mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
fix portable updater
This commit is contained in:
parent
582d159332
commit
0ea63a78b4
@ -74,14 +74,17 @@ export async function downloadAndInstallUpdate(version: string): Promise<void> {
|
|||||||
}).unref()
|
}).unref()
|
||||||
}
|
}
|
||||||
if (file.endsWith('.7z')) {
|
if (file.endsWith('.7z')) {
|
||||||
await writeFile(
|
spawn(
|
||||||
path.join(exeDir(), 'install.ps1'),
|
'cmd',
|
||||||
`& "${path.join(resourcesFilesDir(), '7za.exe')}" x -o"${exeDir()}" -y "${path.join(dataDir(), file)}"; Start-Process -FilePath "${exePath()}"`
|
[
|
||||||
)
|
'/C',
|
||||||
spawn('powershell', ['-File', `"${path.join(exeDir(), 'install.ps1')}"`], {
|
`""${path.join(resourcesFilesDir(), '7za.exe')}" x -o"${exeDir()}" -y "${path.join(dataDir(), file)}" & start "" "${exePath()}""`
|
||||||
shell: true,
|
],
|
||||||
detached: true
|
{
|
||||||
}).unref()
|
shell: true,
|
||||||
|
detached: true
|
||||||
|
}
|
||||||
|
).unref()
|
||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
if (file.endsWith('.dmg')) {
|
if (file.endsWith('.dmg')) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user