allow installed AppImage apps to launch without URL

This commit is contained in:
2026-07-02 13:56:26 +09:00
parent e18e9d9494
commit c3dc97e78f
2 changed files with 9 additions and 6 deletions
+6 -5
View File
@@ -760,7 +760,7 @@ function createWindow(): void {
ipcMain.on('launch-app', (_, payload: {
appName: string
url: string
url?: string
width?: number
height?: number
devAppPath?: string
@@ -815,17 +815,18 @@ function createWindow(): void {
: resolvedExecPath
if (spawnPath) {
const useDevLauncher = is.dev && spawnPath === resolvedDevAppPath
const launchUrlArg = url ? [`--url=${encodeURIComponent(url)}`] : []
const args = useDevLauncher
? ['run', 'dev']
: [`--url=${encodeURIComponent(url)}`, ...authLaunchArgs, ...(authProtocolUrl ? [authProtocolUrl] : [])]
: [...launchUrlArg, ...authLaunchArgs, ...(authProtocolUrl ? [authProtocolUrl] : [])]
const execBin = useDevLauncher ? 'npm' : spawnPath
const childEnv = { ...process.env }
if (useDevLauncher) {
if (useDevLauncher && url) {
childEnv.ATNMY_APP_URL = url
}
if (useDevLauncher && handoffCode) {
childEnv.ATNMY_HANDOFF_FILE = writeDevHandoffFile(appName, url, handoffCode, audienceApp)
childEnv.ATNMY_HANDOFF_FILE = writeDevHandoffFile(appName, url ?? '', handoffCode, audienceApp)
childEnv.ATNMY_HANDOFF_TOKEN = handoffCode
childEnv.ATNMY_AUDIENCE_APP = audienceApp
} else if (handoffCode) {
@@ -885,7 +886,7 @@ function createWindow(): void {
additionalArguments: [
'--app-window',
`--app-name=${encodeURIComponent(appName)}`,
`--app-url=${encodeURIComponent(url)}`
`--app-url=${encodeURIComponent(url ?? '')}`
]
}
})