mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-27 05:50:26 +00:00
added standalone build.sh for manually building AppImages
This commit is contained in:
parent
24188b3892
commit
be44dcd569
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -12,7 +12,7 @@ defaults:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Build and Test
|
||||
name: Compile and Test
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
@ -75,7 +75,7 @@ jobs:
|
||||
- name: Archive buildkit-${{ matrix.profile }}.tar.gz
|
||||
run: |
|
||||
cp LICENSE.txt target
|
||||
cp dist/${{ matrix.launcher }} target
|
||||
cp dist/buildkit/${{ matrix.launcher }} target
|
||||
cp target/cryptomator-*.jar target/mods
|
||||
- name: Upload buildkit-${{ matrix.profile }}
|
||||
uses: actions/upload-artifact@v2
|
||||
@ -129,8 +129,6 @@ jobs:
|
||||
path: runtime
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Linux AppImage
|
||||
#
|
||||
@ -167,10 +165,10 @@ jobs:
|
||||
working-directory: Cryptomator.AppDir
|
||||
- name: Patch Cryptomator.AppDir
|
||||
run: |
|
||||
cp -r dist/appimage/resources/appimage/AppDir/* Cryptomator.AppDir/
|
||||
cp -r dist/appimage/resources/AppDir/* Cryptomator.AppDir/
|
||||
chmod +x Cryptomator.AppDir/runtime/bin/java
|
||||
export REVISION_NO=`git rev-list --count HEAD`
|
||||
envsubst '${REVISION_NO}' < dist/appimage/resources/appimage/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
|
||||
envsubst '${REVISION_NO}' < dist/appimage/resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
|
||||
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
|
||||
|
53
dist/appimage/build.sh
vendored
Executable file
53
dist/appimage/build.sh
vendored
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASEDIR=$(dirname $0)/../..
|
||||
REVISION_NO=`git rev-list --count HEAD`
|
||||
|
||||
# check preconditions
|
||||
if [ -z "${JAVA_HOME}" ]; then echo "JAVA_HOME not set. Run using JAVA_HOME=/path/to/jdk ./build.sh"; exit 1; fi
|
||||
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; }
|
||||
|
||||
# compile
|
||||
mvn -B -f${BASEDIR}/pom.xml clean package -DskipTests -Plinux
|
||||
|
||||
# prepare AppDir
|
||||
mkdir ${BASEDIR}/target/Cryptomator.AppDir
|
||||
mv ${BASEDIR}/target/libs ${BASEDIR}/target/Cryptomator.AppDir
|
||||
mv ${BASEDIR}/target/mods ${BASEDIR}/target/Cryptomator.AppDir
|
||||
mv ${BASEDIR}/LICENSE.txt ${BASEDIR}/target/Cryptomator.AppDir
|
||||
cd ${BASEDIR}/target/Cryptomator.AppDir
|
||||
|
||||
# add runtime
|
||||
${JAVA_HOME}/bin/jlink
|
||||
--output runtime
|
||||
--module-path "${JAVA_HOME}/jmods"
|
||||
--add-modules java.base,java.desktop,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,jdk.unsupported,jdk.crypto.ec,jdk.accessibility
|
||||
--no-header-files
|
||||
--no-man-pages
|
||||
--strip-debug
|
||||
--compress=1
|
||||
|
||||
# extract jffi
|
||||
JFFI_NATIVE_JAR=`ls libs | grep -e 'jffi-[1-9]\.[0-9]\{1,2\}.[0-9]\{1,2\}-native.jar'`
|
||||
${JAVA_HOME}/bin/jar -xf libs/${JFFI_NATIVE_JAR} /jni/x86_64-Linux/
|
||||
mv jni/x86_64-Linux/* libs/libjffi.so
|
||||
rm -r jni/x86_64-Linux
|
||||
|
||||
# finalize AppDir
|
||||
envsubst '${REVISION_NO}' < ${BASEDIR}/dist/appimage/resources/AppDir/bin/cryptomator.sh > Cryptomator.AppDir/bin/cryptomator.sh
|
||||
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
|
||||
ln -s usr/share/applications/org.cryptomator.Cryptomator.desktop Cryptomator.AppDir/Cryptomator.desktop
|
||||
ln -s bin/cryptomator.sh Cryptomator.AppDir/AppRun
|
||||
|
||||
# load AppImageTool
|
||||
curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -o /tmp/appimagetool.AppImage
|
||||
chmod +x /tmp/appimagetool.AppImage
|
||||
|
||||
# create AppImage
|
||||
/tmp/appimagetool.AppImage \
|
||||
${BASEDIR}/target/Cryptomator.AppDir \
|
||||
cryptomator-SNAPSHOT-x86_64.AppImage \
|
||||
-u 'gh-releases-zsync|cryptomator|cryptomator|latest|cryptomator-*-x86_64.AppImage.zsync'
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
dist/launcher-linux.sh → dist/buildkit/launcher-linux.sh
vendored
Normal file → Executable file
0
dist/launcher-linux.sh → dist/buildkit/launcher-linux.sh
vendored
Normal file → Executable file
0
dist/launcher-mac.sh → dist/buildkit/launcher-mac.sh
vendored
Normal file → Executable file
0
dist/launcher-mac.sh → dist/buildkit/launcher-mac.sh
vendored
Normal file → Executable file
Loading…
Reference in New Issue
Block a user