diff --git a/electron/build/linux-libs/aarch64/libXss.so.1 b/electron/build/linux-libs/aarch64/libXss.so.1 new file mode 100644 index 0000000..5457619 Binary files /dev/null and b/electron/build/linux-libs/aarch64/libXss.so.1 differ diff --git a/electron/build/linux-libs/aarch64/libXtst.so.6 b/electron/build/linux-libs/aarch64/libXtst.so.6 new file mode 100644 index 0000000..594f888 Binary files /dev/null and b/electron/build/linux-libs/aarch64/libXtst.so.6 differ diff --git a/electron/build/linux-libs/aarch64/libappindicator.so.1 b/electron/build/linux-libs/aarch64/libappindicator.so.1 new file mode 100644 index 0000000..acc2e60 Binary files /dev/null and b/electron/build/linux-libs/aarch64/libappindicator.so.1 differ diff --git a/electron/build/linux-libs/aarch64/libgconf-2.so.4 b/electron/build/linux-libs/aarch64/libgconf-2.so.4 new file mode 100644 index 0000000..9f35e59 Binary files /dev/null and b/electron/build/linux-libs/aarch64/libgconf-2.so.4 differ diff --git a/electron/build/linux-libs/aarch64/libindicator.so.7 b/electron/build/linux-libs/aarch64/libindicator.so.7 new file mode 100644 index 0000000..21c1a97 Binary files /dev/null and b/electron/build/linux-libs/aarch64/libindicator.so.7 differ diff --git a/electron/build/linux-libs/aarch64/libnotify.so.4 b/electron/build/linux-libs/aarch64/libnotify.so.4 new file mode 100644 index 0000000..aa888ce Binary files /dev/null and b/electron/build/linux-libs/aarch64/libnotify.so.4 differ diff --git a/electron/build/linux-libs/libXss.so.1 b/electron/build/linux-libs/x86_64/libXss.so.1 similarity index 100% rename from electron/build/linux-libs/libXss.so.1 rename to electron/build/linux-libs/x86_64/libXss.so.1 diff --git a/electron/build/linux-libs/libXtst.so.6 b/electron/build/linux-libs/x86_64/libXtst.so.6 similarity index 100% rename from electron/build/linux-libs/libXtst.so.6 rename to electron/build/linux-libs/x86_64/libXtst.so.6 diff --git a/electron/build/linux-libs/libappindicator.so.1 b/electron/build/linux-libs/x86_64/libappindicator.so.1 similarity index 100% rename from electron/build/linux-libs/libappindicator.so.1 rename to electron/build/linux-libs/x86_64/libappindicator.so.1 diff --git a/electron/build/linux-libs/libgconf-2.so.4 b/electron/build/linux-libs/x86_64/libgconf-2.so.4 similarity index 100% rename from electron/build/linux-libs/libgconf-2.so.4 rename to electron/build/linux-libs/x86_64/libgconf-2.so.4 diff --git a/electron/build/linux-libs/libindicator.so.7 b/electron/build/linux-libs/x86_64/libindicator.so.7 similarity index 100% rename from electron/build/linux-libs/libindicator.so.7 rename to electron/build/linux-libs/x86_64/libindicator.so.7 diff --git a/electron/build/linux-libs/libnotify.so.4 b/electron/build/linux-libs/x86_64/libnotify.so.4 similarity index 100% rename from electron/build/linux-libs/libnotify.so.4 rename to electron/build/linux-libs/x86_64/libnotify.so.4 diff --git a/electron/pack.js b/electron/pack.js index 7bfc86d..77bc6db 100644 --- a/electron/pack.js +++ b/electron/pack.js @@ -123,13 +123,18 @@ require('electron-packager')({ async function downloadAppImageTool(appImageBase) { const localArch = process.arch === 'x64' ? 'x86_64' : 'aarch64'; - const res = await axios.get(`https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${localArch}.AppImage`); + const url = `https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${localArch}.AppImage`; + const res = await axios.get(url, { responseType: 'arraybuffer' }); const appImagePath = path.join(appImageBase, 'appimagetool.AppImage'); + console.log('Downloading', url, appImageBase, typeof res.data); + + + fs.writeFileSync(appImagePath, res.data); fs.chmodSync(appImagePath, 0o755); - const result = child_process.spawnSync(appImagePath, ['--appimage-extract'], {cwd: appImageBase, env: { ...process.env }}); + const result = child_process.spawnSync(appImagePath, ['--appimage-extract'], {cwd: appImageBase}); if (result.status !== 0) { console.log('Run failed', 'APPIMAGE EXTRACT', {status: result.status, call: result.error?.syscall, args: result.error?.spawnargs, path: result.error?.path, code: result.error?.code, stdout: String(result.stdout), stderr: String(result.stderr) }); @@ -151,7 +156,7 @@ require('electron-packager')({ fs.renameSync(path.join(appPath, 'F-Chat'), path.join(appPath, 'AppRun')); fs.copyFileSync(path.join(buildPath, 'icon.png'), path.join(appPath, 'icon.png')); - const libDir = path.join(appPath, 'usr', 'lib'), libSource = path.join(buildPath, 'linux-libs'); + const libDir = path.join(appPath, 'usr', 'lib'), libSource = path.join(buildPath, 'linux-libs', appArchLong); fs.mkdirSync(libDir, {recursive: true}); @@ -174,7 +179,7 @@ require('electron-packager')({ args.push('--sign-args', `--no-tty --pinentry-mode loopback --yes --passphrase=${process.argv[3]}`); } - const appRunResult = child_process.spawnSync(path.join(distFinal, 'squashfs-root', 'AppRun'), args, {cwd: distFinal, env: {ARCH: appArchLong }}); + const appRunResult = child_process.spawnSync(path.join(appImageBase, 'squashfs-root', 'AppRun'), args, {cwd: appImageBase, env: {ARCH: appArchLong }}); if (appRunResult.status !== 0) { console.log('Run failed', 'APPRUN', appArch, {status: appRunResult.status, call: appRunResult.error?.syscall, args: appRunResult.error?.spawnargs, path: appRunResult.error?.path, code: appRunResult.error?.code, stdout: String(appRunResult.stdout), stderr: String(appRunResult.stderr) });