- Shell 100%
|
Beethoven
f8e176dc14
(scripts/aarch64_aimg_release.sh) aarch64 build script
top 10 cursed commit messages |
||
|---|---|---|
| scripts | (scripts/aarch64_aimg_release.sh) aarch64 build script | |
| src | (src/mkappimage) delete TODO entry | |
| .gitignore | (.gitignore) ignore build output | |
| .shellcheckrc | (.shellcheckrc) ignore SC2015 | |
| LICENSE | (LICENSE) Relicense to GPLv3 before public release | |
| README.md | (README.md) big update | |
mkappimage - AppImage development made slightly easier
What is this?
mkappimage is a simple script to set up a template for manual packaging of AppImages.
It doesn't package things for you, but it will set up an AppDir for you.
Dependencies
Most of these come free with your f'in xbox
Installation
- Copy
AppDir/to somewhere on your system. - Somewhere in your environment (for example,
/etc/profileor~/.bashrc,) setMKAPPIMAGE_TEMPLATE_DIRto the new location ofAppDir. - Do
sudo install -Dm755 ./mkappimage /binto copy the script to your /bin folder. You can also install this to somewhere else in your$PATH. - To uninstall, simply remove
AppDir/, and removemkappimageandappimagetoolfrom the folder you installed them to.
For the AppImage release, simply rename mkappimage.aimg to mkappimage, then move it to somwhere in your $PATH, or do sudo install -Dm755 mkappimage.aimg /usr/bin/mkappimage.
To uninstall, sudo rm /usr/bin/mkappimage.
Usage
CLI
Invoke with the following parameters:
-n/--name <name>: The name of your AppImage. This sets the invoked program from the AppRun script, the name of the .desktop shortcut, and the name of the icon. Mandatory.-d/--description <description>: A description of the program's functionality. This only changes the Comment field in the .desktop shortcut. Optional, and does nothing if avoided.-c/--categories <categories>: A semicolon-delimited list of categories the application belongs to. Optional, and populates with "System" if avoided.-i/--image <URL>: A link to an image to download, for use when the application renders a favicon. Optional, and will populate with a generic Steam icon instead if avoided.-r/--release <URL>: A link to a release download. When populated, the script will download the release file and place it in<Name>/release. Optional, and does nothing if avoided.-s/--source <URL>: A link to a git repository page. When populated, the script will clone the specified repository into<Name>/srcOptional, and does nothing if avoided.-v/--verbose: Display extra information at runtime. Optional, and does nothing if avoided.
A template directory will appear in the folder you invoked the script in, which contains the minimum requirements for manual packaging.
GUI
A GUI will appear with the following fields:
- Name: The name of your AppImage. This sets the invoked program from the AppRun script, the name of the .desktop shortcut, and the name of the icon. Mandatory.
- Description: A description of the program's functionality. This only changes the Comment field in the .desktop shortcut. Optional, and does nothing if avoided.
- Categories: A semicolon-delimited list of categories the application belongs to. Optional, and populates with "System" if avoided.
- Image: A link to an image to download, for use when the application renders a favicon. Optional, and will populate with a generic Steam icon instead if avoided.
- Release: A link to a release download. When populated, the script will download the release file and place it in
<Name>/release. Optional, and does nothing if avoided. - Source: A link to a git repository page. When populated, the script will clone the specified repository into
<Name>/srcOptional, and does nothing if avoided.
Once you fill out these fields, a template directory will appear in the folder you invoked the script in, which contains the minimum requirements for manual packaging.
If you have a src/ folder, follow all build instructions in the project's README file to build the software from source. You may need to follow installation instructions pretty loosely to make source-built software work on your target platform.
If you have a release/ folder, you should only need to copy the main executable to <Name>/usr/bin to make the AppImage functional.
To make the output actually portable, do mkappimage --download-libs <executable> from the template directory.
This will source all of the libraries your system says it uses to run that executable, and copy them to <Name>/usr/lib.
You may still need to manually track down some remaining libraries your target platform needs to run the executable.
To do this, you can use either ldd, objdump -p, or readelf -d <Name>/usr/bin/$executable |grep NEEDED on it to determine what libraries are needed. If all else fails, the executable will error if it needs a given library, and you can do the rest from there.
Once you're done setting the AppDir correctly, cd just above it, then do ARCH=<target platform's architecture> appimagetool <template folder> <appimage name>, and if you have no errors, you should get an AppImage out of it!
Don't forget to check the .desktop file with desktop-file-validate before building the AppImage to make sure that it'll actually build.
Voila! You should now have an AppImage of your favorite software.