Bladeren bron

adjust appimage build to use "common" resources

Sebastian Stenzel 3 jaren geleden
bovenliggende
commit
d38c19cffc

+ 7 - 0
.github/workflows/release.yml

@@ -282,6 +282,13 @@ jobs:
           mv appdir/Cryptomator Cryptomator.AppDir
           cp -r dist/linux/appimage/resources/AppDir/* Cryptomator.AppDir/
           envsubst '${REVISION_NO} ${SEMVER_STR}' < dist/linux/appimage/resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
+          envsubst '${SEMVER_STR}' < dist/linux/common/org.cryptomator.Cryptomator.desktop > Cryptomator.AppDir/usr/share/applications/org.cryptomator.Cryptomator.desktop
+          cp dist/linux/common/org.cryptomator.Cryptomator256.png Cryptomator.AppDir/usr/share/icons/hicolor/256x256/apps/org.cryptomator.Cryptomator.png
+          cp dist/linux/common/org.cryptomator.Cryptomator512.png Cryptomator.AppDir/usr/share/icons/hicolor/512x512/apps/org.cryptomator.Cryptomator.png
+          cp dist/linux/common/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg
+          cp dist/linux/common/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/usr/share/applications/org.cryptomator.Cryptomator.desktop
+          cp dist/linux/common/org.cryptomator.Cryptomator.appdata.xml Cryptomator.AppDir/usr/share/metainfo/org.cryptomator.Cryptomator.appdata.xml
+          cp dist/linux/common/cryptomator-vault.xml Cryptomator.AppDir/usr/share/mime/packages/cryptomator-vault.xml
           ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/org.cryptomator.Cryptomator.svg
           ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/Cryptomator.svg
           ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/.DirIcon

+ 8 - 0
dist/linux/appimage/build.sh

@@ -9,6 +9,7 @@ command -v mvn >/dev/null 2>&1 || { echo >&2 "mvn not found."; exit 1; }
 command -v curl >/dev/null 2>&1 || { echo >&2 "curl not found."; exit 1; }
 
 VERSION=$(mvn -f ../../../pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)
+SEMVER_STR=${VERSION}
 
 # compile
 mvn -B -f ../../../pom.xml clean package -DskipTests -Plinux
@@ -54,6 +55,13 @@ mv Cryptomator Cryptomator.AppDir
 cp -r resources/AppDir/* Cryptomator.AppDir/
 chmod +x Cryptomator.AppDir/lib/runtime/bin/java
 envsubst '${REVISION_NO}' < resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
+envsubst '${SEMVER_STR}' < ../common/org.cryptomator.Cryptomator.desktop > Cryptomator.AppDir/usr/share/applications/org.cryptomator.Cryptomator.desktop
+cp ../common/org.cryptomator.Cryptomator256.png Cryptomator.AppDir/usr/share/icons/hicolor/256x256/apps/org.cryptomator.Cryptomator.png
+cp ../common/org.cryptomator.Cryptomator512.png Cryptomator.AppDir/usr/share/icons/hicolor/512x512/apps/org.cryptomator.Cryptomator.png
+cp ../common/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg
+cp ../common/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/usr/share/applications/org.cryptomator.Cryptomator.desktop
+cp ../common/org.cryptomator.Cryptomator.appdata.xml Cryptomator.AppDir/usr/share/metainfo/org.cryptomator.Cryptomator.appdata.xml
+cp ../common/cryptomator-vault.xml Cryptomator.AppDir/usr/share/mime/packages/cryptomator-vault.xml
 ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/org.cryptomator.Cryptomator.svg
 ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/Cryptomator.svg
 ln -s usr/share/icons/hicolor/scalable/apps/org.cryptomator.Cryptomator.svg Cryptomator.AppDir/.DirIcon

+ 0 - 0
dist/linux/appimage/resources/AppDir/usr/share/applications/.gitkeep


+ 0 - 0
dist/linux/appimage/resources/AppDir/usr/share/icons/hicolor/256x256/apps/.gitkeep


+ 0 - 0
dist/linux/appimage/resources/AppDir/usr/share/icons/hicolor/512x512/apps/.gitkeep


+ 0 - 0
dist/linux/appimage/resources/AppDir/usr/share/icons/hicolor/scalable/apps/.gitkeep


+ 0 - 0
dist/linux/appimage/resources/AppDir/usr/share/metainfo/.gitkeep


+ 1 - 1
dist/linux/common/org.cryptomator.Cryptomator.desktop

@@ -1,6 +1,6 @@
 [Desktop Entry]
 Name=Cryptomator
-Version=${VERSION_STR}
+Version=${SEMVER_STR}
 Comment=Cloud Storage Encryption Utility
 Exec=cryptomator %F
 Icon=org.cryptomator.Cryptomator