-
Notifications
You must be signed in to change notification settings - Fork 22
/
PackRelease.ps1
47 lines (38 loc) · 1.47 KB
/
PackRelease.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"Packing release..."
Add-Type -assembly "system.io.compression.filesystem"
if (-Not(Test-Path Release\TemplePlus.exe)) {
Write-Error "Run this script after building TemplePlus. Release\TemplePlus.exe not found"
Exit
}
# Create a ZIP file for portable distribution
if (Test-Path dist) {
Remove-Item -Recurse dist
}
mkdir dist
copy Release\TemplePlusConfig.exe dist
copy Release\TemplePlusConfig.exe.config dist
copy Release\Squirrel.dll dist
copy Release\Splat.dll dist
copy Release\NuGet.Squirrel.dll dist
copy Release\Mono.Cecil*.dll dist
copy Release\Microsoft.WindowsAPICodePack*.dll dist
copy Release\INIFileParser.dll dist
copy Release\ICSharpCode.SharpZipLib.dll dist
copy Release\FontAwesome.WPF.dll dist
copy Release\DeltaCompressionDotNet*.dll dist
copy Release\TemplePlus.exe dist
copy -Recurse tpdata dist\tpdata
copy -Recurse dependencies\python-lib dist\tpdata\python-lib
copy "C:\Program Files (x86)\Windows Kits\10\Redist\D3D\x86\d3dcompiler_47.dll" dist
$distZipFile = "TemplePlus-$($env:TEMPLEPLUS_VERSION).zip"
$distZipFile = Join-Path (pwd) $distZipFile
if (Test-Path $distZipFile) {
rm $distZipFile
}
"Compressing distribution archive to $distZipFile"
$srcDir = Join-Path (pwd) "dist"
[io.compression.zipfile]::CreateFromDirectory($srcDir, $distZipFile)
# Create the nuget package (with the right version number)
nuget.exe pack -Version $env:TEMPLEPLUS_VERSION TemplePlus.nuspec
"Finished packing the release."