summaryrefslogtreecommitdiff
path: root/MAKE.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'MAKE.ps1')
-rw-r--r--MAKE.ps19
1 files changed, 9 insertions, 0 deletions
diff --git a/MAKE.ps1 b/MAKE.ps1
new file mode 100644
index 0000000..d0ddd47
--- /dev/null
+++ b/MAKE.ps1
@@ -0,0 +1,9 @@
+& pyinstaller bidding_data.spec
+Copy-Item '*.md' -Destination 'dist' -Force
+Copy-Item 'res\*' -Destination 'dist' -Force -Recurse
+Set-Variable -Name VersionInfo -Value (Get-Item 'dist\bidding_data.exe').VersionInfo
+Set-Variable -Name FileVersion -Value $VersionInfo.FileVersion.Split(',')
+Set-Variable -Name BundleName -Value ('bundle\\' + $VersionInfo.InternalName + '-' + $FileVersion[0].Trim() + '.' + $FileVersion[1].Trim() + '.zip')
+Remove-Item $BundleName -ErrorAction SilentlyContinue
+Add-Type -Assembly 'System.IO.Compression.FileSystem'
+[System.IO.Compression.ZipFile]::CreateFromDirectory('dist', $BundleName)