Skip to content

Commit

Permalink
Merge branch 'master' into issue2230.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Nov 25, 2019
2 parents 7913c78 + a67d0aa commit eea0ecf
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 31 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,8 @@ endif()

# Package OpenCOR

set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME ${CMAKE_PROJECT_NAME})

set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_CONTACT "Team OpenCOR (team@opencor.ws)")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
Expand Down Expand Up @@ -1418,12 +1420,13 @@ if(WIN32)
")
endif()
elseif(APPLE)
# Select PackageMaker and ZIP as the packagers on macOS
# Note: this is actually done within the package script, so that the ZIP
# package can be done 'properly', i.e. we don't have the full tree
# structure in the ZIP file...
# Select productbuild and ZIP as the packagers on macOS

set(CPACK_GENERATOR productbuild ZIP)
set(CPACK_SYSTEM_NAME "macOS")
set(CPACK_PROJECT_CONFIG_FILE ${PLATFORM_DISTRIB_DIR}/package.cmake)

set(CPACK_COMPONENTS_ALL ${CMAKE_PROJECT_NAME})

set(CPACK_RESOURCE_FILE_WELCOME "${PLATFORM_DISTRIB_DIR}/welcome.txt")
set(CPACK_RESOURCE_FILE_README "${DISTRIB_DIR}/readMe.txt")
Expand Down
74 changes: 57 additions & 17 deletions distrib/macos/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${CMAKE_PROJECT_NAME}</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
Expand All @@ -20,7 +22,51 @@
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeIconFile</key>
<string>${CMAKE_PROJECT_NAME}.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>sedml</string>
</array>
<key>CFBundleTypeName</key>
<string>SED-ML File</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeIconFile</key>
<string>${CMAKE_PROJECT_NAME}.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>omex</string>
</array>
<key>CFBundleTypeName</key>
<string>COMBINE Archive</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>${CMAKE_PROJECT_NAME}</string>
<key>CFBundleIconFile</key>
<string>${CMAKE_PROJECT_NAME}.icns</string>
<key>CFBundleIdentifier</key>
<string>ws.opencor</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${CMAKE_PROJECT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,23 +78,17 @@
</array>
</dict>
</array>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2011-${YEAR}</string>
<key>CFBundleIconFile</key>
<string>${CMAKE_PROJECT_NAME}.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>${CMAKE_PROJECT_NAME}</string>
<key>CFBundleIdentifier</key>
<string>ws.opencor</string>
<key>CFBundleVersion</key>
<string>${VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${VERSION}</string>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2011-${YEAR}</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSRequiresAquaSystemAppearance</key>
<string>true</string>
<true/>
</dict>
</plist>
7 changes: 7 additions & 0 deletions distrib/macos/package.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Our different CPack generators require using different prefixes

if("${CPACK_GENERATOR}" STREQUAL "ZIP")
set(CPACK_INSTALL_PREFIX /)
else()
set(CPACK_INSTALL_PREFIX /Applications/OpenCOR)
endif()
2 changes: 1 addition & 1 deletion doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>General:</strong> added (initial) support for <a href=\"https://www.python.org/\">Python</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/1255\">#1255</a>)." },
{ "change": "<strong>General:</strong> added (initial) support for <a href=\"https://www.python.org/\">Python</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/1255\">#1255</a>). Replaced our use of <a href=\"https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html\">PackageMaker</a> with that of productbuild on <a href=\"https://en.wikipedia.org/wiki/MacOS\">macOS</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/2210\">#2210</a>)." },
{ "change": "<strong>Python support:</strong> update the PATH using <code>\\</code> rather than <code>/</code> on Windows (see issue <a href=\"https://github.com/opencor/opencor/issues/2219\">#2219</a>)." },
{ "change": "<strong>SED-ML support:</strong> added support left and right triangle symbols (see issue <a href=\"https://github.com/opencor/opencor/issues/2173\">#2173</a>)." },
{ "change": "<strong>Simulation Experiment view:</strong> properly handle the Graph Panel properties (see issue <a href=\"https://github.com/opencor/opencor/issues/2171\">#2171</a>). Make sure that curves are plotted with all of their original settings when reloading a SED-ML file (see issue <a href=\"https://github.com/opencor/opencor/issues/2176\">#2176</a>). Make sure that all of a solver's properties get saved to a SED-ML file (see issue <a href=\"https://github.com/opencor/opencor/issues/2185\">#2185</a>)." },
Expand Down
22 changes: 13 additions & 9 deletions package
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ origDir=`pwd`

cd ${appDir}/build

if [ "`uname -s`" = "Linux" ]; then
cpack
else
if [ -f /Applications/PackageMaker.app/Contents/MacOS/PackageMaker ]; then
cpack -G PackageMaker -D CPACK_INSTALL_PREFIX=/Applications/OpenCOR
fi

cpack -G ZIP -D CPACK_INSTALL_PREFIX=.
fi
cpack

exitCode=$?

if [ "`uname -s`" = "Darwin" ]; then
packageName="OpenCOR-`date '+%Y-%m-%d'`-macOS"

mkdir ${packageName}

mv ${packageName}.pkg ${packageName}

hdiutil create -srcfolder ${packageName} ${packageName}.dmg

rm -fr ${packageName}
fi

cd $origDir

if [ $exitCode -eq 0 ]; then
Expand Down

0 comments on commit eea0ecf

Please sign in to comment.