wipe registry option

This commit is contained in:
SpikeHD
2022-08-26 17:53:45 -07:00
parent fa38a22117
commit bf8de40caa
6 changed files with 58 additions and 1 deletions

View File

@@ -161,6 +161,12 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
}
}
// First wipe registry if we have to
await invoke('wipe_registry', {
// The exe is always PascalCase so we can get the dir using regex
execName: (await getGameExecutable())?.split('.exe')[0].replace(/([a-z\d])([A-Z])/g, '$1 $2'),
})
// Launch the program
const gameExists = await invoke('dir_exists', {
path: exe || config.game_install_path,