From ff5f88e4c0891ab8c144b237486e46fb4e7a4816 Mon Sep 17 00:00:00 2001 From: Joerg Koenig Date: Tue, 14 May 2019 22:50:55 +0200 Subject: Fixed windows scripts Change-Id: Ic996056a3569de751e645f584e6f3bae98c5067b --- buildqt32.bat | 43 ++++++++++++++++++++++++++++++++----------- buildqt64.bat | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 20 deletions(-) mode change 100755 => 100644 buildqt32.bat mode change 100755 => 100644 buildqt64.bat diff --git a/buildqt32.bat b/buildqt32.bat old mode 100755 new mode 100644 index 8ef1ce1..6eef465 --- a/buildqt32.bat +++ b/buildqt32.bat @@ -10,14 +10,21 @@ if not defined PERLDIR ( echo PERLDIR is not defined. exit /b 1 ) -rem SET SDKDIR=z:\VS2019BT\ -rem SET PERLDIR=z:\Perl64\ +if not defined NASMDIR ( + echo NASMDIR is not defined. + exit /b 1 +) +if not defined MSYSDIR ( + echo MSYSDIR is not defined. + exit /b 1 +) + +set PATH=%MSYSDIR%\usr\bin;%PATH% +SET PERL=%PERLDIR%\bin\perl.exe SET QT_VERSION=5.12 SET QT_RELEASE=3 -SET PERL=%PERLDIR%\bin\perl.exe - SET QT_FULL_VER=%QT_VERSION%.%QT_RELEASE% SET QT_SOURCE_ARCHIVE=qt-everywhere-src-%QT_FULL_VER%.zip SET "DL_URL=https://download.qt.io/official_releases/qt/%QT_VERSION%/%QT_FULL_VER%/single/%QT_SOURCE_ARCHIVE%" @@ -25,34 +32,40 @@ SET SRC_DIR=%BASEDIR%qt-%QT_VERSION% SET OPENSSL=openssl-1.0.2r SET OPENSSL_URL=https://www.openssl.org/source/%OPENSSL%.tar.gz" -SET PATH=%BASEDIR%\wintools;%PERLDIR%\bin;%PATH% +SET PATH=%BASEDIR%\wintools;%NASMDIR%;%PERLDIR%\bin;%PATH% if not exist "%OPENSSL%.tar.gz" wget.exe -c "%OPENSSL_URL% 7za.exe x %OPENSSL%.tar.gz -y if not exist "%OPENSSL%" 7za.exe x %OPENSSL%.tar -y +cd %OPENSSL% +rm -f NUL +cd %BASEDIR% rem 32 - Bit SET INST_ARCH=x86-msvc -call %SDKDIR%setvcvars.bat 2019 x86 +call %SDKDIR%\setvcvars.bat 2019 x86 +if %errorlevel% neq 0 exit /b %errorlevel% rem Build OpenSSL cd %BASEDIR%\%OPENSSL% call %PERL% Configure VC-WIN32 --prefix=%BASEDIR%/openssl-%INST_ARCH% +if %errorlevel% neq 0 exit /b %errorlevel% call ms\do_ms.bat +if %errorlevel% neq 0 exit /b %errorlevel% call ms\do_nasm.bat +if %errorlevel% neq 0 exit /b %errorlevel% rem Build static lib call nmake -f ms\nt.mak +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\nt.mak install -rem Build DLL -call %PERL% Configure VC-WIN32 --prefix=%BASEDIR%/openssl-%INST_ARCH% -call ms\do_ms.bat -call ms\do_nasm.bat +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\ntdll.mak +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\ntdll.mak install +if %errorlevel% neq 0 exit /b %errorlevel% cd %BASEDIR% -rem QT if not exist "%QT_SOURCE_ARCHIVE%" wget.exe -c "%DL_URL%" if exist %SRC_DIR% ( @@ -60,6 +73,7 @@ if exist %SRC_DIR% ( del /f /s /q %SRC_DIR% > nul rmdir /s /q %SRC_DIR% ) + 7za.exe x %QT_SOURCE_ARCHIVE% -y rename qt-everywhere-src-%QT_FULL_VER% qt-%QT_VERSION% @@ -67,8 +81,15 @@ SET PREFIX=%BASEDIR%qt-%QT_VERSION%-%INST_ARCH%\ cd %SRC_DIR% del config.cache call .\configure -prefix %PREFIX% -static -shared -mp -platform win32-msvc -release -ssl -nomake examples -nomake tests -skip qtwebengine -qt-zlib -qt-libjpeg -qt-libpng -qt-pcre -qt-freetype -opengl desktop -openssl -I%BASEDIR%\openssl-%INST_ARCH%\include -L%BASEDIR%\openssl-%INST_ARCH%\lib -opensource -confirm-license +if %errorlevel% neq 0 exit /b %errorlevel% call nmake +if %errorlevel% neq 0 exit /b %errorlevel% call nmake install +if %errorlevel% neq 0 exit /b %errorlevel% + cd %PREFIX% %BASEDIR%wintools\7za.exe a -tzip %BASEDIR%\qt-%QT_VERSION%-%INST_ARCH%.zip .\* cd %BASEDIR% + +rm -Rf %OPENSSL% +rm -Rf qt-%QT_VERSION% diff --git a/buildqt64.bat b/buildqt64.bat old mode 100755 new mode 100644 index 4284099..e157f12 --- a/buildqt64.bat +++ b/buildqt64.bat @@ -10,12 +10,18 @@ IF NOT DEFINED PERLDIR ( ECHO PERLDIR is not defined. EXIT /b 1 ) +if not defined NASMDIR ( + echo NASMDIR is not defined. + exit /b 1 +) +if not defined MSYSDIR ( + echo MSYSDIR is not defined. + exit /b 1 +) +set PATH=%MSYSDIR%\usr\bin;%PATH% set PERL=%PERLDIR%\bin\perl.exe -REM SET SDKDIR=z:\VS2019BT -REM SET PERLDIR=z:\Perl64 - SET QT_VERSION=5.12 SET QT_RELEASE=3 @@ -26,28 +32,34 @@ SET SRC_DIR=%BASEDIR%qt-%QT_VERSION% SET OPENSSL=openssl-1.0.2r SET OPENSSL_URL=https://www.openssl.org/source/%OPENSSL%.tar.gz" -SET PATH=%BASEDIR%\wintools;%PERLDIR%\bin;%PATH% +SET PATH=%BASEDIR%\wintools;%NASMDIR%;%PERLDIR%\bin;%PATH% if not exist "%OPENSSL%.tar.gz" wget.exe -c "%OPENSSL_URL%" 7za.exe x %OPENSSL%.tar.gz -y if not exist "%OPENSSL%" 7za.exe x %OPENSSL%.tar -y +cd %OPENSSL% +rm -f NUL +cd %BASEDIR% rem 64 Bit SET INST_ARCH=x86_64-msvc -call "%SDKDIR%\setvcvars.bat" 2019 x64 +call %SDKDIR%\setvcvars.bat 2019 x64 +if %errorlevel% neq 0 exit /b %errorlevel% rem - static - cd %OPENSSL% call %PERL% Configure VC-WIN64A --prefix=%BASEDIR%openssl-%INST_ARCH% +if %errorlevel% neq 0 exit /b %errorlevel% call ms\do_win64a +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\nt.mak +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\nt.mak install -rem - shared - -cd %OPENSSL% -call %PERL% Configure VC-WIN64A --prefix=%BASEDIR%openssl-%INST_ARCH% -call ms\do_win64a +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\ntdll.mak +if %errorlevel% neq 0 exit /b %errorlevel% call nmake -f ms\ntdll.mak install +if %errorlevel% neq 0 exit /b %errorlevel% cd %BASEDIR% @@ -66,8 +78,15 @@ SET PREFIX=%BASEDIR%qt-%QT_VERSION%-%INST_ARCH%\ cd %SRC_DIR% del config.cache call .\configure -prefix %PREFIX% -mp -static -shared -platform win32-msvc -release -nomake examples -nomake tests -skip qtdoc -skip qtgamepad -skip qtwebengine -ssl -openssl -I%BASEDIR%openssl-%INST_ARCH%\include -L%BASEDIR%openssl-%INST_ARCH%\lib -opensource -qt-zlib -qt-libjpeg -qt-libpng -qt-pcre -qt-freetype -opengl desktop -confirm-license +if %errorlevel% neq 0 exit /b %errorlevel% call nmake +if %errorlevel% neq 0 exit /b %errorlevel% call nmake install +if %errorlevel% neq 0 exit /b %errorlevel% + cd %PREFIX% %BASEDIR%wintools\7za.exe a -tzip %BASEDIR%\qt-%QT_VERSION%-%INST_ARCH%.zip .\* cd %BASEDIR% + +rm -Rf %OPENSSL% +rm -Rf qt-%QT_VERSION% -- cgit v0.12