MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / openFlashpointManager

Function openFlashpointManager

src/back/util/misc.ts:455–465  ·  view source on GitHub ↗
(state: BackState)

Source from the content-addressed store, hash-verified

453}
454
455export function openFlashpointManager(state: BackState): void {
456 const cwd = path.join(state.config.flashpointPath, 'Manager');
457 const fpmPath = 'FlashpointManager.exe';
458 const updatesReady = state.componentStatuses.filter(c => c.state === ComponentState.NEEDS_UPDATE).length > 0;
459 exitApp(state, async () => {
460 const args = updatesReady ? ['/update', '/launcher'] : ['/launcher'];
461 const child = child_process.spawn(fpmPath, args, { detached: true, cwd, stdio: ['ignore', 'ignore', 'ignore'] });
462 child.unref();
463 await promiseSleep(2500);
464 });
465}
466
467export function compareSemVerVersions(v1: string, v2: string): number {
468 const v1Parts = v1.split('.').map(part => parseInt(part));

Callers 1

registerRequestCallbacksFunction · 0.90

Calls 3

exitAppFunction · 0.90
promiseSleepFunction · 0.85
spawnMethod · 0.80

Tested by

no test coverage detected