feat: 添加 host-spawn 下载步骤并更新应用启动命令

This commit is contained in:
Elysia
2026-01-31 21:27:31 +08:00
parent 2f7af3ca8f
commit 850b8dcd1f
2 changed files with 11 additions and 3 deletions

View File

@@ -74,6 +74,15 @@ jobs:
run: | run: |
npm install npm install
- name: Download host-spawn
shell: bash
run: |
if [ "${{ matrix.architecture }}" == "x64" ]; then
curl -fsSL -o ./extras/host-spawn https://github.com/1player/host-spawn/releases/latest/download/host-spawn-x86_64
elif [ "${{ matrix.architecture }}" == "arm64" ]; then
curl -fsSL -o ./extras/host-spawn https://github.com/1player/host-spawn/releases/latest/download/host-spawn-aarch64
fi
- name: Build Release Files - name: Build Release Files
shell: bash shell: bash
run: | run: |

View File

@@ -5,7 +5,6 @@ import { promisify } from 'node:util';
import pino from 'pino'; import pino from 'pino';
import { InstalledAppInfo } from '../../typedefinition'; import { InstalledAppInfo } from '../../typedefinition';
import { lookup } from 'node:dns';
const logger = pino({ 'name': 'install-manager' }); const logger = pino({ 'name': 'install-manager' });
@@ -408,8 +407,8 @@ ipcMain.handle('launch-app', async (_event, pkgname: string) => {
logger.warn('No pkgname provided for launch-app'); logger.warn('No pkgname provided for launch-app');
} }
const execCommand = '/opt/apm-store/extras/apm-launcher'; const execCommand = "/opt/apm-store/extras/host-spawn-x86_64";
const execParams = [ 'launch', pkgname ]; const execParams = ['/opt/apm-store/extras/apm-launcher', 'launch', pkgname ];
logger.info(`Launching app: ${pkgname} with command: ${execCommand} ${execParams.join(' ')}`); logger.info(`Launching app: ${pkgname} with command: ${execCommand} ${execParams.join(' ')}`);