-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.ps1
46 lines (38 loc) · 1.04 KB
/
make.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
.\.venv\Scripts\activate
$datetime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
if (Test-Path output) {
rm -fo -r output
}
mkdir output
.\translation.ps1 compile
# Non-REPL
&pyinstaller `
--add-data "res;res" `
--add-data "locales;locales" `
--noconfirm `
--name "PWAAT Save Editor" `
--manifest ".\manifest.xml" `
.\app\entry_native.py
# app\entry.py
sleep 3
$bat = @"
@echo off
"PWAAT Save Editor.exe"
pause
"@
Out-File -FilePath ".\dist\PWAAT Save Editor\DEBUG.bat" -InputObject $bat -Encoding ascii
$file_name = ".\dist\PWAAT_Save_Editor_$datetime.zip"
Compress-Archive -Force -Path ".\dist\PWAAT Save Editor" -DestinationPath $file_name
cp $file_name output
# REPL
&pyinstaller --noconfirm .\packages.spec
sleep 3
$bat = @"
@echo off
"PWAAT Save Editor.exe"
pause
"@
Out-File -FilePath ".\dist\PWAAT Save Editor\DEBUG.bat" -InputObject $bat -Encoding ascii
$file_name = ".\dist\PWAAT_Save_Editor_REPL_$datetime.zip"
Compress-Archive -Force -Path ".\dist\PWAAT Save Editor" -DestinationPath $file_name
cp $file_name output