A template for creating Nim applications that will get converted to an AppImage.
myapp.AppDir
: Here goes all the AppImage data.AppRun
: The file that Nim outputs after compiling..DirIcon
: PNG icon. Should be in one of the standard image sizes, e.g., 128x128 or 256x256 pixels.myapp.desktop
: Destkop file describing the payload application.myapp.svg
: Application’s icon in the best available quality.
src
: Application source.myapp.nim
: Main module.
LICENSE
: Application's license (see https://choosealicense.com).myapp.nimble
: Configuration file to define the dependencies and more of the nimble package.README.md
: Description of the application.
The file allocated at myapp.AppDir/myapp.desktop
requires to define the following entries:
Type
: Application, Link or Directory.Name
: Application's name.Categories
: A list of categories for your application separated by a semi-colon.
(List of the valid categories)Icon
: Application's icon filename, without the extension.Èxec
: A command line consisting on an executable program.
Optional entries:
X-AppImage-Name
: Application's name. Used to relate two AppImages of the same application but different versions.X-AppImage-Version
: Application's version (e.g.,1.0.0-beta-2
or2019.1.1
).X-AppImage-Arch
: Application's architecture (e.g.,x86_64
ori386
).
By default myapp.desktop
file looks like:
[Desktop Entry]
Type=Application
Name=My App
Categories=Utility;
Icon=myapp
Exec=AppRun
X-AppImage-Version=0.1.0
X-AppImage-Arch=x86_64
To generate the actual AppImage we will use appimagetool. So you may want to download it.
But before generating it we must compile our application as following:
nim c --outdir:myapp.AppDir --out:myapp.AppDir/AppRun src/myapp.nim # Or cpp
Now we just need to use appimagetool to generate the AppImage.
appimagetool myapp.AppDir/
This will output a new AppImage with the name of My_App-x86_64.AppImage
.
- AppImage website.
- AppImage docs.
- AppImage packaging guide.
- Discord: Patitotective#0127.
- Email: cristobalriaga@gmail.com.
- Twitter: @patitotective.