diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 876053c95..c939b343d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,48 +87,6 @@ jobs: target/LICENSE.txt target/${{ matrix.launcher }} if-no-files-found: error - -# -# jlink -# - - jlink: - name: Create runtime-${{ matrix.profile }} - needs: test - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - include: - - os: ubuntu-latest - profile: linux - - os: windows-latest - profile: win - - os: macOS-latest - profile: mac - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: ${{ env.JAVA_VERSION }} - - name: Create Runtime Image - run: > - ${JAVA_HOME}/bin/jlink - --verbose - --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 - - name: Upload runtime-${{ matrix.profile }} - uses: actions/upload-artifact@v2 - with: - name: runtime-${{ matrix.profile }} - path: runtime - if-no-files-found: error - # # Release Metadata # @@ -155,7 +113,105 @@ jobs: echo "::set-output name=versionNum::99.0.0" fi echo "::set-output name=revNum::`git rev-list --count HEAD`" - + +# +# Application Directory +# + + appdir: + name: Create appdir-${{ matrix.profile }} + needs: [buildkit, metadata] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + include: + - os: ubuntu-latest + profile: linux + jpackageoptions: > + --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Dcryptomator.logDir=\"~/.local/share/Cryptomator/logs\"" + --java-options "-Dcryptomator.settingsPath=\"~/.config/Cryptomator/settings.json:~/.Cryptomator/settings.json\"" + --java-options "-Dcryptomator.ipcSocketPath=\"~/.config/Cryptomator/ipc.socket\"" + --java-options "-Dcryptomator.mountPointsDir=\"~/.local/share/Cryptomator/mnt\"" + --java-options "-Dcryptomator.showTrayIcon=false" + --java-options "-Dcryptomator.buildNumber=\"appimage-${{ needs.metadata.outputs.revNum }}\"" + --resource-dir dist/appdir/linux/resources + - os: windows-latest + profile: win + jpackageoptions: > + --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Dcryptomator.logDir=\"~/AppData/Roaming/Cryptomator\"" + --java-options "-Dcryptomator.settingsPath=\"~/AppData/Roaming/Cryptomator/settings.json\"" + --java-options "-Dcryptomator.ipcSocketPath=\"~/AppData/Roaming/Cryptomator/ipc.socket\"" + --java-options "-Dcryptomator.keychainPath=\"~/AppData/Roaming/Cryptomator/keychain.json\"" + --java-options "-Dcryptomator.mountPointsDir=\"~/Cryptomator\"" + --java-options "-Dcryptomator.showTrayIcon=true" + --java-options "-Dcryptomator.buildNumber=\"msi-${{ needs.metadata.outputs.revNum }}\"" + --resource-dir dist/appdir/win/resources + --icon dist/appdir/win/resources/Cryptomator.ico + - os: macOS-latest + profile: mac + jpackageoptions: > + --java-options "-Dfile.encoding=\"utf-8\"" + --java-options "-Dcryptomator.logDir=\"~/Library/Logs/Cryptomator\"" + --java-options "-Dcryptomator.settingsPath=\"~/Library/Application Support/Cryptomator/settings.json\"" + --java-options "-Dcryptomator.ipcSocketPath=\"~/Library/Application Support/Cryptomator/ipc.socket\"" + --java-options "-Dcryptomator.showTrayIcon=true" + --java-options "-Dcryptomator.buildNumber=\"dmg-${{ needs.metadata.outputs.revNum }}\"" + --mac-package-identifier org.cryptomator + --resource-dir dist/appdir/mac/resources + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{ env.JAVA_VERSION }} + - name: Download buildkit-${{ matrix.profile }} + uses: actions/download-artifact@v2 + with: + name: buildkit-${{ matrix.profile }} + path: buildkit + - name: Create Runtime Image + run: > + ${JAVA_HOME}/bin/jlink + --verbose + --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 + - name: Create App Directory + run: > + ${JAVA_HOME}/bin/jpackage + --verbose + --type app-image + --runtime-image runtime + --input buildkit/libs + --module-path buildkit/mods + --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator + --dest appdir + --name Cryptomator + --vendor "Skymatic GmbH" + --copyright "(C) 2016 - 2021 Skymatic GmbH" + --app-version "${{ needs.metadata.outputs.versionNum }}.${{ needs.metadata.outputs.revNum }}" + --java-options "-Xss5m" + --java-options "-Xmx256m" + ${{ matrix.jpackageoptions }} + - name: Add Contrib Files + run: | + if [ -e dist/appdir/${{ matrix.profile }}/contrib/ ]; then + cp dist/appdir/${{ matrix.profile }}/contrib/* appdir/ + fi + - name: Upload appdir-${{ matrix.profile }} + uses: actions/upload-artifact@v2 + with: + name: appdir-${{ matrix.profile }} + path: appdir + if-no-files-found: error + + # # Linux AppImage # @@ -163,19 +219,14 @@ jobs: linux-appimage: name: Build AppImage runs-on: ubuntu-latest - needs: [buildkit, jlink, metadata] + needs: [appdir] steps: - uses: actions/checkout@v2 - name: Download buildkit-linux uses: actions/download-artifact@v2 with: - name: buildkit-linux + name: appdir-linux path: Cryptomator.AppDir - - name: Download runtime-linux - uses: actions/download-artifact@v2 - with: - name: runtime-linux - path: Cryptomator.AppDir/runtime - name: Extract libjffi.so # workaround for https://github.com/cryptomator/cryptomator-linux/issues/27 run: | JFFI_NATIVE_JAR=`ls libs/ | grep -e 'jffi-[1-9]\.[0-9]\{1,2\}.[0-9]\{1,2\}-native.jar'` @@ -226,64 +277,6 @@ jobs: cryptomator-${{ needs.metadata.outputs.versionStr }}-x86_64.AppImage.zsync.asc if-no-files-found: error -# -# Windows App Dir -# - - windows-appdir: - name: Build Windows App Directory - runs-on: windows-latest - needs: [buildkit, jlink, metadata] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: ${{ env.JAVA_VERSION }} - - name: Download buildkit-win - uses: actions/download-artifact@v2 - with: - name: buildkit-win - path: buildkit - - name: Download runtime-win - uses: actions/download-artifact@v2 - with: - name: runtime-win - path: runtime - - name: Create app directory - run: > - ${JAVA_HOME}/bin/jpackage - --verbose - --type app-image - --runtime-image runtime - --input buildkit/libs - --module-path buildkit/mods - --dest app - --name Cryptomator - --vendor "Skymatic GmbH" - --copyright "(C) 2016 - 2021 Skymatic GmbH" - --app-version "${{ needs.metadata.outputs.versionNum }}.${{ needs.metadata.outputs.revNum }}" - --icon dist/msi/resources/app/Cryptomator.ico - --java-options "-Dfile.encoding=\"utf-8\"" - --java-options "-Dcryptomator.logDir=\"~/AppData/Roaming/Cryptomator\"" - --java-options "-Dcryptomator.settingsPath=\"~/AppData/Roaming/Cryptomator/settings.json\"" - --java-options "-Dcryptomator.ipcPortPath=\"~/AppData/Roaming/Cryptomator/ipcPort.bin\"" - --java-options "-Dcryptomator.keychainPath=\"~/AppData/Roaming/Cryptomator/keychain.json\"" - --java-options "-Dcryptomator.mountPointsDir=\"~/Cryptomator\"" - --java-options "-Dcryptomator.showTrayIcon=true" - --java-options "-Dcryptomator.buildNumber=\"msi-${{ needs.metadata.outputs.revNum }}\"" - --java-options "-Xss2m" - --java-options "-Xmx256m" - --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator - - name: Patch app directory - run: | - cp dist/msi/resources/app/dlls/* app/Cryptomator/ - - name: Upload app directory - uses: actions/upload-artifact@v2 - with: - name: win-appdir - path: app/Cryptomator - if-no-files-found: error - # release: # name: Draft a Release on GitHub Releases # runs-on: ubuntu-latest diff --git a/dist/appdir/linux/resources/.gitkeep b/dist/appdir/linux/resources/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/appdir/mac/resources/Cryptomator-Vault.icns b/dist/appdir/mac/resources/Cryptomator-Vault.icns new file mode 100644 index 000000000..4bcd4c9ba Binary files /dev/null and b/dist/appdir/mac/resources/Cryptomator-Vault.icns differ diff --git a/dist/appdir/mac/resources/Cryptomator.entitlements b/dist/appdir/mac/resources/Cryptomator.entitlements new file mode 100644 index 000000000..00f46d649 --- /dev/null +++ b/dist/appdir/mac/resources/Cryptomator.entitlements @@ -0,0 +1,16 @@ + + + + + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-executable-page-protection + + com.apple.security.cs.disable-library-validation + + + diff --git a/dist/appdir/mac/resources/Cryptomator.icns b/dist/appdir/mac/resources/Cryptomator.icns new file mode 100644 index 000000000..25da5b5be Binary files /dev/null and b/dist/appdir/mac/resources/Cryptomator.icns differ diff --git a/dist/appdir/mac/resources/Info.plist b/dist/appdir/mac/resources/Info.plist new file mode 100644 index 000000000..b6103319a --- /dev/null +++ b/dist/appdir/mac/resources/Info.plist @@ -0,0 +1,120 @@ + + + + + LSMinimumSystemVersion + 10.13.0 + CFBundleDevelopmentRegion + English + CFBundleAllowMixedLocalizations + + CFBundleExecutable + Cryptomator + CFBundleIconFile + Cryptomator.icns + CFBundleIdentifier + org.cryptomator + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Cryptomator + CFBundlePackageType + APPL + CFBundleShortVersionString + ###BUNDLE_SHORT_VERSION_STRING### + CFBundleSignature + ???? + LSApplicationCategoryType + public.app-category.utilities + CFBundleVersion + ###BUNDLE_VERSION### + NSHumanReadableCopyright + cryptomator.org + NSHighResolutionCapable + true + NSUbiquitousContainers + + iCloud.com.setolabs.Cryptomator + + NSUbiquitousContainerIsDocumentScopePublic + + NSUbiquitousContainerName + Cryptomator + NSUbiquitousContainerSupportedFolderLevels + Any + + + + CFBundleDocumentTypes + + + LSItemContentTypes + + org.cryptomator.vault-metadata + + CFBundleTypeIconFile + Cryptomator-Vault.icns + CFBundleTypeName + Cryptomator Vault Metadata + LSHandlerRank + Owner + CFBundleTypeRole + Editor + + + UTExportedTypeDeclarations + + + UTTypeIdentifier + org.cryptomator.vault-metadata + UTTypeConformsTo + + public.utf8-plain-text + public.json + + UTTypeDescription + Cryptomator Vault Metadata + UTTypeIconFile + Cryptomator-Vault.icns + UTTypeTagSpecification + + public.filename-extension + + cryptomator + + public.mime-type + + application/x-vnd.cryptomator.vault-metadata + + + + + UTTypeIdentifier + org.cryptomator.encrypted-data + UTTypeConformsTo + + public.data + + UTTypeDescription + Cryptomator Encrypted Data + UTTypeIconFile + Cryptomator-Vault.icns + UTTypeTagSpecification + + public.filename-extension + + c9r + c9s + + public.mime-type + + application/vnd.cryptomator.encrypted + + + + + + NSSupportsAutomaticGraphicsSwitching + + + diff --git a/dist/msi/resources/app/dlls/dokan1.dll b/dist/appdir/win/contrib/dokan1.dll similarity index 100% rename from dist/msi/resources/app/dlls/dokan1.dll rename to dist/appdir/win/contrib/dokan1.dll diff --git a/dist/msi/resources/app/dlls/jnidispatch.dll b/dist/appdir/win/contrib/jnidispatch.dll similarity index 100% rename from dist/msi/resources/app/dlls/jnidispatch.dll rename to dist/appdir/win/contrib/jnidispatch.dll diff --git a/dist/msi/resources/app/Cryptomator.ico b/dist/appdir/win/resources/Cryptomator.ico similarity index 100% rename from dist/msi/resources/app/Cryptomator.ico rename to dist/appdir/win/resources/Cryptomator.ico