mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
reorg and install script
This commit is contained in:
parent
803feb116e
commit
b018da2572
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ bin/
|
||||
dist/
|
||||
ext/
|
||||
resources/js/neutralino.js
|
||||
resources/bg
|
||||
|
||||
.storage/
|
||||
.tmp/
|
||||
|
26
install.cmd
Normal file
26
install.cmd
Normal file
@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
:: Ensure we are elevated for certs
|
||||
>nul 2>&1 reg query "HKU\S-1-5-19" || (
|
||||
echo Currently running with non Administrator privileges, raising...
|
||||
echo set UAC = CreateObject^("Shell.Application"^) > "%temp%\UAC.vbs"
|
||||
echo UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%temp%\UAC.vbs"
|
||||
"%temp%\UAC.vbs"
|
||||
del /f /q "%temp%\UAC.vbs" >nul 2>nul
|
||||
exit /b
|
||||
)
|
||||
|
||||
certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer
|
||||
|
||||
echo Downloading proxy server...
|
||||
|
||||
if not exist "./ext" mkdir "ext"
|
||||
if not exist "./temp" mkdir "temp"
|
||||
|
||||
:: Begin by retrieving mitmproxy 8.0.0
|
||||
powershell Invoke-WebRequest -Uri https://snapshots.mitmproxy.org/8.0.0/mitmproxy-8.0.0-windows.zip -OutFile "./temp/mitmproxy-8.0.0-windows.zip"
|
||||
|
||||
:: Extract from temp/ to ext/ with powershell
|
||||
powershell Expand-Archive -Path "./temp/mitmproxy-8.0.0-windows.zip" -DestinationPath "./ext/" -Force
|
||||
|
||||
echo Done! You can now open
|
@ -6,7 +6,9 @@
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"dev": "neu run",
|
||||
"build": "neu build && npm run move_files",
|
||||
"move_files": "cp -r ./ext ./dist/GrassClipper && cp -r ./proxy ./dist/GrassClipper"
|
||||
"build": "npm run clean_dist && neu build && npm run move_files && npm run rename_exe",
|
||||
"move_files": "cp -r ./ext ./dist/GrassClipper && cp -r ./proxy ./dist/GrassClipper && cp install.cmd ./dist/GrassClipper && cp -r ./scripts ./dist/GrassClipper",
|
||||
"rename_exe": "mv ./dist/GrassClipper/GrassClipper-win_x64.exe ./dist/GrassClipper/GrassClipper.exe",
|
||||
"clean_dist": "rm -rf ./dist"
|
||||
}
|
||||
}
|
||||
|
@ -100,5 +100,5 @@ async function launchPrivate() {
|
||||
console.log('connecting to ' + ip)
|
||||
|
||||
// Pass IP and game folder to the private server launcher
|
||||
Neutralino.os.execCommand(`${NL_CWD}/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}/Genshin Impact Game/${await getGenshinExecName()}"`).catch(e => console.log(e))
|
||||
Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}/Genshin Impact Game/${await getGenshinExecName()}"`).catch(e => console.log(e))
|
||||
}
|
Loading…
Reference in New Issue
Block a user