create resources file on ifrst config write

This commit is contained in:
SpikeHD 2022-07-15 18:25:43 -07:00
parent f37e44a88c
commit cc4600ec77
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,7 @@
"disabled": "Disabled",
"game_exec": "Set Game Executable",
"game_version": "Set Game Version",
"emergency_metadata": "Emergency Metadata Replacement",
"emergency_metadata": "Emergency Metadata Restore",
"grasscutter_jar": "Set Grasscutter JAR",
"toggle_encryption": "Toggle Encryption",
"java_path": "Set Custom Java Path",

View File

@ -1,5 +1,6 @@
import { fs } from '@tauri-apps/api'
import { dataDir } from '@tauri-apps/api/path'
import { cacheLauncherResources } from './resources'
let configFilePath: string
let defaultConfig: Configuration
@ -119,6 +120,9 @@ async function readConfigFile() {
}
await fs.writeFile(file)
// ALso just shoe-horning this in, cache resources on first launch
await cacheLauncherResources()
}
// Finally, read the file