From: Nabil Ghodbane Date: Tue, 18 May 2021 15:33:02 +0000 (+0200) Subject: spns #23875 : URANIE Windows build X-Git-Tag: V9_7_0~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d0132ac1a9fafee94ae794a6bb52508a3f6c31b4;p=tools%2Fsat_salome.git spns #23875 : URANIE Windows build --- diff --git a/products/compil_scripts/Python-3.6.5.bat b/products/compil_scripts/Python-3.6.5.bat index a639fc8..c2af50d 100644 --- a/products/compil_scripts/Python-3.6.5.bat +++ b/products/compil_scripts/Python-3.6.5.bat @@ -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 diff --git a/products/compil_scripts/boost_V1.67.0.bat b/products/compil_scripts/boost_V1.67.0.bat index 477b975..f6b5333 100644 --- a/products/compil_scripts/boost_V1.67.0.bat +++ b/products/compil_scripts/boost_V1.67.0.bat @@ -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%" diff --git a/products/compil_scripts/cmake.bat b/products/compil_scripts/cmake.bat index aa6fd1a..23c7d59 100644 --- a/products/compil_scripts/cmake.bat +++ b/products/compil_scripts/cmake.bat @@ -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 diff --git a/products/compil_scripts/cppunit.bat b/products/compil_scripts/cppunit.bat index 53e6e27..a2a1628 100755 --- a/products/compil_scripts/cppunit.bat +++ b/products/compil_scripts/cppunit.bat @@ -8,6 +8,11 @@ IF NOT DEFINED SAT_DEBUG ( SET SAT_DEBUG=0 ) +set PLATFORM_TARGET=x64 +if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE ( + set PLATFORM_TARGET=Win32 +) + SET PRODUCT_BUILD_TYPE=Release REM TODO: NGH: not Tested yet if %SAT_DEBUG% == 1 ( @@ -42,30 +47,30 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo ------------------------------------------------------------------------------- -echo msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% echo ------------------------------------------------------------------------------- cd %BUILD_DIR%\src\cppunit -msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild exit 21 ) -msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd +msbuild cppunit.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd /p:Platform=%PLATFORM_TARGET% if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild exit 22 ) -msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild exit 23 ) -msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd_dll /p:Platform=x64 +msbuild cppunit_dll.vcxproj %MAKE_OPTIONS% /p:Configuration=Debug /p:TargetName=cppunitd_dll /p:Platform=%PLATFORM_TARGET% if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild exit 24 @@ -91,4 +96,4 @@ if NOT %ERRORLEVEL% == 0 ( taskkill /F /IM "mspdbsrv.exe" echo. -echo ########## END \ No newline at end of file +echo ########## END diff --git a/products/compil_scripts/freeimage.bat b/products/compil_scripts/freeimage.bat index 3bd5ad5..74a39da 100644 --- a/products/compil_scripts/freeimage.bat +++ b/products/compil_scripts/freeimage.bat @@ -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" diff --git a/products/compil_scripts/freetype.bat b/products/compil_scripts/freetype.bat index 60a1b9f..9577cb6 100755 --- a/products/compil_scripts/freetype.bat +++ b/products/compil_scripts/freetype.bat @@ -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 +) + if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% REM clean BUILD directory @@ -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% set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS=ON set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" +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. @@ -42,11 +51,11 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo ********************************************************************* -echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% ALL_BUILD.vcxproj +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% ALL_BUILD.vcxproj echo ********************************************************************* echo. -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% ALL_BUILD.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% ALL_BUILD.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild ALL_BUILD.vcxproj exit 2 @@ -54,11 +63,11 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo ********************************************************************* -echo *** installation... msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% INSTALL.vcxproj +echo *** installation... msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% INSTALL.vcxproj echo ********************************************************************* echo. -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% INSTALL.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:PlatformTarget=%PLATFORM_TARGET% INSTALL.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild INSTALL.vcxproj exit 3 diff --git a/products/compil_scripts/lapack.bat b/products/compil_scripts/lapack.bat index 65a5d88..54b5680 100644 --- a/products/compil_scripts/lapack.bat +++ b/products/compil_scripts/lapack.bat @@ -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 index 0000000..5d75e9e --- /dev/null +++ b/products/compil_scripts/root-6.24.bat @@ -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 index 0000000..96487ab --- /dev/null +++ b/products/compil_scripts/zlib-1.2.5.bat @@ -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 diff --git a/products/env_scripts/boost.py b/products/env_scripts/boost.py index fc95367..42e2bca 100755 --- a/products/env_scripts/boost.py +++ b/products/env_scripts/boost.py @@ -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'))