Skip to content

Commit a3eaccb

Browse files
authored
exe and sh download java link update (HMCL-dev#1903)
* Update main.cpp * exe and sh download java link update * fix
1 parent e0c97da commit a3eaccb

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

HMCL/src/main/resources/assets/HMCLauncher.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,22 @@ fi
133133

134134
if [[ "$_HMCL_ARCH" == "loongarch64" ]]; then
135135
if [ "$_HMCL_USE_CHINESE" == true ]; then
136-
echo "运行 HMCL 需要 Java 运行时环境,请安装龙芯 JDK8 (http://www.loongnix.cn/zh/api/java/downloads-jdk8/index.html) 并设置环境变量后重试。" 1>&2
136+
echo "运行 HMCL 需要 Java 运行时环境,请安装龙芯 JDK8 (https://docs.hmcl.net/downloads/loongnix.html) 并设置环境变量后重试。" 1>&2
137137
else
138138
echo "The Java runtime environment is required to run HMCL." 1>&2
139-
echo "Please install Loongson JDK8 (http://www.loongnix.cn/zh/api/java/downloads-jdk8/index.html) and set the environment variables, then try again." 1>&2
139+
echo "Please install Loongson JDK8 (https://docs.hmcl.net/downloads/loongnix.html) and set the environment variables, then try again." 1>&2
140140
fi
141141
exit 1
142142
fi
143143

144144

145145
case "$_HMCL_OS" in
146146
linux)
147-
_HMCL_DOWNLOAD_PAGE_OS="&os=Linux";;
147+
_HMCL_DOWNLOAD_PAGE_OS="linux";;
148148
osx)
149-
_HMCL_DOWNLOAD_PAGE_OS="&os=macOS";;
149+
_HMCL_DOWNLOAD_PAGE_OS="macos";;
150150
windows)
151-
_HMCL_DOWNLOAD_PAGE_OS="&os=Windows";;
151+
_HMCL_DOWNLOAD_PAGE_OS="windows";;
152152
*)
153153
echo "Unknown os: $_HMCL_OS" 1>&2
154154
exit 1
@@ -157,20 +157,20 @@ esac
157157

158158
case "$_HMCL_ARCH" in
159159
arm64)
160-
_HMCL_DOWNLOAD_PAGE_ARCH="&bitness=64-bit&architecture=ARM";;
160+
_HMCL_DOWNLOAD_PAGE_ARCH="arm64";;
161161
arm32)
162-
_HMCL_DOWNLOAD_PAGE_ARCH="&bitness=32-bit&architecture=ARM";;
162+
_HMCL_DOWNLOAD_PAGE_ARCH="arm32";;
163163
x86_64)
164-
_HMCL_DOWNLOAD_PAGE_ARCH="&bitness=64-bit&architecture=x86";;
164+
_HMCL_DOWNLOAD_PAGE_ARCH="x86_64";;
165165
x86)
166-
_HMCL_DOWNLOAD_PAGE_ARCH="&bitness=32-bit&architecture=x86";;
166+
_HMCL_DOWNLOAD_PAGE_ARCH="x86";;
167167
*)
168168
echo "Unknown architecture: $_HMCL_ARCH" 1>&2
169169
exit 1
170170
;;
171171
esac
172172

173-
_HMCL_DOWNLOAD_PAGE="https://bell-sw.com/pages/downloads/?version=java-17-lts$_HMCL_DOWNLOAD_PAGE_OS$_HMCL_DOWNLOAD_PAGE_ARCH&package=jdk-full"
173+
_HMCL_DOWNLOAD_PAGE="https://docs.hmcl.net/downloads/$_HMCL_DOWNLOAD_PAGE_OS/$_HMCL_DOWNLOAD_PAGE_ARCH.html"
174174

175175
if [ "$_HMCL_USE_CHINESE" == true ]; then
176176
echo "运行 HMCL 需要 Java 运行时环境,请安装 Java 并设置环境变量后重试。" 1>&2
@@ -180,4 +180,4 @@ else
180180
echo "Please install Java and set the environment variables and try again." 1>&2
181181
echo "$_HMCL_DOWNLOAD_PAGE" 1>&2
182182
fi
183-
exit 1
183+
exit 1

HMCLauncher/HMCL/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
156156

157157
if (isWin7OrLater) {
158158
if (isARM64) {
159-
downloadLink = L"https://docs.hmcl.net/downloads/windows-aarch64.html";
159+
downloadLink = L"https://docs.hmcl.net/downloads/windows/arm64.html";
160160
} if (isX64) {
161-
downloadLink = L"https://docs.hmcl.net/downloads/windows-x64.html";
161+
downloadLink = L"https://docs.hmcl.net/downloads/windows/x86_64.html";
162162
} else {
163-
downloadLink = L"https://docs.hmcl.net/downloads/windows-i586.html";
163+
downloadLink = L"https://docs.hmcl.net/downloads/windows/x86.html";
164164
}
165165
} else {
166166
downloadLink = L"https://docs.hmcl.net/downloads/java.html";

0 commit comments

Comments
 (0)