Commit Graph

1167 Commits

Author SHA1 Message Date
Glavo
1ac1ff3c95 fix crash 2023-02-08 21:16:24 +08:00
Glavo
7e522ff136
弃用 commons-lang (#2061)
* Remove ArrayUtils

* Remove MutableObject

* VersionRange

* Replace Range with VersionRange

* fix checkstyle

* Update

* update

* update

* fix checkstyle

* fix checkstyle

* update
2023-02-08 19:57:52 +08:00
zkitefly
90c261ddd1
Quilt 相关功能完善 (#2035)
* Quilt 相关功能完善

- Mcbbs 整合包适配 Quilt
- 自定义命令支持 Quilt 环境变量
- 顺便把语言文件内的机翻错误“\:”修复

* Fix

---------

Co-authored-by: Yuhui Huang <i@huangyuhui.net>
2023-02-08 19:54:54 +08:00
zkitefly
29410b951d
优化日志分析器 (#2038)
* 更新 CrashReportAnalyzer.java

* Edit

* Fix

* add

* 删除 CrashReportAnalyzerTest.java

试试删掉的话能不能构建成功

* Fix

* Fix

* Revert "删除 CrashReportAnalyzerTest.java"

This reverts commit 4fe873cfcb.

* 换回 LibericaJDK

* Fix

尴尬(

* 更新 GameCrashWindow.java

修改大小以显示更多内容(防止左下角按钮被吞掉)

* 更新 I18N_zh_CN.properties

- 修改链接,可以跳转至特定地方
- 统一叫法 "全局(特定)游戏设置"
- 将升级显卡的相关教程文章更换

* Fix

* Update CrashReportAnalyzer.java

* Fix

- 删除重复检查项

* 添加日志检查

https://paste.ee/p/vv7DD

* fix

* add

怎么tm还来一个

* 更新 CrashReportAnalyzerTest.java

* 调整

* fix

* 更新 I18N_zh_CN.properties

* 更新 I18N_zh_CN.properties

* 添加重复安装 Optifine检查

https://github.com/huanghongxun/HMCL/discussions/1904#discussioncomment-4340734

* 添加重复安装 Forge 的检查

test

更新 CrashReportAnalyzer.java

fix

* 完善 OPTIFINE_IS_NOT_COMPATIBLE_WITH_FORGE

完善 OPTIFINE_IS_NOT_COMPATIBLE_WITH_FORGE

https://github.com/huanghongxun/HMCL/discussions/1904#discussioncomment-4332485
https://github.com/huanghongxun/HMCL/discussions/1904#discussioncomment-4332522

* fix

* 调整 FABRIC_WARNINGS

https://paste.ee/p/KOTyX
2023-02-06 22:56:58 +08:00
Glavo
461cde3282
改进 LogWindow (#1971)
* Add CircularArrayList

* fix test

* update

* update
2023-02-06 22:55:16 +08:00
Glavo
e76d520cac
x86-64 平台上不自动选择 32 位 Java (#2042)
* close #2041

* update

* update
2023-02-06 22:49:37 +08:00
Glavo
ec6637728a
代码清理 (#2072)
* Remove unused methods

* newRaisedButton

* update

* update

* update

* update

* update

* toLowerCase and toUpperCase

* update

* update
2023-02-06 22:44:19 +08:00
Glavo
e543ee3f55
建议 Forge 用户使用官方推荐版本的 Java 启动游戏 (#2033)
* Share LibraryAnalyzer

* Add a new JavaVersionConstraint rule

* Update message
2023-02-02 21:35:22 +08:00
zkitefly
f7526d4cdc
将初始化内容设定为“名称”排序 (#2054)
* 将初始化内容设定为“名称”排序

* 更新 RemoteModRepository.java
2023-02-02 21:33:43 +08:00
Glavo
c86302df58
Update NormalizedSkin (#2036)
* Update NormalizedSkin

* Add tests

* update

* update
2023-02-02 21:26:27 +08:00
Glavo
d4398764a1
Update Texture (#2037)
* Update Texture

* fix checkstyle
2023-02-02 21:25:05 +08:00
Glavo
92ce7c83ca
清理代码 (#1990)
* cleanup

* Cleanup StringUtils

* Cleanup CommandBuilder

* Cleanup CommandBuilder

* Use 'String::replace(char, char)'
2023-01-14 02:37:55 +08:00
Glavo
753ba956fe
fix #1705: Do not re-enable mod after update (#2001)
* fix #1705: Do not re-enable mod after update

* update

* Do not select disabled mods by default
2023-01-14 02:37:11 +08:00
Glavo
0130676b42
fix #1999: Add overrideJavaArguments to LaunchOptions (#2000)
* fix #1999: Add overrideJavaArguments to LaunchOptions

* fix checkstyle
2023-01-14 02:16:20 +08:00
Glavo
42dd877b97
Bump junit from 4 to 5 (#1997) 2023-01-14 01:48:38 +08:00
Glavo
1cc429c7ca
优化 mod 列表加载速度 (#1985)
* Share ZipFileSystem

* fix memory leak
2023-01-08 18:15:55 +08:00
Glavo
7c8d75f5a4
fix memory leak (#1986) 2023-01-07 21:33:16 +08:00
Glavo
593e70fa43
优化对 Java 兼容性问题的检测 (#1973)
* Optimization Tips

* cleanup code
2023-01-07 21:29:18 +08:00
Glavo
6475e03c01
Improve quilt support (#1974) 2023-01-07 21:27:25 +08:00
Glavo
3f0e8138b1
fix Modpack::acceptFile (#1972)
* fix Modpack::acceptFile

* fix separator
2023-01-07 21:25:36 +08:00
Glavo
0f0f5cbc28
fix #1905: fix path splicing (#1951) 2022-12-30 17:01:49 +08:00
Glavo
bed74dc66c
fix find HMCL directory (#1953) 2022-12-30 17:00:10 +08:00
Glavo
d032b3c677
close #1376: 在用户文件夹中存储账户信息 (#1941)
* Save accounts in hmcl dir

* close #1377: Add conversion button

* fix YggdrasilAccount::getIdentifier()

* Check whether the account exists before moving

* Add server url to selected account

* Add global prefix
2022-12-30 02:03:19 +08:00
Glavo
4c2d1063ec
fix #1922: Add Xms only when the min memory is less than the max memory (#1949) 2022-12-30 01:59:02 +08:00
Yingchi Long
2e7e2d261c
feat: use XDG_DATA_HOME as for Linux working directories (#1948) 2022-12-30 01:58:15 +08:00
zkitefly
9750c69742
fix #1926 (#1940) 2022-12-28 23:22:46 +08:00
Glavo
d67dd700e9
修复主题相关问题 (#1915)
* Update blue.css

* fix

* fix

* Cleanup Code

* Use blue.bss

* fix read theme
2022-12-17 18:34:10 +08:00
Glavo
a7108f318a
Adjust JVM arguments priority (#1898)
* Adjust JVM arguments priority

* #1889: Use the default JVM arguments consistent with the official launcher

* Follow -Xmx settings in modpack info

* Do not force generation of -Xmx
2022-12-06 13:34:32 +08:00
Glavo
1ec9e41459
fix #1885: filter letter color code (#1890) 2022-12-02 17:28:25 +08:00
Glavo
a6231ac593
修复内存泄漏 (#1888)
* Fix memory leaks

* Cache icon in cell

* Lazy acquisition of availableCharsets
2022-12-02 17:27:52 +08:00
Glavo
ea91ee91ec
close #1199: Reimplement Zipper (#1891) 2022-12-02 17:26:00 +08:00
Glavo
d4c0c30283
修复在精简 JRE 上崩溃的问题 (#1893)
* Do not load javafx.web on unsupported platforms

* No longer requires jdk.zipfs to exist
2022-12-02 17:23:08 +08:00
Glavo
9e2c46a6f8
Gradle 7.6 (#1895) 2022-12-02 17:22:09 +08:00
Glavo
ce31bcc6e0 Catch the exception that the OperatingSystemMXBean does not exist 2022-12-01 03:51:21 +08:00
Glavo
d11e22026c
修复遗留问题 (#1875)
* Check the sha1 file of java in the minecraft runtime dir

* Fix download Java on macOS

* misc

* Verify Java at startup

* Find the Java installed by official launcher on osx-arm64

* Extract the downloaded file to a temporary file

* Rollback JavaRepository.getSystemJavaPlatform
2022-11-26 21:43:35 +08:00
Glavo
a96fe298b8
fix #1108 (#1882)
close #1791
close #1868
2022-11-26 21:43:03 +08:00
zkitefly
e414450f3c
优化日志分析器 (#1813)
* 优化日志分析器

* 修复翻译错误

* 修复翻译错误

* 修复翻译错误

* Update CrashReportAnalyzer.java

* Update I18N_zh_CN.properties

* 逐步修复问题

* 逐步修复问题

* 尝试修复

* 修复错误

* 修复错误

* 尝试

* 尝试

* 修复

* 按照要求修改

* 依据 Check Style 修复问题

* 按提示修改

* 修复错误

* Update CrashReportAnalyzer.java

* 删除

* Update I18N_zh_CN.properties

* Update CrashReportAnalyzer.java
2022-11-25 22:45:00 +08:00
Glavo
7e826a5952
close #1803: Add new rule to CrashReportAnalyzer (#1872) 2022-11-25 22:37:41 +08:00
Glavo
f5d83095cc
修复 Java 下载相关问题 (#1874)
* fix #1561: Replace existing files when downloading Java
close #1756

* close #1755: Download Java using mirror

* Skip existing files
2022-11-25 22:34:26 +08:00
Glavo
6611774aa9
Fix the problem of garbled logs on Java 18+ (#1866) 2022-11-25 17:17:31 +08:00
Glavo
e1eb40c129
Optimization HMCLProcessListener::onLog (#1867) 2022-11-25 17:16:23 +08:00
Glavo
c76b562705
Remove log4j-patch (#1860)
* Remove log4j-patch

* Update I18N
2022-11-23 17:20:15 +08:00
Glavo
0f26ae5cfc
代码清理与修复 UI 卡顿资源占用过高的问题 (#1849)
* Lazy initialization of Swing

* Load ISRG Root X1 certificate only on Java 8

* Replace JOptionPane with JavaFX Alert

* Avoid using java.awt.Desktop

* Rewrite TexturesLoader

* Optimization SelfDependencyPatcher

* fix typo

* close #968: Use computeIfAbsent to ensure thread safety

* Optimization GameVersion::minecraftVersion

* code cleanup

* Set the initial capacity of readFullyWithoutClosing

* code cleanup

* Mark inner classes as static if possible

* Cache version icon

* Code cleanup

* Fix ListView scrolling performance issues

* DatapackListPage::items

* Replace OutputStream with FileChannel::write
2022-11-23 16:33:14 +08:00
Glavo
035469240d
close #1855: Add 1.19 to DEFAULT_GAME_VERSIONS (#1857) 2022-11-23 16:32:20 +08:00
Glavo
7ee81f7425
Deny access to CurseForge without api key (#1858) 2022-11-23 16:32:07 +08:00
Glavo
1253272626
fix #1852: Lookup manifest in this jar (#1853) 2022-11-23 14:06:35 +08:00
Glavo
ee843543bf
性能与内存优化 (#1848)
* optimization

* Make ManagedProcess::getLines thread safe
2022-11-13 23:43:45 +08:00
Glavo
bac14db432
修复无法正确处理带有 Quilt 的 MultiMC 整合包的问题 (#1841)
* fix #1760: typo

* export quilt info in mmc modpack
2022-11-13 23:39:56 +08:00
huanghongxun
a3d8c6b3b3 feat(skin): introduce new official skins. 2022-11-05 20:22:02 +08:00
huanghongxun
a70e53364d fix(multiplayer): force using authlib-injector in multiplayer mode. 2022-10-30 13:45:34 +08:00
Glavo
68a8944810
改进 HiPer 支持 (#1763)
* Disable start hiper button when token is empty

* Use gsudo start hiper

* Automatically request administrator privileges on Windows and Linux

* Automatically start hiper with sudo on mac

* Update I18N

* Prompt user to chown unwritable files

* Update HiPer file verification failed prompt

* Log other hiper exceptions

* temporarily disable gsudo

* Detect admin rights with 'net session'

* Hide the hint pane when running with administrator privileges

* Prompt user when starting HMCL with sudo

* Fix ClassNotFoundException when no JavaFX

* Update the prompt when the permission cannot be obtained

* Add support for saving multiple HiPer configurations

* update link
close Glavo/HMCL#3

* Detect RISC-V 32

* Save original hiper authorization information

* Add support for importing and exporting license files

* Set initial license file name

* Complement the missing message

* Handling gsudo failure to obtain permission
2022-10-25 21:55:12 +08:00
zkitefly
b280b238df
尝试完成 #1780 (#1789) 2022-10-25 21:52:23 +08:00
huanghongxun
0f39aad429 fix(auth): legacy user type for OfflineAccount. 2022-10-25 21:48:55 +08:00
Glavo
ff78297ee5
fix IntegrityCheck::performCheck (#1792) 2022-10-23 23:28:22 +08:00
Glavo
694e31a7fe
Cache manifest in JarUtils (#1797) 2022-10-23 23:27:21 +08:00
Glavo
43986676d8
修复中文路径下启动 <= 1.12.2 的版本没有声音的问题 (#1754)
* Use native encoding by default

* Fix the problem that LWJGL fails to load OpenAL under Java 18
2022-10-08 17:10:27 +08:00
Glavo
2649e79d47
fix build fails with Java 19 (#1784) 2022-10-08 17:09:12 +08:00
huanghongxun
d3ca50259a fix(modrinth): quilt is already supported. Closes #1746. 2022-09-24 23:16:11 +08:00
Akira Yamazaki
a8b09e2195
修复执行 PreLaunchCommand 时会被阻塞的问题 (#1737) 2022-09-24 16:57:19 +08:00
huanghongxun
f1eb2da57c feat(multiplayer): hiper. 2022-09-12 22:38:36 +08:00
zkitefly
03541a6f85
修改 response.errorDescription.contains() 参数 (#1708)
* 添加两个 response.errorDescription.contains()

* 再添加一个qwq

* 删除重复项

* 恢复删除的项

* 修改

* 修改
2022-09-10 21:50:08 +08:00
Chikage0o0
5fe1ef899d
fix modrinth modpack install (#1702)
* fix modrinth modpack install

* fix NullPointerException
2022-09-10 21:49:31 +08:00
huanghongxun
a6b26a0cd9 fix(microsoft): show relogin dialog when grant expired. Closes #1691. 2022-09-03 23:35:09 +08:00
huanghongxun
0c7b0f285e fix(microsoft): retry 5 times when socket timeout. Closes #1691. 2022-09-03 23:33:11 +08:00
Glavo
6c07924d9b
完善 osx-arm64 原生支持 (#1689)
* Add 1.6~1.18.2 support for osx-arm64

* fix crash on 1.12

* Update I18N
2022-09-03 16:55:27 +08:00
Glavo
835668d781
Update purchase link (#1692) 2022-09-03 16:53:55 +08:00
Glavo
058a8e2335
Update JavaVersionConstraint (#1683) 2022-09-01 22:20:16 +08:00
huanghongxun
3c3c28aaa5 fix(launch): not escape spaces in exported shell script. Closes #1541. 2022-08-29 00:19:32 +08:00
huanghongxun
a80fc34ef1 fix(launch): should not create file when throwing CommandTooLongException. Closes #1606. 2022-08-29 00:03:35 +08:00
huanghongxun
08d7ff138b fix(login): prompt to retry logging in. Closes #1658 #1591 #1544 1608. 2022-08-28 23:57:47 +08:00
Glavo
bce2d1ea5c
Revert ExitWaiter (#1668) 2022-08-28 21:05:43 +08:00
Yuhui Huang
3b5ddcafa6 fix(quilt): Quilt Hash not enabled. Closes #1657. 2022-08-28 17:03:54 +08:00
Glavo
a4164a86af
Support path containing unicode characters on Mac OS (#1661) 2022-08-28 16:54:22 +08:00
Glavo
c21671e86b
修复通过自动安装更新游戏时的崩溃 (#1662)
* fix game upgrade

* fix #1459: Invalidate the version number cache before saving the version
close #1566
2022-08-28 16:52:26 +08:00
huanghongxun
19b6633f4a fix: checkstyle. 2022-08-21 21:29:09 +08:00
Glavo
b80c787b60
为非 x86 平台提供开箱即用的启动支持 (#1610)
* Replace native libraries on non-x86 platforms

* Add support for Linux ARM

* Relax the constraint 'JavaVersionConstraint.VANILLA_X86'

* Fix several hints

* Add OpenGL software renderer option

* Add support for OpenGL software renderer on windows

* Add __GLX_VENDOR_LIBRARY_NAME on Linux

* Catch GLFW error 65543

* Allow users to disable auto completion of native libraries

* fix NPE when violated mandatory constraint

* Add support for Minecraft 1.13

* Add support for Minecraft 1.6~1.12

* Add base support for linux-loongarch64

* Improve warnings on Loongson platform

* Add linux launcher script

* fix typo

* Add support for loongarch64 (old world)
2022-08-21 19:00:05 +08:00
huanghongxun
675af3a5aa feat(download): quilt installation. 2022-08-21 18:20:11 +08:00
huanghongxun
4ba4c3e749 feat(quilt): WIP: partially implements quilt installation. 2022-08-20 15:52:22 +08:00
huanghongxun
11e2277c9e feat(account): show little-skin login method by default. Closes #1622. 2022-08-20 14:58:38 +08:00
Tungstend
366e359d83
修复litemod信息获取失败 (#1545)
* 修复Modrinth源加载列表失败,增加Modrinth源获取前置模组功能

* Revert "修复Modrinth源加载列表失败,增加Modrinth源获取前置模组功能"

This reverts commit 1d29c69d92.

* 修复CF源获取模组版本列表不全

* Modrinth源获取类别列表,搜索时增加类别选项

* Update ModrinthRemoteModRepository.java

* Update ModrinthRemoteModRepository.java

* 修复cf源获取前置模组失败

* Revert "Update ModrinthRemoteModRepository.java"

This reverts commit 40b7c1d59d.

* Revert "Revert "Update ModrinthRemoteModRepository.java""

This reverts commit 2027c9ef4c.

* Revert "修复cf源获取前置模组失败"

This reverts commit 4404daf0ea.

* fix conflict

* 修复cf源无法获取前置模组

* fix check style

* Update LiteModMetadata.java
2022-08-08 16:58:55 +08:00
ZekerZhayard
f7d8a473aa
Fix NoSuchMethodError when compiling with Java 9+ (#1585) 2022-08-08 16:58:14 +08:00
Glavo
38d71fd6bb
Add world info page (#1620) 2022-08-08 16:56:03 +08:00
Rovniced
09167bb302
修复curseforge文件名存在中文下载失败 (#1578)
* Update RemoteMod.java

* Update RemoteMod.java

* Update RemoteMod.java
2022-08-08 16:52:02 +08:00
xmdhs
702d27393e replace piston-data.mojang.com 2022-06-17 11:16:33 +08:00
xmdhs
698d3a311d replace piston-meta.mojang.com 2022-06-17 11:16:33 +08:00
Glavo
c92f8e3b51 Complete optifine that is not installed automatically 2022-06-16 20:35:14 +08:00
Glavo
7c502ecd01 fix #1311: fix auto complete OptiFine 2022-06-16 20:35:14 +08:00
Glavo
a237a31d23 Output the URL in the log when the file is not found 2022-06-16 20:35:14 +08:00
ZekerZhayard
8bd4df68f5 Fix #1543 2022-06-14 12:49:56 +08:00
Glavo
29cff02f3c Update JavaVersionConstraint 2022-06-13 23:30:41 +08:00
Glavo
d1bc41e1f1 Detect loongarch 2022-06-13 23:30:41 +08:00
huanghongxun
edd89fb040 fix: test. 2022-06-03 23:59:35 +08:00
huanghongxun
df6230fc01 fix(install): date deserialization. Closes #1512. 2022-06-03 23:13:40 +08:00
huanghongxun
2a979d2b15 fix(download): incorrect mcmod url for modpacks. Closes #1525. 2022-06-03 22:47:03 +08:00
Tungstend
30565c2b50
修复cf源无法获取前置模组 (#1520)
* 修复Modrinth源加载列表失败,增加Modrinth源获取前置模组功能

* Revert "修复Modrinth源加载列表失败,增加Modrinth源获取前置模组功能"

This reverts commit 1d29c69d92.

* 修复CF源获取模组版本列表不全

* Modrinth源获取类别列表,搜索时增加类别选项

* Update ModrinthRemoteModRepository.java

* Update ModrinthRemoteModRepository.java

* 修复cf源获取前置模组失败

* Revert "Update ModrinthRemoteModRepository.java"

This reverts commit 40b7c1d59d.

* Revert "Revert "Update ModrinthRemoteModRepository.java""

This reverts commit 2027c9ef4c.

* Revert "修复cf源获取前置模组失败"

This reverts commit 4404daf0ea.

* fix conflict

* 修复cf源无法获取前置模组

* fix check style
2022-06-02 14:14:51 +08:00
zkitefly
c400c7be9d
Account migration link update (#1513)
* Create  获得加入Cato社区网络身份凭证的方法.txt

* Delete 获得加入Cato社区网络身份凭证的方法.txt

* Update CreateMultiplayerRoomDialog.java

* Update CreateMultiplayerRoomDialog.java

* Update MultiplayerPageSkin.java

* Update YggdrasilService.java
2022-06-02 13:04:12 +08:00
huanghongxun
dc26dba1d0 fix(download): category may be null. 2022-05-24 01:17:29 +08:00
huanghongxun
66cbb23a38 fix(java): broken macos java location. 2022-05-24 01:09:10 +08:00
huanghongxun
663fc176d8 feat(java): find java in minecraft runtime directory with any component name. As a new component name "java-runtime-gamma" was added. 2022-05-24 01:02:16 +08:00
Mingye Wang
b9ec22677e
chore(javaversion): refactor searchPotentialJavaExecutables (#1485)
* chore(javaversion): refactor searchPotentialJavaExecutables

This is a very draft quality PR. I don't even have JDK installed to build it, that's how draft it is.

1. Refactor function to share common steps of the code: system locations, Minecraft launcher runtimes, PATH/HMCL_JRES
2. Modify Minecraft launcher runtimes to include java-runtime-beta

* Update HMCLCore/src/main/java/org/jackhuang/hmcl/util/platform/JavaVersion.java

* Make optional happy

* correct stream-of paren; add macOS bundle exploration

* who needs exploreBundle?

* fix a stupid typo; add debugging tools. It works!
2022-05-23 23:17:32 +08:00