fix launcher desktop registration and google login flow

This commit is contained in:
2026-07-06 13:52:22 +09:00
parent cdf67ee52b
commit 82ffd62723
+11 -6
View File
@@ -97,14 +97,19 @@ function registerLinuxProtocolHandler(): void {
if (process.platform !== 'linux') return
try {
const desktopFileName = is.dev
? 'autonomy-studio-launcher-dev.desktop'
: 'autonomy-studio-launcher.desktop'
const applicationsDir = join(app.getPath('home'), '.local', 'share', 'applications')
const installedDesktopFilePath = join(applicationsDir, 'autonomy-studio-launcher.desktop')
if (!is.dev) {
rmSync(installedDesktopFilePath, { force: true })
execFile('xdg-mime', ['default', 'autonomy-studio-launcher.desktop', 'x-scheme-handler/autonomy-studio'], () => undefined)
execFile('update-desktop-database', [applicationsDir], () => undefined)
return
}
const desktopFileName = 'autonomy-studio-launcher-dev.desktop'
const desktopFilePath = join(applicationsDir, desktopFileName)
const iconPath = is.dev
? join(process.cwd(), 'resources/icon.png')
: join(dirname(process.execPath), 'resources/icon.png')
const iconPath = join(process.cwd(), 'resources/icon.png')
const execArgs = process.defaultApp && process.argv[1]
? `"${escapeDesktopExecValue(process.execPath)}" "${escapeDesktopExecValue(resolve(process.argv[1]))}" %u`
: `"${escapeDesktopExecValue(process.execPath)}" %u`