Files
club-launcher/electron/launcher.ts
T

16 lines
372 B
TypeScript

import { shell } from 'electron'
import { spawn } from 'child_process'
export function launchSteamGame(appid: string): void {
shell.openExternal(`steam://rungameid/${appid}`)
}
export function launchExe(exe: string, args: string[] = []): void {
const child = spawn(exe, args, {
detached: true,
stdio: 'ignore',
windowsHide: false,
})
child.unref()
}