🚸 优化弹出 explorer
This commit is contained in:
@@ -928,7 +928,7 @@ Retry:
|
|||||||
Sub()
|
Sub()
|
||||||
If ModpackExportBlocking(Options) Then
|
If ModpackExportBlocking(Options) Then
|
||||||
Hint("导出成功!", HintType.Finish)
|
Hint("导出成功!", HintType.Finish)
|
||||||
OpenExplorer($"""{GetPathFromFullPath(Options.Dest)}""")
|
OpenExplorer($"/select,""{Options.Dest}""")
|
||||||
End If
|
End If
|
||||||
End Sub, "Modpack Export")
|
End Sub, "Modpack Export")
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1014,13 +1014,13 @@ Retry:
|
|||||||
|
|
||||||
Dim files As New JArray
|
Dim files As New JArray
|
||||||
For Each m In ModrinthMapping
|
For Each m In ModrinthMapping
|
||||||
Dim f As New JObject
|
files.Add(New JObject From {
|
||||||
f.Add("path", $"mods/{m.Key}")
|
{"path", $"mods/{m.Key}"},
|
||||||
f.Add("hashes", m.Value("hashes"))
|
{"hashes", m.Value("hashes")},
|
||||||
f.Add("env", New JObject From {{"client", "required"}, {"server", "required"}})
|
{"env", New JObject From {{"client", "required"}, {"server", "required"}}},
|
||||||
f.Add("downloads", New JArray From {m.Value("url")})
|
{"downloads", New JArray From {m.Value("url")}},
|
||||||
f.Add("fileSize", m.Value("size"))
|
{"fileSize", m.Value("size")}
|
||||||
files.Add(f)
|
})
|
||||||
Next
|
Next
|
||||||
Dim depend As New JObject From {{"minecraft", McVersion}}
|
Dim depend As New JObject From {{"minecraft", McVersion}}
|
||||||
If Version.Version.HasForge Then depend.Add("forge", Version.Version.ForgeVersion)
|
If Version.Version.HasForge Then depend.Add("forge", Version.Version.ForgeVersion)
|
||||||
@@ -1047,11 +1047,10 @@ Retry:
|
|||||||
'额外文件
|
'额外文件
|
||||||
For Each p In Additional
|
For Each p In Additional
|
||||||
If String.IsNullOrWhiteSpace(p) Then Continue For '传空字串进去会直接把整个版本文件夹拷过去
|
If String.IsNullOrWhiteSpace(p) Then Continue For '传空字串进去会直接把整个版本文件夹拷过去
|
||||||
Dim fromPath As String = $"{Version.Path}{p}"
|
If Not p.StartsWithF(Version.Path, IgnoreCase:=True) Then Continue For
|
||||||
If Directory.Exists(fromPath) Then
|
Dim relative As String = p.Replace(Version.Path, "")
|
||||||
CopyDirectory(fromPath, $"{tempDir}overrides\{p}")
|
If File.Exists(p) AndAlso Not IsVerRedundant(p) Then
|
||||||
ElseIf File.Exists(fromPath) Then
|
CopyFile(p, $"{tempDir}overrides\{relative}")
|
||||||
CopyFile(fromPath, $"{tempDir}overrides\{p}")
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -1066,7 +1065,7 @@ Retry:
|
|||||||
End Function
|
End Function
|
||||||
Private Function ExportCompressed(Version As McVersion, DestPath As String, Additional As String(), Name As String, VerID As String, PCLSetupGlobal As Boolean) As Boolean
|
Private Function ExportCompressed(Version As McVersion, DestPath As String, Additional As String(), Name As String, VerID As String, PCLSetupGlobal As Boolean) As Boolean
|
||||||
Try
|
Try
|
||||||
Log($"[Export] 导出整合包(含启动器):{Version.Path} -> {DestPath},额外版本文件 {If(Additional Is Nothing OrElse Not Additional.Any, "不导出", Additional.Join(", "))},全局设置 {If(PCLSetupGlobal, "导出", "不导出")}")
|
Log($"[Export] 导出整合包(含启动器):{Version.Path} -> {DestPath},额外版本文件 {Additional.Count} 个,全局设置 {If(PCLSetupGlobal, "导出", "不导出")}")
|
||||||
Dim tempDir As String = $"{ExpTempDir}{GetUuid()}\"
|
Dim tempDir As String = $"{ExpTempDir}{GetUuid()}\"
|
||||||
Log($"[Export] 最终压缩包的缓存文件夹:{tempDir}")
|
Log($"[Export] 最终压缩包的缓存文件夹:{tempDir}")
|
||||||
Directory.CreateDirectory(tempDir)
|
Directory.CreateDirectory(tempDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user