[branch-1.3] 15aff37 - Refactor macOS bundle generation to avoid "quarantine"

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[branch-1.3] 15aff37 - Refactor macOS bundle generation to avoid "quarantine" "Albrecht Schlosser" 07:17 May 03 top right image
 
commit 15aff3718e7102371cf1b301a03d65cef73c941e
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Mon May 3 14:19:50 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Mon May 3 16:11:05 2021 +0200

    Refactor macOS bundle generation to avoid "quarantine"
    
    macOS Big Sur 11.3 introduced a new "security feature" such that
    app bundles created from existing bundle templates in downloaded
    files (tar distibutions, expanded) could no longer be executed
    without unsetting the "quarantine" attribute. This commit fixes
    this by creating all bundles from scratch.
    
    Known *workaround* for older tarballs and snapshots:
    
      $ xattr -d -r com.apple.quarantine xxx.app

 .gitignore                                         |  90 +--------------------
 CMake/fl_create_example.cmake                      |   6 +-
 fltk.list.in                                       |   4 -
 fluid/CMakeLists.txt                               |   4 +-
 fluid/Makefile                                     |  11 +--
 fluid/fluid.app/Contents/Info.plist                |  53 ------------
 fluid/fluid.app/Contents/PkgInfo                   |   1 -
 fluid/fluid.app/Contents/Resources/fluid.icns      | Bin 34579 -> 0 bytes
 fluid/fluid.plist                                  |  53 ++++++++++++
 fluid/icons/fluid.icns                             | Bin 0 -> 34579 bytes
 test/CMakeLists.txt                                |   2 +-
 test/Makefile                                      |  35 ++++----
 test/blocks.app/Contents/Info.plist                |  47 -----------
 test/blocks.app/Contents/PkgInfo                   |   1 -
 test/blocks.app/Contents/Resources/blocks.icns     | Bin 51049 -> 0 bytes
 test/checkers.app/Contents/Info.plist              |  47 -----------
 test/checkers.app/Contents/PkgInfo                 |   1 -
 test/checkers.app/Contents/Resources/checkers.icns | Bin 61235 -> 0 bytes
 test/editor-Info.plist                             |  43 ----------
 test/mac-resources/blocks.icns                     | Bin 0 -> 51049 bytes
 test/mac-resources/blocks.plist                    |  47 +++++++++++
 test/mac-resources/checkers.icns                   | Bin 0 -> 61235 bytes
 test/mac-resources/checkers.plist                  |  47 +++++++++++
 test/mac-resources/editor.plist                    |  43 ++++++++++
 test/mac-resources/sudoku.icns                     | Bin 0 -> 34921 bytes
 test/mac-resources/sudoku.plist                    |  47 +++++++++++
 test/sudoku.app/Contents/Info.plist                |  47 -----------
 test/sudoku.app/Contents/PkgInfo                   |   1 -
 test/sudoku.app/Contents/Resources/sudoku.icns     | Bin 34921 -> 0 bytes
 29 files changed, 268 insertions(+), 362 deletions(-)

diff --git .gitignore .gitignore
index 2b0b55c..e79d9d7 100644
--- .gitignore
+++ .gitignore
@@ -116,11 +116,7 @@
 /fluid/*.ilk
 /fluid/*.pdb
 /fluid/TAGS
-
-# /fluid/fluid.app/Contents/MacOS/
-/fluid/fluid.app/Contents/MacOS/fluid
-
-# /fluid/pixmaps/
+/fluid/fluid.app
 /fluid/pixmaps/*.bck
 
 # /ide/VisualC2008/
@@ -294,89 +290,7 @@
 /test/fltk*.exp
 /test/fltk*.dll
 
-# /test/blocks.app/Contents/MacOS/
-/test/blocks.app/Contents/MacOS/blocks
-
-# /test/checkers.app/Contents/MacOS/
-/test/checkers.app/Contents/MacOS/checkers
-
-# /test/sudoku.app/Contents/MacOS/
-/test/sudoku.app/Contents/MacOS/sudoku
-
 # /test/ - generated apps (macOS)
-/test/CubeView.app/
-/test/adjuster.app/
-/test/animated.app/
-/test/arc.app/
-/test/ask.app/
-/test/bitmap.app/
-/test/boxtype.app/
-/test/browser.app/
-/test/button.app/
-/test/buttons.app/
-/test/cairo_test.app/
-/test/clock.app/
-/test/colbrowser.app/
-/test/color_chooser.app/
-/test/cube.app/
-/test/cursor.app/
-/test/curve.app/
-/test/demo.app/
-/test/device.app/
-/test/doublebuffer.app/
-/test/editor.app/
-/test/fast_slow.app/
-/test/file_chooser.app/
-/test/fltk-versions.app/
-/test/fonts.app/
-/test/forms.app/
-/test/fractals.app/
-/test/fullscreen.app/
-/test/gl_overlay.app/
-/test/glpuzzle.app/
-/test/hello.app/
-/test/help.app/
-/test/icon.app/
-/test/iconize.app/
-/test/image.app/
-/test/inactive.app/
-/test/input.app/
-/test/input_choice.app/
-/test/keyboard.app/
-/test/label.app/
-/test/line_style.app/
-/test/list_visuals.app/
-/test/mandelbrot.app/
-/test/menubar.app/
-/test/message.app/
-/test/minimum.app/
-/test/native-filechooser.app/
-/test/navigation.app/
-/test/offscreen.app/
-/test/output.app/
-/test/overlay.app/
-/test/pack.app/
-/test/pixmap.app/
-/test/pixmap_browser.app/
-/test/preferences.app/
-/test/radio.app/
-/test/resize.app/
-/test/resizebox.app/
-/test/rotated_text.app/
-/test/scroll.app/
-/test/shape.app/
-/test/subwindow.app/
-/test/symbols.app/
-/test/table.app/
-/test/tabs.app/
-/test/threads.app/
-/test/tile.app/
-/test/tiled_image.app/
-/test/tree.app/
-/test/twowin.app/
-/test/unittests.app/
-/test/utf8.app/
-/test/valuators.app/
-/test/windowfocus.app/
+/test/*.app
 
 **/.DS_Store
diff --git CMake/fl_create_example.cmake CMake/fl_create_example.cmake
index 3f13985..59a78d2 100644
--- CMake/fl_create_example.cmake
+++ CMake/fl_create_example.cmake
@@ -27,7 +27,7 @@
 #   Sources can be:
 #   - .c/.cxx files, e.g. 'hello.cxx'
 #   - .fl (fluid) files, e.g. 'radio.fl'
-#   - .plist file (macOS), e.g. 'editor-Info.plist'
+#   - .plist file (macOS), e.g. 'editor.plist'
 #   - .icns file (macOS Icon), e.g. 'checkers.icns'
 #   - .rc file (Windows resource file, e.g. icon definition)
 #
@@ -39,6 +39,7 @@
 #   all other file types are added to the target's source files.
 #
 #   macOS specific .icns and .plist files are ignored on other platforms.
+#   These files must resided in the subdirectory 'mac-resources'.
 #
 # - LIBRARIES:
 #   List of libraries (CMake target names), separated by ';'. Needs
@@ -129,7 +130,8 @@ macro (CREATE_EXAMPLE NAME SOURCES LIBRARIES)
   endif (ICON_PATH)
 
   if (PLIST)
-    set_target_properties (${TARGET_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/${PLIST}")
+    set_target_properties (${TARGET_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST
+                           "${CMAKE_CURRENT_SOURCE_DIR}/mac-resources/${PLIST}")
   elseif (MAC_BUNDLE)
     set_target_properties (${TARGET_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "${TARGET_NAME}")
     set_target_properties (${TARGET_NAME} PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.fltk.${TARGET_NAME}")
diff --git fltk.list.in fltk.list.in
index 872333c..9f2a823 100644
--- fltk.list.in
+++ fltk.list.in
@@ -107,7 +107,6 @@ f 0555 root sys $libdir/libfltk_gl.so.@FL_DSO_VERSION@ src/libfltk_gl.so.@FL_DSO
 d 0555 root sys /Applications/fluid.app -
 d 0555 root sys /Applications/fluid.app/Contents -
 f 0444 root sys /Applications/fluid.app/Contents/Info.plist fluid/fluid.app/Contents/Info.plist
-f 0444 root sys /Applications/fluid.app/Contents/PkgInfo fluid/fluid.app/Contents/PkgInfo
 d 0555 root sys /Applications/fluid.app/Contents/MacOS -
 l 0555 root sys /Applications/fluid.app/Contents/MacOS/fluid $bindir/fluid
 d 0555 root sys /Applications/fluid.app/Contents/Resources -
@@ -376,7 +375,6 @@ f 0444 root sys $docdir/examples/ test/*.h
 d 0555 root sys /Applications/blocks.app -
 d 0555 root sys /Applications/blocks.app/Contents -
 f 0444 root sys /Applications/blocks.app/Contents/Info.plist test/blocks.app/Contents/Info.plist
-f 0444 root sys /Applications/blocks.app/Contents/PkgInfo test/blocks.app/Contents/PkgInfo
 d 0555 root sys /Applications/blocks.app/Contents/MacOS -
 f 0555 root sys /Applications/blocks.app/Contents/MacOS/blocks test/blocks
 d 0555 root sys /Applications/blocks.app/Contents/Resources -
@@ -386,7 +384,6 @@ f 0444 root sys /Applications/blocks.app/Contents/Resources/blocks.icns test/blo
 d 0555 root sys /Applications/checkers.app -
 d 0555 root sys /Applications/checkers.app/Contents -
 f 0444 root sys /Applications/checkers.app/Contents/Info.plist test/checkers.app/Contents/Info.plist
-f 0444 root sys /Applications/checkers.app/Contents/PkgInfo test/checkers.app/Contents/PkgInfo
 d 0555 root sys /Applications/checkers.app/Contents/MacOS -
 f 0555 root sys /Applications/checkers.app/Contents/MacOS/checkers test/checkers
 d 0555 root sys /Applications/checkers.app/Contents/Resources -
@@ -396,7 +393,6 @@ f 0444 root sys /Applications/checkers.app/Contents/Resources/checkers.icns test
 d 0555 root sys /Applications/sudoku.app -
 d 0555 root sys /Applications/sudoku.app/Contents -
 f 0444 root sys /Applications/sudoku.app/Contents/Info.plist test/sudoku.app/Contents/Info.plist
-f 0444 root sys /Applications/sudoku.app/Contents/PkgInfo test/sudoku.app/Contents/PkgInfo
 d 0555 root sys /Applications/sudoku.app/Contents/MacOS -
 f 0555 root sys /Applications/sudoku.app/Contents/MacOS/sudoku test/sudoku
 d 0555 root sys /Applications/sudoku.app/Contents/Resources -
diff --git fluid/CMakeLists.txt fluid/CMakeLists.txt
index de6788e..472c84c 100644
--- fluid/CMakeLists.txt
+++ fluid/CMakeLists.txt
@@ -46,7 +46,7 @@ endif (WIN32)
 
 if (APPLE AND (NOT OPTION_APPLE_X11))
   set (ICON_NAME fluid.icns)
-  set (ICON_PATH "${PROJECT_SOURCE_DIR}/fluid/fluid.app/Contents/Resources/${ICON_NAME}")
+  set (ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_NAME}")
   add_executable (fluid MACOSX_BUNDLE ${CPPFILES} ${ICON_PATH})
 
   # create macOS bundle wrapper script
@@ -79,7 +79,7 @@ endif (FLTK_HAVE_CAIRO)
 
 if (APPLE AND (NOT OPTION_APPLE_X11))
   # create bundle
-  set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/fluid/fluid.app/Contents/Info.plist")
+  set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/fluid.plist")
   set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_ICON_FILE ${ICON_NAME})
   set_target_properties (fluid PROPERTIES RESOURCE ${ICON_PATH})
   # install
diff --git fluid/Makefile fluid/Makefile
index eb1b346..1e5a42f 100644
--- fluid/Makefile
+++ fluid/Makefile
@@ -1,7 +1,7 @@
 #
 # FLUID Makefile for the Fast Light Tool Kit (FLTK).
 #
-# Copyright 1998-2020 by Bill Spitzak and others.
+# Copyright 1998-2021 by Bill Spitzak and others.
 #
 # This library is free software. Distribution and use rights are outlined in
 # the file "COPYING" which should have been included with this file.  If this
@@ -49,9 +49,11 @@ fluid$(EXEEXT):		$(OBJECTS) $(LIBNAME) $(FLLIBNAME) \
 			$(IMGLIBNAME)
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDFLAGS) $(LDLIBS)
-	$(OSX_ONLY) $(RM) -r -f fluid.app/Contents/MacOS
-	$(OSX_ONLY) mkdir fluid.app/Contents/MacOS
+	$(OSX_ONLY) $(RM) -r -f fluid.app
+	$(OSX_ONLY) mkdir -p fluid.app/Contents/MacOS fluid.app/Contents/Resources
 	$(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS
+	$(OSX_ONLY) $(INSTALL) icons/fluid.icns fluid.app/Contents/Resources
+	$(OSX_ONLY) $(INSTALL) fluid.plist fluid.app/Contents/Info.plist
 
 fluid-shared$(EXEEXT):	$(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
 			../src/$(IMGDSONAME)
@@ -61,7 +63,7 @@ fluid-shared$(EXEEXT):	$(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
 clean:
 	-$(RM) *.o core.* *~ *.bck *.bak
 	-$(RM) core fluid$(EXEEXT) fluid-shared$(EXEEXT)
-	-$(RM) fluid.app/Contents/MacOS/fluid$(EXEEXT)
+	$(OSX_ONLY) -$(RMDIR) fluid.app
 
 depend:	$(CPPFILES)
 	makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES)
@@ -95,7 +97,6 @@ install-osx:
 	-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app
 	-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app/Contents
 	$(INSTALL_DATA) fluid.app/Contents/Info.plist $(DESTDIR)/Applications/fluid.app/Contents/Info.plist
-	$(INSTALL_DATA) fluid.app/Contents/PkgInfo $(DESTDIR)/Applications/fluid.app/Contents/PkgInfo
 	-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app/Contents/MacOS
 	$(RM) $(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid
 	$(LN) $(bindir)/fluid $(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid
diff --git fluid/fluid.app/Contents/Info.plist fluid/fluid.app/Contents/Info.plist
deleted file mode 100644
index 3ab9ea8..0000000
--- fluid/fluid.app/Contents/Info.plist
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleExecutable</key>
-	<string>fluid</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.fltk.fluid</string>
-	<key>CFBundleVersion</key>
-	<string>1.3.6</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright 1998-2021 by Bill Spitzak and others</string>
-	<key>CFAppleHelpAnchor</key>
-	<string>help</string>
-	<key>CFBundleName</key>
-	<string>Fluid</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>FLID</string>
-	<key>CFBundleIconFile</key>
-	<string>fluid.icns</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.3.6</string>
-	<key>CFBundleGetInfoString</key>
-	<string>1.3.6, Copyright 1998-2021 by Bill Spitzak and others</string>
-	<key>CFBundleDocumentTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>fl</string>
-			</array>
-			<key>CFBundleTypeIconFile</key>
-			<string>fluid.icns</string>
-			<key>CFBundleTypeName</key>
-			<string>FLUID Designer File</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>Flid</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-		</dict>
-	</array>
-	<key>NSHighResolutionCapable</key>
-	<true/>
-</dict>
-</plist>
diff --git fluid/fluid.app/Contents/PkgInfo fluid/fluid.app/Contents/PkgInfo
deleted file mode 100644
index c5f9363..0000000
--- fluid/fluid.app/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-FLIDFlid
diff --git fluid/fluid.app/Contents/Resources/fluid.icns fluid/fluid.app/Contents/Resources/fluid.icns
deleted file mode 100644
index 0fda055..0000000
Binary files fluid/fluid.app/Contents/Resources/fluid.icns and /dev/null differ
diff --git fluid/fluid.plist fluid/fluid.plist
new file mode 100644
index 0000000..3ab9ea8
--- /dev/null
+++ fluid/fluid.plist
@@ -0,0 +1,53 @@
+<?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>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleExecutable</key>
+	<string>fluid</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fluid</string>
+	<key>CFBundleVersion</key>
+	<string>1.3.6</string>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2021 by Bill Spitzak and others</string>
+	<key>CFAppleHelpAnchor</key>
+	<string>help</string>
+	<key>CFBundleName</key>
+	<string>Fluid</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>FLID</string>
+	<key>CFBundleIconFile</key>
+	<string>fluid.icns</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.3.6</string>
+	<key>CFBundleGetInfoString</key>
+	<string>1.3.6, Copyright 1998-2021 by Bill Spitzak and others</string>
+	<key>CFBundleDocumentTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>fl</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>fluid.icns</string>
+			<key>CFBundleTypeName</key>
+			<string>FLUID Designer File</string>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>Flid</string>
+			</array>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+		</dict>
+	</array>
+	<key>NSHighResolutionCapable</key>
+	<true/>
+</dict>
+</plist>
diff --git fluid/icons/fluid.icns fluid/icons/fluid.icns
new file mode 100644
index 0000000..0fda055
Binary files /dev/null and fluid/icons/fluid.icns differ
diff --git test/CMakeLists.txt test/CMakeLists.txt
index 90767d4..d0abbb1 100644
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -67,7 +67,7 @@ CREATE_EXAMPLE (curve curve.cxx fltk)
 CREATE_EXAMPLE (demo demo.cxx fltk)
 CREATE_EXAMPLE (device device.cxx fltk)
 CREATE_EXAMPLE (doublebuffer doublebuffer.cxx fltk)
-CREATE_EXAMPLE (editor "editor.cxx;editor-Info.plist" fltk)
+CREATE_EXAMPLE (editor "editor.cxx;editor.plist" fltk)
 CREATE_EXAMPLE (fast_slow fast_slow.fl fltk)
 CREATE_EXAMPLE (file_chooser file_chooser.cxx "fltk_images;fltk")
 CREATE_EXAMPLE (fltk-versions fltk-versions.cxx fltk)
diff --git test/Makefile test/Makefile
index d514ec8..be49743 100644
--- test/Makefile
+++ test/Makefile
@@ -1,7 +1,7 @@
 #
-# Test/example program makefile for the Fast Light Tool Kit (FLTK).
+# Test/example program Makefile for the Fast Light Tool Kit (FLTK).
 #
-# Copyright 1998-2020 by Bill Spitzak and others.
+# Copyright 1998-2021 by Bill Spitzak and others.
 #
 # This library is free software. Distribution and use rights are outlined in
 # the file "COPYING" which should have been included with this file.  If this
@@ -196,12 +196,7 @@ include makedepend
 
 clean:
 	$(RM) $(ALL) $(GLALL) core
-	for file in $(ALL) $(GLALL); do \
-		if [ $$file = "blocks" -o $$file = "checkers" -o $$file = "sudoku" ]; then \
-			continue; \
-		fi; \
-		$(OSX_ONLY) rm -f -r $$file.app; \
-	done
+	$(RMDIR) *.app
 	$(RM) *.o core.* *~ *.bck *.bak
 	$(RM) CubeViewUI.cxx CubeViewUI.h
 	$(RM) fast_slow.cxx fast_slow.h
@@ -214,9 +209,6 @@ clean:
 	$(RM) tabs.cxx tabs.h
 	$(RM) tree.cxx tree.h
 	$(RM) valuators.cxx valuators.h
-	$(OSX_ONLY) $(RM) blocks.app/Contents/MacOS/blocks$(EXEEXT)
-	$(OSX_ONLY) $(RM) checkers.app/Contents/MacOS/checkers$(EXEEXT)
-	$(OSX_ONLY) $(RM) sudoku.app/Contents/MacOS/sudoku$(EXEEXT)
 
 install:	all
 	echo "Installing example programs to $(DESTDIR)$(docdir)/examples..."
@@ -252,7 +244,6 @@ install-osx:
 			$(INSTALL_DIR) $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
 		fi; \
 		$(INSTALL_DATA) $$game.app/Contents/Info.plist $(DESTDIR)/Applications/$$game.app/Contents; \
-		$(INSTALL_DATA) $$game.app/Contents/PkgInfo $(DESTDIR)/Applications/$$game.app/Contents; \
 		$(INSTALL_BIN) $$game.app/Contents/MacOS/$$game $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
 		$(INSTALL_DATA) $$game.app/Contents/Resources/$$game.icns $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
 	done
@@ -312,16 +303,20 @@ buttons$(EXEEXT): buttons.o
 blocks$(EXEEXT): blocks.o
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) blocks.o -o $@ $(AUDIOLIBS) $(LINKFLTK) $(LDLIBS)
-	$(OSX_ONLY) $(RM) -f -r blocks.app/Contents/MacOS
-	$(OSX_ONLY) mkdir blocks.app/Contents/MacOS
+	$(OSX_ONLY) $(RM) -f -r blocks.app
+	$(OSX_ONLY) mkdir -p blocks.app/Contents/MacOS blocks.app/Contents/Resources
 	$(OSX_ONLY) $(INSTALL_BIN) blocks$(EXEEXT) blocks.app/Contents/MacOS
+	$(OSX_ONLY) $(INSTALL_BIN) mac-resources/blocks.icns blocks.app/Contents/Resources/
+	$(OSX_ONLY) $(INSTALL_BIN) mac-resources/blocks.plist blocks.app/Contents/Info.plist
 
 checkers$(EXEEXT): checkers.o
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
-	$(OSX_ONLY) $(RM) -f -r checkers.app/Contents/MacOS
-	$(OSX_ONLY) mkdir checkers.app/Contents/MacOS
+	$(OSX_ONLY) $(RM) -f -r checkers.app
+	$(OSX_ONLY) mkdir -p checkers.app/Contents/MacOS checkers.app/Contents/Resources
 	$(OSX_ONLY) $(INSTALL_BIN) checkers$(EXEEXT) checkers.app/Contents/MacOS
+	$(OSX_ONLY) $(INSTALL_BIN) mac-resources/checkers.icns checkers.app/Contents/Resources/
+	$(OSX_ONLY) $(INSTALL_BIN) mac-resources/checkers.plist checkers.app/Contents/Info.plist
 
 clock$(EXEEXT): clock.o
 
@@ -356,7 +351,7 @@ editor$(EXEEXT): editor.o
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) editor.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
 	$(OSX_ONLY) ../fltk-config --post $@
-	$(OSX_ONLY) cp -f editor-Info.plist editor.app/Contents/Info.plist
+	$(OSX_ONLY) cp -f mac-resources/editor.plist editor.app/Contents/Info.plist
 
 fast_slow$(EXEEXT): fast_slow.o
 fast_slow.cxx:	fast_slow.fl ../fluid/fluid$(EXEEXT)
@@ -473,9 +468,11 @@ subwindow$(EXEEXT): subwindow.o
 sudoku: sudoku.o
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) sudoku.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) $(LDLIBS)
-	$(OSX_ONLY) $(RM) -r -f sudoku.app/Contents/MacOS
-	$(OSX_ONLY) mkdir sudoku.app/Contents/MacOS
+	$(OSX_ONLY) $(RM) -f -r sudoku.app
+	$(OSX_ONLY) mkdir -p sudoku.app/Contents/MacOS sudoku.app/Contents/Resources
 	$(OSX_ONLY) $(INSTALL_BIN) sudoku$(EXEEXT) sudoku.app/Contents/MacOS
+	$(OSX_ONLY) $(INSTALL_BIN) mac-resources/sudoku.icns sudoku.app/Contents/Resources/
+	$(OSX_ONLY) $(INSTALL_BIN) mac-resources/sudoku.plist sudoku.app/Contents/Info.plist
 
 sudoku.exe: sudoku.o sudoku.rc
 	echo Linking $@...
diff --git test/blocks.app/Contents/Info.plist test/blocks.app/Contents/Info.plist
deleted file mode 100644
index 9448901..0000000
--- test/blocks.app/Contents/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plist version="0.9">
-    <dict>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-
-	<key>CFBundleExecutable</key>
-	<string>blocks</string>
-
-	<key>CFBundleIdentifier</key>
-	<string>com.easysw.blocks</string>
-
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright 2006 by Michael Sweet</string>
-
-	<key>CFAppleHelpAnchor</key>
-	<string>help</string>
-
-	<key>CFBundleName</key>
-	<string>blocks</string>
-
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-
-	<key>CFBundleSignature</key>
-	<string>BLKS</string>
-
-	<key>CFBundleIconFile</key>
-	<string>blocks.icns</string>
-
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-
-	<key>CFBundleGetInfoString</key>
-	<string>1.0, Copyright 2006 by Michael Sweet</string>
-
-	<key>NSHighResolutionCapable</key>
-	<true/>
-
-    </dict>
-</plist>
diff --git test/blocks.app/Contents/PkgInfo test/blocks.app/Contents/PkgInfo
deleted file mode 100644
index 103810a..0000000
--- test/blocks.app/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-BLKSBlks
diff --git test/blocks.app/Contents/Resources/blocks.icns test/blocks.app/Contents/Resources/blocks.icns
deleted file mode 100644
index 7e7ba24..0000000
Binary files test/blocks.app/Contents/Resources/blocks.icns and /dev/null differ
diff --git test/checkers.app/Contents/Info.plist test/checkers.app/Contents/Info.plist
deleted file mode 100644
index 4929602..0000000
--- test/checkers.app/Contents/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plist version="0.9">
-    <dict>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-
-	<key>CFBundleExecutable</key>
-	<string>checkers</string>
-
-	<key>CFBundleIdentifier</key>
-	<string>org.fltk.checkers</string>
-
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright 1997-2010 by Bill Spitzak and others</string>
-
-	<key>CFAppleHelpAnchor</key>
-	<string>help</string>
-
-	<key>CFBundleName</key>
-	<string>checkers</string>
-
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-
-	<key>CFBundleSignature</key>
-	<string>FLSU</string>
-
-	<key>CFBundleIconFile</key>
-	<string>checkers.icns</string>
-
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-
-	<key>CFBundleGetInfoString</key>
-	<string>1.0, Copyright 1997-2010 by Bill Spitzak and others</string>
-
-	<key>NSHighResolutionCapable</key>
-	<true/>
-
-    </dict>
-</plist>
diff --git test/checkers.app/Contents/PkgInfo test/checkers.app/Contents/PkgInfo
deleted file mode 100644
index 5af7226..0000000
--- test/checkers.app/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-FLSUFlsu
diff --git test/checkers.app/Contents/Resources/checkers.icns test/checkers.app/Contents/Resources/checkers.icns
deleted file mode 100644
index 5bdec12..0000000
Binary files test/checkers.app/Contents/Resources/checkers.icns and /dev/null differ
diff --git test/editor-Info.plist test/editor-Info.plist
deleted file mode 100644
index dea3f13..0000000
--- test/editor-Info.plist
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDocumentTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>*</string>
-			</array>
-			<key>CFBundleTypeName</key>
-			<string>AllFiles</string>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>LSTypeIsPackage</key>
-			<false/>
-			<key>NSPersistentStoreTypeKey</key>
-			<string>XML</string>
-		</dict>
-	</array>
-	<key>CFBundleExecutable</key>
-	<string>editor</string>
-	<key>CFBundleGetInfoString</key>
-	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.fltk.editor</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>FLTK</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
-	<key>NSHighResolutionCapable</key>
-	<true/>
-</dict>
-</plist>
diff --git test/mac-resources/blocks.icns test/mac-resources/blocks.icns
new file mode 100644
index 0000000..7e7ba24
Binary files /dev/null and test/mac-resources/blocks.icns differ
diff --git test/mac-resources/blocks.plist test/mac-resources/blocks.plist
new file mode 100644
index 0000000..911e0fc
--- /dev/null
+++ test/mac-resources/blocks.plist
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plist version="0.9">
+    <dict>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+
+	<key>CFBundleExecutable</key>
+	<string>blocks</string>
+
+	<key>CFBundleIdentifier</key>
+	<string>com.easysw.blocks</string>
+
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 2006-2021 by Michael Sweet</string>
+
+	<key>CFAppleHelpAnchor</key>
+	<string>help</string>
+
+	<key>CFBundleName</key>
+	<string>blocks</string>
+
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+
+	<key>CFBundleSignature</key>
+	<string>BLKS</string>
+
+	<key>CFBundleIconFile</key>
+	<string>blocks.icns</string>
+
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+
+	<key>CFBundleGetInfoString</key>
+	<string>1.0, Copyright 2006-2021 by Michael Sweet</string>
+
+	<key>NSHighResolutionCapable</key>
+	<true/>
+
+    </dict>
+</plist>
diff --git test/mac-resources/checkers.icns test/mac-resources/checkers.icns
new file mode 100644
index 0000000..5bdec12
Binary files /dev/null and test/mac-resources/checkers.icns differ
diff --git test/mac-resources/checkers.plist test/mac-resources/checkers.plist
new file mode 100644
index 0000000..e92595a
--- /dev/null
+++ test/mac-resources/checkers.plist
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plist version="0.9">
+    <dict>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+
+	<key>CFBundleExecutable</key>
+	<string>checkers</string>
+
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.checkers</string>
+
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1997-2021 by Bill Spitzak and others</string>
+
+	<key>CFAppleHelpAnchor</key>
+	<string>help</string>
+
+	<key>CFBundleName</key>
+	<string>checkers</string>
+
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+
+	<key>CFBundleSignature</key>
+	<string>FLSU</string>
+
+	<key>CFBundleIconFile</key>
+	<string>checkers.icns</string>
+
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+
+	<key>CFBundleGetInfoString</key>
+	<string>1.0, Copyright 1997-2021 by Bill Spitzak and others</string>
+
+	<key>NSHighResolutionCapable</key>
+	<true/>
+
+    </dict>
+</plist>
diff --git test/mac-resources/editor.plist test/mac-resources/editor.plist
new file mode 100644
index 0000000..6324e5c
--- /dev/null
+++ test/mac-resources/editor.plist
@@ -0,0 +1,43 @@
+<?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>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleDocumentTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>*</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>AllFiles</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSTypeIsPackage</key>
+			<false/>
+			<key>NSPersistentStoreTypeKey</key>
+			<string>XML</string>
+		</dict>
+	</array>
+	<key>CFBundleExecutable</key>
+	<string>editor</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.editor</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2021 by Bill Spitzak and others.</string>
+	<key>NSHighResolutionCapable</key>
+	<true/>
+</dict>
+</plist>
diff --git test/mac-resources/sudoku.icns test/mac-resources/sudoku.icns
new file mode 100644
index 0000000..abbe75e
Binary files /dev/null and test/mac-resources/sudoku.icns differ
diff --git test/mac-resources/sudoku.plist test/mac-resources/sudoku.plist
new file mode 100644
index 0000000..0583828
--- /dev/null
+++ test/mac-resources/sudoku.plist
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plist version="0.9">
+    <dict>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+
+	<key>CFBundleExecutable</key>
+	<string>sudoku</string>
+
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.sudoku</string>
+
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 2005-2021 by Michael Sweet</string>
+
+	<key>CFAppleHelpAnchor</key>
+	<string>help</string>
+
+	<key>CFBundleName</key>
+	<string>sudoku</string>
+
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+
+	<key>CFBundleSignature</key>
+	<string>FLSU</string>
+
+	<key>CFBundleIconFile</key>
+	<string>sudoku.icns</string>
+
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+
+	<key>CFBundleGetInfoString</key>
+	<string>1.0, Copyright 2005-2021 by Michael Sweet</string>
+
+	<key>NSHighResolutionCapable</key>
+	<true/>
+
+    </dict>
+</plist>
diff --git test/sudoku.app/Contents/Info.plist test/sudoku.app/Contents/Info.plist
deleted file mode 100644
index b75285c..0000000
--- test/sudoku.app/Contents/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plist version="0.9">
-    <dict>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-
-	<key>CFBundleExecutable</key>
-	<string>sudoku</string>
-
-	<key>CFBundleIdentifier</key>
-	<string>org.fltk.sudoku</string>
-
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright 2005-2006 by Michael Sweet</string>
-
-	<key>CFAppleHelpAnchor</key>
-	<string>help</string>
-
-	<key>CFBundleName</key>
-	<string>sudoku</string>
-
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-
-	<key>CFBundleSignature</key>
-	<string>FLSU</string>
-
-	<key>CFBundleIconFile</key>
-	<string>sudoku.icns</string>
-
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-
-	<key>CFBundleGetInfoString</key>
-	<string>1.0, Copyright 2005-2006 by Michael Sweet</string>
-
-	<key>NSHighResolutionCapable</key>
-	<true/>
-
-    </dict>
-</plist>
diff --git test/sudoku.app/Contents/PkgInfo test/sudoku.app/Contents/PkgInfo
deleted file mode 100644
index 5af7226..0000000
--- test/sudoku.app/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-FLSUFlsu
diff --git test/sudoku.app/Contents/Resources/sudoku.icns test/sudoku.app/Contents/Resources/sudoku.icns
deleted file mode 100644
index abbe75e..0000000
Binary files test/sudoku.app/Contents/Resources/sudoku.icns and /dev/null differ
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.