From d8e3cf00b4496a24b7bd22f5169ea0ce7e0b69c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Fri, 29 Sep 2023 17:22:22 +0800 Subject: [PATCH] update --- .cmake/InstallerScript.iss.in | 2 +- scripts/windows-mingw-publish.ps1 | 8 ++++---- scripts/windows-publish.ps1 | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.cmake/InstallerScript.iss.in b/.cmake/InstallerScript.iss.in index 8768f430..77de24d7 100644 --- a/.cmake/InstallerScript.iss.in +++ b/.cmake/InstallerScript.iss.in @@ -6,7 +6,7 @@ #define MyAppPublisher "ZhuZiChu" #define MyAppURL "https://zhuzichu520.github.io/" #define MyAppExeName "example.exe" -#define MyAppFileDir "example-win64_msvc2019_64-6.5.0" +#define MyAppFileDir "dist" [Setup] ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. diff --git a/scripts/windows-mingw-publish.ps1 b/scripts/windows-mingw-publish.ps1 index 472300f8..b5c90b01 100644 --- a/scripts/windows-mingw-publish.ps1 +++ b/scripts/windows-mingw-publish.ps1 @@ -15,16 +15,16 @@ Write-Host "scriptDir" $scriptDir function Main() { - New-Item -ItemType Directory $archiveName + New-Item -ItemType Directory dist # 拷贝exe - Copy-Item bin\release\* $archiveName\ -Force -Recurse | Out-Null + Copy-Item bin\release\* dist\ -Force -Recurse | Out-Null # 拷贝依赖 - windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName + windeployqt --qmldir . --plugindir dist\plugins --no-translations --compiler-runtime dist\$targetName # 删除不必要的文件 $excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb") Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force # 打包zip - Compress-Archive -Path $archiveName $archiveName'.zip' + Compress-Archive -Path dist $archiveName'.zip' } if ($null -eq $archiveName || $null -eq $targetName) { diff --git a/scripts/windows-publish.ps1 b/scripts/windows-publish.ps1 index b406b57f..df0f5ad4 100644 --- a/scripts/windows-publish.ps1 +++ b/scripts/windows-publish.ps1 @@ -25,22 +25,22 @@ Write-Host "scriptDir" $scriptDir function Main() { - New-Item -ItemType Directory $archiveName + New-Item -ItemType Directory dist # 拷贝exe - Copy-Item bin\release\* $archiveName\ -Force -Recurse | Out-Null + Copy-Item bin\release\* dist -Force -Recurse | Out-Null # 拷贝依赖 - windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName + windeployqt --qmldir . --plugindir dist\plugins --no-translations --compiler-runtime dist\$targetName # 删除不必要的文件 $excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb") - Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force + Remove-Item -Path dist -Include $excludeList -Recurse -Force # 拷贝vcRedist dll $redistDll="{0}{1}\*.CRT\*.dll" -f $env:vcToolsRedistDir.Trim(),$env:msvcArch - Copy-Item $redistDll $archiveName\ + Copy-Item $redistDll dist\ # 拷贝WinSDK dll $sdkDll="{0}Redist\{1}ucrt\DLLs\{2}\*.dll" -f $env:winSdkDir.Trim(),$env:winSdkVer.Trim(),$env:msvcArch - Copy-Item $sdkDll $archiveName\ + Copy-Item $sdkDll dist\ # 打包zip - Compress-Archive -Path $archiveName $archiveName'.zip' + Compress-Archive -Path dist $archiveName'.zip' } if ($null -eq $archiveName || $null -eq $targetName) {