Open as admin

Set migoto exe when dl from menu
This commit is contained in:
Thoronium
2023-05-16 13:56:40 -06:00
parent d551344f39
commit 3205c96a62
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!("You running as a non-elevated user. Some stuff will almost definitely not work.");
println!("==============================================================================="); println!("===============================================================================");
//reopen_as_admin(); reopen_as_admin();
} }
// Setup datadir/cultivation just in case something went funky and it wasn't made // Setup datadir/cultivation just in case something went funky and it wasn't made

View File

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

View File

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