Thomas Kluyver committed 39beb6e

iconfile parameter to specify the location of an icns icon for Mac apps.

Comments (0)

Files changed (1)


 <plist version="1.0">
-	<string>%(bundle_iconfile)s</string>
+	<string>icon.icns</string>
     description = "create a Mac application bundle"
     user_options = [
-        ('bundle-iconfile=', None, 'Name of the application bundle icon ' \
-                'file as stored in the Info.plist file'),
+        ('iconfile=', None, 'Path to an icns icon file for the application.'),
         ('qt-menu-nib=', None, 'Location of qt_menu.nib folder for Qt ' \
                 'applications. Will be auto-detected by default.')
     def initialize_options(self):
-        self.bundle_iconfile = 'icon.icns'
+        self.iconfile = None
         self.qt_menu_nib = False
     def finalize_options(self):
         self.copy_tree(build.build_exe, self.binDir)
+        # Copy the icon
+        if self.iconfile:
+            self.copy_file(self.iconfile, os.path.join(self.resourcesDir, 'icon.icns')
         # Create the Info.plist file