plist.sh 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/bin/bash
  2. function make_plist() {
  3. # Create information property list file (Info.plist).
  4. cat << EOF > $plistfile
  5. <?xml version="1.0" encoding="UTF-8"?>
  6. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  7. <plist version="1.0">
  8. <dict>
  9. <key>CFBundleExecutable</key>
  10. <string>$appname</string>
  11. <key>CFBundleGetInfoString</key>
  12. <string>Slic3r Copyright (C) 2011-$(date +%Y) Alessandro Ranellucci</string>
  13. <key>CFBundleIconFile</key>
  14. <string>Slic3r.icns</string>
  15. <key>CFBundleName</key>
  16. <string>Slic3r</string>
  17. <key>CFBundleShortVersionString</key>
  18. EOF
  19. echo " <string>Slic3r $SLIC3R_BUILD_ID</string>" >>$plistfile
  20. cat << EOF >> $plistfile
  21. <key>CFBundleIdentifier</key>
  22. <string>org.slic3r.$appname</string>
  23. <key>CFBundleInfoDictionaryVersion</key>
  24. <string>6.0</string>
  25. <key>CFBundlePackageType</key>
  26. <string>APPL</string>
  27. <key>CFBundleSignature</key>
  28. <string>????</string>
  29. <key>CFBundleVersion</key>
  30. <string>${SLIC3R_BUILD_ID}</string>
  31. <key>CFBundleDocumentTypes</key>
  32. <array>
  33. <dict>
  34. <key>CFBundleTypeExtensions</key>
  35. <array>
  36. <string>stl</string>
  37. <string>STL</string>
  38. </array>
  39. <key>CFBundleTypeIconFile</key>
  40. <string>stl.icns</string>
  41. <key>CFBundleTypeName</key>
  42. <string>STL</string>
  43. <key>CFBundleTypeRole</key>
  44. <string>Viewer</string>
  45. <key>LISsAppleDefaultForType</key>
  46. <true/>
  47. <key>LSHandlerRank</key>
  48. <string>Alternate</string>
  49. </dict>
  50. <dict>
  51. <key>CFBundleTypeExtensions</key>
  52. <array>
  53. <string>obj</string>
  54. <string>OBJ</string>
  55. </array>
  56. <key>CFBundleTypeIconFile</key>
  57. <string>Slic3r.icns</string>
  58. <key>CFBundleTypeName</key>
  59. <string>STL</string>
  60. <key>CFBundleTypeRole</key>
  61. <string>Viewer</string>
  62. <key>LISsAppleDefaultForType</key>
  63. <true/>
  64. <key>LSHandlerRank</key>
  65. <string>Alternate</string>
  66. </dict>
  67. <dict>
  68. <key>CFBundleTypeExtensions</key>
  69. <array>
  70. <string>amf</string>
  71. <string>AMF</string>
  72. </array>
  73. <key>CFBundleTypeIconFile</key>
  74. <string>Slic3r.icns</string>
  75. <key>CFBundleTypeName</key>
  76. <string>STL</string>
  77. <key>CFBundleTypeRole</key>
  78. <string>Viewer</string>
  79. <key>LISsAppleDefaultForType</key>
  80. <true/>
  81. <key>LSHandlerRank</key>
  82. <string>Alternate</string>
  83. </dict>
  84. <dict>
  85. <key>CFBundleTypeExtensions</key>
  86. <array>
  87. <string>gcode</string>
  88. <string>GCODE</string>
  89. </array>
  90. <key>CFBundleTypeIconFile</key>
  91. <string>gcode.icns</string>
  92. <key>CFBundleTypeName</key>
  93. <string>GCODE</string>
  94. <key>CFBundleTypeRole</key>
  95. <string>Editor</string>
  96. <key>LISsAppleDefaultForType</key>
  97. <true/>
  98. <key>LSHandlerRank</key>
  99. <string>Alternate</string>
  100. </dict>
  101. </array>
  102. <key>LSMinimumSystemVersion</key>
  103. <string>10.7</string>
  104. <key>NSPrincipalClass</key>
  105. <string>NSApplication</string>
  106. <key>NSHighResolutionCapable</key>
  107. <true/>
  108. </dict>
  109. </plist>
  110. EOF
  111. }