ITADN
ivan-hc/AM/Issues

First time experience from a developers perspective.

#2322Openjames-lawrence 创建于 2026-05-05
J
james-lawrencecommented
this is post creation of the AppImage and using AM to install it. mostly just cliff notes of stuff i ran into getting an appimage built. note these are not critiques just the things I ran into and wish had been easier to find. # Installation bash script installation always sets off red flags. why not just bundle the script inside an appimage? =) # integration points ## good documentation the [documentation](https://docs.appimage.org) is sadly lacking on important details. I'd love a simple, update to date example of the major bits for appimage, basically: tree MyAppDir ├── myapp.desktop ├── myapp.svg ├── .permissions ├── .... # everything else bundled with the app. if those three files existed in a fully specified form *somewhere* implementing a appimage would be much simpler/straight forward. ## desktop and icon files the rewriting of the desktop file causes issues. ideally just let developers deal with the XDG quirks. AM should just follow the spec for placement. basically for applications, drop the desktop file in ~/.local/share/applications and the icon in ~/.local/share/icons/hicolor/... here is what my current icons tree looks like after AM (slightly) mangled it. ```bash tree ~/.local/share/icons/hicolor/ ├── 128x128 │   └── apps │   ├── steam_icon_1203620.png │   └── steam_icon_2738000.png ├── 16x16 │   └── apps │   ├── steam_icon_1203620.png │   └── steam_icon_2738000.png ├── 24x24 │   └── apps │   └── steam_icon_2738000.png ├── 256x256 │   └── apps │   ├── steam_icon_1203620.png │   └── steam_icon_2738000.png ├── 32x32 │   └── apps │   ├── steam_icon_1203620.png │   └── steam_icon_2738000.png ├── 48x48 │   └── apps │   └── steam_icon_2738000.png ├── 64x64 │   └── apps │   └── steam_icon_1203620.png ├── 96x96 │   └── apps └── scalable └── apps ├── am-gui.png -> /opt/am-gui/icons/am-gui.png ├── appimagelint.png -> /opt/appimagelint/icons/appimagelint.png ├── appimagetool.png -> /opt/appimagetool/icons/appimagetool.png └── retrovibed.svg -> /home/james.lawrence/.local/Applications/retrovibed/icons/retrovibed.svg ``` the main thing is issue is dumping files into scalable that are not scalable: ```bash file /opt/appimagelint/icons/appimagelint /opt/appimagelint/icons/appimagelint: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced file /home/james.lawrence/.local/Applications/retrovibed/icons/retrovibed /home/james.lawrence/.local/Applications/retrovibed/icons/retrovibed: SVG Scalable Vector Graphics image ``` the appimagelint,appimagetools icon should have been dropped into 128x128. am-gui im unsure of given its 512x512 size. regardless I suggest playing with [xdg-icon-resource](https://portland.freedesktop.org/doc/xdg-icon-resource.html) it covers everything basically. the default theme is hicolor which is why things drop them in there. it has a install command you can use to automate this (*cough* one could bundle it with your futrure appimage *cough*). there is also a `xdg-desktop-menu` command for placing the desktop files but i'm less familiar with that one. alright onto details with a specific example this is a basically unmodified desktop file I use for an app. ``` [Desktop Entry] Type=Application Name=Example Comment="derp derp" Exec=/usr/lib/example/bin/foo Icon=example.app StartupWMClass=example.app Categories=Player;Utility;Archiving;AudioVideo; Terminal=false StartupNotify=true ``` notice the Icon and StartWMClass names. they're just the final names from the hicolor theme below: ```bash tree ~/.local/share/icons/hicolor/ └── scalable └── apps └── example.app.svg ``` at this point i think the only AM would need to do here is to rewrite the Exec field to point to the app image location which can be handled with cut: ```bash echo "Exec=~/.local/bin/retrovibed %u %g" | cut -d'=' -f2 | cut -d ' ' -f2- %u %g ``` this form almost works except for when there is only the binary path in the Exec line. ```bash "Exec=${APPIMAGE} $(cat /path/to/app.desktop | grep Exec | cut -d'=' -f2 | cut -d ' ' -f2-)" ``` ### sandboxing how to seamlessly self sandbox apps is missing. I've run across a reference to a .permissions file for SAS/AISAP but i forgot where. but I'd love for my users not to have to manually sandbox the app. I'd also love apps to be sandboxed by default. by .permissions file in the AppDir or by defaulting to something reasonable. getting a good flow here would be wonderful. basically if I install an appimage knowing its safely sandboxed by default is a huge draw and then if an app specifies a .permissions file to access stuff allowing that to be reviewed by the user during install is great. basically instead of `am install --sandbox` and having to specify permissions it should be `am install --unsafe` to install an app without permissions.
7 条评论