|
| 1 | +## Copyright (c) MediaArea.net SARL. All Rights Reserved. |
| 2 | +## |
| 3 | +## Use of this source code is governed by a BSD-style license that can |
| 4 | +## be found in the License.html file in the root of the source tree. |
| 5 | +## |
| 6 | + |
| 7 | +$ErrorActionPreference = "Stop" |
| 8 | + |
| 9 | +#----------------------------------------------------------------------- |
| 10 | +# Setup |
| 11 | +$release_directory = $PSScriptRoot |
| 12 | +$version = (Get-Content "${release_directory}\..\Project\version.txt" -Raw).Trim() |
| 13 | +$arch = "x64" |
| 14 | + |
| 15 | +#----------------------------------------------------------------------- |
| 16 | +# Cleanup |
| 17 | +$artifact = "${release_directory}\QCTools_${version}_Windows_${arch}_WithoutInstaller" |
| 18 | +if (Test-Path "${artifact}") { |
| 19 | + Remove-Item -Force -Recurse "${artifact}" |
| 20 | +} |
| 21 | + |
| 22 | +$artifact = "${release_directory}\QCTools_${version}_Windows_${arch}_WithoutInstaller.zip" |
| 23 | +if (Test-Path "${artifact}") { |
| 24 | + Remove-Item -Force "${artifact}" |
| 25 | +} |
| 26 | + |
| 27 | +$artifact = "${release_directory}\QCTools_${version}_Windows_${arch}_DebugInfo.zip" |
| 28 | +if (Test-Path "${artifact}") { |
| 29 | + Remove-Item -Force "${artifact}" |
| 30 | +} |
| 31 | + |
| 32 | +$artifact = "${release_directory}\QCTools_${version}_Windows.exe" |
| 33 | +if (Test-Path "${artifact}") { |
| 34 | + Remove-Item -Force "${artifact}" |
| 35 | +} |
| 36 | + |
| 37 | +#----------------------------------------------------------------------- |
| 38 | +# Package GUI |
| 39 | +Push-Location "${release_directory}" |
| 40 | + New-Item -ItemType Directory -Path "QCTools_${version}_Windows_${arch}_WithoutInstaller" |
| 41 | + Push-Location -Path "QCTools_${version}_Windows_${arch}_WithoutInstaller" |
| 42 | + Copy-Item -Force -Path "${release_directory}\..\History.txt" . |
| 43 | + Copy-Item -Force -Path "${release_directory}\..\License.html" . |
| 44 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\QCTools.exe" . |
| 45 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Core.dll" . |
| 46 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Gui.dll" . |
| 47 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Multimedia.dll" . |
| 48 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6MultimediaWidgets.dll" . |
| 49 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Network.dll" . |
| 50 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6OpenGL.dll" . |
| 51 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Qml.dll" . |
| 52 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6QmlModels.dll" . |
| 53 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Svg.dll" . |
| 54 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\Qt6Widgets.dll" . |
| 55 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\d3dcompiler_47.dll" . |
| 56 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\opengl32sw.dll" . |
| 57 | + New-Item -ItemType directory -Path "iconengines" |
| 58 | + Push-Location -Path "iconengines" |
| 59 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\\iconengines\qsvgicon.dll" . |
| 60 | + Pop-Location |
| 61 | + New-Item -ItemType directory -Path "imageformats" |
| 62 | + Push-Location -Path "imageformats" |
| 63 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\imageformats\qjpeg.dll" . |
| 64 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\imageformats\qsvg.dll" . |
| 65 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\imageformats\qico.dll" . |
| 66 | + Pop-Location |
| 67 | + New-Item -ItemType directory -Path "multimedia" |
| 68 | + Push-Location -Path "multimedia" |
| 69 | + Copy-Item -Force -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\multimedia\windowsmediaplugin.dll" . |
| 70 | + Pop-Location |
| 71 | + New-Item -ItemType directory -Path "networkinformation" |
| 72 | + Push-Location -Path "networkinformation" |
| 73 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\networkinformation\qnetworklistmanager.dll" . |
| 74 | + Pop-Location |
| 75 | + New-Item -ItemType directory -Path "platforms" |
| 76 | + Push-Location -Path "platforms" |
| 77 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\platforms\qwindows.dll" . |
| 78 | + Pop-Location |
| 79 | + New-Item -ItemType directory -Path "styles" |
| 80 | + Push-Location -Path "styles" |
| 81 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\styles\qwindowsvistastyle.dll" . |
| 82 | + Pop-Location |
| 83 | + New-Item -ItemType directory -Path "tls" |
| 84 | + Push-Location -Path "tls" |
| 85 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\tls\qcertonlybackend.dll" . |
| 86 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\tls\qopensslbackend.dll" . |
| 87 | + Copy-Item -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\tls\qschannelbackend.dll" . |
| 88 | + Pop-Location |
| 89 | + Copy-Item -Path "${release_directory}\..\..\output\lib\qwt.dll" . |
| 90 | + Copy-Item -Path "${release_directory}\..\..\output\bin\avdevice-*.dll" . |
| 91 | + Copy-Item -Path "${release_directory}\..\..\output\bin\avcodec-*.dll" . |
| 92 | + Copy-Item -Path "${release_directory}\..\..\output\bin\avfilter-*.dll" . |
| 93 | + Copy-Item -Path "${release_directory}\..\..\output\bin\avformat-*.dll" . |
| 94 | + Copy-Item -Path "${release_directory}\..\..\output\bin\avutil-*.dll" . |
| 95 | + Copy-Item -Path "${release_directory}\..\..\output\bin\postproc-*.dll" . |
| 96 | + Copy-Item -Path "${release_directory}\..\..\output\bin\swresample-*.dll" . |
| 97 | + Copy-Item -Path "${release_directory}\..\..\output\bin\swscale-*.dll" . |
| 98 | + Copy-Item -Path "${release_directory}\..\..\output\bin\freetype-*.dll" . |
| 99 | + Copy-Item -Path "${release_directory}\..\..\output\bin\harfbuzz.dll" . |
| 100 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\concrt140.dll" . |
| 101 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\msvcp140.dll" . |
| 102 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\msvcp140_1.dll" . |
| 103 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\msvcp140_2.dll" . |
| 104 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\msvcp140_atomic_wait.dll" . |
| 105 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\msvcp140_codecvt_ids.dll" . |
| 106 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\vccorlib140.dll" . |
| 107 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\vcruntime140.dll" . |
| 108 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\vcruntime140_1.dll" . |
| 109 | + Copy-Item -Path "${Env:VCToolsRedistDir}\${arch}\Microsoft.VC143.CRT\vcruntime140_threads.dll" . |
| 110 | + |
| 111 | + Compress-Archive -Path * -DestinationPath "..\QCTools_${version}_Windows_${arch}_WithoutInstaller.zip" |
| 112 | + Pop-Location |
| 113 | + |
| 114 | + Compress-Archive -Path "${release_directory}\..\Project\QtCreator\build\qctools-gui\release\QCTools.pdb" -DestinationPath "QCTools_${version}_Windows_${arch}_DebugInfo.zip" |
| 115 | +Pop-Location |
| 116 | + |
| 117 | +#----------------------------------------------------------------------- |
| 118 | +# Package installer |
| 119 | +Push-Location "${release_directory}" |
| 120 | + makensis.exe "..\Source\Install\QCTools.nsi" |
| 121 | +Pop-Location |
0 commit comments