mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
fix: 更新应用图标格式为ICNS,优化安装管理器命令执行
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
"dist-electron"
|
"dist-electron"
|
||||||
],
|
],
|
||||||
"linux": {
|
"linux": {
|
||||||
"icon": "public/amber-pm-logo.png",
|
"icon": "public/amber-pm-logo.icns",
|
||||||
"category": "System",
|
"category": "System",
|
||||||
"executableName": "apm-app-store",
|
"executableName": "apm-app-store",
|
||||||
"desktop": {
|
"desktop": {
|
||||||
|
|||||||
@@ -37,11 +37,10 @@ const checkSuperUserCommand = async (): Promise<string> => {
|
|||||||
return superUserCmd;
|
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) => {
|
return await new Promise<{ code: number; stdout: string; stderr: string }>((resolve) => {
|
||||||
const child = spawn(execCommand, execParams, {
|
const child = spawn(execCommand, execParams, {
|
||||||
shell: true,
|
shell: true,
|
||||||
env: { ...process.env, ...(envOverride || {}) }
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let stdout = '';
|
let stdout = '';
|
||||||
@@ -330,12 +329,9 @@ ipcMain.on('remove-installed', async (_event, pkgname: string) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle('list-upgradable', async () => {
|
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(
|
const { code, stdout, stderr } = await runCommandCapture(
|
||||||
'/bin/bash',
|
'/usr/bin/amber-pm-debug',
|
||||||
['-lc', listCommand],
|
['aptss', 'list', '--upgradable']);
|
||||||
{ LANGUAGE: 'en_US' }
|
|
||||||
);
|
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
logger.error(`list-upgradable failed: ${stderr || stdout}`);
|
logger.error(`list-upgradable failed: ${stderr || stdout}`);
|
||||||
return {
|
return {
|
||||||
|
|||||||
BIN
public/amber-pm-logo.icns
Normal file
BIN
public/amber-pm-logo.icns
Normal file
Binary file not shown.
Reference in New Issue
Block a user