Skip to content

Commit

Permalink
add checks and nice logging for icon parameter
Browse files Browse the repository at this point in the history
class IconBundler
  • Loading branch information
Alexqwesa authored and azubieta committed Jun 29, 2022
1 parent d9f4ff0 commit d0df74e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions appimagebuilder/modules/setup/icon_bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ class Error(RuntimeError):
def __init__(self, app_dir, icon):
self.app_dir = app_dir
self.icon = icon
if icon.endswith(".ico"):
logging.info("File .ico is not supported as app icon, searching for svg or png files: %s " % icon)
self.icon = icon[:-4]
elif icon.endswith(".png") or icon.endswith(".svg"):
logging.info("Don't use extension in app icon file name, cutting it down: %s " % icon )
self.icon = icon[:-4]

def bundle_icon(self):
source_icon_path = self._get_icon_path()
Expand Down

0 comments on commit d0df74e

Please sign in to comment.