forked from Zzaphkiel/Seraphine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.ps1
41 lines (34 loc) · 992 Bytes
/
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
<#
.SYNOPSIS
该脚本用于打包 "Seraphine" 。
.PARAMETER dest
输出的目标路径。默认为当前目录。
.PARAMETER dbg
是否启用调试模式。如果启用,将不会删除 `.\dist` 目录,也不会创建 zip 文件。
.EXAMPLE
.\make.ps1 -dbg
#>
param(
[Parameter()]
[String]$dest = ".",
[Switch]$dbg
)
if ($dbg -and (Test-Path .\dist)) {
rm -r -Force .\dist
}
pyinstaller -w -i .\app\resource\images\logo.ico main.py
rm -r -fo .\build
rm -r -fo .\main.spec
rni -path .\dist\main -newName Seraphine
rni -path .\dist\Seraphine\main.exe -newName Seraphine.exe
cpi .\app -destination .\dist\Seraphine -recurse
rm -r .\dist\Seraphine\app\common
rm -r .\dist\Seraphine\app\components
rm -r .\dist\Seraphine\app\lol
rm -Path .\dist\Seraphine\app\resource\game* -r
rm -r .\dist\Seraphine\app\resource\i18n\Seraphine.zh_CN.ts
rm -r .\dist\Seraphine\app\view
if (! $dbg) {
7z a $dest\Seraphine.zip .\dist\Seraphine\* -r
rm -r .\dist
}