2019-06-12 08:06:33 +02:00
|
|
|
# List startup folder.
|
|
|
|
$old_pwd=$pwd.Path
|
2020-04-28 11:34:35 +02:00
|
|
|
$ssl_bin = "C:\OpenSSL-v111-Win64\bin"
|
2020-04-28 12:42:34 +02:00
|
|
|
$mysql_dir = "C:\Program Files\MySQL\MySQL Server 5.7"
|
2020-04-28 11:32:14 +02:00
|
|
|
|
|
|
|
ls "$ssl_bin"
|
2020-04-28 12:42:34 +02:00
|
|
|
ls "$mysql_dir\lib"
|
2019-06-12 08:06:33 +02:00
|
|
|
ls
|
2020-04-28 21:15:58 +02:00
|
|
|
|
|
|
|
echo "qmake args are: '$env:qmake_args'."
|
2019-06-12 08:06:33 +02:00
|
|
|
|
2019-06-12 08:20:32 +02:00
|
|
|
# Setup env path with qmake.
|
|
|
|
$env:PATH = "$env:QTDIR\bin;" + $env:PATH
|
|
|
|
|
2020-04-28 12:42:34 +02:00
|
|
|
# Build MySQL Qt plugin.
|
2020-04-28 21:15:58 +02:00
|
|
|
$qt_ver = "$env:QTVER"
|
|
|
|
$qt_rev = "$env:QTREV"
|
2020-04-28 12:42:34 +02:00
|
|
|
$qtbase_url = "https://download.qt.io/archive/qt/$qt_ver/$qt_ver.$qt_rev/submodules/qtbase-everywhere-src-$qt_ver.$qt_rev.zip"
|
|
|
|
$output = "qt.zip"
|
|
|
|
|
|
|
|
mkdir "build-mysql"
|
|
|
|
cd "build-mysql"
|
|
|
|
|
2020-04-28 21:15:58 +02:00
|
|
|
echo "Building MySQL Qt plugin, downloading Qt '$qt_ver.$qt_rev'."
|
|
|
|
|
2020-04-28 20:39:43 +02:00
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
2020-04-28 12:42:34 +02:00
|
|
|
Invoke-WebRequest -Uri $qtbase_url -OutFile $output
|
|
|
|
|
|
|
|
& "..\resources\scripts\7za\7za.exe" x $output
|
|
|
|
|
2020-04-28 21:15:58 +02:00
|
|
|
$qt_mysql_dir = "./qtbase-everywhere-src-$qt_ver.$qt_rev/src/plugins/sqldrivers"
|
2020-04-28 13:49:41 +02:00
|
|
|
$mysql_d_rev = $mysql_dir.Replace('\', '/')
|
2020-04-28 13:51:50 +02:00
|
|
|
|
2020-04-28 14:24:36 +02:00
|
|
|
cd "$qt_mysql_dir"
|
|
|
|
|
2020-04-28 14:36:00 +02:00
|
|
|
qmake.exe -- MYSQL_INCDIR="$mysql_d_rev/include" MYSQL_LIBDIR="$mysql_d_rev/lib"
|
2020-04-28 12:45:30 +02:00
|
|
|
nmake.exe sub-mysql
|
2020-04-28 21:15:58 +02:00
|
|
|
|
2020-04-28 14:40:42 +02:00
|
|
|
Copy-Item -Path ".\plugins\sqldrivers\qsqlmysql.dll" -Destination "$old_pwd\build-mysql"
|
|
|
|
|
|
|
|
cd "$old_pwd"
|
2020-04-28 21:15:58 +02:00
|
|
|
ls "build-mysql"
|
2020-04-28 12:42:34 +02:00
|
|
|
|
2020-04-28 21:15:58 +02:00
|
|
|
# Build RSS Guard itself.
|
2019-06-12 08:06:33 +02:00
|
|
|
mkdir "rssguard-build"
|
|
|
|
cd "rssguard-build"
|
|
|
|
qmake.exe ..\build.pro "$env:qmake_args"
|
|
|
|
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.
|
|
|
|
Copy-Item -Path "$ssl_bin\libcrypto*.dll" -Destination ".\app\"
|
|
|
|
Copy-Item -Path "$ssl_bin\libssl*.dll" -Destination ".\app\"
|
|
|
|
|
2020-04-28 12:42:34 +02:00
|
|
|
# Copy MySQL Qt plugin.
|
2020-04-28 14:52:31 +02:00
|
|
|
Copy-Item -Path "$mysql_dir\lib\libmysql.dll" -Destination ".\app\"
|
2020-04-28 14:46:52 +02:00
|
|
|
Copy-Item -Path "$old_pwd\build-mysql\qsqlmysql.dll" -Destination ".\app\sqldrivers\"
|
2020-04-28 11:32:14 +02:00
|
|
|
|
2019-06-12 08:06:33 +02:00
|
|
|
nmake.exe windows_all
|
|
|
|
cd "$old_pwd"
|