Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
a174c48
update
CiiLu Mar 7, 2025
855ff55
扩展名排除
CiiLu Mar 7, 2025
aa3f0cd
feat #4311: 模组管理页面无需点击右侧控件即可触发全选快捷键
Open-KFC Mar 17, 2025
ba3ed00
Merge branch 'Hex-Dragon:main' into feat4311
Open-KFC Mar 20, 2025
ca72906
feat: 点击“下载新 Mod”按钮跳转到下载页面时自动填充搜索框的内容
wyc-26 Apr 4, 2025
31f0b81
fix(PageDownloadMod): 小问题
wyc-26 Apr 4, 2025
52ddb97
chore(PageDownloadMod): 还是这样好了……
wyc-26 Apr 4, 2025
8dc1148
pref(ModComp):提高代码可读性
RyogiMutsuki Apr 11, 2025
35c5b69
fix:shao'o'e
RyogiMutsuki Apr 11, 2025
74657d5
pref(ModNet):使用 HttpClient 替代过时的 WebRequest 和 WebClient
RyogiMutsuki Apr 13, 2025
1e98e91
Merge pull request #19 from Hex-Dragon/main
RyogiMutsuki Apr 26, 2025
effdf5a
Merge pull request #32 from Hex-Dragon/main
RyogiMutsuki Apr 28, 2025
f3680f0
fix:大文件删除没有无法放入回收站的提示
RyogiMutsuki Apr 28, 2025
124f5c2
Merge pull request #43 from Hex-Dragon/main
RyogiMutsuki Apr 30, 2025
fa12897
feat(ModDownloadLib): 自动创建资源包文件夹
wyc-26 May 1, 2025
acaff10
fix(ModLaunch): 证书不信任导致无法登录皮肤站
wyc-26 May 5, 2025
443d306
fix(ModLaunch): 证书不信任导致无法登录皮肤站*2
wyc-26 May 5, 2025
9a0ad08
Merge pull request #49 from LuoYun-Team/modnet
RyogiMutsuki May 26, 2025
e19f910
fix:可能在获取正版皮肤时失败
RyogiMutsuki May 31, 2025
878ff98
Update PageDownloadShader.xaml
MoYuan-CN May 31, 2025
73d705a
fix(PageVersionOverall): 重命名版本时会修改后缀名且会修改不应重命名的文件或文件夹
wyc-26 May 31, 2025
d2e2103
Merge pull request #51 from Hex-Dragon/main
RyogiMutsuki Jun 1, 2025
dcac683
Update PageSetupLeft.xaml.vb
Neclyon Jun 1, 2025
5a94854
Refactor(ModNet): 使用 HttpClient 代替过失函数 Feat(ModNet): 支持 GZip 等压缩格式响应的读取
RyogiMutsuki Jun 1, 2025
ebd2019
Merge branch 'main' into feat#6026
wyc-26 Jun 2, 2025
36c03d1
fix(PageComp): 重复的代码
wyc-26 Jun 2, 2025
c2a476f
fix(ModWatcher): Quilt 加载器错误窗口关闭后提示启动成功
wyc-26 Jun 2, 2025
f2ae0fb
fix(PageDownloadCompDetail): 部分原版可用的光影无法显示可下载的游戏版本
wyc-26 Jun 2, 2025
9c9216c
revert: 错误的文件更改
RyogiMutsuki Jun 2, 2025
70a2f28
revert: 错误的文件更改
RyogiMutsuki Jun 2, 2025
3adf47a
fix: 编译错误
RyogiMutsuki Jun 2, 2025
7ecf306
chore: 弄错了
RyogiMutsuki Jun 2, 2025
cddcd9e
chore: 修复火绒的特征查杀 (感谢火绒论坛的 UnknownOoo 老哥)
tangge233 Jun 4, 2025
da8a50a
fix(PageDownloadCompDetail): 给资源包也加上
wyc-26 Jun 4, 2025
809a281
style: 修改变量名称
tangge233 Jun 4, 2025
0c1b9e3
fix(ModWatcher): 忘写对应的 WatcherLog
wyc-26 Jun 5, 2025
2991e43
chore: 小改
wyc-26 Jun 5, 2025
6dbb5c9
fix: 少了特定标头和异常抛出
RyogiMutsuki Jun 7, 2025
300d1ec
feat(Secret):允许使用环境变量覆盖部分内容
RyogiMutsuki Jun 7, 2025
81619cb
feat: 支持识别因为微软账号被标记为可疑活动导致登陆失败
XiaoYueOwO Jun 9, 2025
5e31a1d
Update MyMsgLogin.xaml.vb
XiaoYueOwO Jun 9, 2025
cbf038d
chore(CurseForge): 增加新的 Fallback
RyogiMutsuki Jun 16, 2025
6c426b0
Merge pull request #6437 from LuoYun-Team/Skin
LTCatt Jun 16, 2025
d1fa710
Merge pull request #6570 from LuoYun-Team/curseforge-link
LTCatt Jun 16, 2025
f1c0469
Merge pull request #6482 from tangge233/fix/HRKill
LTCatt Jun 16, 2025
66bf71a
Merge pull request #6456 from CreeperIsASpy/main
LTCatt Jun 16, 2025
666243e
Merge pull request #6249 from PCL-Community/feat#6244
LTCatt Jun 16, 2025
a219eca
Merge pull request #6440 from MoYuan-CN/issue/6438
LTCatt Jun 16, 2025
27b4df0
Merge pull request #6117 from LuoYun-Team/ModComp
LTCatt Jun 16, 2025
01b26cd
Merge pull request #6472 from PCL-Community/fix#6451
LTCatt Jun 16, 2025
a63c5b4
Merge pull request #5872 from Open-KFC/feat4311
LTCatt Jun 16, 2025
4585f31
2.10.2 正式版
LTCatt Jun 16, 2025
ebc9f5e
2.10.2
LTCatt Jun 16, 2025
fdf5407
2.10.3
LTCatt Jun 17, 2025
74e5eb8
修改筛选版本
Pearl-Luo Jun 19, 2025
70ec0b6
fix(java): JVM 崩溃导致错误将版本号识别为 JDK/JRE 64
RyogiMutsuki Jun 19, 2025
7cd5747
fix(ModSecret): 开源版本龙猫蓝配色错误
wyc-26 Jun 20, 2025
6616afd
chore: 一不小心动了注释位置
wyc-26 Jun 20, 2025
65812b8
chore: 删除无用代码
RyogiMutsuki Jun 20, 2025
83e34b8
Update Plain Craft Launcher 2/Modules/Base/ModNet.vb
RyogiMutsuki Jun 23, 2025
5274ae8
chore: 链接更新
Light-Beacon Jun 23, 2025
f3017b6
Update MyMsgLogin.xaml.vb
zkitefly Jun 25, 2025
72a2b5d
修改 Mod 支持所有常用版本的描述
Pearl-Luo Jun 25, 2025
a38e208
回退上次更改
Pearl-Luo Jun 25, 2025
d6043c7
feat(PageDownloadCompDetail): 为每种资源区分 CachedFolder
wyc-26 Jun 25, 2025
e188f73
feat: 允许为单个版本关闭 Mod 更新功能
wyc-26 Jun 26, 2025
c708aca
refactor: 移到高级启动选项里面
wyc-26 Jun 27, 2025
9af03d4
imp(download): 改进可选组件互斥逻辑
MoYuan-CN Jun 30, 2025
3f5392d
fix(version): 应当是 1.20.5+
MoYuan-CN Jun 30, 2025
48684f8
将版本号改为 1.21.7
Pearl-Luo Jul 1, 2025
5ae8138
fix(skin): 可能尝试使用 HTTPS 协议从没有 SSL 证书的服务器下载皮肤文件
RyogiMutsuki Jul 1, 2025
e40a41a
fix: 搜索旧版本 Forge mod 崩溃
shatyuka Jul 2, 2025
5aad129
fix: 规避 WPF 剪贴板卡顿,修复剪切不清除文本的问题
ABA2396 Jul 3, 2025
17031e1
feat:去掉“刷新头像”和“修改披风”之间的线
LuLu-ling Jul 4, 2025
3539805
fix(Drop): 文件拖拽修复
RyogiMutsuki Jul 11, 2025
5126b25
chore: 将旧代码还原获取
RyogiMutsuki Jul 11, 2025
dd028bb
chore: 自动搜索java路径添加 ~/.jdks
lingting Jul 13, 2025
6770e55
Merge pull request #5798 from CiiLu/music
LTCatt Jul 13, 2025
c332a4d
Merge pull request #6027 from PCL-Community/feat#6026
LTCatt Jul 13, 2025
f090a63
Merge pull request #6216 from LuoYun-Team/dialog
LTCatt Jul 13, 2025
9b49235
Merge pull request #6287 from PCL-Community/fix#5252
LTCatt Jul 13, 2025
f98dcd8
Merge pull request #6407 from LuoYun-Team/HttpClient
LTCatt Jul 13, 2025
ad583c2
fix: 选择图片不能选择 jpeg 格式
wyc-26 Jul 13, 2025
f271d72
Merge pull request #6797 from PCL-Community/#6774
LTCatt Jul 13, 2025
96b6ef2
Merge pull request #6473 from PCL-Community/fix#6439
LTCatt Jul 13, 2025
ff225e9
chore: 文件夹以\结尾
lingting Jul 14, 2025
08e4414
将版本号改为 1.21.8
Pearl-Luo Jul 17, 2025
a843b22
Merge branch 'Meloong-Git:main' into fix
Pearl-Luo Jul 17, 2025
d8efb76
Merge pull request #6505 from LuoYun-Team/CustomKey
LTCatt Jul 17, 2025
1458ce9
Merge pull request #6527 from Baiyuexiao-Studio/security-interrupt
LTCatt Jul 17, 2025
deb9029
Merge pull request #6585 from hongggggv/fix
LTCatt Jul 17, 2025
885b3ea
Merge pull request #6587 from LuoYun-Team/java-version
LTCatt Jul 17, 2025
d6a5a8b
Merge pull request #6626 from Light-Beacon/main
LTCatt Jul 18, 2025
8b234d8
Merge pull request #6635 from zkitefly/patch-4
LTCatt Jul 18, 2025
3d63ceb
Merge pull request #6644 from PCL-Community/optimize-1
LTCatt Jul 18, 2025
4d954ae
Merge pull request #6701 from LuoYun-Team/skin-url
LTCatt Jul 18, 2025
2de22b7
Merge pull request #6795 from lingting/main
LTCatt Jul 18, 2025
ae8de39
Merge pull request #6717 from xrlzu-Community/main
LTCatt Jul 18, 2025
eed6c92
Merge pull request #6594 from PCL-Community/fix#6588
LTCatt Jul 18, 2025
d6575df
Merge pull request #6685 from MoYuan-CN/issue/6673
LTCatt Jul 19, 2025
14e14b9
Merge pull request #6772 from LuoYun-Team/Drop
LTCatt Jul 20, 2025
4d91d0b
Merge pull request #6706 from shatyuka/fix/search-forge-mods
LTCatt Jul 20, 2025
4486e7e
Merge pull request #6445 from PCL-Community/fix#6443
LTCatt Jul 21, 2025
b5cfebe
ci(build): 让工作流支持新版本代码的自动替换
RyogiMutsuki Jul 22, 2025
3e474b8
Merge pull request #6845 from LuoYun-Team/actions
LTCatt Jul 22, 2025
add4153
2.10.4
LTCatt Jul 22, 2025
28ef67e
2.10.5
LTCatt Jul 22, 2025
73d9eed
fix(music): 计算音乐文件数量逻辑有误
RyogiMutsuki Jul 24, 2025
5fc0693
imp: 修改参数展示名
MoYuan-CN Jul 28, 2025
b76266a
imp: 修改参数展示名
MoYuan-CN Jul 28, 2025
5a841de
fix(Launch): 修复 HMCL 安装的部分整合包没法启动
RyogiMutsuki Aug 3, 2025
ce91fe6
fix(launch): missing "
RyogiMutsuki Aug 3, 2025
490626a
feat(PageVersionSetup): 自动将服务器地址替换为半角冒号
youzi-3222 Aug 7, 2025
fdc56a2
style: 一个 typo 修复
pynickle Aug 7, 2025
10a5a30
Update Plain Craft Launcher 2.vbproj
pynickle Aug 7, 2025
6848387
feat(PageVersionSetup): 替换中文冒号不弹窗提示
youzi-3222 Aug 7, 2025
8e0f53c
2.10.5 正式版
LTCatt Aug 7, 2025
c7e0dd3
chore(tip): 移除提示
RyogiMutsuki Aug 8, 2025
128b800
chore(tip): 移除注册表项目
RyogiMutsuki Aug 8, 2025
d133138
实现 #6973
Light-Beacon Aug 8, 2025
838cb3c
news homepage use ssl
Light-Beacon Aug 8, 2025
c90d96e
Merge pull request #6709 from ABA2396/pcl2
LTCatt Aug 11, 2025
59857c3
Merge pull request #6984 from Light-Beacon/change-news-homepage-link
LTCatt Aug 11, 2025
5785ffd
Merge pull request #6980 from Light-Beacon/main
LTCatt Aug 11, 2025
c22f925
Merge pull request #6976 from LuoYun-Team/inst-tip
LTCatt Aug 11, 2025
88e8701
Merge pull request #6971 from pynickle/style/swapped
LTCatt Aug 11, 2025
28640dc
Merge pull request #6942 from LuoYun-Team/MMC-Modpack-Fix
LTCatt Aug 12, 2025
f67ef9c
Merge pull request #6904 from MoYuan-CN/pr/term-optimize
LTCatt Aug 12, 2025
1d09471
Merge pull request #6970 from youzi-3222/auto-repl-colon
LTCatt Aug 12, 2025
adf52d5
2.10.6
LTCatt Aug 12, 2025
273cee6
fix: IsSwaped 在加壳后失效
LTCatt Aug 12, 2025
8e095dd
2.10.6 正式版
LTCatt Aug 13, 2025
b09750f
fix(java): 尝试修复从 ~/.jdks 中搜索Java时未匹配到任何可用项
lingting Aug 27, 2025
9a3df4a
feat(java): Java搜索支持 Jet的sdk且同时忽略jet 的jcef sdk
lingting Aug 27, 2025
f211df1
Merge pull request #6648 from PCL-Community/feat#6610
LTCatt Sep 1, 2025
3528bf5
Merge pull request #6866 from LuoYun-Team/MusicCount
LTCatt Sep 1, 2025
dc7f01d
Merge pull request #7151 from lingting/main
LTCatt Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
required: false
- label: "**我已尝试使用 HMCL 启动,HMCL 没有出现问题。** 如果 HMCL 也无法启动就不是 PCL 导致的问题,请 **不要** 提交反馈。[下载 HMCL](https://hmcl.huangyuhui.net/download)"
required: true
- label: "我已在 [Issues 页面](https://github.com/Hex-Dragon/PCL2/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Hex-Dragon/PCL2/discussions/1930) 中搜索,确认了这一 Bug 未被提交过。"
- label: "我已在 [Issues 页面](https://github.com/Meloong-Git/PCL/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Meloong-Git/PCL/discussions/1930) 中搜索,确认了这一 Bug 未被提交过。"
required: true
- type: textarea
id: "yml-2"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
required: false
- label: "我知晓大多数此类问题都是网络环境不佳导致的,但我确实认为我的问题可能是 PCL 导致的,和网络环境无关。"
required: true
- label: "我已在 [Issues 页面](https://github.com/Hex-Dragon/PCL2/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Hex-Dragon/PCL2/discussions/1930) 中搜索,确认了这一 Bug 未被提交过。"
- label: "我已在 [Issues 页面](https://github.com/Meloong-Git/PCL/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Meloong-Git/PCL/discussions/1930) 中搜索,确认了这一 Bug 未被提交过。"
required: true
- type: textarea
id: "yml-2"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
label: "检查项"
description: "请逐个检查下列项目,并勾选确认。"
options:
- label: "我已在 [Issues 页面](https://github.com/Hex-Dragon/PCL2/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Hex-Dragon/PCL2/discussions/1930) 中搜索,确认了这一 Bug 未被提交过。"
- label: "我已在 [Issues 页面](https://github.com/Meloong-Git/PCL/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Meloong-Git/PCL/discussions/1930) 中搜索,确认了这一 Bug 未被提交过。"
required: true
- type: textarea
id: "yml-2"
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/ch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ body:
label: "检查项"
description: "请逐个检查下列项目,并勾选确认。"
options:
- label: "我已在 [Issues 页面](https://github.com/Hex-Dragon/PCL2/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Hex-Dragon/PCL2/discussions/1930) 中搜索,确认了这一建议未被提交过。"
- label: "我已在 [Issues 页面](https://github.com/Meloong-Git/PCL/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Meloong-Git/PCL/discussions/1930) 中搜索,确认了这一建议未被提交过。"
required: true
- label: "我已查看 [功能投票页面](https://github.com/Hex-Dragon/PCL2/discussions/categories/%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8/),确认了这一建议未在投票列表中。"
- label: "我已查看 [功能投票页面](https://github.com/Meloong-Git/PCL/discussions/categories/%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8/),确认了这一建议未在投票列表中。"
required: true
- type: textarea
id: "yml-2"
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: 主页预设反馈
url: https://github.com/Hex-Dragon/PCL2/discussions/categories/自定义主页
url: https://github.com/Meloong-Git/PCL/discussions/categories/自定义主页
about: 提交与预设的主页(设置 → 个性化 → 主页预设)中的具体内容相关的反馈
- name: 帮助文档反馈
url: https://github.com/LTCatt/PCL2Help/issues
about: 提交与 PCL 帮助文档(更多 → 帮助)中的具体内容相关的反馈
- name: 提问
url: https://github.com/Hex-Dragon/PCL2/discussions/new?category=%E6%8F%90%E9%97%AE
url: https://github.com/Meloong-Git/PCL/discussions/new?category=%E6%8F%90%E9%97%AE
about: 我想问一些 PCL 相关的问题……
- name: 讨论
url: https://github.com/Hex-Dragon/PCL2/discussions/new?category=%E8%AE%A8%E8%AE%BA
url: https://github.com/Meloong-Git/PCL/discussions/new?category=%E8%AE%A8%E8%AE%BA
about: 我想讨论一些 PCL 相关的事情……
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ body:
label: "检查项"
description: "请逐个检查下列项目,并勾选确认。"
options:
- label: "我已在 [Issues 页面](https://github.com/Hex-Dragon/PCL2/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Hex-Dragon/PCL2/discussions/1930) 中搜索,确认了这一提案未被提交过。"
- label: "我已在 [Issues 页面](https://github.com/Meloong-Git/PCL/issues?q=is%3Aissue+) 和 [常见&难检反馈及问题列表](https://github.com/Meloong-Git/PCL/discussions/1930) 中搜索,确认了这一提案未被提交过。"
required: true
- label: "我已查看 [功能投票页面](https://github.com/Hex-Dragon/PCL2/discussions/categories/%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8/),确认了这一提案未在投票列表中。"
- label: "我已查看 [功能投票页面](https://github.com/Meloong-Git/PCL/discussions/categories/%E5%8A%9F%E8%83%BD%E6%8A%95%E7%A5%A8/),确认了这一提案未在投票列表中。"
required: true
- label: "我知晓还没做的新功能真的太多了,忙不过来,所以新功能提案几乎不会被处理,也不建议再提交新功能提案 qwq……"
required: true
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:

- name: Update Help
run: |
$workpath = [System.Environment]::CurrentDirectory
Set-Location ..
git clone https://github.com/LTCatt/PCL2Help.git -b master --single-branch --depth 1
Set-Location PCL2Help
Expand All @@ -52,8 +51,8 @@ jobs:

- name: Replace
run: |
(gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Public Const OAuthClientId As String = ""', 'Public Const OAuthClientId As String = "${{ secrets.CLIENT_ID }}"' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb"
(gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Public Const CurseForgeAPIKey As String = ""', 'Public Const CurseForgeAPIKey As String = "${{ secrets.CURSEFORGE_API_KEY }}"' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb"
(gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Public OAuthClientId As String = If(Environment.GetEnvironmentVariable("PCL_MS_CLIENT_ID"), "")', 'Public OAuthClientId As String = If(Environment.GetEnvironmentVariable("PCL_MS_CLIENT_ID"), "${{ secrets.CLIENT_ID }}")' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb"
(gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Public CurseForgeAPIKey As String = If(Environment.GetEnvironmentVariable("PCL_CURSEFORGE_API_KEY"), "")', 'Public CurseForgeAPIKey As String = If(Environment.GetEnvironmentVariable("PCL_CURSEFORGE_API_KEY"), "${{ secrets.CURSEFORGE_API_KEY }}")' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb"
(gc "Plain Craft Launcher 2\Modules\Base\ModBase.vb") -replace 'Public Const CommitHash As String = ""', 'Public Const CommitHash As String = "${{ github.sha }}"' | Out-File "Plain Craft Launcher 2\Modules\Base\ModBase.vb"

- name: Build
Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
这些规则主要是为了阻止恶意的使用和 “山寨版” 的出现,常规、善意的使用都没啥问题的,放心吧!

如果你只是参考了一小段代码,署个名就行啦,不用担心。
如果对具体细节有疑问,欢迎在 https://github.com/Hex-Dragon/PCL2/discussions/new?category=%E6%8F%90%E9%97%AE 发帖询问!
如果对具体细节有疑问,欢迎在 https://github.com/Meloong-Git/PCL/discussions/new?category=%E6%8F%90%E9%97%AE 发帖询问!

多谢大家啦!
4 changes: 4 additions & 0 deletions Plain Craft Launcher 2/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="13.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
3 changes: 3 additions & 0 deletions Plain Craft Launcher 2/Application.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="clr-namespace:PCL.Controls.Behaviors"
xmlns:local="clr-namespace:PCL"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
StartupUri="FormMain.xaml"
Expand Down Expand Up @@ -302,6 +303,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="behaviors:ClipboardInterceptor.EnableSafeClipboard" Value="True" />
</Style>
<Style TargetType="PasswordBox">
<Setter Property="FontSize" Value="13" />
Expand Down Expand Up @@ -343,6 +345,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="behaviors:ClipboardInterceptor.EnableSafeClipboard" Value="True" />
</Style>

<!-- ComboBox -->
Expand Down
65 changes: 21 additions & 44 deletions Plain Craft Launcher 2/Application.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ WaitRetry:
ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 Or SecurityProtocolType.Tls Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
ServicePointManager.DefaultConnectionLimit = 1024
ServicePointManager.UseNagleAlgorithm = False
'计时
Log("[Start] 第一阶段加载用时:" & GetTimeTick() - ApplicationStartTick & " ms")
ApplicationStartTick = GetTimeTick()
Expand Down Expand Up @@ -181,53 +182,29 @@ WaitRetry:
End Sub

'动态 DLL 调用
Private Shared AssemblyNAudio As Assembly
Private Shared AssemblyJson As Assembly
Private Shared AssemblyDialog As Assembly
Private Shared AssemblyImazenWebp As Assembly
Private Shared ReadOnly AssemblyNAudioLock As New Object
Private Shared ReadOnly AssemblyJsonLock As New Object
Private Shared ReadOnly AssemblyDialogLock As New Object
Private Shared ReadOnly AssemblyImazenWebpLock As New Object
Private Declare Function SetDllDirectory Lib "kernel32" Alias "SetDllDirectoryA" (lpPathName As String) As Boolean
Public Shared Function AssemblyResolve(sender As Object, args As ResolveEventArgs) As Assembly
If args.Name.StartsWithF("NAudio") Then
SyncLock AssemblyNAudioLock
If AssemblyNAudio Is Nothing Then
Log("[Start] 加载 DLL:NAudio")
AssemblyNAudio = Assembly.Load(GetResources("NAudio"))
End If
Return AssemblyNAudio
End SyncLock
ElseIf args.Name.StartsWithF("Newtonsoft.Json") Then
SyncLock AssemblyJsonLock
If AssemblyJson Is Nothing Then
Log("[Start] 加载 DLL:Json")
AssemblyJson = Assembly.Load(GetResources("Json"))
End If
Return AssemblyJson
End SyncLock
ElseIf args.Name.StartsWithF("Ookii.Dialogs.Wpf") Then
SyncLock AssemblyDialogLock
If AssemblyDialog Is Nothing Then
Log("[Start] 加载 DLL:Dialogs")
AssemblyDialog = Assembly.Load(GetResources("Dialogs"))
End If
Return AssemblyDialog
End SyncLock
ElseIf args.Name.StartsWithF("Imazen.WebP") Then
SyncLock AssemblyImazenWebpLock
If AssemblyImazenWebp Is Nothing Then
Log("[Start] 加载 DLL:Imazen.WebP")
AssemblyImazenWebp = Assembly.Load(GetResources("Imazen_WebP"))
SetDllDirectory(PathPure.TrimEnd("\"))
Public Shared Function AssemblyResolve(sender As Object, Args As ResolveEventArgs) As Assembly
'缓存
Static Prefixes As String() = {"NAudio", "Newtonsoft.Json", "Ookii.Dialogs.Wpf", "Imazen.WebP", "CacheCow.Common", "CacheCow.Client.FileStore", "CacheCow.Client", "System.Net.Http.Formatting"}
Static Locks As New Dictionary(Of String, Object)(StringComparer.Ordinal)
Static LoadedAssembly As New Dictionary(Of String, Assembly)(StringComparer.Ordinal)
'查找对应的 DLL
Dim Prefix As String = Prefixes.FirstOrDefault(Function(p) Args.Name.StartsWithF(p))
If Prefix Is Nothing Then Return Nothing
'加载 DLL
If Not Locks.ContainsKey(Prefix) Then Locks(Prefix) = New Object()
SyncLock Locks(Prefix)
If Not LoadedAssembly.ContainsKey(Prefix) Then
Log($"[Start] 加载 DLL:{Prefix}")
LoadedAssembly(Prefix) = Assembly.Load(GetResources(Prefix))
'WebP 特判
If Prefix = "Imazen.WebP" Then
SetDllDirectory(PathPure.TrimEnd("\"c))
WriteFile(PathPure & "libwebp.dll", GetResources("libwebp64"))
End If
Return AssemblyImazenWebp
End SyncLock
Else
Return Nothing
End If
End If
Return LoadedAssembly(Prefix)
End SyncLock
End Function

'切换窗口
Expand Down
Loading
Loading