Skip to content

Commit

Permalink
Added custom Info.plist to SPIERSview for macOS
Browse files Browse the repository at this point in the history
macOS file associations are done through the Info.plist files under the application pakages. QT/qmake should be able to overwrite the default generated file with this custom file. Need to make sure that the custom Info.plist (below) is in XML format and not binary as qmake uses sed for string replacements within it.
  • Loading branch information
alanspencer committed May 29, 2020
1 parent 00449fc commit 1008ae1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
35 changes: 35 additions & 0 deletions SPIERSview/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>SPIERSview64</string>
<key>CFBundleIconFile</key>
<string>SPIERSviewIcon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.SPIERSview64</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>spv</string>
<string>vaxml</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<string>application/octet-stream</string>
<key>CFBundleTypeName</key>
<string>SPIERSview</string>
</dict>
</plist>
14 changes: 10 additions & 4 deletions SPIERSview/SPIERSview.pro
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ unix:!macx {
# MacOS common build here
macx {

#RJG - Below vtk installation achieved using installation via homebrew
#Below vtk installation achieved using installation via homebrew
#eg. brew install vtk
LIBS += -L$$PWD/../../../../../../usr/local/Cellar/vtk/8.2.0_10/lib/ \
-lvtkCommonExecutionModel-8.2.1 \
Expand Down Expand Up @@ -303,14 +303,20 @@ macx {
INCLUDEPATH += $$PWD/../../../../../../usr/local/Cellar/vtk/8.2.0_10/include/vtk-8.2/
DEPENDPATH += $$PWD/../../../../../../usr/local/Cellar/vtk/8.2.0_10/include/vtk-8.2/

#RJG - Note also the virtual machine has a VTK version built on the box:
# RJG - Note also the virtual machine has a VTK version built on the box:
#LIBS += -L$$PWD/../../../../SPIERS/VTK-8.2.0/build/lib/ \
#INCLUDEPATH += $$PWD/../../../../SPIERS/VTK-8.2.0/build
#DEPENDPATH += $$PWD/../../../../SPIERS/VTK-8.2.0/build
#I have left this in case an alternative is ever required
# I have left this in case an alternative is ever required

#Mac icon
# Mac icon
ICON = resources/SPIERSviewIcon.icns

# macOS file associations are done through the Info.plist files under the application pakages
# QT/qmake should be able to overwrite the default generated file with this custom file
# We need to make sure that the custom Info.plist (below) is in XML format and not binary
# as qmake uses sed for string replacements within it.
QMAKE_INFO_PLIST = Info.plist
}

SOURCES += src/main.cpp \
Expand Down

0 comments on commit 1008ae1

Please sign in to comment.