-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
863f4c0
commit 91c520e
Showing
2 changed files
with
34 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
@echo off | ||
SETLOCAL EnableDelayedExpansion | ||
chcp 65001 | ||
set HMCL_UPDATE_ARG=-Dhmcl.update_source.override= | ||
set HMCL_UPDATE_JSON=https://gitee.com/Glavo/HMCL-Update/raw/main/update/dev.json | ||
set HMCL_UPDATE_JAVA_OPTION=%HMCL_UPDATE_ARG%%HMCL_UPDATE_JSON% | ||
if "%JAVA_TOOL_OPTIONS%JUST_TEST"=="JUST_TEST" ( | ||
SetX JAVA_TOOL_OPTIONS %HMCL_UPDATE_JAVA_OPTION% | ||
) else ( | ||
for /f "usebackq tokens=2,*" %%A in (`reg query HKCU\Environment /v JAVA_TOOL_OPTIONS`) do set _TEMP_JAVA_TOOL_OPTIONS=%%B | ||
if "!_TEMP_JAVA_TOOL_OPTIONS!JUST_TEST"=="JUST_TEST" ( | ||
choice /c:yn /m "你已经在设置了系统变量 'JAVA_TOOL_OPTIONS',所以无法修改环境变量。是否要打开系统属性窗口?(Y/N)" | ||
if !errorlevel!==1 SystemPropertiesAdvanced | ||
) ELSE ( | ||
powershell -Command "SetX JAVA_TOOL_OPTIONS $(If ($env:_TEMP_JAVA_TOOL_OPTIONS -Match '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*') {$env:_TEMP_JAVA_TOOL_OPTIONS -replace '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*', $env:HMCL_UPDATE_JAVA_OPTION} Else {\"$env:_TEMP_JAVA_TOOL_OPTIONS $env:HMCL_UPDATE_JAVA_OPTION\"})" | ||
) | ||
) | ||
@echo off | ||
SETLOCAL EnableDelayedExpansion | ||
chcp 65001 | ||
set HMCL_UPDATE_ARG=-Dhmcl.update_source.override= | ||
set HMCL_UPDATE_JSON=https://gitee.com/Glavo/HMCL-Update/raw/main/update/dev.json | ||
set HMCL_UPDATE_JAVA_OPTION=%HMCL_UPDATE_ARG%%HMCL_UPDATE_JSON% | ||
if "%JAVA_TOOL_OPTIONS%JUST_TEST"=="JUST_TEST" ( | ||
SetX JAVA_TOOL_OPTIONS %HMCL_UPDATE_JAVA_OPTION% | ||
) else ( | ||
for /f "usebackq tokens=2,*" %%A in (`reg query HKCU\Environment /v JAVA_TOOL_OPTIONS`) do set _TEMP_JAVA_TOOL_OPTIONS=%%B | ||
if "!_TEMP_JAVA_TOOL_OPTIONS!JUST_TEST"=="JUST_TEST" ( | ||
choice /c:yn /m "你已经在设置了系统变量 'JAVA_TOOL_OPTIONS',所以无法修改环境变量。是否要打开系统属性窗口?(Y/N)" | ||
if !errorlevel!==1 SystemPropertiesAdvanced | ||
) ELSE ( | ||
powershell -Command "SetX JAVA_TOOL_OPTIONS $(If ($env:_TEMP_JAVA_TOOL_OPTIONS -Match '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*') {$env:_TEMP_JAVA_TOOL_OPTIONS -replace '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*', $env:HMCL_UPDATE_JAVA_OPTION} Else {\"$env:_TEMP_JAVA_TOOL_OPTIONS $env:HMCL_UPDATE_JAVA_OPTION\"})" | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
@echo off | ||
SETLOCAL EnableDelayedExpansion | ||
chcp 65001 | ||
set HMCL_UPDATE_ARG=-Dhmcl.update_source.override= | ||
set HMCL_UPDATE_JSON=https://gitee.com/Glavo/HMCL-Update/raw/main/update/stable.json | ||
set HMCL_UPDATE_JAVA_OPTION=%HMCL_UPDATE_ARG%%HMCL_UPDATE_JSON% | ||
if "%JAVA_TOOL_OPTIONS%JUST_TEST"=="JUST_TEST" ( | ||
SetX JAVA_TOOL_OPTIONS %HMCL_UPDATE_JAVA_OPTION% | ||
) else ( | ||
for /f "usebackq tokens=2,*" %%A in (`reg query HKCU\Environment /v JAVA_TOOL_OPTIONS`) do set _TEMP_JAVA_TOOL_OPTIONS=%%B | ||
if "!_TEMP_JAVA_TOOL_OPTIONS!JUST_TEST"=="JUST_TEST" ( | ||
choice /c:yn /m "你已经在设置了系统变量 'JAVA_TOOL_OPTIONS',所以无法修改环境变量。是否要打开系统属性窗口?(Y/N)" | ||
if !errorlevel!==1 SystemPropertiesAdvanced | ||
) ELSE ( | ||
powershell -Command "SetX JAVA_TOOL_OPTIONS $(If ($env:_TEMP_JAVA_TOOL_OPTIONS -Match '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*') {$env:_TEMP_JAVA_TOOL_OPTIONS -replace '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*', $env:HMCL_UPDATE_JAVA_OPTION} Else {\"$env:_TEMP_JAVA_TOOL_OPTIONS $env:HMCL_UPDATE_JAVA_OPTION\"})" | ||
) | ||
) | ||
@echo off | ||
SETLOCAL EnableDelayedExpansion | ||
chcp 65001 | ||
set HMCL_UPDATE_ARG=-Dhmcl.update_source.override= | ||
set HMCL_UPDATE_JSON=https://gitee.com/Glavo/HMCL-Update/raw/main/update/stable.json | ||
set HMCL_UPDATE_JAVA_OPTION=%HMCL_UPDATE_ARG%%HMCL_UPDATE_JSON% | ||
if "%JAVA_TOOL_OPTIONS%JUST_TEST"=="JUST_TEST" ( | ||
SetX JAVA_TOOL_OPTIONS %HMCL_UPDATE_JAVA_OPTION% | ||
) else ( | ||
for /f "usebackq tokens=2,*" %%A in (`reg query HKCU\Environment /v JAVA_TOOL_OPTIONS`) do set _TEMP_JAVA_TOOL_OPTIONS=%%B | ||
if "!_TEMP_JAVA_TOOL_OPTIONS!JUST_TEST"=="JUST_TEST" ( | ||
choice /c:yn /m "你已经在设置了系统变量 'JAVA_TOOL_OPTIONS',所以无法修改环境变量。是否要打开系统属性窗口?(Y/N)" | ||
if !errorlevel!==1 SystemPropertiesAdvanced | ||
) ELSE ( | ||
powershell -Command "SetX JAVA_TOOL_OPTIONS $(If ($env:_TEMP_JAVA_TOOL_OPTIONS -Match '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*') {$env:_TEMP_JAVA_TOOL_OPTIONS -replace '(?<=\s|^^)-Dhmcl\.update_source\.override=\S*', $env:HMCL_UPDATE_JAVA_OPTION} Else {\"$env:_TEMP_JAVA_TOOL_OPTIONS $env:HMCL_UPDATE_JAVA_OPTION\"})" | ||
) | ||
) |