mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-17 09:26:50 +08:00
Merge branch 'babalae:main' into main
This commit is contained in:
@@ -12,7 +12,7 @@ namespace BetterGenshinImpact.Genshin.Paths;
|
||||
/// </summary>
|
||||
public partial class UnityLogGameLocator
|
||||
{
|
||||
[GeneratedRegex(@".:/.+(?:GenshinImpact|YuanShen)(?=_Data)", RegexOptions.IgnoreCase)]
|
||||
[GeneratedRegex(@".:(?:\\|/).+(?:GenshinImpact|YuanShen)(?=_Data)", RegexOptions.IgnoreCase)]
|
||||
private static partial Regex WarmupFileLine();
|
||||
|
||||
public static async ValueTask<string?> LocateSingleGamePathAsync()
|
||||
@@ -23,28 +23,19 @@ public partial class UnityLogGameLocator
|
||||
string logFilePathOversea = Path.Combine(appDataPath, @"..\LocalLow\miHoYo\Genshin Impact\output_log.txt");
|
||||
string logFilePathChinese = Path.Combine(appDataPath, @"..\LocalLow\miHoYo\原神\output_log.txt");
|
||||
|
||||
if (File.Exists(logFilePathChinese))
|
||||
var p1 = await LocateGamePathAsync(logFilePathChinese).ConfigureAwait(false);
|
||||
if (p1 is not null)
|
||||
{
|
||||
var p1 = await LocateGamePathAsync(logFilePathChinese).ConfigureAwait(false);
|
||||
if (p1 is not null && File.Exists(p1))
|
||||
{
|
||||
return p1;
|
||||
}
|
||||
}
|
||||
|
||||
if (File.Exists(logFilePathOversea))
|
||||
{
|
||||
var p2 = await LocateGamePathAsync(logFilePathOversea).ConfigureAwait(false);
|
||||
if (p2 is not null && File.Exists(p2))
|
||||
{
|
||||
return p2;
|
||||
}
|
||||
return p1;
|
||||
}
|
||||
|
||||
return await LocateGamePathAsync(logFilePathOversea).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TaskControl.Logger.LogDebug(e, "Failed to locate game path.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -73,8 +64,12 @@ public partial class UnityLogGameLocator
|
||||
return null;
|
||||
}
|
||||
|
||||
string entryName = $"{matchResult.Value}.exe";
|
||||
string fullPath = Path.GetFullPath(Path.Combine(matchResult.Value, "..", entryName));
|
||||
string fullPath = Path.GetFullPath($"{matchResult.Value}.exe");
|
||||
if (!File.Exists(fullPath))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return fullPath;
|
||||
}
|
||||
}
|
||||
@@ -47,10 +47,10 @@ internal class Program
|
||||
option.IsInstallCertificate = false;
|
||||
option.OverlayInstallRemoveExt = "exe,dll,pdb";
|
||||
option.UnpackingPassword = null!;
|
||||
option.ExeName = @"BetterGI\BetterGI.exe";
|
||||
option.ExeName = @"BetterGI.exe";
|
||||
option.KeyName = "BetterGI";
|
||||
option.DisplayName = "BetterGI";
|
||||
option.DisplayIcon = @"BetterGI\BetterGI.exe";
|
||||
option.DisplayIcon = @"BetterGI.exe";
|
||||
option.DisplayVersion = "0.0.0.0";
|
||||
option.Publisher = "babalae";
|
||||
option.AppName = "BetterGI";
|
||||
|
||||
@@ -41,10 +41,10 @@ internal class Program
|
||||
option.IsAllowFirewall = true;
|
||||
option.IsRefreshExplorer = true;
|
||||
option.IsInstallCertificate = false;
|
||||
option.ExeName = @"BetterGI\BetterGI.exe";
|
||||
option.ExeName = @"BetterGI.exe";
|
||||
option.KeyName = "BetterGI";
|
||||
option.DisplayName = "BetterGI";
|
||||
option.DisplayIcon = @"BetterGI\BetterGI.exe";
|
||||
option.DisplayIcon = @"BetterGI.exe";
|
||||
option.DisplayVersion = "0.0.0.0";
|
||||
option.Publisher = "babalae";
|
||||
option.AppName = "BetterGI";
|
||||
|
||||
@@ -30,13 +30,13 @@ cd /d %~dp0
|
||||
del /f /q %tmpfolder%\*.lib
|
||||
del /f /q %tmpfolder%\*ffmpeg*.dll
|
||||
|
||||
:: 添加一些配置文件开始(大文件不适合放在Github)
|
||||
:: 添加一些配置文件开始(大文件不适合放在Github)
|
||||
if exist "E:\HuiTask\BetterGIBuild\BetterGI" (
|
||||
xcopy "E:\HuiTask\BetterGIBuild\BetterGI\*" "%tmpfolder%" /E /C /I /Y
|
||||
)
|
||||
:: 添加一些配置文件结束
|
||||
:: 添加一些配置文件结束
|
||||
|
||||
MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\ -t7z -mx=5 -mf=BCJ2 -r -y
|
||||
MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\* -t7z -mx=5 -mf=BCJ2 -r -y
|
||||
copy /y publish.7z .\MicaSetup\Resources\Setups\publish.7z
|
||||
if exist "%zipFile%" ( del /f /q "%zipfile%" )
|
||||
rename publish.7z %archiveFile%
|
||||
|
||||
@@ -29,7 +29,7 @@ xcopy * "%tmpfolder%" /E /C /I /Y
|
||||
cd /d %~dp0
|
||||
del /f /q %tmpfolder%\*.lib
|
||||
del /f /q %tmpfolder%\*ffmpeg*.dll
|
||||
MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\ -t7z -mx=5 -mf=BCJ2 -r -y
|
||||
MicaSetup.Tools\7-Zip\7z a publish.7z %tmpfolder%\* -t7z -mx=5 -mf=BCJ2 -r -y
|
||||
copy /y publish.7z .\MicaSetup\Resources\Setups\publish.7z
|
||||
if exist "%zipFile%" ( del /f /q "%zipfile%" )
|
||||
rename publish.7z %archiveFile%
|
||||
|
||||
@@ -107,4 +107,4 @@ BetterGI · 更好的原神, 一个基于计算机视觉技术,意图让原
|
||||
|
||||
## 问题反馈
|
||||
|
||||
提 [Issue](https://github.com/babalae/better-genshin-impact/issues) 或 QQ群[783846140](https://qm.qq.com/q/lVzxCCKEko)
|
||||
提 [Issue](https://github.com/babalae/better-genshin-impact/issues) 或 QQ群[960900268](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=faj5hQWJwrWtl9PG8sSAlN2jlQMQfoU1&authKey=QXFi8LYERO4j8TBnO%2FuDtazKXJdMDZaO%2FV2fXmm3USsjpeU8dJgi7Bha9mdfdXy5&noverify=0&group_code=960900268)
|
||||
|
||||
Reference in New Issue
Block a user