forked from 10se1ucgo/DisableWinTracking
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathbuild.ps1
More file actions
29 lines (21 loc) · 636 Bytes
/
build.ps1
File metadata and controls
29 lines (21 loc) · 636 Bytes
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
$version = Select-String -Path .\dwt_about.py -Pattern '^__version__ = "([0-9.]+)"$' | % { "$($_.matches.groups[1])" }
$pyVersion='cp39'
# Setup
# Create virtual env if needed
if(!(test-path env))
{
py -m venv env
}
.\env\Scripts\activate
pip install -r requirements.txt
# Clean
Remove-Item -Recurse dist\*
Remove-Item -Recurse public\*
# Build
#pyinstaller --onefile dwt_about.py dwt_util.py dwt.py --icon=main.ico
pyinstaller dwt.spec
# Package
Copy-Item COPYING dist\
Copy-Item COPYING.LESSER dist\
Copy-Item README.md dist\
Compress-Archive -Force -Path dist\* -DestinationPath "public\dwt-$version-$pyVersion-win_x86.zip"