mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
feat: 添加运行库安装脚本
This commit is contained in:
17
DependencySetup_依赖库安装.bat
Normal file
17
DependencySetup_依赖库安装.bat
Normal file
@@ -0,0 +1,17 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
|
||||
:: 检查是否以管理员身份运行
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 正在获取管理员权限...
|
||||
powershell -Command "Start-Process cmd.exe -ArgumentList '/c %~0' -Verb RunAs"
|
||||
exit /b
|
||||
)
|
||||
|
||||
winget install "Microsoft.VCRedist.2015+.x64" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
winget install "Microsoft.DotNet.DesktopRuntime.8" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
|
||||
echo 运行库修复完成,请重启电脑后再次尝试运行 MAA。
|
||||
echo The runtime repair is complete. Please restart your computer and try running MAA again.
|
||||
pause
|
||||
@@ -16,9 +16,13 @@
|
||||
<ItemGroup>
|
||||
<MaaResourceFiles Include="$(MSBuildProjectDirectory)\..\..\resource\**\*.*" />
|
||||
<MaaPythonBinding Include="$(MSBuildProjectDirectory)\..\..\src\Python\**\*.*" />
|
||||
<!-- 添加 DependencySetup_依赖库安装.bat 文件 -->
|
||||
<DependencySetupFile Include="$(MSBuildProjectDirectory)\..\..\DependencySetup_依赖库安装.bat" />
|
||||
</ItemGroup>
|
||||
<Message Text="Copying resource files" Importance="High" />
|
||||
<Copy SourceFiles="@(MaaResourceFiles)" DestinationFiles="$(MSBuildProjectDirectory)\..\..\$(Platform)\$(Configuration)\resource\%(RecursiveDir)%(Filename)%(Extension)" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />
|
||||
<Copy SourceFiles="@(MaaPythonBinding)" DestinationFiles="$(MSBuildProjectDirectory)\..\..\$(Platform)\$(Configuration)\Python\%(RecursiveDir)%(Filename)%(Extension)" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />
|
||||
<!-- 复制 DependencySetup_依赖库安装.bat 文件 -->
|
||||
<Copy SourceFiles="@(DependencySetupFile)" DestinationFiles="$(MSBuildProjectDirectory)\..\..\$(Platform)\$(Configuration)\%(Filename)%(Extension)" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user