4 Commits

Author SHA1 Message Date
50032cc599 docs: 更新 README 2024-08-23 18:58:09 +08:00
5334dcbee1 chore: 更新pom打包设置 2024-08-23 18:50:56 +08:00
eadff7408f chore(pom): 更新打包设置 2024-08-22 17:50:51 +08:00
e6d98a991e Update README.md 2024-02-20 20:56:29 +08:00
2 changed files with 111 additions and 13 deletions

View File

@ -1,8 +1,91 @@
<div style="text-align:center;">
# DayZ Mod Translator # DayZ Mod Translator
<br>
<div>
<img alt="JDK" src="https://img.shields.io/badge/JDK-17-%2300599C">
<img alt="platform" src="https://img.shields.io/badge/platform-Windows-blueviolet">
</div>
[//]: # (<div>)
[//]: # ( <img alt="license" src="https://img.shields.io/github/license/octopusYan/dayz-mod-translator">)
[//]: # ( <img alt="commit" src="https://img.shields.io/github/commit-activity/m/octopusYan/dayz-mod-translator?color=%23ff69b4">)
[//]: # (</div>)
[//]: # (<div>)
[//]: # ( <img alt="stars" src="https://img.shields.io/github/stars/octopusYan/dayz-mod-translator?style=social">)
[//]: # ( <img alt="GitHub all releases" src="https://img.shields.io/github/downloads/octopusYan/dayz-mod-translator/total?style=social">)
[//]: # (</div>)
<br>
使用 JavaFx 编写的 DayZ 游戏mod 汉化GUI工具 使用 JavaFx 编写的 DayZ 游戏mod 汉化GUI工具
## 截图 </div>
### 使用
- 设置 -> 翻译,选择翻译接口,填写配置信息,点击确定
- 点击左侧打开文件选择需要翻译的模组pbo文件
- 待翻译文本获取完成后,点击右侧翻译按钮
- 翻译完成后,点击打包按钮,选择保存位置
<details><summary>截图</summary>
![Main window start](doc/img/screenshot01.png 'Main application window start') ![Main window start](doc/img/screenshot01.png 'Main application window start')
![Main window open file](doc/img/screenshot02.png 'Main window open file') ![Main window open file](doc/img/screenshot02.png 'Main window open file')
</details>
### 本地构建
#### 环境说明
| 名称 | 描述 |
|-------|---------------------------------------------------------|
| 系统环境 | windows11/10 |
| JDK版本 | 17 |
| 构建工具 | Mavne |
| 打包工具 | [JavaPackager](https://github.com/fvarrui/JavaPackager) |
#### 步骤
1. 环境配置
- 打开 [JavaFx](https://gluonhq.com/products/javafx/) 官网环境下载页面
- 在下方 Downloads 处
- `JavaFX version` 选择 `17.0.12[LTS]`
- `Operating System` 选择 `Windows`
- `Type` 选择 `jmods`
- 点击右侧绿色按钮下载解压
- 将解压文件夹内所有 `.jmod` 后缀名的文件复制到 `jdk环境目录``jmods`文件夹中
2. 下载源代码并使用 [IntelliJ IDEA](https://www.jetbrains.com/zh-cn/idea/download/?section=windows) 打开
```bash
git clone https://github.com/octopusYan/dayz-mod-translator.git
```
3. 打包
- 使用 `IntelliJ IDEA` Maven UI
- 点击右侧工具栏的`Maven`
- 展开 `DayzModTranslator\Lifecycle`
- 点击 package
- 使用 mvn 命令
```bash
mvn package
```
### 可能会用到
吾爱论坛 / 谷歌翻译修复:[谷歌浏览器右键翻译失效了咋办一键修复才13KB](https://www.52pojie.cn/thread-1781877-1-1.html)
## 致谢
### 开源库
- [pboman3](https://github.com/winseros/pboman3):打开、打包和解包 ArmA PBO 文件的工具。

39
pom.xml
View File

@ -22,12 +22,11 @@
<maven.compiler.target>17</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<java.version>17</java.version> <java.version>17</java.version>
<junit.version>5.10.0</junit.version> <junit.version>5.11.0</junit.version>
<javafx.version>17.0.6</javafx.version> <javafx.version>17.0.12</javafx.version>
<slf4j.version>2.0.12</slf4j.version> <slf4j.version>2.0.16</slf4j.version>
<logback.version>1.4.14</logback.version> <logback.version>1.5.7</logback.version>
<fastjson.version>2.0.46</fastjson.version> <fastjson.version>2.0.52</fastjson.version>
<hutool.version>5.8.25</hutool.version>
</properties> </properties>
<dependencies> <dependencies>
@ -89,13 +88,13 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.14.0</version> <version>3.16.0</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io --> <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>2.15.1</version> <version>2.16.1</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-exec --> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-exec -->
<dependency> <dependency>
@ -113,6 +112,21 @@
</dependency> </dependency>
</dependencies> </dependencies>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>nexus-snapshot-repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<build> <build>
<resources> <resources>
<resource> <resource>
@ -125,7 +139,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version> <version>3.13.0</version>
<configuration> <configuration>
<source>17</source> <source>17</source>
<target>17</target> <target>17</target>
@ -135,7 +149,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version> <version>3.3.1</version>
<configuration> <configuration>
<nonFilteredFileExtensions> <nonFilteredFileExtensions>
<nonFilteredFileExtension>exe</nonFilteredFileExtension> <nonFilteredFileExtension>exe</nonFilteredFileExtension>
@ -153,7 +167,8 @@
<!-- Default configuration for running with: mvn clean javafx:run --> <!-- Default configuration for running with: mvn clean javafx:run -->
<id>default-cli</id> <id>default-cli</id>
<configuration> <configuration>
<mainClass>cn.octopusyan.dayzmodtranslator/cn.octopusyan.dayzmodtranslator.AppLuncher <mainClass>
cn.octopusyan.dayzmodtranslator/cn.octopusyan.dayzmodtranslator.AppLuncher
</mainClass> </mainClass>
<launcher>launcher</launcher> <launcher>launcher</launcher>
<jlinkZipName>app</jlinkZipName> <jlinkZipName>app</jlinkZipName>
@ -169,7 +184,7 @@
<plugin> <plugin>
<groupId>io.github.fvarrui</groupId> <groupId>io.github.fvarrui</groupId>
<artifactId>javapackager</artifactId> <artifactId>javapackager</artifactId>
<version>1.7.5</version> <version>1.7.7-SNAPSHOT</version>
<configuration> <configuration>
<bundleJre>true</bundleJre> <bundleJre>true</bundleJre>
<mainClass>cn.octopusyan.dayzmodtranslator.AppLuncher</mainClass> <mainClass>cn.octopusyan.dayzmodtranslator.AppLuncher</mainClass>