Provide an app icon on OS X
authorDiane Trout <diane@caltech.edu>
Sat, 15 Jul 2006 01:53:04 +0000 (01:53 +0000)
committerDiane Trout <diane@caltech.edu>
Sat, 15 Jul 2006 01:53:04 +0000 (01:53 +0000)
derived from the nice SVG icon created with Inkscape.

icons/mussa.svg [new file with mode: 0644]
icons/osx/Resources/mussa.icns [new file with mode: 0644]
qui/CMakeLists.txt

diff --git a/icons/mussa.svg b/icons/mussa.svg
new file mode 100644 (file)
index 0000000..d89ce2a
--- /dev/null
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg1874"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docbase="/Users/diane/proj/mussa/icons"
+   sodipodi:docname="mussa.svg">
+  <defs
+     id="defs1876" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.5"
+     inkscape:cx="15.188597"
+     inkscape:cy="34.661786"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:window-width="823"
+     inkscape:window-height="577"
+     inkscape:window-x="58"
+     inkscape:window-y="288">
+    <sodipodi:guide
+       orientation="vertical"
+       position="-311.64124"
+       id="guide2797" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="-320.89791"
+       id="guide2807" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="-310.61272"
+       id="guide2809" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="2.1818182"
+       id="guide2811" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="61.818182"
+       id="guide2813" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata1879">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       style="opacity:1;fill:black;fill-opacity:1;stroke:black;stroke-width:0.19203824;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect1882"
+       width="59.262508"
+       height="6.0079613"
+       x="2.4596553"
+       y="7.8960199"
+       rx="1.8181819"
+       ry="1.8181819" />
+    <rect
+       style="opacity:1;fill:black;fill-opacity:1;stroke:black;stroke-width:0.19203822;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2770"
+       width="59.262508"
+       height="6.0079613"
+       x="2.4596555"
+       y="47.896023"
+       rx="1.6363636"
+       ry="1.6363636" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:blue;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 34.264458,47.718181 L 48.67583,14"
+       id="path2788"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2801"
+       inkscape:connection-end="#rect2803" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:blue;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 15.996809,14 L 31.479749,47.718181"
+       id="path2786"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2774"
+       inkscape:connection-end="#rect2801" />
+    <rect
+       style="opacity:1;fill:#19ff19;fill-opacity:1;stroke:black;stroke-width:0.19841914;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2774"
+       width="8.9106722"
+       height="6.0833988"
+       x="10.09921"
+       y="7.8173914"
+       rx="1.8181819"
+       ry="1.8181819" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:red;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 14.554546,14 L 14.554546,47.718181"
+       id="path2784"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2774"
+       inkscape:connection-end="#rect2799" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:red;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 50.051818,14 L 50.411913,47.718181"
+       id="path2790"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#rect2803"
+       inkscape:connection-end="#rect2805" />
+    <rect
+       style="opacity:1;fill:#19ff19;fill-opacity:1;stroke:black;stroke-width:0.19841914;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2799"
+       width="8.9106722"
+       height="6.0833988"
+       x="10.09921"
+       y="47.81739"
+       rx="1.8181819"
+       ry="1.8181819" />
+    <rect
+       style="opacity:1;fill:#19ff19;fill-opacity:1;stroke:black;stroke-width:0.19841914;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2801"
+       width="8.9106722"
+       height="6.0833988"
+       x="28.466677"
+       y="47.81739"
+       rx="1.8181819"
+       ry="1.8181819" />
+    <rect
+       style="opacity:1;fill:#19ff19;fill-opacity:1;stroke:black;stroke-width:0.19841914;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2803"
+       width="8.9106722"
+       height="6.0833988"
+       x="45.562939"
+       y="7.8173914"
+       rx="1.8181819"
+       ry="1.8181819" />
+    <rect
+       style="opacity:1;fill:#19ff19;fill-opacity:1;stroke:black;stroke-width:0.19841914;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2805"
+       width="8.9106722"
+       height="6.0833988"
+       x="45.99012"
+       y="47.81739"
+       rx="1.8181819"
+       ry="1.8181819" />
+  </g>
+</svg>
diff --git a/icons/osx/Resources/mussa.icns b/icons/osx/Resources/mussa.icns
new file mode 100644 (file)
index 0000000..fa83115
Binary files /dev/null and b/icons/osx/Resources/mussa.icns differ
index 324704ae705d730c40f2b16b1afffa82ef8d9b60..64a725571d53bb90dd192b7a21d22880a9239b2f 100644 (file)
@@ -99,6 +99,25 @@ IF(USE_PYTHON)
                         )
 ENDIF(USE_PYTHON)
 
+
+# we need Cocoa in order to find where our base directory is (AKA bundle)
+IF(APPLE)
+  SET(COCOA_LIBRARY "-framework Cocoa")
+  TARGET_LINK_LIBRARIES(mussagl ${COCOA_LIBRARY})
+  SET(MACOSX_BUNDLE_BUNDLE_NAME "Mussa")
+  SET(MACOSX_BUNDLE_LONG_VERSION_STRING "Mussa Copyright 2004-2006 California Institute of Technology")
+  SET(MACOSX_BUNDLE_COPYRIGHT "Copyright 2004-2006 California Institute of Technology")
+  SET(MACOSX_BUNDLE_ICON_FILE "mussa")
+
+  SET(APP_DIR ${CMAKE_BINARY_DIR}/qui/mussagl.app/Contents)
+  SET(RESOURCE_DIR ${APP_DIR}/Resources})
+
+  ADD_CUSTOM_TARGET(mussa.icns ALL
+                    cmake -E copy_directory ${CMAKE_SOURCE_DIR}/icons/osx
+                                            ${APP_DIR}
+                   )
+ENDIF(APPLE)
+
 # these are needed for AMD64 systems but don't hurt on 32bit
 SET_SOURCE_FILES_PROPERTIES(${SOURCES} PROPERTIES COMPILE_FLAGS "-fPIC")
 SET_TARGET_PROPERTIES(mussa_qui PROPERTIES COMPILE_FLAGS "-fPIC")