mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 11:42:19 +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,
|
shell: true,
|
||||||
detached: true
|
detached: true
|
||||||
}).unref()
|
}
|
||||||
|
).unref()
|
||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
if (file.endsWith('.dmg')) {
|
if (file.endsWith('.dmg')) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user