Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenx190 committed Sep 19, 2018
1 parent 872b1c9 commit c929c71
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,19 @@ A Windows batch script to help you compile Qt from source code. You should know
5. If you want to link Qt against [ICU](http://site.icu-project.org/) and [OpenSSL](https://www.openssl.org/) libraries, you will have to change the script file. Please add the following config parameters:
- ICU:
```bat
-icu ICU_PREFIX="%_ICU_DIR%" ICU_LIBS_DEBUG="-licudtd -licuind -licuucd" ICU_LIBS_RELEASE="-licudt -licuin -licuuc"
REM If you do not have/need the debug version of ICU, use the following command line
REM -icu ICU_PREFIX="%_ICU_DIR%" ICU_LIBS="-licudt -licuin -licuuc"
SET "_ICU_DIR=your icu dir path"
SET "PATH=%_ICU_DIR%\bin;%PATH%"
-icu -I "%_ICU_DIR%\include" -L "%_ICU_DIR%\lib"
```
- OpenSSL:
```bat
-openssl-linked OPENSSL_PREFIX="%_OPENSSL_DIR%" OPENSSL_LIBS_DEBUG="-lssleay32d -llibeay32d" OPENSSL_LIBS_RELEASE="-lssleay32 -llibeay32"
REM If you do not have/need the debug version of OpenSSL, use the following command line
REM -openssl-linked OPENSSL_PREFIX="%_OPENSSL_DIR%" OPENSSL_LIBS="-lssleay32 -llibeay32"
SET "_OPENSSL_DIR=your openssl dir path"
SET "PATH=%_OPENSSL_DIR%\bin;%PATH%"
-openssl-linked -I "%_OPENSSL_DIR%\include" -L "%_OPENSSL_DIR%\lib"
```
Notes:
- "%_ICU_DIR%" and "%_OPENSSL_DIR%" are the directories that contain "bin", "lib" and "include" directories of ICU and OpenSSL, remember to set them in the batch script.
- ICU will increase the size of your application for about 40MB, if you don't need it then do not link against it, that's also what the Qt Company already did.
- Remember to add the ICU and OpenSSL's "bin" directories into your PATH variable, otherwise the whole Qt compiling process will fail.
Note:
- ICU will increase the size of your application for 20~30 MB, if you don't need it then do not link against it, that's also what the Qt Company already did.
- If you are building static version of Qt, do not add ICU and OpenSSL's bin dirs to the path variable, because they do not exist.
Notes:
- **If you want to compile QWebEngine, you have to change your system locale to English(United States)** and don't forget to change it back after compiling Qt.
Expand Down
2 changes: 1 addition & 1 deletion build-static-version-of-qt-with-icu-and-openssl-linked.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
SET "_ICU_DIR=C:\ICU\icu4c-static"
SET "_OPENSSL_DIR=C:\OpenSSL\openssl-static"
SET "PATH=%_ICU_DIR%\bin;%_OPENSSL_DIR%\bin;%PATH%"
CALL "configure.bat" -icu ICU_PREFIX="%_ICU_DIR%" ICU_LIBS="-lsicudt -lsicuin -lsicuuc -lAdvapi32" -openssl-linked OPENSSL_PREFIX="%_OPENSSL_DIR%" OPENSSL_LIBS="-llibcrypto -llibssl -lgdi32"
CALL "configure.bat" -icu -I "%_ICU_DIR%\include" -L "%_ICU_DIR%\lib" -openssl-linked -I "%_OPENSSL_DIR%\include" -L "%_OPENSSL_DIR%\lib"
```

**NOTE**
Expand Down
4 changes: 4 additions & 0 deletions win-build-qt.bat
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,12 @@ IF EXIST "%_BUILD_BAT%" DEL /F /Q "%_BUILD_BAT%"
@ECHO SETLOCAL
IF /I "%_QT_COMPILER:~-3%" NEQ "g++" @ECHO CALL "%_VC_BAT_PATH%" %_TARGET_ARCH%
@ECHO SET "PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%%PATH%%"
@ECHO REM SET "_ICU_DIR="
@ECHO REM SET "_OPENSSL_DIR="
@ECHO REM SET "PATH=%%_ICU_DIR%%\bin;%%_OPENSSL_DIR%%\bin;%%PATH%%"
@ECHO CD /D "%_ROOT%"
@ECHO CALL "%_CFG_BAT%" %_CFG_PARAMS%
@ECHO REM CALL "%_CFG_BAT%" %_CFG_PARAMS% -icu -I "%%_ICU_DIR%%\include" -L "%%_ICU_DIR%%\lib" -openssl-linked -I "%%_OPENSSL_DIR%%\include" -L "%%_OPENSSL_DIR%%\lib"
@ECHO IF %%ERRORLEVEL%% NEQ 0 GOTO ErrHappen
IF /I "%_QT_COMPILER:~-3%" == "g++" (
@ECHO %_MAKE_TOOL% -j 4 ^&^& %_MAKE_TOOL% install
Expand Down

0 comments on commit c929c71

Please sign in to comment.