mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-28 19:47:26 +00:00
fix(ci): completely hide engine-dist from linuxdeploy because patchelf corrupts static binaries
This commit is contained in:
@@ -68,23 +68,26 @@ jobs:
|
|||||||
- name: Provision locked engines
|
- name: Provision locked engines
|
||||||
if: runner.os != 'macOS'
|
if: runner.os != 'macOS'
|
||||||
run: node scripts/provision-engines.js --target ${{ matrix.target }}
|
run: node scripts/provision-engines.js --target ${{ matrix.target }}
|
||||||
- name: Hide _internal from linuxdeploy (Linux only)
|
- name: Hide all engines from linuxdeploy (Linux only)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
# Patch tauri.conf.json's beforeBuildCommand to delete _internal from engine-dist
|
# Patch tauri.conf.json's beforeBuildCommand to empty engine-dist
|
||||||
# AFTER stage-engines.js verifies it, but BEFORE tauri builds the bundle.
|
# AFTER stage-engines.js verifies it, but BEFORE tauri builds the bundle.
|
||||||
# This hides it from linuxdeploy. We will repack it into the AppImage later.
|
# This hides all static binaries (ffmpeg, aria2c, etc) from linuxdeploy
|
||||||
sed -i 's/npm run build/rm -rf src-tauri\/engine-dist\/${{ matrix.target }}\/_internal \&\& npm run build/' src-tauri/tauri.conf.json
|
# which corrupts them via patchelf. We will repack them into the AppImage later.
|
||||||
|
sed -i 's/npm run build/rm -rf src-tauri\/engine-dist\/* \&\& npm run build/' src-tauri/tauri.conf.json
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: npm run tauri build -- -vv --target ${{ matrix.target }} --bundles ${{ matrix.bundles }}
|
run: npm run tauri build -- -vv --target ${{ matrix.target }} --bundles ${{ matrix.bundles }}
|
||||||
env:
|
env:
|
||||||
APPIMAGE_EXTRACT_AND_RUN: 1
|
APPIMAGE_EXTRACT_AND_RUN: 1
|
||||||
- name: Repack AppImage with _internal (Linux only)
|
- name: Repack AppImage with engines (Linux only)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
APPDIR="src-tauri/target/${{ matrix.target }}/release/bundle/appimage/Firelink.AppDir"
|
APPDIR="src-tauri/target/${{ matrix.target }}/release/bundle/appimage/Firelink.AppDir"
|
||||||
# Copy _internal directly from provisioned-engines into the AppDir
|
# Ensure target directory exists in AppDir
|
||||||
cp -r src-tauri/provisioned-engines/${{ matrix.target }}/_internal "$APPDIR/usr/lib/Firelink/engine-dist/${{ matrix.target }}/_internal"
|
mkdir -p "$APPDIR/usr/lib/Firelink/engine-dist/${{ matrix.target }}"
|
||||||
|
# Copy everything directly from provisioned-engines into the AppDir
|
||||||
|
cp -r src-tauri/provisioned-engines/${{ matrix.target }}/* "$APPDIR/usr/lib/Firelink/engine-dist/${{ matrix.target }}/"
|
||||||
|
|
||||||
# Download appimagetool
|
# Download appimagetool
|
||||||
wget -qO appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
wget -qO appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||||
|
|||||||
Reference in New Issue
Block a user