mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 08:04:52 +01:00
fix theme list and add launching server with game
This commit is contained in:
@@ -104,6 +104,23 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
||||
|
||||
// Connect to proxy
|
||||
await invoke('connect', { port: 8365, certificatePath: await dataDir() + '\\cultivation\\ca' })
|
||||
|
||||
// Open server as well if the options are set
|
||||
if (config.grasscutter_with_game) {
|
||||
let jarFolder = config.grasscutter_path
|
||||
|
||||
if (jarFolder.includes('/')) {
|
||||
jarFolder = jarFolder.substring(0, config.grasscutter_path.lastIndexOf('/'))
|
||||
} else {
|
||||
jarFolder = jarFolder.substring(0, config.grasscutter_path.lastIndexOf('\\'))
|
||||
}
|
||||
|
||||
await invoke('run_jar', {
|
||||
path: config.grasscutter_path,
|
||||
executeIn: jarFolder,
|
||||
javaPath: config.java_path || ''
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Launch the program
|
||||
|
||||
Reference in New Issue
Block a user