]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #23875 : URANIE Windows build
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 18 May 2021 15:33:02 +0000 (17:33 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 18 May 2021 15:33:07 +0000 (17:33 +0200)
products/compil_scripts/Python-3.6.5.bat
products/compil_scripts/boost_V1.67.0.bat
products/compil_scripts/cmake.bat
products/compil_scripts/cppunit.bat
products/compil_scripts/freeimage.bat
products/compil_scripts/freetype.bat
products/compil_scripts/lapack.bat
products/compil_scripts/root-6.24.bat [new file with mode: 0644]
products/compil_scripts/zlib-1.2.5.bat [new file with mode: 0644]
products/env_scripts/boost.py

index a639fc81e791b52cd230c5d41cb30d50804f19b5..c2af50d475cc2079cbf3027bc63465f8e1aeccb6 100644 (file)
@@ -13,6 +13,11 @@ if %SAT_DEBUG% == 1 (
   set PRODUCT_BUILD_TYPE=Debug
 )
 
+set PLATFORM_TARGET=x64
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set PLATFORM_TARGET=Win32
+)
+
 SET LIB_TAG=
 if %SAT_DEBUG% == 1 (
   set LIB_TAG=_d
@@ -77,8 +82,8 @@ REM Compilation
 
 cd %SOURCE_DIR%
 echo.
-echo *** msbuild %SOURCE_DIR%\PCBuild\pcbuild.sln /t:Build /m /nologo /v:m /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 /p:BuildProjectReferences=false /p:OutDir=%PRODUCT_INSTALL%\
-msbuild %SOURCE_DIR%\PCBuild\pcbuild.sln  /t:Build /m /nologo /v:m /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 /p:OutDir=%PRODUCT_INSTALL%\
+echo *** msbuild %SOURCE_DIR%\PCBuild\pcbuild.sln /t:Build /m /nologo /v:m /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% /p:BuildProjectReferences=false /p:OutDir=%PRODUCT_INSTALL%\
+msbuild %SOURCE_DIR%\PCBuild\pcbuild.sln  /t:Build /m /nologo /v:m /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% /p:OutDir=%PRODUCT_INSTALL%\
 if NOT %ERRORLEVEL% == 0 (
     echo ERROR on msbuild
     exit 2
index 477b97511aa1eb32ed4007c099caf40011b55adb..f6b53339f1056b1980a03fbc4e2a39611777057c 100644 (file)
@@ -30,7 +30,13 @@ echo.
 echo --------------------------------------------------------------------------
 echo *** Compilation
 echo --------------------------------------------------------------------------
-.\bjam --toolset=msvc --prefix=%PRODUCT_INSTALL% address-model=64  --build-type=complete stage variant=%PRODUCT_BUILD_TYPE% threading=multi link=shared runtime-link=shared install
+
+set PLATFORM_TARGET=64
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set PLATFORM_TARGET=32
+)
+
+.\bjam --toolset=msvc --prefix=%PRODUCT_INSTALL% address-model=%PLATFORM_TARGET%  --build-type=complete stage variant=%PRODUCT_BUILD_TYPE% threading=multi link=shared runtime-link=shared install
 
 cd "%BUILD_DIR%"
 
index aa6fd1ac280756adb6dfbb8dabb3fd71649e5a89..23c7d596cadebdd0e214f76fee03d25197cb6831 100644 (file)
@@ -10,15 +10,20 @@ REM clean BUILD directory
 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
 mkdir %BUILD_DIR%
 
+set PLATFORM_TARGET=x64
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set PLATFORM_TARGET=Win32
+)
+
 rem # Configuration
 rem # According to cmake README, cmake is mandatory for compiling cmake on windows
 set CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=Release
-if defined CMAKE_GENERATOR (
-    set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR%
-) else (
-    set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64"
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64
+  set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SYSTEM_VERSION=10.0.19041.0
 )
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR%
 
 set MSBUILDDISABLENODEREUSE=1
 
@@ -36,9 +41,9 @@ if NOT %ERRORLEVEL% == 0 (
 
 echo.
 echo --------------------------------------------------------------------------
-echo msbuild %MAKE_OPTIONS% /p:Configuration=Release ALL_BUILD.vcxproj
+echo msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:PlatformTarget=%PLATFORM_TARGET% ALL_BUILD.vcxproj
 echo --------------------------------------------------------------------------
-msbuild %MAKE_OPTIONS% /p:Configuration=Release ALL_BUILD.vcxproj
+msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:PlatformTarget=%PLATFORM_TARGET% ALL_BUILD.vcxproj  
 if NOT %ERRORLEVEL% == 0 (
     echo ERROR on msbuild ALL_BUILD.vcxproj
     exit 2
@@ -46,9 +51,9 @@ if NOT %ERRORLEVEL% == 0 (
 
 echo.
 echo --------------------------------------------------------------------------
-echo msbuild %MAKE_OPTIONS% /p:Configuration=Release INSTALL.vcxproj
+echo msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:PlatformTarget=%PLATFORM_TARGET% INSTALL.vcxproj
 echo --------------------------------------------------------------------------
-msbuild %MAKE_OPTIONS% /p:Configuration=Release INSTALL.vcxproj
+msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:PlatformTarget=%PLATFORM_TARGET% INSTALL.vcxproj
 if NOT %ERRORLEVEL% == 0 (
     echo ERROR on msbuild INSTALL.vcxproj
     exit 3
index 53e6e279a953d2a9eb55f1ad25a92959328c751a..a2a1628445cdc8604c1959b16393c3d602ce412b 100755 (executable)
@@ -8,6 +8,11 @@ IF NOT DEFINED SAT_DEBUG (
   SET SAT_DEBUG=0\r
 )\r
 \r
+set PLATFORM_TARGET=x64\r
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (\r
+  set PLATFORM_TARGET=Win32\r
+)\r
+\r
 SET PRODUCT_BUILD_TYPE=Release\r
 REM TODO: NGH: not Tested yet\r
 if %SAT_DEBUG% == 1 (\r
@@ -42,30 +47,30 @@ if NOT %ERRORLEVEL% == 0 (
 \r
 echo.\r
 echo -------------------------------------------------------------------------------\r
-echo msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64\r
+echo msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET%\r
 echo -------------------------------------------------------------------------------\r
 \r
 cd %BUILD_DIR%\src\cppunit\r
 \r
-msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64\r
+msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET%\r
 if NOT %ERRORLEVEL% == 0 (\r
     echo ERROR on msbuild\r
     exit 21\r
 )\r
 \r
-msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd \r
+msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd /p:Platform=%PLATFORM_TARGET%\r
 if NOT %ERRORLEVEL% == 0 (\r
     echo ERROR on msbuild\r
     exit 22\r
 )\r
 \r
-msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64\r
+msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET%\r
 if NOT %ERRORLEVEL% == 0 (\r
     echo ERROR on msbuild\r
     exit 23\r
 )\r
 \r
-msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd_dll /p:Platform=x64\r
+msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd_dll /p:Platform=%PLATFORM_TARGET%\r
 if NOT %ERRORLEVEL% == 0 (\r
     echo ERROR on msbuild\r
     exit 24\r
@@ -91,4 +96,4 @@ if NOT %ERRORLEVEL% == 0 (
 taskkill /F /IM "mspdbsrv.exe"\r
 \r
 echo.\r
-echo ########## END
\ No newline at end of file
+echo ########## END\r
index 3bd5ad519672c39e31ec1239908cdcbe9820bb43..74a39da18edee56332f2aed139e0084483a83ad9 100644 (file)
@@ -14,6 +14,11 @@ if %SAT_DEBUG% == 1 (
   set PRODUCT_BUILD_TYPE=Debug
 )
 
+set PLATFORM_TARGET=x64
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set PLATFORM_TARGET=Win32
+)
+
 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
 if NOT exist "%PRODUCT_INSTALL%\include" mkdir %PRODUCT_INSTALL%\include
 if NOT exist "%PRODUCT_INSTALL%\lib" mkdir %PRODUCT_INSTALL%\lib
@@ -43,8 +48,8 @@ if NOT %ERRORLEVEL% == 0 (
 
 REM Compilation
 echo.
-echo *** %BUILD_DIR%\FreeImage.2017.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=x64 
-msbuild %BUILD_DIR%\FreeImage.2017.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=x64
+echo *** %BUILD_DIR%\FreeImage.2017.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=%PLATFORM_TARGET%
+msbuild %BUILD_DIR%\FreeImage.2017.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=%PLATFORM_TARGET%
 if NOT %ERRORLEVEL% == 0 (
     echo ERROR on msbuild
     exit 2
@@ -55,25 +60,25 @@ echo.
 echo *** COPY FreeImage DLL to %PRODUCT_INSTALL%
 
 if %SAT_DEBUG% == 1 (
-  copy /Y %BUILD_DIR%\Dist\x64\*.dll %PRODUCT_INSTALL%\bin\
-  copy /Y %BUILD_DIR%\Dist\x64\*.lib %PRODUCT_INSTALL%\lib\
-  copy /Y %BUILD_DIR%\Dist\x64\*.pdb %PRODUCT_INSTALL%\lib\
-  copy /Y %BUILD_DIR%\Dist\x64\*.h %PRODUCT_INSTALL%\include\
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\*.dll %PRODUCT_INSTALL%\bin\
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\*.lib %PRODUCT_INSTALL%\lib\
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\*.pdb %PRODUCT_INSTALL%\lib\
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\*.h %PRODUCT_INSTALL%\include\
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\FreeImagePlusd.dll %PRODUCT_INSTALL%\bin\FreeImagePlus.dll
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\FreeImagePlusd.lib %PRODUCT_INSTALL%\lib\FreeImagePlus.lib
-  copy /Y %BUILD_DIR%\Dist\x64\FreeImaged.dll %PRODUCT_INSTALL%\bin\FreeImage.dll
-  copy /Y %BUILD_DIR%\Dist\x64\FreeImaged.lib %PRODUCT_INSTALL%\lib\FreeImage.lib
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\*.dll %PRODUCT_INSTALL%\bin\
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\*.lib %PRODUCT_INSTALL%\lib\
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\*.pdb %PRODUCT_INSTALL%\lib\
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\*.h %PRODUCT_INSTALL%\include\
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\*.dll %PRODUCT_INSTALL%\bin\
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\*.lib %PRODUCT_INSTALL%\lib\
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\*.pdb %PRODUCT_INSTALL%\lib\
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\*.h %PRODUCT_INSTALL%\include\
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\FreeImagePlusd.dll %PRODUCT_INSTALL%\bin\FreeImagePlus.dll
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\FreeImagePlusd.lib %PRODUCT_INSTALL%\lib\FreeImagePlus.lib
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\FreeImaged.dll %PRODUCT_INSTALL%\bin\FreeImage.dll
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\FreeImaged.lib %PRODUCT_INSTALL%\lib\FreeImage.lib
 ) else (
-  copy /Y %BUILD_DIR%\Dist\x64\FreeImage.dll %PRODUCT_INSTALL%\bin\FreeImage.dll
-  copy /Y %BUILD_DIR%\Dist\x64\FreeImage.lib %PRODUCT_INSTALL%\lib\FreeImage.lib
-  copy /Y %BUILD_DIR%\Dist\x64\FreeImage.h %PRODUCT_INSTALL%\include\FreeImage.h
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\FreeImagePlus.dll %PRODUCT_INSTALL%\bin\FreeImagePlus.dll
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\FreeImagePlus.lib %PRODUCT_INSTALL%\lib\FreeImagePlus.lib
-  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\x64\FreeImagePlus.h %PRODUCT_INSTALL%\include\FreeImagePlus.h
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\FreeImage.dll %PRODUCT_INSTALL%\bin\FreeImage.dll
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\FreeImage.lib %PRODUCT_INSTALL%\lib\FreeImage.lib
+  copy /Y %BUILD_DIR%\Dist\%PLATFORM_TARGET%\FreeImage.h %PRODUCT_INSTALL%\include\FreeImage.h
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\FreeImagePlus.dll %PRODUCT_INSTALL%\bin\FreeImagePlus.dll
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\FreeImagePlus.lib %PRODUCT_INSTALL%\lib\FreeImagePlus.lib
+  copy /Y %BUILD_DIR%\Wrapper\FreeImagePlus\dist\%PLATFORM_TARGET%\FreeImagePlus.h %PRODUCT_INSTALL%\include\FreeImagePlus.h
 )
 
 taskkill /F /IM "mspdbsrv.exe"
index 60a1b9f06a96c8ed9def093c0c8790afbf474bf4..9577cb67b0713993daefe5681fa4b522bf045a45 100755 (executable)
@@ -13,6 +13,11 @@ if %SAT_DEBUG% == 1 (
   set PRODUCT_BUILD_TYPE=Debug\r
 )\r
 \r
+set PLATFORM_TARGET=x64\r
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (\r
+  set PLATFORM_TARGET=Win32\r
+)\r
+\r
 if NOT exist "%PRODUCT_INSTALL%" mkdir  %PRODUCT_INSTALL%\r
 \r
 REM clean BUILD directory\r
@@ -25,7 +30,11 @@ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX=%PRODUCT_INSTALL%
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=%PRODUCT_BUILD_TYPE%\r
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS=ON\r
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE\r
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64"\r
+if %PLATFORM_TARGET% == Win32 (\r
+  set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0\r
+)\r
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING=%CMAKE_GENERATOR%\r
+\r
 set MSBUILDDISABLENODEREUSE=1\r
 \r
 echo.\r
@@ -42,11 +51,11 @@ if NOT %ERRORLEVEL% == 0 (
 \r
 echo.\r
 echo *********************************************************************\r
-echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% ALL_BUILD.vcxproj\r
+echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% ALL_BUILD.vcxproj\r
 echo *********************************************************************\r
 echo.\r
 \r
-msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% ALL_BUILD.vcxproj\r
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% ALL_BUILD.vcxproj\r
 if NOT %ERRORLEVEL% == 0 (\r
     echo ERROR on msbuild ALL_BUILD.vcxproj\r
     exit 2\r
@@ -54,11 +63,11 @@ if NOT %ERRORLEVEL% == 0 (
 \r
 echo.\r
 echo *********************************************************************\r
-echo *** installation... msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% INSTALL.vcxproj\r
+echo *** installation... msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% INSTALL.vcxproj\r
 echo *********************************************************************\r
 echo.\r
 \r
-msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% INSTALL.vcxproj\r
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% INSTALL.vcxproj\r
 if NOT %ERRORLEVEL% == 0 (\r
     echo ERROR on msbuild INSTALL.vcxproj\r
     exit 3\r
index 65a5d88ecf01bc945156e3c72b16b255b5188f30..54b568096b94fd58888a4a88d0fba1079a8ce8b9 100644 (file)
@@ -13,7 +13,17 @@ if %SAT_DEBUG% == 1 (
   set PRODUCT_BUILD_TYPE=Debug
 )
 
-set GFORTRAN_EXE=%MINGW_ROOT_DIR%\bin\gfortran.exe
+set PLATFORM_TARGET=x64
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set PLATFORM_TARGET=x86
+)
+
+set GFORTRAN_ROOT_DIR=%MINGW_ROOT_DIR%
+if %PLATFORM_TARGET% == x86 (
+  set GFORTRAN_ROOT_DIR=%MINGW_32BIT_ROOT_DIR%
+)
+
+set GFORTRAN_EXE=%GFORTRAN_ROOT_DIR%\bin\gfortran.exe
 
 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
 REM clean BUILD directory
@@ -22,30 +32,41 @@ mkdir %BUILD_DIR%
 
 echo.
 echo ************************************************
-echo *** Setting local path to %MINGW_ROOT_DIR%\bin
+echo *** Setting local path to %GFORTRAN_ROOT_DIR%\bin
 echo ************************************************
-set path=%MINGW_ROOT_DIR%\bin;%path%
+set path=%GFORTRAN_ROOT_DIR%\bin;%path%
 set CMAKE_OPTIONS=
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX=%PRODUCT_INSTALL:\=/%
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=%PRODUCT_BUILD_TYPE%
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS:BOOL=ON
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_CXX_FLAGS=-fPIC
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_C_FLAGS=-fPIC
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_OPTIMIZED_BLAS=OFF
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCBLAS=ON
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLAPACKE=ON
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SIZEOF_VOID_P=8
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_Fortran_COMPILER=%MINGW_ROOT_DIR:\=/%/bin/gfortran.exe
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_Fortran_COMPILER=%GFORTRAN_ROOT_DIR:\=/%/bin/gfortran.exe
 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SH="CMAKE_SH-NOTFOUND"
-set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="MinGW Makefiles"
 
+if %PLATFORM_TARGET% == x64 (
+  goto :SET_CMAKE_64_BIT_SECTION
+)
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_CXX_FLAGS="-fPIC -m32"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_C_FLAGS="-fPIC -m32"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition -m32"
+goto :SET_CMAKE_END
+
+:SET_CMAKE_64_BIT_SECTION
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_CXX_FLAGS="-fPIC"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_C_FLAGS="-fPIC"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition"
+
+:SET_CMAKE_END
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="MinGW Makefiles"
 set MSBUILDDISABLENODEREUSE=1
 
 echo.
 echo *********************************************************************
-echo *** cmake %CMAKE_OPTIONS}%
+echo *** cmake %CMAKE_OPTIONS%  %SOURCE_DIR%
 echo *********************************************************************
+
 %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
 if NOT %ERRORLEVEL% == 0 (
     echo "ERROR on cmake"
@@ -73,5 +94,3 @@ if NOT %ERRORLEVEL% == 0 (
     echo ERROR on mingw32-make install
     exit 3
 )
-
-
diff --git a/products/compil_scripts/root-6.24.bat b/products/compil_scripts/root-6.24.bat
new file mode 100644 (file)
index 0000000..5d75e9e
--- /dev/null
@@ -0,0 +1,90 @@
+@echo off
+
+echo ##########################################################################
+echo root %VERSION%
+echo ##########################################################################
+
+IF NOT DEFINED SAT_DEBUG (
+  SET SAT_DEBUG=0
+)
+
+SET PRODUCT_BUILD_TYPE=Release
+
+REM TODO: NGH: not Tested yet
+if %SAT_DEBUG% == 1 (
+  set PRODUCT_BUILD_TYPE=Debug
+)
+
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+
+REM clean BUILD directory
+if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
+mkdir %BUILD_DIR%
+SET CMAKE_OPTIONS=
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE%
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_CXX_STANDARD=14 
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_fftw3=OFF 
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHONBIN%
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPython3_LIBRARY_DIRS=%PYTHON_ROOT_DIR%\libs
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dpyroot=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dpyroot_legacy=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dminuit2=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_freetype=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_davix=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_ftgl=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_gl2ps=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_glew=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_gsl=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_lz4=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_lzma=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_pcre=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_unuran=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_xxhash=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_zlib=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_zstd=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dmathmore=OFF
+rem set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_ROOT:PATH=%BOOST_ROOT_DIR:\=/%
+rem set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBoost_ADDITIONAL_VERSIONS="1.67.0 1.67"
+rem set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBOOST_INCLUDEDIR=%BOOST_ROOT_DIR:\=/%/include/boost-1_67
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SYSTEM_VERSION=10.0.19041.0
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR%
+
+cd %BUILD_DIR%
+
+echo.
+echo --------------------------------------------------------------------------
+echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+echo --------------------------------------------------------------------------
+
+%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on root
+    exit 1
+)
+
+echo.
+echo --------------------------------------------------------------------------
+echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x86 ALL_BUILD.vcxproj
+echo --------------------------------------------------------------------------
+
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 ALL_BUILD.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild ALL_BUILD.vcxproj
+    exit 2
+)
+
+echo. 
+echo --------------------------------------------------------------------------
+echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 INSTALL.vcxproj
+echo --------------------------------------------------------------------------
+
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 INSTALL.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild INSTALL.vcxproj
+    exit 3
+)
+
+echo.
+echo ########## END
diff --git a/products/compil_scripts/zlib-1.2.5.bat b/products/compil_scripts/zlib-1.2.5.bat
new file mode 100644 (file)
index 0000000..96487ab
--- /dev/null
@@ -0,0 +1,74 @@
+@echo off
+
+echo ##########################################################################
+echo zlib %VERSION%
+echo ##########################################################################
+
+IF NOT DEFINED SAT_DEBUG (
+  SET SAT_DEBUG=0
+)
+
+SET PRODUCT_BUILD_TYPE=Release
+if %SAT_DEBUG% == 1 (
+  set PRODUCT_BUILD_TYPE=Debug
+)
+
+set PLATFORM_TARGET=x64
+if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE (
+  set PLATFORM_TARGET=Win32
+)
+
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+REM clean BUILD directory
+if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
+mkdir %BUILD_DIR%
+
+cd %BUILD_DIR%
+set CMAKE_OPTIONS=
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=%PRODUCT_BUILD_TYPE%
+if %PLATFORM_TARGET% == Win32 (
+  set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0
+)
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING=%CMAKE_GENERATOR%
+
+set MSBUILDDISABLENODEREUSE=1
+
+echo.
+echo *********************************************************************
+echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+echo *********************************************************************
+echo.
+
+%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+if NOT %ERRORLEVEL% == 0 (
+    echo "ERROR on cmake"
+    exit 1
+)
+
+echo.
+echo *********************************************************************
+echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% ALL_BUILD.vcxproj"
+echo *********************************************************************
+echo.
+
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% ALL_BUILD.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild gmsh.vcxproj
+    exit 2
+)
+
+echo.
+echo *********************************************************************
+echo *** installation...
+echo *********************************************************************
+echo.
+
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% INSTALL.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild INSTALL.vcxproj
+    exit 3
+)
+
+echo.
+echo ########## END
index fc95367ddd5b2dd64337cd08612a68d53e9aaaa2..42e2bca37642e1e5f6e21258e6bc4567136f3918 100755 (executable)
@@ -10,9 +10,13 @@ def set_env(env, prereq_dir, version):
     env.set('BOOSTDIR', prereq_dir)
     env.set('BOOST_ROOT_DIR', prereq_dir)
     env.set('BOOST_ROOT', prereq_dir)
-    env.set('BOOST_INCLUDE_DIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
-    env.set('Boost_INCLUDE_DIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
-    env.set('BOOST_INCLUDEDIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
+    cmake_version = env.get('CMAKE_VERSION')
+    if '3.16.7' in cmake_version:
+      env.set('Boost_INCLUDE_DIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
+    else:
+      env.set('BOOST_INCLUDE_DIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
+      env.set('Boost_INCLUDE_DIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
+      env.set('BOOST_INCLUDEDIR',os.path.join(prereq_dir,'include','boost-1_67','boost'))
     env.set('Boost_ADDITIONAL_VERSIONS',"'1.67.0 1.67'")
     env.set('BOOST_LIBRARY_DIR',os.path.join(prereq_dir,'lib'))
     env.set('BOOST_LIBRARYDIR',os.path.join(prereq_dir,'lib'))