mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
fix script paths and quotations
This commit is contained in:
parent
fff00ca815
commit
28ee27e50d
@ -3,7 +3,7 @@ Neutralino.init();
|
|||||||
let localeObj;
|
let localeObj;
|
||||||
const filesystem = Neutralino.filesystem
|
const filesystem = Neutralino.filesystem
|
||||||
const createCmdWindow = async (command) => {
|
const createCmdWindow = async (command) => {
|
||||||
Neutralino.os.execCommand(`cmd.exe /c start ${command}`, { background: true })
|
Neutralino.os.execCommand(`cmd.exe /c start "" ${command}`, { background: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -286,7 +286,7 @@ async function closeFirstTimePopup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function runInstallScript() {
|
async function runInstallScript() {
|
||||||
createCmdWindow(`${NL_CWD}/scripts/install.cmd "${NL_CWD}" true`)
|
createCmdWindow(`.\\scripts\\install.cmd "${NL_CWD}" true`)
|
||||||
|
|
||||||
// Create an interval that will check for the proxy server installation finish
|
// Create an interval that will check for the proxy server installation finish
|
||||||
const interval = setInterval(async () => {
|
const interval = setInterval(async () => {
|
||||||
@ -398,11 +398,11 @@ async function launchPrivate() {
|
|||||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||||
|
|
||||||
// Pass IP and game folder to the private server launcher
|
// Pass IP and game folder to the private server launcher
|
||||||
createCmdWindow(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} ${port} ${config.useHttps} "${config.gameexe}" "${NL_CWD}" ${config.enableKillswitch} true`).catch(e => console.log(e))
|
createCmdWindow(`.\\scripts\\private_server_launch.cmd ${ip} ${port} ${config.useHttps} "${config.gameexe}" "${NL_CWD}" ${config.enableKillswitch} true`).catch(e => console.log(e))
|
||||||
}
|
}
|
||||||
|
|
||||||
async function launchLocalServer() {
|
async function launchLocalServer() {
|
||||||
const config = await getCfg()
|
const config = await getCfg()
|
||||||
|
|
||||||
createCmdWindow(`${NL_CWD}/scripts/local_server_launch.cmd "${config.serverFolder}"`).catch(e => console.log(e))
|
createCmdWindow(`.\\scripts\\local_server_launch.cmd "${config.serverFolder}"`).catch(e => console.log(e))
|
||||||
}
|
}
|
||||||
|
@ -9,22 +9,22 @@ echo Downloading proxy server...
|
|||||||
cd "%ORIGIN%"
|
cd "%ORIGIN%"
|
||||||
|
|
||||||
if not exist "%ORIGIN%/ext" mkdir "%ORIGIN%/ext"
|
if not exist "%ORIGIN%/ext" mkdir "%ORIGIN%/ext"
|
||||||
if not exist "%ORIGIN%/temp" mkdir "%ORIGIN%/temp"
|
if not exist "%ORIGIN%/temp" mkdir "%ORIGIN%/temp
|
||||||
|
|
||||||
:: Begin by retrieving mitmproxy 7.0.4
|
:: Begin by retrieving mitmproxy 7.0.4
|
||||||
powershell Invoke-WebRequest -Uri https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-windows.zip -OutFile "%ORIGIN%/temp/mitmproxy-7.0.4-windows.zip"
|
powershell Invoke-WebRequest -Uri https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-windows.zip -OutFile "'%ORIGIN%/temp/mitmproxy-7.0.4-windows.zip'"
|
||||||
|
|
||||||
echo Extracting...
|
echo Extracting...
|
||||||
|
|
||||||
:: Extract from temp/ to ext/ with powershell
|
:: Extract from temp/ to ext/ with powershell
|
||||||
powershell Expand-Archive -Path "%ORIGIN%/temp/mitmproxy-7.0.4-windows.zip" -DestinationPath "%ORIGIN%/ext/" -Force
|
powershell Expand-Archive -Path "'%ORIGIN%/temp/mitmproxy-7.0.4-windows.zip'" -DestinationPath "'%ORIGIN%/ext/'" -Force
|
||||||
|
|
||||||
del /s /q "%ORIGIN%/temp"
|
del /s /q "%ORIGIN%/temp"
|
||||||
|
|
||||||
echo Running proxy server in order to generate certificates...
|
echo Running proxy server in order to generate certificates...
|
||||||
|
|
||||||
:: Start proxy server
|
:: Start proxy server
|
||||||
start "Proxy Server" %ORIGIN%/ext/mitmdump.exe --ssl-insecure --set ip=%ip%
|
start "Proxy Server" "%ORIGIN%/ext/mitmdump.exe" --ssl-insecure --set ip=%ip%
|
||||||
|
|
||||||
:: Allow the proxy server to create the certificates
|
:: Allow the proxy server to create the certificates
|
||||||
ping 127.0.0.1 -n 6 > nul
|
ping 127.0.0.1 -n 6 > nul
|
||||||
|
@ -38,7 +38,7 @@ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v Pr
|
|||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "127.0.0.1:8080" /f >nul 2>nul
|
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "127.0.0.1:8080" /f >nul 2>nul
|
||||||
|
|
||||||
:: Start proxy server
|
:: Start proxy server
|
||||||
start "Proxy Server" %ORIGIN%/ext/mitmdump.exe -s "%ORIGIN%/proxy/proxy.py" --ssl-insecure --set ip=%IP% --set port=%PORT% --set use_https=%USE_HTTPS%
|
start "Proxy Server" "%ORIGIN%/ext/mitmdump.exe" -s "%ORIGIN%/proxy/proxy.py" --ssl-insecure --set ip=%IP% --set port=%PORT% --set use_https=%USE_HTTPS%
|
||||||
|
|
||||||
echo Opening %GAME_PATH%
|
echo Opening %GAME_PATH%
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user