Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复GitHub Actions构建压缩包的版本日期不正确的问题 #5

Merged
merged 7 commits into from
Mar 27, 2024
Merged
Changes from all commits
Commits
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
17 changes: 10 additions & 7 deletions 执行脚本.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ IF EXIST "%~dp0Temp" (rd /s /q "%~dp0Temp")

Rem 创建便携版 NVDA
"%~dp0Resource\%nvda%.exe" --create-portable-silent --portable-path="%~dp0Temp\NVDA"

Rem 运行 NVDA(不含 GitHub Actions),设置版本日期变量
if "%1" == "GITHUB_ACTIONS" (
Rem 在 GitHub Actions 中无需运行 NVDA
@echo on
@echo on
set VersionDate=%date:~-4%.%date:~-10,2%.%date:~-7,2%
) else (
if /i %PROCESSOR_IDENTIFIER:~0,3%==x86 (
if /i %PROCESSOR_IDENTIFIER:~0,3%==x86 (
Start /D "%ProgramFiles%\NVDA" NVDA
) else (
) else (
Start /D "%ProgramFiles(x86)%\NVDA" NVDA
)
)
set VersionDate=%date:~3,4%.%date:~8,2%.%date:~11,2%
)

Rem 开始生成
Expand All @@ -28,7 +31,7 @@ COPY /B /V /Y "%~dp0documentation\ReadMe.md" "%~dp0Output\说明.txt"
"%~dp0Tools\InnoSetup\Compil32" /cc "%~dp0便携版安装脚本.iss"
"%~dp0Tools\InnoSetup\Compil32" /cc "%~dp0懒人版安装脚本.iss"
"%~dp0Tools\InnoSetup\Compil32" /cc "%~dp0恢复备份的 NVDA 配置.iss"
"%~dp0Tools\7Zip\7z.exe" a -y -tzip "%~dp0Output\Archive\NVDA_Lazy_Edition_%date:~3,4%.%date:~8,2%.%date:~11,2%.zip" "%~dp0Output\NVDA 懒人版.exe" "%~dp0Output\更新日志.txt" "%~dp0Output\说明.txt" "%~dp0Output\NVDA 配置恢复工具.exe"
"%~dp0Tools\7Zip\7z.exe" a -y -tzip "%~dp0Output\Archive\Source_Code_And_Dependency_Files_%date:~3,4%.%date:~8,2%.%date:~11,2%.zip" "%~dp0documentation" "%~dp0Resource" "%~dp0Tools" "%~dp0userConfig" "%~dp0ReadMe.md" "%~dp0便携版安装脚本.iss" "%~dp0恢复备份的 NVDA 配置.iss" "%~dp0懒人版安装脚本.iss" "%~dp0执行脚本.bat"
"%~dp0Tools\7Zip\7z.exe" a -y -tzip "%~dp0Output\Archive\NVDA_Lazy_Edition_%VersionDate%.zip" "%~dp0Output\NVDA 懒人版.exe" "%~dp0Output\更新日志.txt" "%~dp0Output\说明.txt" "%~dp0Output\NVDA 配置恢复工具.exe"
"%~dp0Tools\7Zip\7z.exe" a -y -tzip "%~dp0Output\Archive\Source_Code_And_Dependency_Files_%VersionDate%.zip" "%~dp0documentation" "%~dp0Resource" "%~dp0Tools" "%~dp0userConfig" "%~dp0ReadMe.md" "%~dp0便携版安装脚本.iss" "%~dp0恢复备份的 NVDA 配置.iss" "%~dp0懒人版安装脚本.iss" "%~dp0执行脚本.bat"

Exit
Loading