2020-11-18 10:50:31 +01:00
|
|
|
$old_pwd = $pwd.Path
|
2020-04-28 11:32:14 +02:00
|
|
|
|
2020-11-18 10:50:31 +01:00
|
|
|
# Get Qt.
|
|
|
|
$qt_version = "5.15.1"
|
|
|
|
$qt_stub = "qt-$qt_version-dynamic-msvc2019-x86_64"
|
|
|
|
$qt_link = "https://github.com/martinrotter/qt5-minimalistic-builds/releases/download/$qt_version/$qt_stub.7z"
|
|
|
|
$qt_output = "qt.7z"
|
2020-04-28 21:15:58 +02:00
|
|
|
|
2020-04-28 20:39:43 +02:00
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
2020-11-18 10:50:31 +01:00
|
|
|
Invoke-WebRequest -Uri $qt_link -OutFile $qt_output
|
|
|
|
& ".\resources\scripts\7za\7za.exe" x $qt_output
|
2020-04-28 14:40:42 +02:00
|
|
|
|
2020-11-18 10:58:19 +01:00
|
|
|
$qt_path = (Resolve-Path $qt_stub).Path
|
|
|
|
$qt_qmake = "$qt_path\bin\qmake.exe"
|
|
|
|
|
2020-11-18 10:50:31 +01:00
|
|
|
cd "$qt_stub\bin\"
|
|
|
|
& ".\qtbinpatcher.exe"
|
2020-04-28 14:40:42 +02:00
|
|
|
cd "$old_pwd"
|
2020-11-18 10:50:31 +01:00
|
|
|
|
|
|
|
$env:PATH = "$qt_path\bin\;" + $env:PATH
|
2020-04-28 12:42:34 +02:00
|
|
|
|
2020-04-28 21:15:58 +02:00
|
|
|
# Build RSS Guard itself.
|
2020-11-18 10:50:31 +01:00
|
|
|
echo "qmake args are: '$env:qmake_args'."
|
|
|
|
|
2019-06-12 08:06:33 +02:00
|
|
|
mkdir "rssguard-build"
|
|
|
|
cd "rssguard-build"
|
2020-11-21 07:37:26 +01:00
|
|
|
& "$qt_qmake" "..\build.pro" "-r" "$env:qmake_args" "CONFIG-=debug" "CONFIG-=debug_and_release" "CONFIG*=release"
|
2019-06-12 08:06:33 +02:00
|
|
|
nmake.exe
|
2020-04-28 10:37:24 +02:00
|
|
|
|
|
|
|
cd "src\rssguard"
|
2020-04-28 10:07:07 +02:00
|
|
|
nmake.exe install
|
2019-06-12 08:06:33 +02:00
|
|
|
|
2020-04-28 10:37:24 +02:00
|
|
|
cd "app"
|
2020-04-28 10:21:49 +02:00
|
|
|
windeployqt.exe --verbose 1 --compiler-runtime --no-translations --release rssguard.exe librssguard.dll
|
2020-04-28 21:15:58 +02:00
|
|
|
|
2020-04-28 10:07:07 +02:00
|
|
|
cd ".."
|
2020-04-28 11:32:14 +02:00
|
|
|
|
|
|
|
# Copy OpenSSL.
|
2020-11-18 10:50:31 +01:00
|
|
|
Copy-Item -Path "$qt_path\bin\libcrypto*.dll" -Destination ".\app\"
|
|
|
|
Copy-Item -Path "$qt_path\bin\libssl*.dll" -Destination ".\app\"
|
2020-04-28 11:32:14 +02:00
|
|
|
|
2020-04-28 12:42:34 +02:00
|
|
|
# Copy MySQL Qt plugin.
|
2020-11-18 10:50:31 +01:00
|
|
|
Copy-Item -Path "$qt_path\bin\libmariadb.dll" -Destination ".\app\"
|
2020-04-28 11:32:14 +02:00
|
|
|
|
2019-06-12 08:06:33 +02:00
|
|
|
nmake.exe windows_all
|
|
|
|
cd "$old_pwd"
|