From bb58490497eee0cd08b56f7b16cff94a2b65e991 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 24 May 2021 12:57:47 +0200 Subject: [PATCH] support de Python 3.7.9 et zlib-1.2.11 --- products/Python.pyconf | 11 ++ products/URANIE.pyconf | 7 + products/compil_scripts/Python-3.7.9.bat | 185 +++++++++++++++++++++++ products/compil_scripts/URANIE.bat | 19 ++- products/compil_scripts/pthreads.bat | 181 +++++++++++----------- products/compil_scripts/zlib-1.2.11.bat | 74 +++++++++ products/env_scripts/URANIE.py | 28 +++- products/env_scripts/root.py | 2 + products/root.pyconf | 2 +- products/zlib.pyconf | 9 ++ 10 files changed, 419 insertions(+), 99 deletions(-) create mode 100644 products/compil_scripts/Python-3.7.9.bat create mode 100644 products/compil_scripts/zlib-1.2.11.bat diff --git a/products/Python.pyconf b/products/Python.pyconf index 4bcb1bf..cae3736 100755 --- a/products/Python.pyconf +++ b/products/Python.pyconf @@ -49,4 +49,15 @@ version_3_6_5_win : compil_script : "Python-3.6.5.bat" patches : ['Python-3.6.5_windows.patch'] } +version_3_7_9 : +{ + patches : [] +} + +version_3_7_9_win : +{ + compil_script : "Python-3.7.9.bat" + patches : [] + build_depend : ['perl'] +} diff --git a/products/URANIE.pyconf b/products/URANIE.pyconf index 06be18d..335a68d 100644 --- a/products/URANIE.pyconf +++ b/products/URANIE.pyconf @@ -24,3 +24,10 @@ version_4_5_0 : { patches: ['URANIE-4.5.0.patch'] } + +version_4_5_0_win : +{ + depend : ['Python', 'root','nlopt', 'boost', 'pthreads'] + build_depend : ["cmake", 'swig', 'cppunit'] + patches: ['URANIE-4.5.0.patch'] +} diff --git a/products/compil_scripts/Python-3.7.9.bat b/products/compil_scripts/Python-3.7.9.bat new file mode 100644 index 0000000..8f36bfb --- /dev/null +++ b/products/compil_scripts/Python-3.7.9.bat @@ -0,0 +1,185 @@ +@echo off + +echo ########################################################################## +echo Python %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 +) + +SET LIB_TAG= +if %SAT_DEBUG% == 1 ( + set LIB_TAG=_d +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +if NOT exist "%PRODUCT_INSTALL%\libs" mkdir %PRODUCT_INSTALL%\libs +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +cd %SOURCE_DIR% +xcopy * %BUILD_DIR% /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 1 +) + +SET MSBUILDDISABLENODEREUSE=1 + +cd %BUILD_DIR%\PCbuild + +REM Upgrade to current version of MSVC +echo. +echo *** devenv pcbuild.sln /upgrade +devenv pcbuild.sln /upgrade +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on devenv + exit 1 +) + +echo. + +cd PCBuild +echo. +echo Extracting zlib... +if exist "%BUILD_DIR%\externals\cpython-source-deps-zlib-1.2.11" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-zlib-1.2.11" +if exist "%BUILD_DIR%\externals\zlib-1.2.11" rmdir /Q /S "%BUILD_DIR%\externals\zlib-1.2.11" +7z x -y %BUILD_DIR%\externals\zips\zlib-1.2.11.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-zlib-1.2.11 %BUILD_DIR%\externals\zlib-1.2.11 + +echo Extracting nasm... +if exist "%BUILD_DIR%\externals\cpython-bin-deps-nasm-2.11.06" rmdir /Q /S "%BUILD_DIR%\externals\cpython-bin-deps-nasm-2.11.06" +if exist "%BUILD_DIR%\externals\nasm-2.11.06" rmdir /Q /S "%BUILD_DIR%\externals\nasm-2.11.06" +7z x -y %BUILD_DIR%\externals\zips\nasm-2.11.06.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-bin-deps-nasm-2.11.06 %BUILD_DIR%\externals\nasm-2.11.06 + +echo Extracting openssl... +if exist "%BUILD_DIR%\externals\cpython-source-deps-openssl-1.1.1g" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-openssl-1.1.1g" +if exist "%BUILD_DIR%\externals\openssl-1.1.1g" rmdir /Q /S "%BUILD_DIR%\externals\openssl-1.1.1g" +7z x -y %BUILD_DIR%\externals\zips\openssl-1.1.1g.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-openssl-1.1.1g %BUILD_DIR%\externals\openssl-1.1.1g + +echo Extracting sqlite... +if exist "%BUILD_DIR%\externals\cpython-source-deps-sqlite-3.31.1.0" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-sqlite-3.31.1.0" +if exist "%BUILD_DIR%\externals\sqlite-3.31.1.0" rmdir /Q /S "%BUILD_DIR%\externals\sqlite-3.31.1.0" +7z x -y %BUILD_DIR%\externals\zips\sqlite-3.31.1.0.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-sqlite-3.31.1.0 %BUILD_DIR%\externals\sqlite-3.31.1.0 + +echo Extracting xz... +if exist "%BUILD_DIR%\externals\cpython-source-deps-xz-5.2.2" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-xz-5.2.2" +if exist "%BUILD_DIR%\externals\xz-5.2.2" rmdir /Q /S "%BUILD_DIR%\externals\xz-5.2.2" +7z x -y %BUILD_DIR%\externals\zips\xz-5.2.2.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-xz-5.2.2 %BUILD_DIR%\externals\xz-5.2.2 + +echo Extracting xz... +if exist "%BUILD_DIR%\externals\cpython-source-deps-bzip2-1.0.6" rmdir /Q /S "%BUILD_DIR%\externals\cpython-source-deps-bzip2-1.0.6" +if exist "%BUILD_DIR%\externals\bzip2-1.0.6" rmdir /Q /S "%BUILD_DIR%\externals\bzip2-1.0.6" +7z x -y %BUILD_DIR%\externals\zips\bzip2-1.0.6.zip -o%BUILD_DIR%\externals +mv %BUILD_DIR%\externals\cpython-source-deps-bzip2-1.0.6 %BUILD_DIR%\externals\bzip2-1.0.6 + +echo Extracting pip... +if exist "%BUILD_DIR%\externals\pip-21.1.1" rmdir /Q /S "%BUILD_DIR%\externals\pip-21.1.1" +7z x -y %BUILD_DIR%\externals\zips\pip-21.1.1.zip -o%BUILD_DIR%\externals + +REM Compilation + +cd %BUILD_DIR% +echo. + +REM Upgrade to current version of MSVC +echo. +echo *** devenv pcbuild.sln /upgrade +devenv pcbuild.sln /upgrade +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on devenv + exit 1 +) + +echo *** msbuild %BUILD_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 %BUILD_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 +) + +REM Installation of additional files +echo. +echo *** Installation of additional files +cd .. +xcopy /Y /I /E %BUILD_DIR%\include %PRODUCT_INSTALL%\include +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy include + exit 3 +) + +copy /Y %BUILD_DIR%\PC\pyconfig.h %PRODUCT_INSTALL%\include +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on copy PC\pyconfig.h + exit 4 +) + +xcopy /Y /I /E %BUILD_DIR%\lib %PRODUCT_INSTALL%\lib +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy lib + exit 5 +) + +REM some prequistes if compiled in Debug mode require the lib to be in folder libs +REM other ones require these static lib to be in the root directory +REM on purpose we don't use mklink, since this requires the user to have his node set in developer mode. +xcopy /Y %PRODUCT_INSTALL%\*.lib %PRODUCT_INSTALL%\libs\ +if NOT %ERRORLEVEL% == 0 ( + echo ERROR could not copy static libraries + exit 6 +) + +REM on purpose, we don't use mklink - requires admin rights... +copy /Y /B %PRODUCT_INSTALL%\python%LIB_TAG%.exe %PRODUCT_INSTALL%\python3.exe +if %SAT_DEBUG% == 1 ( + copy /Y /B %PRODUCT_INSTALL%\python_d.exe %PRODUCT_INSTALL%\python.exe + REM otherwise OmniORB does not compile... + copy /Y /B %PRODUCT_INSTALL%\libs\python37_d.lib %PRODUCT_INSTALL%\libs\python37.lib + copy /Y /B %PRODUCT_INSTALL%\libs\python_d.lib %PRODUCT_INSTALL%\libs\python.lib +) + +cd %PRODUCT_INSTALL%\ + +REM Add PIP support +set PYTHONHOME=%PRODUCT_INSTALL% +set PYTHON_ROOT_DIR=%PRODUCT_INSTALL% +set PYTHON_VERSION=3.7 +set PATH=%PRODUCT_INSTALL%;%PATH% +set PATH=%PRODUCT_INSTALL%\lib;%PATH% +set PYTHON_INCLUDE=%PRODUCT_INSTALL%\include +set PYTHONPATH=%PRODUCT_INSTALL%\lib;%PYTHONPATH% +set PYTHONPATH=%PRODUCT_INSTALL%\lib\site-packages;%PYTHONPATH% +set PYTHONBIN=%PRODUCT_INSTALL%\python.exe +set PATH=%PRODUCT_INSTALL%\Scripts;%PATH% + +%PRODUCT_INSTALL%\python.exe %BUILD_DIR%\externals\pip-21.1.1\get-pip.py --force-reinstall --no-setuptools --no-wheel --no-index --find-links=%BUILD_DIR%\externals\pip-21.1.1 + +REM In debug mode, we need to rename all _d.pyd to .pyd... don't ask why. Seems like a known bug in OmniORB. +if %SAT_DEBUG% == 1 ( + cd %PRODUCT_INSTALL% + powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}" + cd %PRODUCT_INSTALL%\lib\site-packages + powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) { $_ | Copy-Item -Destination {$_.Name -replace '.pyd','_d.pyd'}}}" +) + + +taskkill /F /IM "mspdbsrv.exe" + +echo. +echo ########## END diff --git a/products/compil_scripts/URANIE.bat b/products/compil_scripts/URANIE.bat index e819807..a36d544 100644 --- a/products/compil_scripts/URANIE.bat +++ b/products/compil_scripts/URANIE.bat @@ -14,6 +14,8 @@ if %SAT_DEBUG% == 1 ( set PRODUCT_BUILD_TYPE=Debug ) +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% @@ -24,7 +26,14 @@ SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DWITH-OPT++:BOOL=ON SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DWITH-JSONCPP:BOOL=ON SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -D--enable-doc:BOOL=ON -SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -D--enable-WIN32-DEBUG=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_ROOT_DIR=%PTHREAD_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_INCLUDE_DIR=%PTHREAD_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_DLL_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVC2.dll +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVCE2.lib + cd %BUILD_DIR% echo. @@ -40,10 +49,10 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo -------------------------------------------------------------------------- -echo *** msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo *** msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% echo -------------------------------------------------------------------------- -msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild ALL_BUILD.vcxproj exit 2 @@ -51,10 +60,10 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo -------------------------------------------------------------------------- -echo *** msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo *** msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% echo -------------------------------------------------------------------------- -msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild INSTALL.vcxproj exit 3 diff --git a/products/compil_scripts/pthreads.bat b/products/compil_scripts/pthreads.bat index 579ec8e..3b98f3d 100755 --- a/products/compil_scripts/pthreads.bat +++ b/products/compil_scripts/pthreads.bat @@ -1,88 +1,93 @@ -@echo off - -echo ########################################################################## -echo PThreads %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 -) - -if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% -if NOT exist "%PRODUCT_INSTALL%\lib" mkdir %PRODUCT_INSTALL%\lib -if NOT exist "%PRODUCT_INSTALL%\include" mkdir %PRODUCT_INSTALL%\include - -REM clean BUILD directory -if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% -mkdir %BUILD_DIR% - -robocopy %SOURCE_DIR% %BUILD_DIR% /E /NP /NFL /NDL /NS /NC -if NOT %ERRORLEVEL% == 1 ( - echo ERROR when copying archive %ERRORLEVEL% - exit 1 -) - -cd %BUILD_DIR% - -REM Upgrade to current version of MSVC -echo. -echo *** devenv %BUILD_DIR%\pthread.sln /upgrade -devenv %BUILD_DIR%\pthread.sln /upgrade -if NOT %ERRORLEVEL% == 0 ( - echo ERROR on devenv - exit 2 -) - -REM Compilation -echo. -echo *** %BUILD_DIR%\pthread.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=x64 - -msbuild %BUILD_DIR%\pthread.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=x64 -if NOT %ERRORLEVEL% == 0 ( - echo ERROR on msbuild - exit 3 -) - -echo. -echo -------------------------------------------------------------------------- -echo *** Installing includes -echo -------------------------------------------------------------------------- -echo. - -xcopy %BUILD_DIR%\*.h %PRODUCT_INSTALL%\include\ -if NOT %ERRORLEVEL% == 0 ( - echo "ERROR on copying includes" - exit 4 -) - -echo. -echo -------------------------------------------------------------------------- -echo *** Installing libs -echo -------------------------------------------------------------------------- -echo. - -xcopy %BUILD_DIR%\*.dll %PRODUCT_INSTALL%\lib\ -if NOT %ERRORLEVEL% == 0 ( - echo "ERROR on copying dll files" - exit 5 -) - -xcopy %BUILD_DIR%\*.lib %PRODUCT_INSTALL%\lib\ -if NOT %ERRORLEVEL% == 0 ( - echo "ERROR on copying lib files" - exit 6 -) - -copy %PRODUCT_INSTALL%\lib\pthreadVC2.lib %PRODUCT_INSTALL%\lib\pthreadVC2_64.lib -if NOT %ERRORLEVEL% == 0 ( - echo "ERROR on renaming lib\pthreadVC2.lib" - exit 7 -) - -echo. -echo "########## END" +@echo off + +echo ########################################################################## +echo PThreads %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% +if NOT exist "%PRODUCT_INSTALL%\lib" mkdir %PRODUCT_INSTALL%\lib +if NOT exist "%PRODUCT_INSTALL%\include" mkdir %PRODUCT_INSTALL%\include + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +robocopy %SOURCE_DIR% %BUILD_DIR% /E /NP /NFL /NDL /NS /NC +if NOT %ERRORLEVEL% == 1 ( + echo ERROR when copying archive %ERRORLEVEL% + exit 1 +) + +cd %BUILD_DIR% + +REM Upgrade to current version of MSVC +echo. +echo *** devenv %BUILD_DIR%\pthread.sln /upgrade +devenv %BUILD_DIR%\pthread.sln /upgrade +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on devenv + exit 2 +) + +REM Compilation +echo. +echo *** %BUILD_DIR%\pthread.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=%PLATFORM_TARGET% + +msbuild %BUILD_DIR%\pthread.sln /t:build /p:Configuration=%PRODUCT_BUILD_TYPE%;Platform=%PLATFORM_TARGET% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild + exit 3 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** Installing includes +echo -------------------------------------------------------------------------- +echo. + +xcopy %BUILD_DIR%\*.h %PRODUCT_INSTALL%\include\ +if NOT %ERRORLEVEL% == 0 ( + echo "ERROR on copying includes" + exit 4 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** Installing libs +echo -------------------------------------------------------------------------- +echo. + +xcopy %BUILD_DIR%\*.dll %PRODUCT_INSTALL%\lib\ +if NOT %ERRORLEVEL% == 0 ( + echo "ERROR on copying dll files" + exit 5 +) + +xcopy %BUILD_DIR%\*.lib %PRODUCT_INSTALL%\lib\ +if NOT %ERRORLEVEL% == 0 ( + echo "ERROR on copying lib files" + exit 6 +) + +copy %PRODUCT_INSTALL%\lib\pthreadVC2.lib %PRODUCT_INSTALL%\lib\pthreadVC2_%PLATFORM_TARGET%.lib +if NOT %ERRORLEVEL% == 0 ( + echo "ERROR on renaming lib\pthreadVC2.lib" + exit 7 +) + +echo. +echo "########## END" diff --git a/products/compil_scripts/zlib-1.2.11.bat b/products/compil_scripts/zlib-1.2.11.bat new file mode 100644 index 0000000..96487ab --- /dev/null +++ b/products/compil_scripts/zlib-1.2.11.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/URANIE.py b/products/env_scripts/URANIE.py index 0136284..1ce2cd4 100644 --- a/products/env_scripts/URANIE.py +++ b/products/env_scripts/URANIE.py @@ -8,20 +8,38 @@ def set_env(env, prereq_dir, version, forBuild=None): env.set('URANIE_VERSION', version) if platform.system()=="Windows" : - pass - else : env.set('URANIE_ROOT_DIR', prereq_dir) uranie = env.get('URANIE_ROOT_DIR') - # URANIE PATH env.set('URANIESYS', prereq_dir) - # PYTHON PATH env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python')) + # LD LIBRARY PATH + env.prepend('PATH', os.path.join(uranie, 'lib')) + # ROOT PATH + root_env = env.get('ROOTSYS') + root_lib_env = os.path.join(root_env,'lib','root') + if os.path.isdir(root_lib_env): + env.prepend('ROOTSYSLIB', root_lib_env) + else: + env.prepend('ROOTSYSLIB', os.path.join(root_env,'lib')) + # PATH + env.prepend('PATH', os.path.join(uranie,'bin')) + env.prepend('PATH', os.path.join(root_env,'bin')) + # OPT + opt_env = os.path.join(uranie, 'OPT++','optpp-2.4','lib') + env.prepend('PATH', opt_env) + + else : + env.set('URANIE_ROOT_DIR', prereq_dir) + uranie = env.get('URANIE_ROOT_DIR') + # URANIE PATH + env.set('URANIESYS', prereq_dir) + # PYTHON PATH + env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python')) # LD LIBRARY PATH env.prepend('LD_LIBRARY_PATH', os.path.join(uranie, 'lib')) - # ROOT PATH root_env = env.get('ROOTSYS') root_lib_env = os.path.join(root_env,'lib','root') diff --git a/products/env_scripts/root.py b/products/env_scripts/root.py index 0503f86..18293d4 100644 --- a/products/env_scripts/root.py +++ b/products/env_scripts/root.py @@ -7,6 +7,8 @@ def set_env(env, prereq_dir, version): if platform.system() == "Windows": env.prepend('PATH',os.path.join(prereq_dir, 'bin')) env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'bin')) + env.prepend('CMAKE_PREFIX_PATH',os.path.join(prereq_dir)) + env.set('CLING_STANDARD_PCH','none') else: env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'lib')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) diff --git a/products/root.pyconf b/products/root.pyconf index 0a82bff..973a20d 100644 --- a/products/root.pyconf +++ b/products/root.pyconf @@ -28,7 +28,7 @@ version_6_24_00_win: { build_source : "script" compil_script : "root-6.24.bat" - depend : ['Python', 'boost', 'freetype', 'freeimage'] + depend : ['Python', 'Cython', 'numpy'] patches : [] } diff --git a/products/zlib.pyconf b/products/zlib.pyconf index 0a6d9e6..3d6e7a0 100755 --- a/products/zlib.pyconf +++ b/products/zlib.pyconf @@ -28,3 +28,12 @@ default_win : single_install_dir : "yes" } } + +version_1_2_11: +{ +} +version_1_2_11_win: +{ + archive_info : {archive_name : "zlib-" + $APPLICATION.products.zlib + ".tar.gz"} + compil_script : 'zlib-1.2.11.bat' +} -- 2.39.2