-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.ps1.example
40 lines (28 loc) · 1.14 KB
/
deploy.ps1.example
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
# Adjust these paths as necessary.
$mingwPath = "C:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\bin"
$qtPath = "C:\Qt\4.8.7\bin"
###
$ErrorActionPreference = "Stop"
$env:Path = "$mingwPath;$qtPath;$env:Path"
if (!(Test-Path -Path "deploy")) {
New-Item -ItemType Directory -Path "deploy"
}
Set-Location -Path "deploy"
qmake -config release ..\Obsession.pro
make
Copy-Item release\obsession.exe .\Obsession.exe
Remove-Item -Recurse -Force -Path "release"
Remove-Item -Recurse -Force -Path "debug"
Get-ChildItem -Filter "*.h" | Remove-Item -Force
Get-ChildItem -Filter "Makefile*" | Remove-Item -Force
Get-ChildItem -Filter "object_script*" | Remove-Item -Force
Copy-Item (Join-Path $qtPath "libgcc_s_dw2-1.dll") .
Copy-Item (Join-Path $qtPath "libstdc++-6.dll") .
Copy-Item (Join-Path $qtPath "libwinpthread-1.dll") .
Copy-Item (Join-Path $qtPath "QtCore4.dll") .
Copy-Item (Join-Path $qtPath "QtGui4.dll") .
Copy-Item (Join-Path $qtPath "QtNetwork4.dll") .
Copy-Item -Recurse ..\resources\sounds .
Set-Location -Path ..
Compress-Archive -Path "deploy\*" -DestinationPath "obsession-alpha-qt4-windows.zip"
Remove-Item -Recurse -Force -Path "deploy"