✨ support multiple-instances
This commit is contained in:
5
bin/cli.ts
vendored
5
bin/cli.ts
vendored
@@ -160,6 +160,11 @@ program
|
||||
.default(DEFAULT.keepBinary)
|
||||
.hideHelp(),
|
||||
)
|
||||
.addOption(
|
||||
new Option('--multi-instance', 'Allow multiple app instances')
|
||||
.default(DEFAULT.multiInstance)
|
||||
.hideHelp(),
|
||||
)
|
||||
.addOption(
|
||||
new Option('--installer-language <string>', 'Installer language')
|
||||
.default(DEFAULT.installerLanguage)
|
||||
|
||||
1
bin/defaults.ts
vendored
1
bin/defaults.ts
vendored
@@ -27,6 +27,7 @@ export const DEFAULT_PAKE_OPTIONS: PakeCliOptions = {
|
||||
wasm: false,
|
||||
enableDragDrop: false,
|
||||
keepBinary: false,
|
||||
multiInstance: false,
|
||||
};
|
||||
|
||||
// Just for cli development
|
||||
|
||||
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -63,6 +63,7 @@ export async function mergeConfig(
|
||||
title,
|
||||
wasm,
|
||||
enableDragDrop,
|
||||
multiInstance,
|
||||
} = options;
|
||||
|
||||
const { platform } = process;
|
||||
@@ -325,6 +326,7 @@ StartupNotify=true
|
||||
await fsExtra.writeFile(injectFilePath, '');
|
||||
}
|
||||
tauriConf.pake.proxy_url = proxyUrl || '';
|
||||
tauriConf.pake.multi_instance = multiInstance;
|
||||
|
||||
// Configure WASM support with required HTTP headers
|
||||
if (wasm) {
|
||||
|
||||
3
bin/types.ts
vendored
3
bin/types.ts
vendored
@@ -87,6 +87,9 @@ export interface PakeCliOptions {
|
||||
|
||||
// Keep raw binary file alongside installer, default false
|
||||
keepBinary: boolean;
|
||||
|
||||
// Allow multiple instances, default false (single instance)
|
||||
multiInstance: boolean;
|
||||
}
|
||||
|
||||
export interface PakeAppOptions extends PakeCliOptions {
|
||||
|
||||
Reference in New Issue
Block a user