diff --git a/.gitignore b/.gitignore index 1fb02e41..ff588ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ lib/libglvis.js lib/libglvis.a share/logo.rgba.bin.cpp glvis +GLVis.app # Output from running glvis GLVis.pdf diff --git a/CHANGELOG b/CHANGELOG index 35cf3b97..4719a198 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,9 @@ Version 4.0.1 (development) - Replace pthreads and POSIX-specific code with C++11 standard thread library. +- Added build target ("make app") to build a native Mac OS application bundle + that can be double-clicked, added to the Dock, etc. + Version 4.0, released on Dec 11, 2020 ===================================== diff --git a/CMakeLists.txt b/CMakeLists.txt index e7d2ad71..8bdfbbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,3 +309,22 @@ if(NOT EMSCRIPTEN) endif (MFEM_USE_GNUTLS) endif(NOT EMSCRIPTEN) + +add_custom_target(app + COMMAND ${CMAKE_COMMAND} -E make_directory GLVis.app/Contents/MacOS + COMMAND ${CMAKE_COMMAND} -E make_directory GLVis.app/Contents/Resources + COMMAND ${CMAKE_COMMAND} -E copy glvis GLVis.app/Contents/MacOS/ + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/share/Info.plist GLVis.app/Contents + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/share/GLVis.icns + GLVis.app/Contents/Resources/ + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/share/Credits.rtf + GLVis.app/Contents/Resources/ + DEPENDS + glvis-exe + GLVis.app/Contents/Info.plist + GLVis.app/Contents/Resources/GLVis.icns + GLVis.app/Contents/Resources/Credits.rtf + VERBATIM) diff --git a/INSTALL b/INSTALL index cc3ca002..d04d8838 100644 --- a/INSTALL +++ b/INSTALL @@ -60,6 +60,7 @@ Some of the available 'make' targets are: make -> Builds the glvis binary, using the MFEM compiler and options make opt -> Builds an optimized version make debug -> Builds a debug version +make app -> Builds a Mac OS application bundle make clean -> Cleans the build make style -> Format the code with Artistic Style. make help -> Prints a short help message @@ -191,6 +192,9 @@ Some building considerations Note that while this avoids the hard error, and allows for real-time visualization, occasional hangs have been reported with this method. +- On Mac OS X, GLVis can be built as a native application bundle using the 'make + app' target (with both the makefile and CMake build systems). + Dependency building instructions ================================ Note that using the build locations given below will let the GLVis build systems diff --git a/makefile b/makefile index 795f540b..93be9e6f 100644 --- a/makefile +++ b/makefile @@ -16,6 +16,7 @@ GLVis makefile targets: make make status/info make install + make app make clean make distclean make style @@ -30,6 +31,8 @@ make status Display information about the current configuration. make install PREFIX=