mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-01-30 14:39:56 +08:00
Update HMCLauncher (#2264)
* 更新 lang.h * 更新 main.cpp * 更新 HMCLauncher.sh
This commit is contained in:
parent
ab43d4a6cf
commit
126a6dbbed
@ -62,8 +62,10 @@ if [ -n "${HMCL_JAVA_HOME+x}" ]; then
|
||||
else
|
||||
if [ "$_HMCL_USE_CHINESE" == true ]; then
|
||||
echo "环境变量 HMCL_JAVA_HOME 的值无效,请设置为合法的 Java 路径。" 1>&2
|
||||
echo "你可以访问 https://docs.hmcl.net/help.html 页面寻求帮助。" 1>&2
|
||||
else
|
||||
echo "The value of the environment variable HMCL_JAVA_HOME is invalid, please set it to a valid Java path." 1>&2
|
||||
echo "You can visit the https://docs.hmcl.net/help.html page for help." 1>&2
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
@ -124,9 +126,11 @@ fi
|
||||
if [[ "$_HMCL_OS" == "unknown" || "$_HMCL_ARCH" == "unknown" ]]; then
|
||||
if [ "$_HMCL_USE_CHINESE" == true ]; then
|
||||
echo "运行 HMCL 需要 Java 运行时环境,请安装 Java 并设置环境变量后重试。" 1>&2
|
||||
echo "你可以访问 https://docs.hmcl.net/help.html 页面寻求帮助。" 1>&2
|
||||
else
|
||||
echo "The Java runtime environment is required to run HMCL. " 1>&2
|
||||
echo "Please install Java and set the environment variables and try again." 1>&2
|
||||
echo "You can visit the https://docs.hmcl.net/help.html page for help." 1>&2
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
@ -134,9 +138,11 @@ fi
|
||||
if [[ "$_HMCL_ARCH" == "loongarch64" ]]; then
|
||||
if [ "$_HMCL_USE_CHINESE" == true ]; then
|
||||
echo "运行 HMCL 需要 Java 运行时环境,请安装龙芯 JDK8 (https://docs.hmcl.net/downloads/loongnix.html) 并设置环境变量后重试。" 1>&2
|
||||
echo "你可以访问 https://docs.hmcl.net/help.html 页面寻求帮助。" 1>&2
|
||||
else
|
||||
echo "The Java runtime environment is required to run HMCL." 1>&2
|
||||
echo "Please install Loongson JDK8 (https://docs.hmcl.net/downloads/loongnix.html) and set the environment variables, then try again." 1>&2
|
||||
echo "You can visit the https://docs.hmcl.net/help.html page for help." 1>&2
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
@ -175,9 +181,11 @@ _HMCL_DOWNLOAD_PAGE="https://docs.hmcl.net/downloads/$_HMCL_DOWNLOAD_PAGE_OS/$_H
|
||||
if [ "$_HMCL_USE_CHINESE" == true ]; then
|
||||
echo "运行 HMCL 需要 Java 运行时环境,请安装 Java 并设置环境变量后重试。" 1>&2
|
||||
echo "$_HMCL_DOWNLOAD_PAGE" 1>&2
|
||||
echo "你可以访问 https://docs.hmcl.net/help.html 页面寻求帮助。" 1>&2
|
||||
else
|
||||
echo "The Java runtime environment is required to run HMCL. " 1>&2
|
||||
echo "Please install Java and set the environment variables and try again." 1>&2
|
||||
echo "$_HMCL_DOWNLOAD_PAGE" 1>&2
|
||||
echo "You can visit the https://docs.hmcl.net/help.html page for help." 1>&2
|
||||
fi
|
||||
exit 1
|
||||
|
@ -6,7 +6,9 @@
|
||||
|
||||
#define ERROR_PROMPT L"The Java runtime environment is required to run HMCL and Minecraft,\n"\
|
||||
L"Click 'OK' to start downloading java.\n"\
|
||||
L"Please restart HMCL after installing Java."
|
||||
L"Please restart HMCL after installing Java.\n"\
|
||||
L"Click 'Help' go for help."
|
||||
|
||||
#define ERROR_PROMPT_ZH L"运行 HMCL 以及 Minecraft 需要 Java 运行时环境,点击“确定”开始下载。\n"\
|
||||
L"请在安装 Java 完成后重新启动 HMCL。"
|
||||
L"请在安装 Java 完成后重新启动 HMCL。\n"\
|
||||
L"点击“帮助”寻求帮助。"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "os.h"
|
||||
#include "java.h"
|
||||
#include "lang.h"
|
||||
#include <windows.h>
|
||||
|
||||
Version J8(TEXT("8"));
|
||||
|
||||
@ -49,6 +50,10 @@ void FindJavaInDirAndLaunchJVM(const std::wstring &baseDir, const std::wstring &
|
||||
}
|
||||
}
|
||||
|
||||
void OpenHelpPage() {
|
||||
ShellExecute(0, 0, L"https://docs.hmcl.net/help.html", 0, 0, SW_SHOW);
|
||||
}
|
||||
|
||||
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
LPWSTR lpCmdLine, int nCmdShow) {
|
||||
std::wstring path, exeName, jvmOptions;
|
||||
|
Loading…
Reference in New Issue
Block a user