From: Sergey Belash Date: Fri, 7 Mar 2014 12:44:23 +0000 (+0400) Subject: Batch files for environment setup added X-Git-Tag: V_0.1~65 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aadae6b7e33389d89ed3f5124e8dcf772bede252;p=modules%2Fshaper.git Batch files for environment setup added --- diff --git a/buildNewGEOM.bat b/buildNewGEOM.bat new file mode 100644 index 000000000..f84c6242e --- /dev/null +++ b/buildNewGEOM.bat @@ -0,0 +1,11 @@ +@SET ROOT_DIR=%~dp0.. + +@set SRC_DIR=%ROOT_DIR%\sources + +call %SRC_DIR%\env.bat + +mkdir %ROOT_DIR%\build +cd %ROOT_DIR%\build + +cmake %SRC_DIR% -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install +start "" %MSVC_EXE% NewGEOM.sln diff --git a/env.bat b/env.bat new file mode 100644 index 000000000..f9429a84a --- /dev/null +++ b/env.bat @@ -0,0 +1,102 @@ +@echo off + +@REM Load local settings from file localenv.bat that should be located in the root directory +if "%INSTALL_DIR%" == "" ( + set INSTALL_DIR=%~dp0.. +) +if exist "%INSTALL_DIR%\localenv.bat" ( + echo Setting local environment from %INSTALL_DIR%\localenv.bat + call "%INSTALL_DIR%\localenv.bat" +) else ( + echo Warning: file %INSTALL_DIR%\localenv.bat does not exist; using default environment +) + +rem --------------- Configuration -------------- + +rem --------------- Products path -------------- +if "%PRODUCTSDIR%" == "" ( + set PRODUCTSDIR=%INSTALL_DIR%\PRODUCTS +) + +rem --------------- cmake 2.8.7 -------------- +if "%CMAKEDIR%" == "" ( + set CMAKEDIR=%PRODUCTSDIR%\cmake-2.8.12.1 +) +set PATH=%CMAKEDIR%\bin;%PATH% + +@REM ------------------------- +@REM CASCADE +@SET CAS_ROOT_DIR=%PRODUCTSDIR%\OCCT-6.7.0 +@SET CASROOT=%CAS_ROOT_DIR% +@REM ------------------------- +@REM ------------------------- +@REM CASCADE +@SET PATH=%CASROOT%;%CASROOT%\win32\bind;%PATH% +@set CSF_GraphicShr=%CASROOT%\win32\bind\TKOpenGl.dll +@set CSF_MDTVFontDirectory=%CASROOT%\src\FontMFT +@set CSF_LANGUAGE=us +@set MMGT_CLEAR=1 +@set CSF_EXCEPTION_PROMPT=1 +@set CSF_SHMessage=%CASROOT%\src\SHMessage +@set CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures +@set CSF_XSMessage=%CASROOT%\src\XSMessage +@set CSF_StandardDefaults=%CASROOT%\src\StdResource +@set CSF_PluginDefaults=%CASROOT%\src\StdResource +@set CSF_XCAFDefaults=%CASROOT%\src\StdResource +@set CSF_StandardLiteDefaults=%CASROOT%\src\StdResource +@set CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat +@set CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat +@set CSF_IGESDefaults=%CASROOT%\src\XSTEPResource +@set CSF_STEPDefaults=%CASROOT%\src\XSTEPResource +@set CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource +@REM ------------------------- + + +@REM ------------------------- +@REM FREEIMAGE (Used by OCCT) +@SET PATH=%PRODUCTSDIR%\freeimage-3.15.4\bin;%PATH% +@REM ------------------------- + +@REM ------------------------- +@REM FTGL (Used by OCCT) +@SET PATH=%PRODUCTSDIR%\ftgl-2.1.3\bin;%PATH% +@REM ------------------------- + +@REM ------------------------- +@REM FREETYPE (Used by OCCT) +@SET PATH=%PRODUCTSDIR%\freetype-2.4.11\bin;%PATH% +@REM ------------------------- + +@REM ------------------------- +@REM GL2PS (Used by OCCT AND PARAVIEW) +@SET PATH=%PRODUCTSDIR%\gl2ps-1.3.8\bin;%PATH% +@REM ------------------------- + +@REM ------------------------- +@REM TBB (Used by OCCT) +@SET PATH=%PRODUCTSDIR%\tbb\bin;%PATH% +@REM ------------------------- + +@REM ------------------------- +@REM QT +if "%QTDIR%" == "" ( + @SET QTDIR=%PRODUCTSDIR%\Qt-5.2.0\5.2.0\msvc2010 +) +@SET PATH=%QTDIR%\bin;%PATH% +@REM ------------------------- + +rem -------- Visual Studio -------------------- +rem Detect Visual Studio (either commercial or Express edition) +if "%VS100COMNTOOLS%" == "" ( + echo Could not find MS Visual Studio: variable VS100COMNTOOLS is not defined! + exit 1 +) else if exist "%VS100COMNTOOLS%\..\IDE\devenv.exe" ( + set MSVC_EXE="%VS100COMNTOOLS%\..\IDE\devenv.exe" +) else if exist "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" ( + set MSVC_EXE="%VS100COMNTOOLS%\..\IDE\VCExpress.exe" +) else ( + echo "Could not find MS Visual Studio in %VS100COMNTOOLS%\..\IDE" + echo Check environment variable VS100COMNTOOLS! + exit 1 +) +call "%VS100COMNTOOLS%..\Tools\vsvars32.bat"