diff options
author | Ali Can Demiralp <ali.demiralp@qt.io> | 2024-04-04 16:03:22 +0200 |
---|---|---|
committer | Ali Can Demiralp <ali.demiralp@qt.io> | 2024-04-05 09:27:47 +0000 |
commit | 5d1e2cd4792d5b7d5be2603f9c2235d9ec1ebe9d (patch) | |
tree | 6249462dafecb1640183ad8beb8c59adc2ebb19f | |
parent | 922602752270c19f8f5485f0925db6241fcce5a9 (diff) |
Add QtMSBuild stand-alone distribution
Added a post-build step to QtMSBuild to compress the output folder into
a .zip file. The deploy command now copies this .zip file to the
deployment directory along with the .vsix file.
Fixes: QTVSADDINBUG-779
Fixes: QTVSADDINBUG-1157
Change-Id: Ica018358ae323883d51f85489bcd21f10595466b
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r-- | QtMSBuild/QtMSBuild.csproj | 10 | ||||
-rw-r--r-- | scripts/vstools/deploy.cmd | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/QtMSBuild/QtMSBuild.csproj b/QtMSBuild/QtMSBuild.csproj index 00c1e059..5e504fdb 100644 --- a/QtMSBuild/QtMSBuild.csproj +++ b/QtMSBuild/QtMSBuild.csproj @@ -452,4 +452,14 @@ </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(SolutionDir)\transform.targets" /> + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + // Create .zip package + // --> + <Target Name="ZipBuild" AfterTargets="Build"> + <Delete Files="$(OutputPath)\QtMSBuild.zip"/> + <ZipDirectory + SourceDirectory="$(OutputPath)\QtMSBuild" + DestinationFile="$(OutputPath)\QtMSBuild.zip"/> + </Target> </Project>
\ No newline at end of file diff --git a/scripts/vstools/deploy.cmd b/scripts/vstools/deploy.cmd index d71d54b1..64e006ff 100644 --- a/scripts/vstools/deploy.cmd +++ b/scripts/vstools/deploy.cmd @@ -16,12 +16,18 @@ IF "%VERSION_REV%" == "" ( MD "%DEPLOY_DIR%\%VERSION%.0" > NUL 2>&1 COPY /Y QtVsTools.Package\bin\Release\QtVsTools.vsix ^ "%DEPLOY_DIR%\%VERSION%.0\qt-vsaddin-msvc%VS%-%VCVARS_ARCH%-%VERSION%.vsix" > NUL ^ - || (%##% %BOLD%%RED%Error copying package to deploy dir.%RESET%) + || (%##% %BOLD%%RED%Error copying .vsix file to deploy dir.%RESET%) + COPY /Y QtMSBuild\bin\Release\QtMSBuild.zip ^ + "%DEPLOY_DIR%\%VERSION%.0\qt-vsaddin-msvc%VS%-%VCVARS_ARCH%-%VERSION%.zip" > NUL ^ + || (%##% %BOLD%%RED%Error copying .zip file to deploy dir.%RESET%) ) ELSE ( %##% QtVsTools.vsix -^> qt-vsaddin-msvc%VS%-%VCVARS_ARCH%-%VERSION%-rev.%VERSION_REV%.vsix MD "%DEPLOY_DIR%\%VERSION%.%VERSION_REV%" > NUL 2>&1 COPY /Y QtVsTools.Package\bin\Release\QtVsTools.vsix ^ "%DEPLOY_DIR%\%VERSION%.%VERSION_REV%\qt-vsaddin-msvc%VS%-%VCVARS_ARCH%-%VERSION%-rev.%VERSION_REV%.vsix" > NUL ^ - || (%##% %BOLD%%RED%Error copying package to deploy dir.%RESET%) + || (%##% %BOLD%%RED%Error copying .vsix file to deploy dir.%RESET%) + COPY /Y QtMSBuild\bin\Release\QtMSBuild.zip ^ + "%DEPLOY_DIR%\%VERSION%.%VERSION_REV%\qt-vsaddin-msvc%VS%-%VCVARS_ARCH%-%VERSION%-rev.%VERSION_REV%.zip" > NUL ^ + || (%##% %BOLD%%RED%Error copying .zip file to deploy dir.%RESET%) ) %##########################% |