From d90df221bc582cbca5d6374abe591f327121d7c5 Mon Sep 17 00:00:00 2001 From: Glavo Date: Sun, 26 Oct 2025 15:53:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=A6=E7=BB=86=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=8C=87=E5=8D=97=20(#4524)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Building.md | 56 ++++++++++++++++++++++++++++++++++++++++++ docs/Building_zh.md | 56 ++++++++++++++++++++++++++++++++++++++++++ docs/README.md | 8 +----- docs/README_es.md | 8 +----- docs/README_ja.md | 8 +----- docs/README_lzh.md | 8 +----- docs/README_ru.md | 8 +----- docs/README_uk.md | 8 +----- docs/README_zh.md | 10 ++------ docs/README_zh_Hant.md | 8 +----- 10 files changed, 121 insertions(+), 57 deletions(-) create mode 100644 docs/Building.md create mode 100644 docs/Building_zh.md diff --git a/docs/Building.md b/docs/Building.md new file mode 100644 index 000000000..12536a243 --- /dev/null +++ b/docs/Building.md @@ -0,0 +1,56 @@ +# Build Guide + + +**English** | [中文](Building_zh.md) + + +## Requirements + +To build the HMCL launcher, you need to install JDK 17 (or higher). You can download it here: [Download Liberica JDK](https://bell-sw.com/pages/downloads/#jdk-25-lts). + +After installing the JDK, make sure the `JAVA_HOME` environment variable points to the required JDK directory. +You can check the JDK version that `JAVA_HOME` points to like this: + +
+Windows + +PowerShell: +``` +PS > & "$env:JAVA_HOME/bin/java.exe" -version +openjdk version "25" 2025-09-16 LTS +OpenJDK Runtime Environment (build 25+37-LTS) +OpenJDK 64-Bit Server VM (build 25+37-LTS, mixed mode, sharing) +``` + +
+ +
+Linux/macOS/FreeBSD + +``` +> $JAVA_HOME/bin/java -version +openjdk version "25" 2025-09-16 LTS +OpenJDK Runtime Environment (build 25+37-LTS) +OpenJDK 64-Bit Server VM (build 25+37-LTS, mixed mode, sharing) +``` + +
+ +## Get HMCL Source Code + +- You can get the latest source code via [Git](https://git-scm.com/downloads): + ```shell + git clone https://github.com/HMCL-dev/HMCL.git + cd HMCL + ``` +- You can manually download a specific version of the source code from the [GitHub Release page](https://github.com/HMCL-dev/HMCL/releases). + +## Build HMCL + +To build HMCL, switch to the root directory of the HMCL project and run the following command: + +```shell +./gradlew clean makeExecutables +``` + +The built HMCL program files are located in the `HMCL/build/libs` subdirectory under the project root. diff --git a/docs/Building_zh.md b/docs/Building_zh.md new file mode 100644 index 000000000..58d9a264b --- /dev/null +++ b/docs/Building_zh.md @@ -0,0 +1,56 @@ +# 构建指南 + + +[English](Building.md) | **中文** + + +## 环境需求 + +构建 HMCL 启动器需要安装 JDK 17 (或更高版本)。你可以从此处下载它: [Download Liberica JDK](https://bell-sw.com/pages/downloads/#jdk-25-lts)。 + +在安装 JDK 后,请确保 `JAVA_HOME` 环境变量指向符合需求的 JDK 目录。 +你可以这样查看 `JAVA_HOME` 指向的 JDK 版本: + +
+Windows + +PowerShell: +``` +PS > & "$env:JAVA_HOME/bin/java.exe" -version +openjdk version "25" 2025-09-16 LTS +OpenJDK Runtime Environment (build 25+37-LTS) +OpenJDK 64-Bit Server VM (build 25+37-LTS, mixed mode, sharing) +``` + +
+ +
+Linux/macOS/FreeBSD + +``` +> $JAVA_HOME/bin/java -version +openjdk version "25" 2025-09-16 LTS +OpenJDK Runtime Environment (build 25+37-LTS) +OpenJDK 64-Bit Server VM (build 25+37-LTS, mixed mode, sharing) +``` + +
+ +## 获取 HMCL 源码 + +- 通过 [Git](https://git-scm.com/downloads) 可以获取最新源码: + ```shell + git clone https://github.com/HMCL-dev/HMCL.git + cd HMCL + ``` +- 从 [GitHub Release 页面](https://github.com/HMCL-dev/HMCL/releases)可以手动下载特定版本的源码。 + +## 构建 HMCL + +想要构建 HMCL,请切换到 HMCL 项目的根目录下,并执行以下命令: + +```shell +./gradlew clean makeExecutables +``` + +构建出的 HMCL 程序文件位于根目录下的 `HMCL/build/libs` 子目录中。 diff --git a/docs/README.md b/docs/README.md index d92e829b6..63a1c7f2a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -49,13 +49,7 @@ If you want to submit a pull request, here are some requirements: ### Compilation -Simply execute the following command in the project root directory: - -```bash -./gradlew clean build -``` - -Make sure you have Java 17 or later installed. +See the [Build Guide](./Building.md) page. ## JVM Options (for debugging) diff --git a/docs/README_es.md b/docs/README_es.md index b967ebe81..ecc86ede0 100644 --- a/docs/README_es.md +++ b/docs/README_es.md @@ -42,13 +42,7 @@ Si deseas enviar un pull request, aquí tienes algunos requisitos: ### Compilación -Simplemente ejecuta el siguiente comando en el directorio raíz del proyecto: - -```bash -./gradlew clean build -``` - -Asegúrate de tener instalado Java 17 o una versión posterior. +Consulta la página de la [Guía de compilación](./Building.md). ## Opciones de JVM (para depuración) diff --git a/docs/README_ja.md b/docs/README_ja.md index 459001853..787f8a944 100644 --- a/docs/README_ja.md +++ b/docs/README_ja.md @@ -41,13 +41,7 @@ HMCLが対応しているシステムやCPUアーキテクチャについては ### コンパイル方法 -プロジェクトのルートディレクトリで次のコマンドを実行してください。 - -```bash -./gradlew clean build -``` - -Java 17以上がインストールされていることを確認してください。 +ビルド方法については、[ビルドガイド](./Building.md)ページをご覧ください。 ## JVMオプション(デバッグ用) diff --git a/docs/README_lzh.md b/docs/README_lzh.md index 3609dec71..4e0186f31 100644 --- a/docs/README_lzh.md +++ b/docs/README_lzh.md @@ -42,13 +42,7 @@ HMCL 跨域甚廣。無論 Windows、Linux、macOS、FreeBSD 諸常見械綱, ### 編造 -於項目之根目錄,執下列令: - -```bash -./gradlew clean build -``` - -務必保汝已安裝爪哇十七或更高者。 +請觀[編造指南](./Building_zh.md)。 ## 爪哇虛機之通弦(以資勘誤) diff --git a/docs/README_ru.md b/docs/README_ru.md index a5df98a17..d843fc64d 100644 --- a/docs/README_ru.md +++ b/docs/README_ru.md @@ -41,13 +41,7 @@ HMCL обладает отличной кроссплатформенность ### Сборка -Выполните следующую команду в корневой директории проекта: - -```bash -./gradlew clean build -``` - -Убедитесь, что у вас установлена Java 17 или новее. +См. страницу [Руководство по сборке](./Building.md). ## Параметры JVM (для отладки) diff --git a/docs/README_uk.md b/docs/README_uk.md index ad5b1921d..d6edb3982 100644 --- a/docs/README_uk.md +++ b/docs/README_uk.md @@ -41,13 +41,7 @@ HMCL має чудові кросплатформні можливості. Ві ### Компіляція -Просто виконайте наступну команду в кореневому каталозі проєкту: - -```bash -./gradlew clean build -``` - -Переконайтеся, що у вас встановлено Java 17 або новішої версії. +Дивіться сторінку [Посібник зі збірки](./Building.md). ## JVM Options (for debugging) diff --git a/docs/README_zh.md b/docs/README_zh.md index 00c535f40..072eb5de1 100644 --- a/docs/README_zh.md +++ b/docs/README_zh.md @@ -47,15 +47,9 @@ HMCL 有着强大的跨平台能力。它不仅支持 Windows、Linux、macOS、 * IDE:IntelliJ IDEA * 编译器:Java 17+ -### 编译 +### 构建 HMCL -于项目根文件夹执行以下命令: - -```bash -./gradlew clean build -``` - -请确保你至少安装了 JDK 17 或更高版本。 +参见[构建指南](./Building_zh.md)页面。 ## JVM 选项 (用于调试) diff --git a/docs/README_zh_Hant.md b/docs/README_zh_Hant.md index 5cfc055d6..a73b3950c 100644 --- a/docs/README_zh_Hant.md +++ b/docs/README_zh_Hant.md @@ -49,13 +49,7 @@ HMCL 有著強大的跨平臺能力。它不僅支援 Windows、Linux、macOS、 ### 編譯 -於項目根目錄執行以下指令: - -```bash -./gradlew clean build -``` - -請確保你至少安裝了 JDK 17 或更高版本。 +參閱[構建指南](./Building_zh.md)頁面。 ## JVM 選項 (用於除錯)