fix(launcher): use original-fs in portable updater and drop default_app.asar
Electron patches node:fs to treat .asar archives as virtual directories, so portable update verification failed on staged resources/default_app.asar and recursive cleanup could leave staging folders behind. Switch staging lstat and cleanup rm in portable-update.ts to original-fs (falling back to node:fs outside Electron), strip unused resources/default_app.asar during packaging so already-released 0.1.2/0.1.3 portable builds can update cleanly to future releases, and include portable-update.log in exported diagnostics.
This commit is contained in:
1 parent
f6b00bc787
commit
214f9d7f4b
3 files changed
+32
-4
No files matched your search
@@ -163,6 +163,12 @@ async function main(): Promise<void> {
|
||||
uninstallerIcon: join(stage, 'build', 'icon.ico'),
|
||||
installerHeaderIcon: join(stage, 'build', 'icon.ico'),
|
||||
},
|
||||
// Drop Electron's unused fallback welcome archive so portable builds never ship it and
|
||||
// already-released portable launchers (0.1.2 / 0.1.3) can update without tripping over
|
||||
// Electron's .asar virtual-directory check.
|
||||
afterPack: async (context) => {
|
||||
await rm(join(context.appOutDir, 'resources', 'default_app.asar'), { force: true });
|
||||
},
|
||||
},
|
||||
});
|
||||
for (const artifact of artifacts) console.info(artifact);
|
||||
@@ -200,6 +206,7 @@ async function packagePortableArchive(outputFolder: string, version: string): Pr
|
||||
const inventoryPath = join(resources, 'portable-files.json');
|
||||
const portable = join(outputFolder, portableLauncherReleaseFiles(version).archive);
|
||||
try {
|
||||
await rm(join(resources, 'default_app.asar'), { force: true });
|
||||
await writeFile(markerPath, 'portable\n', 'utf8');
|
||||
await writeFile(inventoryPath, '', 'utf8');
|
||||
const ownedFiles = await listRelativeFiles(unpacked);
|
||||
|
||||
Reference in new issue
Block a user