Salome HOME
SALOME 9.10.0-MPI add dedicated sections
[tools/sat_salome.git] / products / compil_scripts / qt-5.6.1.bat
1 @echo off\r
2 \r
3 echo ##########################################################################\r
4 echo Qt %VERSION%\r
5 echo ##########################################################################\r
6 \r
7 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%\r
8 REM clean BUILD directory\r
9 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%\r
10 mkdir %BUILD_DIR%\r
11 \r
12 cd %SOURCE_DIR%\r
13 \r
14 REM Configure\r
15 echo.\r
16 echo --------------------------------------------------------------------------\r
17 echo *** configure  \r
18 echo --------------------------------------------------------------------------\r
19 \r
20 rem configure -prefix %PRODUCT_INSTALL% -release -opensource -verbose -no-separate-debug-info -confirm-license -no-compile-examples -qt-libpng \r
21 \r
22 REM call configure -prefix %PRODUCT_INSTALL% -confirm-license -verbose -release -platform win32-msvc2010 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -qt-sql-odbc -opensource -make libs -qt-designer\r
23 \r
24 call configure -prefix %PRODUCT_INSTALL% -confirm-license -verbose -release -platform win32-msvc2010 -qt-pcre -qt-libjpeg -opengl desktop -qt-sql-sqlite -qt-sql-odbc -opensource -make tools -make libs\r
25 \r
26 if NOT %ERRORLEVEL% == 0 (\r
27     echo "ERROR on configure"\r
28     exit 1\r
29 )\r
30 \r
31 REM Compilation with nmake as said in qt documentation\r
32 REM nmake can crash because of multi-threading problems\r
33 REM Thus, we will try to run it 42 times until it works\r
34 set /a remaining_tries = 42\r
35 :nmake\r
36 echo *** Trying to run nmake %remaining_tries% more time.\r
37 set /a remaining_tries = remaining_tries - 1\r
38 nmake\r
39 if NOT %ERRORLEVEL% == 0 if %remaining_tries% gtr 0 (\r
40     goto nmake\r
41 )\r
42 if %remaining_tries% == 0 (\r
43     echo "ERROR on nmake"\r
44     exit 2\r
45 )\r
46 \r
47 REM Installation\r
48 echo.\r
49 echo --------------------------------------------------------------------------\r
50 echo *** nmake install\r
51 echo --------------------------------------------------------------------------\r
52 \r
53 nmake install\r
54 if NOT %ERRORLEVEL% == 0 (\r
55     echo "ERROR on nmake install"\r
56     exit 3\r
57 )\r
58 \r
59 echo "*** Adding qt.conf file in order to be able to compile using the moved Qt installation"\r
60 echo [Paths] >  %PRODUCT_INSTALL%\bin\qt.conf\r
61 echo Prefix=../ >> %PRODUCT_INSTALL%\bin\qt.conf\r
62 \r
63 echo.\r
64 echo ########## END\r
65 \r