mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 14:13:49 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e8758b5f2 | |||
| e84c1d86bf |
@@ -26,6 +26,7 @@ linux:
|
||||
Categories: "System;"
|
||||
mimeTypes:
|
||||
- "x-scheme-handler/spk"
|
||||
- "x-scheme-handler/apt"
|
||||
target:
|
||||
- "AppImage"
|
||||
- "deb"
|
||||
|
||||
@@ -318,6 +318,21 @@ ipcMain.handle("check-for-updates", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Register custom protocol handlers
|
||||
if (process.defaultApp) {
|
||||
if (process.argv.length >= 2) {
|
||||
app.setAsDefaultProtocolClient("spk", process.execPath, [
|
||||
path.resolve(process.argv[1]),
|
||||
]);
|
||||
app.setAsDefaultProtocolClient("apt", process.execPath, [
|
||||
path.resolve(process.argv[1]),
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
app.setAsDefaultProtocolClient("spk");
|
||||
app.setAsDefaultProtocolClient("apt");
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
// Set User-Agent for client
|
||||
session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
|
||||
|
||||
@@ -10,4 +10,4 @@ Keywords=appstore;
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
StartupWMClass=spark-store
|
||||
MimeType=x-scheme-handler/spk
|
||||
MimeType=x-scheme-handler/spk;x-scheme-handler/apt
|
||||
|
||||
Reference in New Issue
Block a user