forked from mirrors/principia
Switch to using LZMA for AppImage
Appimagelauncher doesn't support Zstd
This commit is contained in:
parent
a491682bf7
commit
d9ba537b7d
1 changed files with 12 additions and 9 deletions
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
# Download appimagetool
|
||||
if [ ! -f appimagetool ]; then
|
||||
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
|
||||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
|
||||
# Newer appimagetool uses Zstd compression which appimagelauncher doesn't support. :/
|
||||
#wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
|
||||
chmod +x appimagetool
|
||||
fi
|
||||
|
||||
|
|
@ -16,15 +18,15 @@ fi
|
|||
rm -rf AppDir
|
||||
|
||||
# Compile and install into AppDir
|
||||
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=AppDir/
|
||||
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=AppDir/usr/
|
||||
ninja
|
||||
ninja install
|
||||
|
||||
cd AppDir
|
||||
|
||||
# Put desktop and icon at root
|
||||
ln -s share/applications/principia.desktop principia.desktop
|
||||
ln -s share/icons/hicolor/128x128/apps/principia.png principia.png
|
||||
cp usr/share/applications/principia.desktop principia.desktop
|
||||
cp usr/share/icons/hicolor/128x128/apps/principia.png principia.png
|
||||
ln -s principia.png .DirIcon
|
||||
|
||||
cat > AppRun <<\APPRUN
|
||||
|
|
@ -54,8 +56,8 @@ xdg-mime default principia-url-handler.desktop x-scheme-handler/principia
|
|||
# Now launch it...
|
||||
|
||||
APP_PATH="$(dirname "$(readlink -f "${0}")")"
|
||||
export LD_LIBRARY_PATH="${APP_PATH}"/lib/:"${LD_LIBRARY_PATH}"
|
||||
exec "${APP_PATH}/bin/principia" "$@"
|
||||
export LD_LIBRARY_PATH="${APP_PATH}"/usr/lib/:"${LD_LIBRARY_PATH}"
|
||||
exec "${APP_PATH}/usr/bin/principia" "$@"
|
||||
APPRUN
|
||||
chmod +x AppRun
|
||||
|
||||
|
|
@ -71,11 +73,12 @@ INCLUDE_LIBS=(
|
|||
libXss.so.1
|
||||
)
|
||||
|
||||
mkdir -p lib/
|
||||
mkdir -p usr/lib/
|
||||
for i in "${INCLUDE_LIBS[@]}"; do
|
||||
cp /usr/lib/x86_64-linux-gnu/$i lib/
|
||||
cp /usr/lib/x86_64-linux-gnu/$i usr/lib/
|
||||
done
|
||||
|
||||
# Actually build the appimage
|
||||
cd ..
|
||||
ARCH=x86_64 ./appimagetool --appimage-extract-and-run AppDir/
|
||||
# LZMA compression since appimagelauncher doesn't support Zstd
|
||||
ARCH=x86_64 ./appimagetool --appimage-extract-and-run --comp xz AppDir/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue