Merge pull request #169 from NotThorny/Admin-Fix

Re-open as admin
This commit is contained in:
SpikeHD
2023-05-16 13:10:50 -07:00
committed by GitHub
3 changed files with 14 additions and 1 deletions

View File

@@ -157,7 +157,7 @@ fn main() -> Result<(), ArgsError> {
println!("You running as a non-elevated user. Some stuff will almost definitely not work.");
println!("===============================================================================");
//reopen_as_admin();
reopen_as_admin();
}
// Setup datadir/cultivation just in case something went funky and it wasn't made

View File

@@ -113,6 +113,15 @@ pub fn unzip(
.unwrap();
}
if zipfile.contains("GIMI") {
window
.emit(
"migoto_extracted",
destpath.to_string() + "3DMigoto Loader.exe",
)
.unwrap();
}
// Delete zip file
match std::fs::remove_file(&zipfile) {
Ok(_) => {

View File

@@ -69,6 +69,10 @@ export class Main extends React.Component<IProps, IState> {
setConfigOption('grasscutter_path', payload)
})
listen('migoto_extracted', ({ payload }: { payload: string }) => {
setConfigOption('migoto_path', payload)
})
// Emitted for rsa replacing-purposes
listen('game_closed', async () => {
const wasPatched = await getConfigOption('patch_rsa')