feat: update application name and paths to reflect new branding

This commit is contained in:
Elysia
2026-01-31 18:32:52 +08:00
parent 6154d75fa6
commit 641589f875
5 changed files with 20 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
appId: "store.spark-app.apm" appId: "store.spark-app.apm"
asar: true asar: true
productName: "apm-app-store" productName: "apm-store"
artifactName: "apm-app-store_${version}_${os}_${arch}.${ext}" artifactName: "apm-store_${version}_${os}_${arch}.${ext}"
directories: directories:
output: "release/${version}" output: "release/${version}"
files: files:
@@ -17,7 +17,7 @@ extraResources:
linux: linux:
icon: "icons/amber-pm-logo.icns" icon: "icons/amber-pm-logo.icns"
category: "System" category: "System"
executableName: "apm-app-store" executableName: "apm-store"
desktop: desktop:
entry: entry:
Name: "APM AppStore" Name: "APM AppStore"

View File

@@ -16,6 +16,8 @@ type InstallTask = {
webContents: WebContents | null; webContents: WebContents | null;
}; };
const SHELL_CALLER_PATH = '/opt/apm-store/extras/shell-caller.sh';
const tasks = new Map<number, InstallTask>(); const tasks = new Map<number, InstallTask>();
let idle = true; // Indicates if the installation manager is idle let idle = true; // Indicates if the installation manager is idle
@@ -153,9 +155,9 @@ ipcMain.on('queue-install', async (event, download_json) => {
let execParams = []; let execParams = [];
if (superUserCmd.length > 0) { if (superUserCmd.length > 0) {
execCommand = superUserCmd; execCommand = superUserCmd;
execParams.push('/opt/apm-app-store/extras/shell-caller.sh'); execParams.push(SHELL_CALLER_PATH);
} else { } else {
execCommand = '/opt/apm-app-store/extras/shell-caller.sh'; execCommand = SHELL_CALLER_PATH;
} }
execParams.push('apm', 'install', '-y', pkgname); execParams.push('apm', 'install', '-y', pkgname);
@@ -254,7 +256,7 @@ ipcMain.handle('check-installed', async (_event, pkgname: string) => {
logger.info(`检查应用是否已安装: ${pkgname}`); logger.info(`检查应用是否已安装: ${pkgname}`);
let child = spawn('/opt/apm-app-store/extras/shell-caller.sh', ['apm', 'list', '--installed', pkgname], { let child = spawn(SHELL_CALLER_PATH, ['apm', 'list', '--installed', pkgname], {
shell: true, shell: true,
env: process.env env: process.env
}); });
@@ -292,9 +294,9 @@ ipcMain.on('remove-installed', async (_event, pkgname: string) => {
let execParams = []; let execParams = [];
if (superUserCmd.length > 0) { if (superUserCmd.length > 0) {
execCommand = superUserCmd; execCommand = superUserCmd;
execParams.push('/opt/apm-app-store/extras/shell-caller.sh'); execParams.push(SHELL_CALLER_PATH);
} else { } else {
execCommand = '/opt/apm-app-store/extras/shell-caller.sh'; execCommand = SHELL_CALLER_PATH;
} }
let child = spawn(execCommand, [...execParams, 'apm', 'remove', '-y', pkgname], { let child = spawn(execCommand, [...execParams, 'apm', 'remove', '-y', pkgname], {
shell: true, shell: true,
@@ -335,7 +337,7 @@ ipcMain.on('remove-installed', async (_event, pkgname: string) => {
ipcMain.handle('list-upgradable', async () => { ipcMain.handle('list-upgradable', async () => {
const { code, stdout, stderr } = await runCommandCapture( const { code, stdout, stderr } = await runCommandCapture(
'/opt/apm-app-store/extras/shell-caller.sh', SHELL_CALLER_PATH,
['apm', 'list', '--upgradable']); ['apm', 'list', '--upgradable']);
if (code !== 0) { if (code !== 0) {
logger.error(`list-upgradable failed: ${stderr || stdout}`); logger.error(`list-upgradable failed: ${stderr || stdout}`);
@@ -352,9 +354,9 @@ ipcMain.handle('list-upgradable', async () => {
ipcMain.handle('list-installed', async () => { ipcMain.handle('list-installed', async () => {
const superUserCmd = await checkSuperUserCommand(); const superUserCmd = await checkSuperUserCommand();
const execCommand = superUserCmd.length > 0 ? superUserCmd : '/opt/apm-app-store/extras/shell-caller.sh'; const execCommand = superUserCmd.length > 0 ? superUserCmd : SHELL_CALLER_PATH;
const execParams = superUserCmd.length > 0 const execParams = superUserCmd.length > 0
? ['/opt/apm-app-store/extras/shell-caller.sh', 'apm', 'list', '--installed'] ? [SHELL_CALLER_PATH, 'apm', 'list', '--installed']
: ['apm', 'list', '--installed']; : ['apm', 'list', '--installed'];
const { code, stdout, stderr } = await runCommandCapture(execCommand, execParams); const { code, stdout, stderr } = await runCommandCapture(execCommand, execParams);
@@ -378,9 +380,9 @@ ipcMain.handle('uninstall-installed', async (_event, pkgname: string) => {
} }
const superUserCmd = await checkSuperUserCommand(); const superUserCmd = await checkSuperUserCommand();
const execCommand = superUserCmd.length > 0 ? superUserCmd : '/opt/apm-app-store/extras/shell-caller.sh'; const execCommand = superUserCmd.length > 0 ? superUserCmd : SHELL_CALLER_PATH;
const execParams = superUserCmd.length > 0 const execParams = superUserCmd.length > 0
? ['/opt/apm-app-store/extras/shell-caller.sh', 'apm', 'remove', '-y', pkgname] ? [SHELL_CALLER_PATH, 'apm', 'remove', '-y', pkgname]
: ['apm', 'remove', '-y', pkgname]; : ['apm', 'remove', '-y', pkgname];
const { code, stdout, stderr } = await runCommandCapture(execCommand, execParams); const { code, stdout, stderr } = await runCommandCapture(execCommand, execParams);
@@ -404,7 +406,7 @@ ipcMain.handle('launch-app', async (_event, pkgname: string) => {
} }
const execCommand = 'dbus-launch'; const execCommand = 'dbus-launch';
const execParams = ['/opt/apm-app-store/extras/apm-launcher', 'start', pkgname]; const execParams = ['/opt/apm-store/extras/apm-launcher', 'start', pkgname];
await runCommandCapture(execCommand, execParams); await runCommandCapture(execCommand, execParams);
}); });

View File

@@ -12,7 +12,7 @@
<allow_inactive>yes</allow_inactive> <allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active> <allow_active>yes</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.exec.path">/opt/apm-app-store/extras/shell-caller.sh</annotate> <annotate key="org.freedesktop.policykit.exec.path">/opt/apm-store/extras/shell-caller.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action> </action>
</policyconfig> </policyconfig>

View File

@@ -1,5 +1,5 @@
{ {
"name": "apm-app-store", "name": "apm-store",
"version": "1.0.3-beta.1", "version": "1.0.3-beta.1",
"main": "dist-electron/main/index.js", "main": "dist-electron/main/index.js",
"description": "Client for APM App Store", "description": "Client for APM App Store",

View File

@@ -1,5 +1,5 @@
#!/usr/bin/bash #!/usr/bin/bash
cp -fv /opt/apm-app-store/extras/store.spark-app.amber-pm-store.policy /usr/share/polkit-1/actions/store.spark-app.amber-pm-store.policy cp -fv /opt/apm-store/extras/store.spark-app.amber-pm-store.policy /usr/share/polkit-1/actions/store.spark-app.amber-pm-store.policy
xdg-mime default apm-app-store.desktop x-scheme-handler/apmstore xdg-mime default apm-store.desktop x-scheme-handler/apmstore
update-mime-database /usr/share/mime || true update-mime-database /usr/share/mime || true