use qt 6 for windows build
This commit is contained in:
parent
ed6db54cff
commit
b1daf883ac
2 changed files with 20 additions and 16 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.0.4" date="2021-11-16"/>
|
<release version="4.0.4" date="2021-11-18"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
|
|
||||||
|
|
@ -19,40 +19,44 @@ $AllProtocols = [System.Net.SecurityProtocolType]'Tls11,Tls12'
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
# Get and prepare needed dependencies.
|
# Get and prepare needed dependencies.
|
||||||
$qt_version = "5.15.2"
|
$qt_version = "6.2.1"
|
||||||
$qt_link = "https://github.com/qt/qtbase/archive/$qt_version.zip"
|
$maria_version = "10.6.5"
|
||||||
$qt_output = "qt.zip"
|
|
||||||
|
|
||||||
$maria_version = "10.6.4"
|
|
||||||
$maria_link = "https://mirror.vpsfree.cz/mariadb/mariadb-$maria_version/winx64-packages/mariadb-$maria_version-winx64.zip"
|
$maria_link = "https://mirror.vpsfree.cz/mariadb/mariadb-$maria_version/winx64-packages/mariadb-$maria_version-winx64.zip"
|
||||||
$maria_output = "maria.zip"
|
$maria_output = "maria.zip"
|
||||||
|
$cmake_version = "3.22.0-rc3"
|
||||||
|
$cmake_link = "https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-windows-x86_64.zip"
|
||||||
|
$cmake_output = "cmake.zip"
|
||||||
|
|
||||||
Invoke-WebRequest -Uri "$qt_link" -OutFile "$qt_output" -MaximumRedirection 5
|
|
||||||
Invoke-WebRequest -Uri "$maria_link" -OutFile "$maria_output"
|
Invoke-WebRequest -Uri "$maria_link" -OutFile "$maria_output"
|
||||||
|
|
||||||
& ".\resources\scripts\7za\7za.exe" x $qt_output
|
|
||||||
& ".\resources\scripts\7za\7za.exe" x $maria_output
|
& ".\resources\scripts\7za\7za.exe" x $maria_output
|
||||||
|
|
||||||
|
Invoke-WebRequest -Uri "$cmake_link" -OutFile "$cmake_output"
|
||||||
|
& ".\resources\scripts\7za\7za.exe" x $cmake_output
|
||||||
|
|
||||||
|
$cmake_path = "$old_pwd\cmake-$cmake_version-windows-x86_64\bin\cmake.exe"
|
||||||
|
|
||||||
# Download Qt itself.
|
# Download Qt itself.
|
||||||
$qt_path = "$old_pwd\qt"
|
$qt_path = "$old_pwd\qt"
|
||||||
pip3 install -U pip
|
pip3 install -U pip
|
||||||
pip3 install -I aqtinstall==1.2.5
|
pip3 install -I aqtinstall
|
||||||
aqt install -O "$qt_path" "$qt_version" "windows" "desktop" "win64_msvc2019_64" -m "qtwebengine"
|
|
||||||
|
aqt install-qt -O "$qt_path" windows desktop $qt_version win64_msvc2019_64 -m qtwebengine qtmultimedia qt5compat qtwebchannel qtpositioning
|
||||||
|
aqt install-src -O "$qt_path" windows desktop $qt_version --archives qtbase
|
||||||
|
|
||||||
$qt_qmake = "$qt_path\$qt_version\msvc2019_64\bin\qmake.exe"
|
$qt_qmake = "$qt_path\$qt_version\msvc2019_64\bin\qmake.exe"
|
||||||
$env:PATH = "$qt_path\$qt_version\msvc2019_64\bin\;" + $env:PATH
|
$env:PATH = "$qt_path\$qt_version\msvc2019_64\bin\;" + $env:PATH
|
||||||
|
|
||||||
# Download openssl.
|
# Download openssl.
|
||||||
aqt tool -O "$qt_path" windows tools_openssl_x64 1.1.1 qt.tools.openssl.win_x64
|
aqt install-tool -O "$qt_path" windows desktop tools_openssl_x64 qt.tools.openssl.win_x64
|
||||||
$openssl_base_path = "$qt_path\Tools\OpenSSL\Win_x64"
|
$openssl_base_path = "$qt_path\Tools\OpenSSL\Win_x64"
|
||||||
|
|
||||||
# Build dependencies.
|
# Build dependencies.
|
||||||
$maria_path = "$old_pwd\mariadb-$maria_version-winx64"
|
$maria_path = "$old_pwd\mariadb-$maria_version-winx64"
|
||||||
$qt_sqldrivers_path = "$old_pwd\qtbase-$qt_version\src\plugins\sqldrivers"
|
$qt_sqldrivers_path = "$qt_path\$qt_version\Src\qtbase\src\plugins\sqldrivers"
|
||||||
|
|
||||||
cd "$qt_sqldrivers_path"
|
cd "$qt_sqldrivers_path"
|
||||||
& $qt_qmake -- MYSQL_INCDIR="$maria_path\include\mysql" MYSQL_LIBDIR="$maria_path\lib"
|
& $cmake_path -G Ninja -DCMAKE_BUILD_TYPE="Release" -DMySQL_INCLUDE_DIR="$maria_path\include\mysql" -DMySQL_LIBRARY="$maria_path\lib\libmariadb.lib"
|
||||||
nmake.exe sub-mysql
|
& $cmake_path --build .
|
||||||
cd "$old_pwd"
|
cd "$old_pwd"
|
||||||
|
|
||||||
# Build application.
|
# Build application.
|
||||||
|
|
@ -89,4 +93,4 @@ else {
|
||||||
# Create NSIS installation package.
|
# Create NSIS installation package.
|
||||||
& "$old_pwd\resources\scripts\nsis\makensis.exe" "/XOutFile $packagebase.exe" ".\NSIS.template.in"
|
& "$old_pwd\resources\scripts\nsis\makensis.exe" "/XOutFile $packagebase.exe" ".\NSIS.template.in"
|
||||||
|
|
||||||
ls
|
ls
|
||||||
Loading…
Add table
Reference in a new issue