feat: add app launching functionality and update related components

This commit is contained in:
Elysia
2026-01-31 18:21:16 +08:00
parent 39e40ff946
commit 6154d75fa6
5 changed files with 140 additions and 14 deletions

View File

@@ -396,4 +396,15 @@ ipcMain.handle('uninstall-installed', async (_event, pkgname: string) => {
success,
message: success ? '卸载完成' : (stderr || stdout || `卸载失败,退出码 ${code}`)
};
});
ipcMain.handle('launch-app', async (_event, pkgname: string) => {
if (!pkgname) {
logger.warn('No pkgname provided for launch-app');
}
const execCommand = 'dbus-launch';
const execParams = ['/opt/apm-app-store/extras/apm-launcher', 'start', pkgname];
await runCommandCapture(execCommand, execParams);
});