When there is no Crux ports, and the application is complex to build I like to use AppImages. To make the the use of them easier I make these two things:
- download all of them to selected place (in my case '${HOME}/bin/AppImage')
- creates a launcher script in my home bin directory.
The scripts are all based on the following template:
#!/bin/bash
name={THE_NAME_OF_THE_APP_HERE}
appPath=${HOME}/bin/AppImage
cd $appPath
binary=$(ls -r1t ${name}*|tail -1)
./$binary
The only thing I need to adjust in there is the name of the application, as it is used i the image filename. The scripts scans the content of the selected folder for all of files containing the define string/name. From them selects the latest (combination of ls and tail) and start is.
To avoid defining the name inside of the I could use the filename of the script as the pattern 'name=$(basenmae ${0})'. However, the name has to the launcher would need to match exactly the name in app image including capitalization.
Final step is to crate the the desktop entry. That's an example for the Inkscape (the file is located in '${HOME}/.local/share/applications/appimage-inkscape.desktop'). I add the appimage prefix to a filename to easily find my appimage applications among other entries.
[Desktop Entry] Name=Inkscape GenericName=Inkscape Exec=inkscape Icon=/home/USER/.local/share/icons/inkscape.png Comment=Application for drawing Type=Application Categories=Graphics; Hidden=false NoDisplay=false Terminal=false StartupNotify=false StartupWMClass=Inkscape DBusActivatable=false
No comments:
Post a Comment