mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Bundle JRE for AppImage
This commit is contained in:
2 files changed
+36
-3
No files matched your search
@@ -207,6 +207,8 @@ jobs:
|
||||
- name: Run Electron Builder
|
||||
shell: bash
|
||||
run: |
|
||||
set -eo pipefail
|
||||
|
||||
mkdir -p gui/electron/dist/artifacts/linux/ \
|
||||
gui/electron/dist/artifacts/win \
|
||||
gui/electron/dist/artifacts/mac
|
||||
@@ -215,11 +217,40 @@ jobs:
|
||||
VERSION="${VERSION#v}"
|
||||
echo "Building version: $VERSION"
|
||||
pnpm i
|
||||
cd gui/electron
|
||||
pnpm exec electron-builder --${{ matrix.platform }} \
|
||||
cd "${{ github.workspace }}/gui/electron"
|
||||
|
||||
# If Linux, build rpm and deb before AppImage (to exclude jre)
|
||||
pnpm exec electron-builder --${{ matrix.platform }} \
|
||||
${{ matrix.platform == 'macos' && '--universal' || '' }} \
|
||||
--config.extraMetadata.version="$VERSION" \
|
||||
${{ matrix.platform == 'linux' && 'rpm deb' || ''}} \
|
||||
--config.extraMetadata.version="$VERSION" \
|
||||
--publish never
|
||||
|
||||
# Grab JRE for AppImage and build AppImage
|
||||
if [[ "${{ matrix.platform }}" == linux ]]; then
|
||||
pushd resources
|
||||
|
||||
# Fetch JRE from Adoptium
|
||||
JRE_ARCHITECTURE="${{ endsWith(matrix.os, '-arm') && 'aarch64' || 'x64' }}"
|
||||
LATEST_JRE_INFO="$(curl -f "https://api.adoptium.net/v3/assets/latest/25/hotspot?architecture=$JRE_ARCHITECTURE&image_type=jre&os=linux&vendor=eclipse")"
|
||||
|
||||
JRE_VERSION="$(echo $LATEST_JRE_INFO | jq -r '.[0].release_name')"
|
||||
JRE_ARCHIVE_URL="$(echo $LATEST_JRE_INFO | jq -r '.[0].binary.package.link')"
|
||||
JRE_ARCHIVE_NAME="$(echo $LATEST_JRE_INFO | jq -r '.[0].binary.package.name')"
|
||||
JRE_ARCHIVE_CHECKSUM="$(echo $LATEST_JRE_INFO | jq -r '.[0].binary.package.checksum')"
|
||||
echo "Downloading Adoptium Eclipse JRE version $JRE_VERSION ($JRE_ARCHIVE_URL)"
|
||||
|
||||
curl -Lf "$JRE_ARCHIVE_URL" -O
|
||||
[[ ! -f "$JRE_ARCHIVE_NAME" ]] && exit 1
|
||||
|
||||
tar -xzf "$JRE_ARCHIVE_NAME"
|
||||
mv "${JRE_VERSION}-jre" jre
|
||||
|
||||
popd
|
||||
|
||||
# Now run AppImage build
|
||||
pnpm exec electron-builder --${{ matrix.platform }} appimage --config.extraMetadata.version="$VERSION" --publish never
|
||||
fi
|
||||
- name: Collect and Rename Artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -53,6 +53,8 @@ linux:
|
||||
to: "."
|
||||
- from: "./resources/firewall"
|
||||
to: "firewall"
|
||||
- from: "./resources/jre"
|
||||
to: "jre"
|
||||
icon: "./resources/icons"
|
||||
|
||||
deb:
|
||||
|
||||
Reference in new issue
Block a user