--- /dev/null
+@echo off
+
+echo ##########################################################################
+echo URANIE %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=-DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
+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"
+
+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 CMake
+ exit 1
+)
+
+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=x64
+if NOT %ERRORLEVEL% == 0 (
+ echo ERROR on msbuild ALL_BUILD.vcxproj
+ exit 2
+)
+
+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=x64
+if NOT %ERRORLEVEL% == 0 (
+ echo ERROR on msbuild INSTALL.vcxproj
+ exit 3
+)
+
+taskkill /F /IM "mspdbsrv.exe"
+
+echo.
+echo ########## END
--- /dev/null
+@echo off
+
+echo ##########################################################################
+echo ROOT %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%
+
+REM clean BUILD directory
+if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
+mkdir %BUILD_DIR%
+cd %BUILD_DIR%
+
+SET 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% -DPYTHON_EXECUTABLE=%PYTHON_ROOT_DIR:\=/%/python.exe
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64"
+
+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 CMake
+ exit 1
+)
+
+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=x64
+if NOT %ERRORLEVEL% == 0 (
+ echo ERROR on msbuild ALL_BUILD.vcxproj
+ exit 2
+)
+
+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=x64
+if NOT %ERRORLEVEL% == 0 (
+ echo ERROR on msbuild INSTALL.vcxproj
+ exit 3
+)
+
+taskkill /F /IM "mspdbsrv.exe"
+
+echo.
+echo ########## END
import os.path, platform
def set_env(env, prereq_dir, version, forBuild=None):
- version = '.'.join(version.replace('-', '.').split('.')[:2])
- env.set('URANIE_VERSION', version)
-
- if platform.system()=="Windows" :
- # URANIE
- uranie_root = os.path.join(prereq_dir, 'uranie-3.9.0')
- env.set('URANIE_ROOT_DIR', uranie_root)
- env.set('URANIESYS', uranie_root)
- env.prepend('PATH', os.path.join(uranie_root, 'bin'))
- env.prepend('PATH', os.path.join(uranie_root, 'lib'))
-
- # ROOT
- root_dir = os.path.join(prereq_dir, 'root5.34.14')
- env.set('ROOT_ROOT_DIR', root_dir)
- env.set('ROOTSYS', root_dir)
- env.set('ROOTSYSLIB', os.path.join(root_dir, 'lib'))
- env.prepend('PATH', os.path.join(root_dir, 'bin'))
-
- env.prepend('PATH', os.path.join(prereq_dir, 'zlib-1.2.5', 'bin'))
- env.prepend('PATH', os.path.join(prereq_dir, 'libxml2-2.7.8.win32', 'bin'))
- env.prepend('PATH', os.path.join(prereq_dir, 'libxml2-2.7.8.win32', 'lib'))
- env.prepend('PATH', os.path.join(prereq_dir, 'iconv-1.9.2.win32', 'bin'))
- env.prepend('PATH', os.path.join(prereq_dir, 'libxslt-1.1.26.win32', 'bin'))
- env.prepend('PATH', os.path.join(prereq_dir, 'fftw-3.3.3-dll32'))
- env.prepend('PATH', os.path.join(prereq_dir, 'nlopt-2.4.2-dll32'))
- env.prepend('PATH', os.path.join(prereq_dir, 'pcl-1.10-modified', 'debug'))
- env.prepend('PATH', os.path.join(prereq_dir, 'optpp-2.4', 'lib'))
- env.prepend('PATH', os.path.join(prereq_dir, 'pthread-win32', 'Pre-built.2', 'dll', 'x86'))
- else :
- env.set('URANIE_ROOT_DIR', prereq_dir)
- uranie = env.get('URANIE_ROOT_DIR')
+ version = '.'.join(version.replace('-', '.').split('.')[:2])
+ env.set('URANIE_VERSION', version)
- ###
- # FORMAT URANIE
-
- # URANIE PATH
- env.set('URANIESYS', prereq_dir)
+ 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'))
- # PYTHON PATH
- env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python'))
-
- # LD LIBRARY PATH
- env.prepend('LD_LIBRARY_PATH', os.path.join(uranie, 'lib'))
+ # LD LIBRARY PATH
+ env.prepend('LD_LIBRARY_PATH', os.path.join(uranie, 'lib'))
- # ROOT PATH
- root_env = env.get('ROOT_ROOT_DIR')
- env.set('ROOTSYS', root_env)
+ # ROOT PATH
+ root_env = env.get('ROOT_ROOT_DIR')
+ env.set('ROOTSYS', root_env)
- 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'))
+ 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'))
- # OPT
- opt_env = os.path.join(uranie, 'OPT++','optpp-2.4','lib')
- env.prepend('LD_LIBRARY_PATH', opt_env)
+ # 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('LD_LIBRARY_PATH', opt_env)
def set_nativ_env(env):
- pass
+ pass