From 269f76d1f9de74ee68f51cbaaa594123143d6051 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 18 Sep 2018 18:08:47 +0300 Subject: [PATCH] Adapt compilation on Windows --- build_Salome_deb.bat | 4 ++-- env_Salome.bat | 23 ++++++++++++----------- salomeRun_deb.bat | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/build_Salome_deb.bat b/build_Salome_deb.bat index 3ab3aa812..a65baa442 100644 --- a/build_Salome_deb.bat +++ b/build_Salome_deb.bat @@ -3,11 +3,11 @@ REM Find absolute path to ROOT_DIR @SET PARENT_DIR=%~dp0.. @SET ROOT_DIR= -pushd %PARENT_DIR%\.. +pushd %PARENT_DIR% @SET ROOT_DIR=%CD% popd -@SET SRC_DIR=%ROOT_DIR%\sources\shaper +@SET SRC_DIR=%ROOT_DIR%\sources @SET OCC_LIB_PREFIX=d call %SRC_DIR%\env_Salome.bat d diff --git a/env_Salome.bat b/env_Salome.bat index 19981f6f0..57d9e32f6 100644 --- a/env_Salome.bat +++ b/env_Salome.bat @@ -1,7 +1,5 @@ @echo off -IF NOT EXIST "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" GOTO ERROR1 - @REM Load local settings from file localenv.bat that should be located in the root directory if "%ROOT_DIR%" == "" ( set ROOT_DIR=%~dp0.. @@ -87,16 +85,19 @@ cd /d %ROOT_DIR% @SET _NO_DEBUG_HEAP=1 -IF "%ARCH%" == "Win64" ( - call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 -) ELSE ( - IF "%ARCH%" == "Win32" ( - call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 - ) ELSE ( - echo Wrong architecture is used. Win32 or Win64 architecture is allowed only. - echo Refer to the set_env.bat script. - ) +if "%VS140COMNTOOLS%" == "" ( + echo Could not find MS Visual Studio: variable VS140COMNTOOLS is not defined! + exit 1 +) else if exist "%VS140COMNTOOLS%\..\IDE\devenv.exe" ( + set MSVC_EXE="%VS140COMNTOOLS%\..\IDE\devenv.exe" +) else if exist "%VS140COMNTOOLS%\..\IDE\VCExpress.exe" ( + set MSVC_EXE="%VS140COMNTOOLS%\..\IDE\VCExpress.exe" +) else ( + echo "Could not find MS Visual Studio in %VS140COMNTOOLS%\..\IDE" + echo Check environment variable VS140COMNTOOLS! + exit 1 ) +call "%VS140COMNTOOLS%..\Tools\vsvars32.bat" @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install @SET PATH=%SHAPER_ROOT_DIR%\lib\salome;%PATH% diff --git a/salomeRun_deb.bat b/salomeRun_deb.bat index 6622e3295..14b69a6ba 100644 --- a/salomeRun_deb.bat +++ b/salomeRun_deb.bat @@ -3,7 +3,7 @@ REM Find absolute path to ROOT_DIR @SET PARENT_DIR=%~dp0.. @SET ROOT_DIR= -pushd %PARENT_DIR%\.. +pushd %PARENT_DIR% @SET ROOT_DIR=%CD% popd -- 2.39.2