Skip to content

Commit 2e36793

Browse files
committed
win build script OCCT 7.1.0
1 parent e3d2621 commit 2e36793

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

win/build-deps.cmd

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,34 +260,48 @@ if not %ERRORLEVEL%==0 goto :Error
260260
call :InstallCMakeProject "%DEPENDENCY_DIR%\%BUILD_DIR%" %BUILD_CFG%
261261
if not %ERRORLEVEL%==0 goto :Error
262262

263-
set DEPENDENCY_NAME=Open CASCADE 7.0.0
264-
set OCCT_FILENAME=occt-V7_0_0-9059ca1
263+
set DEPENDENCY_NAME=Open CASCADE 7.1.0
264+
set OCCT_FILENAME=occt-89aebde
265265
set DEPENDENCY_DIR=%DEPS_DIR%\%OCCT_FILENAME%
266266
cd "%DEPS_DIR%"
267-
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=V7_0_0;sf=tgz" "%DEPS_DIR%" %OCCT_FILENAME%.tar.gz
267+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=89aebde;sf=tgz" "%DEPS_DIR%" %OCCT_FILENAME%.tar.gz
268268
if not %ERRORLEVEL%==0 goto :Error
269+
270+
if exist "%DEPS_DIR%\%OCCT_FILENAME%" (
271+
:: TK: I am having a hard time to reinitialize OCCT, because the directory ends up being recreated by a prior cmake step, even if manually deleted.
272+
:: Therefore check if the directory contains a full checkout [using a single file as proxy] and delete the directory tree if it is not.
273+
if not exist "%DEPS_DIR%\%OCCT_FILENAME%\OCCT_LGPL_EXCEPTION.txt". rd /s/q "%DEPS_DIR%\%OCCT_FILENAME%"
274+
)
275+
269276
call :ExtractArchive %OCCT_FILENAME%.tar.gz "%DEPS_DIR%" "%DEPENDENCY_DIR%"
270277
if not %ERRORLEVEL%==0 goto :Error
271278
call :ExtractArchive %OCCT_FILENAME%.tar "%DEPS_DIR%" "%DEPENDENCY_DIR%"
272279
if not %ERRORLEVEL%==0 goto :Error
273280

281+
set DEPENDENCY_NAME=Additional files
282+
:: Somehow these two files are not present in the downloaded
283+
:: snapshot. Path names being too long for gitweb snapshot?
284+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=89aebdea8d6f4d15cfc50e9458cd8e2e25022326;f=src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx" "%OCCT_FILENAME%\src\RWStepVisual" RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx
285+
if not %ERRORLEVEL%==0 goto :Error
286+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=89aebdea8d6f4d15cfc50e9458cd8e2e25022326;f=src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx" "%OCCT_FILENAME%\src\RWStepVisual" RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx
287+
if not %ERRORLEVEL%==0 goto :Error
288+
set DEPENDENCY_NAME=Open CASCADE 7.1.0
289+
274290
:: Patching always blindly would trigger a rebuild each time
275-
findstr IfcOpenShell "%DEPENDENCY_DIR%\src\XCAFDoc\XCAFDoc_GeomTolerance.cxx">NUL
291+
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
276292
if not %ERRORLEVEL%==0 (
277293
echo Patching %DEPENDENCY_NAME%'s CMake files
278294
REM OCCT insists on finding FreeType DLL even if using static FreeType build + define HAVE_NO_DLL
279-
copy /y "%~dp0patches\occt-V7_0_0-9059ca1_CMakeLists.txt" "%DEPENDENCY_DIR%\CMakeLists.txt"
295+
copy /y "%~dp0patches\89aebde_CMakeLists.txt" "%DEPENDENCY_DIR%\CMakeLists.txt"
280296
REM Patch OCCT to be built against the static MSVC run-time.
281-
copy /y "%~dp0patches\occt-V7_0_0-9059ca1_occt_defs_flags.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_defs_flags.cmake"
297+
copy /y "%~dp0patches\89aebde_adm-cmake-occt_defs_flags.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_defs_flags.cmake"
282298
REM OCCT tries to deploy PDBs from the bin directory even if static build is used.
283-
copy /y "%~dp0patches\occt-V7_0_0-9059ca1_occt_toolkit.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_toolkit.cmake"
284-
REM Defining HAVE_NO_DLL causes compilation errors due to Win32 GetObject and max macros
285-
copy /y "%~dp0patches\occt-V7_0_0-9059ca1_XCAFDoc_Dimension.cxx" "%DEPENDENCY_DIR%\src\XCAFDoc\XCAFDoc_Dimension.cxx"
286-
copy /y "%~dp0patches\occt-V7_0_0-9059ca1_OpenGl_PrimitiveArray.cxx" "%DEPENDENCY_DIR%\src\OpenGl\OpenGl_PrimitiveArray.cxx"
287-
copy /y "%~dp0patches\occt-V7_0_0-9059ca1_XCAFDoc_GeomTolerance.cxx" "%DEPENDENCY_DIR%\src\XCAFDoc\XCAFDoc_GeomTolerance.cxx"
299+
copy /y "%~dp0patches\89aebde_adm-cmake-occt_toolkit.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_toolkit.cmake"
300+
REM Patch header file for HAVE_NO_DLL
301+
copy /y "%~dp0patches\89aebde_Standard_Macro.hxx" "%DEPENDENCY_DIR%\src\Standard\Standard_Macro.hxx"
288302
REM NOTE If adding a new patch, adjust the checks above and below accordingly
289303
)
290-
findstr IfcOpenShell "%DEPENDENCY_DIR%\src\XCAFDoc\XCAFDoc_GeomTolerance.cxx">NUL
304+
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
291305
if not %ERRORLEVEL%==0 goto :Error
292306

293307
cd "%DEPENDENCY_DIR%"

0 commit comments

Comments
 (0)