mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
feat: add app launching functionality and update related components
This commit is contained in:
@@ -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);
|
||||
});
|
||||
Reference in New Issue
Block a user