3 echo ##########################################################################
5 echo ##########################################################################
8 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
9 if NOT exist "%PRODUCT_INSTALL%\include" mkdir %PRODUCT_INSTALL%\include
10 if NOT exist "%PRODUCT_INSTALL%\bin" mkdir %PRODUCT_INSTALL%\bin
12 REM clean BUILD directory
13 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
17 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
18 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=Release
19 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BUILD_LIB=ON
20 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BUILD_SHARED=ON
21 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BUILD_DYNAMIC=ON
22 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_ACIS=OFF
23 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_FLTK=OFF
24 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_ONELAB_METAMODEL=OFF
25 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PARSER=ON
26 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PETSC=OFF
27 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PRIVATE_API=ON
28 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_CGNS=OFF
29 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_HXT=OFF
30 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_SOLVER=ON
31 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_GMM=ON
32 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_TESTS=OFF
33 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PLUGINS=OFF
34 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017 Win64"
35 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BLAS_LAPACK=OFF
36 set MSBUILDDISABLENODEREUSE=1
39 echo *********************************************************************
40 echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS%
41 echo *********************************************************************
44 %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
45 if NOT %ERRORLEVEL% == 0 (
51 echo *********************************************************************
52 echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj
53 echo *********************************************************************
56 msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj
57 if NOT %ERRORLEVEL% == 0 (
58 echo ERROR on msbuild gmsh.vcxproj
63 echo *********************************************************************
64 echo *** installation...
65 echo *********************************************************************
68 msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 INSTALL.vcxproj
69 if NOT %ERRORLEVEL% == 0 (
70 echo ERROR on msbuild INSTALL.vcxproj
75 echo *********************************************************************
76 echo *** installation Headers...
77 echo *********************************************************************
79 msbuild /p:Configuration=Release /p:Platform=x64 /p:BuildProjectReferences=false get_headers.vcxproj
80 if NOT %ERRORLEVEL% == 0 (
81 echo ERROR on msbuild get_headers.vcxproj
85 copy /Y /B %BUILD_DIR%\Release\gmsh.lib %PRODUCT_INSTALL%\bin\gmsh.lib
86 copy /Y /B %BUILD_DIR%\Release\gmsh.exp %PRODUCT_INSTALL%\bin\gmsh.exp
88 SETLOCAL ENABLEDELAYEDEXPANSION
89 FOR %%f IN (gmsh.h gmsh.h_cwrap gmshc.h) do (
91 copy /Y %SOURCE_DIR%\api\%%f %PRODUCT_INSTALL%\include\%X%
95 cd %BUILD_DIR%\Headers\gmsh
96 SETLOCAL ENABLEDELAYEDEXPANSION
99 copy /Y %SOURCE_DIR%\api\%%f %PRODUCT_INSTALL%\include\%X%
103 cd %PRODUCT_INSTALL%\include\gmsh
104 SETLOCAL ENABLEDELAYEDEXPANSION
105 FOR %%f IN (*.h) do (
107 copy /Y %PRODUCT_INSTALL%\include\gmsh\%%f %PRODUCT_INSTALL%\include\%X%
111 REM these two files need to be moved to bin, adding bin directory to PATH does not help.
112 cp %PRODUCT_INSTALL%\lib\gmsh.py %PRODUCT_INSTALL%\bin\gmsh.py
113 cp %PRODUCT_INSTALL%\lib\gmsh.dll %PRODUCT_INSTALL%\bin\gmsh.dll