diff --git a/Desktop.py b/Desktop.py index aebc051..2d523e1 100644 --- a/Desktop.py +++ b/Desktop.py @@ -15,6 +15,13 @@ if hasattr(sys, 'frozen'): else: base_path = os.path.dirname(os.path.abspath(__file__)) +def icon(): + icon = 'icon_windows.png' + if os.path.isfile('icon_mac.png'): + icon = 'icon_mac.png' + + return wx.Icon(icon, wx.BITMAP_TYPE_PNG) + lib_dir = os.path.join(base_path, 'libs') sys.path.insert(0, base_path) @@ -36,8 +43,7 @@ class TaskBarIcon(wx.TaskBarIcon): wx.TaskBarIcon.__init__(self) self.frame = frame - icon = wx.Icon('icon.png', wx.BITMAP_TYPE_PNG) - self.SetIcon(icon) + self.SetIcon(icon()) self.Bind(wx.EVT_TASKBAR_LEFT_UP, self.OnTaskBarClick) self.Bind(wx.EVT_TASKBAR_RIGHT_UP, self.OnTaskBarClick) @@ -170,7 +176,7 @@ class CouchPotatoApp(wx.App, SoftwareUpdate): # Updater base_url = 'https://api.couchpota.to/updates/%s' self.InitUpdates(base_url % VERSION + '/', 'https://couchpota.to/updates/%s' % 'changelog.html', - icon = wx.Icon('icon.png')) + icon = icon()) self.frame = MainFrame(self) self.frame.Bind(wx.EVT_CLOSE, self.onClose) diff --git a/icon_mac.png b/icon_mac.png new file mode 100644 index 0000000..6cdda5c Binary files /dev/null and b/icon_mac.png differ diff --git a/icon.png b/icon_windows.png similarity index 100% rename from icon.png rename to icon_windows.png diff --git a/setup.py b/setup.py index 23b0dfc..8def7da 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ if sys.platform == "win32": ) exeICON = os.path.join(base_path, 'icon.ico') DATA_FILES = getDataFiles([r'.\\couchpotato', r'.\\libs']) - DATA_FILES.append('icon.png') + DATA_FILES.append('icon_windows.png') file_ext = 'win32.zip' @@ -78,7 +78,7 @@ elif sys.platform == "darwin": includes = includes, ) exeICON = None - DATA_FILES = ['icon.png'] + DATA_FILES = ['icon_mac.png'] file_ext = 'macosx-10_6-intel.zip'