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= Install the glvis executable in . +make app + Build a Mac OS application bundle. make clean Clean the glvis executable, library and object files. make distclean @@ -297,6 +300,7 @@ clean: rm -rf lib/*.o lib/*.bc lib/gl/*.o lib/gl/*.bc lib/*~ *~ glvis rm -rf $(LOGO_FILE_CPP) share/*.o rm -rf lib/libglvis.a lib/libglvis.js *.dSYM + rm -rf GLVis.app distclean: clean rm -rf bin/ @@ -309,6 +313,14 @@ ifeq ($(MFEM_USE_GNUTLS),YES) $(INSTALL) -m 750 glvis-keygen.sh $(PREFIX) endif +app: glvis + mkdir -p GLVis.app/Contents/MacOS + mkdir -p GLVis.app/Contents/Resources + cp share/Info.plist GLVis.app/Contents + cp glvis GLVis.app/Contents/MacOS + cp share/GLVis.icns GLVis.app/Contents/Resources + cp share/Credits.rtf GLVis.app/Contents/Resources + help: $(info $(value GLVIS_HELP_MSG)) @true diff --git a/share/Credits.rtf b/share/Credits.rtf new file mode 100644 index 00000000..110f0fc6 --- /dev/null +++ b/share/Credits.rtf @@ -0,0 +1,15 @@ +{\rtf1\ansi\ansicpg1252\cocoartf2580 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\margl1440\margr1440\vieww15100\viewh8040\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\sl288\slmult1\pardirnatural\qc\partightenfactor0 +{\field{\*\fldinst{HYPERLINK "https://glvis.org"}}{\fldrslt +\f0\b\fs26 \cf0 glvis.org}} +\f1\fs24 \ +\ +GLVis is a tool for accurate and flexible OpenGL visualization of finite element solutions based on the {\field{\*\fldinst{HYPERLINK "https://mfem.org"}}{\fldrslt MFEM}} finite element library.\ + +\fs12 \ + +\fs24 Developed by the GLVis team at {\field{\*\fldinst{HYPERLINK "https://computing.llnl.gov/casc"}}{\fldrslt CASC}}, {\field{\*\fldinst{HYPERLINK "https://www.llnl.gov"}}{\fldrslt LLNL}}.} diff --git a/share/GLVis.icns b/share/GLVis.icns new file mode 100644 index 00000000..7787c4de Binary files /dev/null and b/share/GLVis.icns differ diff --git a/share/Info.plist b/share/Info.plist new file mode 100644 index 00000000..1a4be377 --- /dev/null +++ b/share/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleExecutable + glvis + CFBundleIdentifier + org.glvis + CFBundleName + GLVis + CFBundleIconFile + GLVis.icns + CFBundleShortVersionString + 4.0.1 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + NSHighResolutionCapable + + +