Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenx190 committed Apr 4, 2018
1 parent b65d8d3 commit 1a81c27
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions win-build-qt.bat
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ IF NOT EXIST "%_VC_BAT_PATH%" SET "_VC_BAT_PATH=%ProgramFiles(x86)%\Microsoft Vi
IF NOT EXIST "%_VC_BAT_PATH%" SET "_VC_BAT_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
IF NOT EXIST "%_VC_BAT_PATH%" SET "_VC_BAT_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\Shared\14.0\VC\vcvarsall.bat"
IF NOT EXIST "%_VC_BAT_PATH%" SET _VC_BAT_PATH=
IF NOT EXIST "%_VC_BAT_PATH%" ECHO Cannot find [vcvarsall.bat], if you did't install vs in it's default location, please change this script && GOTO Fin
SET _CFG_PARAMS=-opensource -confirm-license %_COMP_MODE% %_BUILD_TYPE% -platform %_QT_COMPILER% -ltcg -qt-sqlite -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -silent -nomake examples -nomake tests -opengl dynamic -prefix "%_INSTALL_DIR%" %_EXTRA_PARAMS%
IF NOT EXIST "%_VC_BAT_PATH%" ECHO Cannot find [vcvarsall.bat], if you did't install VS in it's default location, please change this script && GOTO Fin
IF /I "%_QT_COMPILER:~0,9%" == "win32-icc" SET "_VC_BAT_PATH=%ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries\windows\bin\ipsxe-comp-vars.bat"
IF NOT EXIST "%_VC_BAT_PATH%" ECHO You are using Intel C++ Compiler, however, this script cannot find [ipsxe-comp-vars.bat], if you didn't install ICC in it's default location, please change this script && GOTO Fin
IF /I "%_QT_COMPILER%" == "win32-msvc" SET "_EXTRA_PARAMS=-ltcg %_EXTRA_PARAMS%"
SET _CFG_PARAMS=-opensource -confirm-license %_COMP_MODE% %_BUILD_TYPE% -platform %_QT_COMPILER% -qt-sqlite -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -silent -nomake examples -nomake tests -opengl dynamic -prefix "%_INSTALL_DIR%" %_EXTRA_PARAMS%
SET "_CFG_BAT=%_ROOT%\configure.bat"
REM If you don't have jom, use nmake instead, which is provided by Visual Studio.
REM nmake is very slow, I recommend you use jom, you can download the latest jom
Expand All @@ -63,10 +66,7 @@ ECHO Compiler: %_QT_COMPILER%
ECHO Target architecture: %_TARGET_ARCH%
ECHO Source code directory: %_ROOT%
ECHO Install directory: %_INSTALL_DIR%
IF /I "%_QT_COMPILER%" == "win32-msvc" ECHO vcvarsall.bat: %_VC_BAT_PATH%
IF /I "%_QT_COMPILER%" == "win32-icc" ECHO vcvarsall.bat: %_VC_BAT_PATH%
IF /I "%_QT_COMPILER%" == "win32-icc-k1om" ECHO vcvarsall.bat: %_VC_BAT_PATH%
IF /I "%_QT_COMPILER%" == "win32-clang-msvc" ECHO vcvarsall.bat: %_VC_BAT_PATH%
IF /I "%_QT_COMPILER:~-3%" NEQ "g++" ECHO Compiler batch script: %_VC_BAT_PATH%
ECHO Build tool: %_JOM%
ECHO Qt configure parameters: %_CFG_PARAMS%
ECHO ---------------------------------------
Expand All @@ -87,17 +87,21 @@ SET "hhmiss=%hhmiss: =0%"
SET "_BUILD_BAT=%_INSTALL_DIR%_%YYYYmmdd%%hhmiss%.bat"
ECHO Your build script will be saved to: %_BUILD_BAT%
PAUSE
IF /I "%_QT_COMPILER:~0,9%" == "win32-icc" (
IF /I "%_TARGET_ARCH%" == "x64" (
SET "_TARGET_ARCH=intel64 vs2017"
) ELSE (
SET "_TARGET_ARCH=ia32 vs2017"
)
)
IF EXIST "%_BUILD_BAT%" DEL /F /Q "%_BUILD_BAT%"
> "%_BUILD_BAT%" (
@ECHO @ECHO OFF
@ECHO COLOR
@ECHO TITLE Building Qt from source code
@ECHO CLS
@ECHO SETLOCAL
IF /I "%_QT_COMPILER%" == "win32-msvc" @ECHO CALL "%_VC_BAT_PATH%" %_TARGET_ARCH%
IF /I "%_QT_COMPILER%" == "win32-icc" @ECHO CALL "%_VC_BAT_PATH%" %_TARGET_ARCH%
IF /I "%_QT_COMPILER%" == "win32-icc-k1om" @ECHO CALL "%_VC_BAT_PATH%" %_TARGET_ARCH%
IF /I "%_QT_COMPILER%" == "win32-clang-msvc" @ECHO CALL "%_VC_BAT_PATH%" %_TARGET_ARCH%
IF /I "%_QT_COMPILER:~-3%" NEQ "g++" @ECHO CALL "%_VC_BAT_PATH%" %_TARGET_ARCH%
@ECHO SET "_ROOT=%_ROOT%"
@ECHO SET "PATH=%%_ROOT%%\qtbase\bin;%%_ROOT%%\gnuwin32\bin;%%PATH%%"
@ECHO SET _ROOT=
Expand Down

0 comments on commit 1a81c27

Please sign in to comment.