Skip to content

Commit 27e3353

Browse files
committed
Win build script occt7.2
1 parent 0920116 commit 27e3353

4 files changed

Lines changed: 1662 additions & 10 deletions

File tree

win/build-deps.cmd

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,13 @@ if not %ERRORLEVEL%==0 goto :Error
267267
call :InstallCMakeProject "%DEPENDENCY_DIR%\%BUILD_DIR%" %BUILD_CFG%
268268
if not %ERRORLEVEL%==0 goto :Error
269269

270-
set DEPENDENCY_NAME=Open CASCADE 7.1.0
271-
set OCCT_FILENAME=occt-89aebde
270+
set OCCT_HASH=88af392
271+
set OCCT_VERSION=7.2.0
272+
set DEPENDENCY_NAME=Open CASCADE %OCCT_VERSION%
273+
set OCCT_FILENAME=occt-%OCCT_HASH%
272274
set DEPENDENCY_DIR=%DEPS_DIR%\%OCCT_FILENAME%
273275
cd "%DEPS_DIR%"
274-
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=89aebde;sf=tgz" "%DEPS_DIR%" %OCCT_FILENAME%.tar.gz
276+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=%OCCT_HASH%;sf=tgz" "%DEPS_DIR%" %OCCT_FILENAME%.tar.gz
275277
if not %ERRORLEVEL%==0 goto :Error
276278

277279
if exist "%DEPS_DIR%\%OCCT_FILENAME%" (
@@ -289,24 +291,43 @@ if not %ERRORLEVEL%==0 goto :Error
289291
set DEPENDENCY_NAME=Additional files
290292
:: Somehow these two files are not present in the downloaded
291293
:: snapshot. Path names being too long for gitweb snapshot?
292-
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
294+
295+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=%OCCT_HASH%;f=src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx" "%OCCT_FILENAME%\src\RWStepVisual" RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx
296+
if not %ERRORLEVEL%==0 goto :Error
297+
298+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=%OCCT_HASH%;f=src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx" "%OCCT_FILENAME%\src\RWStepVisual" RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx
299+
if not %ERRORLEVEL%==0 goto :Error
300+
301+
if "%OCCT_VERSION%"=="7.2.0" (
302+
303+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=%OCCT_HASH%;f=src/StepVisual/StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.cxx" "%OCCT_FILENAME%\src\StepVisual" StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.cxx
304+
if not %ERRORLEVEL%==0 goto :Error
305+
306+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=%OCCT_HASH%;f=src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.cxx" "%OCCT_FILENAME%\src\RWStepVisual" RWStepVisual_RWAnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.cxx
307+
if not %ERRORLEVEL%==0 goto :Error
308+
309+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=%OCCT_HASH%;f=src/StepVisual/StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx" "%OCCT_FILENAME%\src\StepVisual" StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx
293310
if not %ERRORLEVEL%==0 goto :Error
294-
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
311+
312+
call :DownloadFile "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blob_plain;hb=%OCCT_HASH%;f=src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx" "%OCCT_FILENAME%\src\RWStepVisual" RWStepVisual_RWAnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx
295313
if not %ERRORLEVEL%==0 goto :Error
296-
set DEPENDENCY_NAME=Open CASCADE 7.1.0
314+
315+
)
316+
317+
set DEPENDENCY_NAME=Open CASCADE %OCCT_VERSION%
297318

298319
:: Patching always blindly would trigger a rebuild each time
299320
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
300321
if not %ERRORLEVEL%==0 (
301322
echo Patching %DEPENDENCY_NAME%'s CMake files
302323
REM OCCT insists on finding FreeType DLL even if using static FreeType build + define HAVE_NO_DLL
303-
copy /y "%~dp0patches\89aebde_CMakeLists.txt" "%DEPENDENCY_DIR%\CMakeLists.txt"
324+
if exist "%~dp0patches\%OCCT_HASH%_CMakeLists.txt" copy /y "%~dp0patches\%OCCT_HASH%_CMakeLists.txt" "%DEPENDENCY_DIR%\CMakeLists.txt"
304325
REM Patch OCCT to be built against the static MSVC run-time.
305-
copy /y "%~dp0patches\89aebde_adm-cmake-occt_defs_flags.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_defs_flags.cmake"
326+
if exist "%~dp0patches\%OCCT_HASH%_adm-cmake-occt_defs_flags.cmake" copy /y "%~dp0patches\%OCCT_HASH%_adm-cmake-occt_defs_flags.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_defs_flags.cmake"
306327
REM OCCT tries to deploy PDBs from the bin directory even if static build is used.
307-
copy /y "%~dp0patches\89aebde_adm-cmake-occt_toolkit.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_toolkit.cmake"
328+
if exist "%~dp0patches\%OCCT_HASH%_adm-cmake-occt_toolkit.cmake" copy /y "%~dp0patches\%OCCT_HASH%_adm-cmake-occt_toolkit.cmake" "%DEPENDENCY_DIR%\adm\cmake\occt_toolkit.cmake"
308329
REM Patch header file for HAVE_NO_DLL
309-
copy /y "%~dp0patches\89aebde_Standard_Macro.hxx" "%DEPENDENCY_DIR%\src\Standard\Standard_Macro.hxx"
330+
if exist "%~dp0patches\%OCCT_HASH%_Standard_Macro.hxx" copy /y "%~dp0patches\%OCCT_HASH%_Standard_Macro.hxx" "%DEPENDENCY_DIR%\src\Standard\Standard_Macro.hxx"
310331
REM NOTE If adding a new patch, adjust the checks above and below accordingly
311332
)
312333
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL

0 commit comments

Comments
 (0)