mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-11 17:16:18 -07:00
feat(launcher): bundle a private Bun runtime
This commit is contained in:
@@ -86,15 +86,32 @@ async function verifyMacOSWindowHelper(
|
||||
return true;
|
||||
}
|
||||
|
||||
async function afterPack(context) {
|
||||
async function stageBundledBunRuntime(context, deps = {}) {
|
||||
const stageBunRuntime =
|
||||
deps.stageBunRuntime ?? (await import('./stage-bun-runtime.mjs')).stageBunRuntime;
|
||||
const productFilename = context.packager?.appInfo?.productFilename;
|
||||
await stageBunRuntime({
|
||||
appOutDir: context.appOutDir,
|
||||
platform: context.electronPlatformName,
|
||||
arch: context.arch,
|
||||
productFilename:
|
||||
typeof productFilename === 'string' && productFilename.trim()
|
||||
? productFilename.trim()
|
||||
: 'SubMiner',
|
||||
});
|
||||
}
|
||||
|
||||
async function afterPack(context, deps = {}) {
|
||||
await stageLinuxAppImageSharedLibrary(context);
|
||||
await verifyMacOSWindowHelper(context);
|
||||
await stageBundledBunRuntime(context, deps);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
LINUX_FFMPEG_LIBRARY,
|
||||
MACOS_WINDOW_HELPER,
|
||||
resolveMacOSAppBundlePath,
|
||||
stageBundledBunRuntime,
|
||||
stageLinuxAppImageSharedLibrary,
|
||||
verifyMacOSWindowHelper,
|
||||
default: afterPack,
|
||||
|
||||
Reference in New Issue
Block a user