fix: 更新应用图标格式为ICNS,优化安装管理器命令执行

This commit is contained in:
Elysia
2026-01-28 18:38:52 +08:00
parent a3d50e026a
commit 4b49424105
3 changed files with 4 additions and 8 deletions

View File

@@ -12,7 +12,7 @@
"dist-electron"
],
"linux": {
"icon": "public/amber-pm-logo.png",
"icon": "public/amber-pm-logo.icns",
"category": "System",
"executableName": "apm-app-store",
"desktop": {

View File

@@ -37,11 +37,10 @@ const checkSuperUserCommand = async (): Promise<string> => {
return superUserCmd;
}
const runCommandCapture = async (execCommand: string, execParams: string[], envOverride?: NodeJS.ProcessEnv) => {
const runCommandCapture = async (execCommand: string, execParams: string[]) => {
return await new Promise<{ code: number; stdout: string; stderr: string }>((resolve) => {
const child = spawn(execCommand, execParams, {
shell: true,
env: { ...process.env, ...(envOverride || {}) }
});
let stdout = '';
@@ -330,12 +329,9 @@ ipcMain.on('remove-installed', async (_event, pkgname: string) => {
});
ipcMain.handle('list-upgradable', async () => {
const listCommand = 'source /opt/apm-store/transhell.sh; load_transhell_debug; amber-pm-debug aptss list --upgradable';
const { code, stdout, stderr } = await runCommandCapture(
'/bin/bash',
['-lc', listCommand],
{ LANGUAGE: 'en_US' }
);
'/usr/bin/amber-pm-debug',
['aptss', 'list', '--upgradable']);
if (code !== 0) {
logger.error(`list-upgradable failed: ${stderr || stdout}`);
return {

BIN
public/amber-pm-logo.icns Normal file

Binary file not shown.