From f5b53f8065a4bb9e3cb47c07d8c319434f173864 Mon Sep 17 00:00:00 2001 From: Leandro Heck Date: Thu, 23 Mar 2023 22:54:01 -0300 Subject: [PATCH 1/4] Add icon svg --- packaging/icons/cura-icon.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 packaging/icons/cura-icon.svg diff --git a/packaging/icons/cura-icon.svg b/packaging/icons/cura-icon.svg new file mode 100644 index 0000000000..b8b7ecfd26 --- /dev/null +++ b/packaging/icons/cura-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file From 9f9e218ef4496cf3de1c5d12df35be75b7466cc7 Mon Sep 17 00:00:00 2001 From: Leandro Heck Date: Fri, 24 Mar 2023 14:31:03 -0300 Subject: [PATCH 2/4] Add extra icons and fix their paths --- packaging/AppImage/create_appimage.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packaging/AppImage/create_appimage.py b/packaging/AppImage/create_appimage.py index 242c45aa5d..e0aeceeedd 100644 --- a/packaging/AppImage/create_appimage.py +++ b/packaging/AppImage/create_appimage.py @@ -30,15 +30,22 @@ def copy_metadata_files(dist_path, version): Copy metadata files for the metadata of the AppImage. """ copied_files = { - os.path.join("..", "icons", "cura-icon_256x256.png"): "cura-icon.png", + os.path.join("..", "icons", "cura-icon.svg"): "usr/share/icons/hicolor/scalable/apps/cura-icon.svg", + os.path.join("..", "icons", "cura-icon_64x64.png"): "usr/share/icons/hicolor/64x64/apps/cura-icon.png", + os.path.join("..", "icons", "cura-icon_128x128.png"): "usr/share/icons/hicolor/128x128/apps/cura-icon.png", + os.path.join("..", "icons", "cura-icon_256x256.png"): "usr/share/icons/hicolor/256x256/apps/cura-icon.png", "cura.appdata.xml": "cura.appdata.xml", "AppRun": "AppRun" } packaging_dir = os.path.dirname(__file__) for source, dest in copied_files.items(): - print("Copying", os.path.join(packaging_dir, source), "to", os.path.join(dist_path, dest)) - shutil.copyfile(os.path.join(packaging_dir, source), os.path.join(dist_path, dest)) + source_file_path = source + dest_file_path = os.path.join(dist_path, dest) + dir_path = dest_file_path + print("Copying", source_file_path, "to", dest_file_path) + os.makedirs(os.path.dirname(dir_path), exist_ok=True) + shutil.copyfile(source_file_path, dest_file_path) # Ensure that AppRun has the proper permissions: 755 (user reads, writes and executes, group reads and executes, world reads and executes). print("Changing permissions for AppRun") From e612341f7f72366275e74908ff6ff69db3319c7b Mon Sep 17 00:00:00 2001 From: Leandro Heck Date: Fri, 24 Mar 2023 14:41:53 -0300 Subject: [PATCH 3/4] Add back the original image. Something was complaining about it. --- packaging/AppImage/create_appimage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/AppImage/create_appimage.py b/packaging/AppImage/create_appimage.py index e0aeceeedd..726d9fcb9b 100644 --- a/packaging/AppImage/create_appimage.py +++ b/packaging/AppImage/create_appimage.py @@ -34,6 +34,7 @@ def copy_metadata_files(dist_path, version): os.path.join("..", "icons", "cura-icon_64x64.png"): "usr/share/icons/hicolor/64x64/apps/cura-icon.png", os.path.join("..", "icons", "cura-icon_128x128.png"): "usr/share/icons/hicolor/128x128/apps/cura-icon.png", os.path.join("..", "icons", "cura-icon_256x256.png"): "usr/share/icons/hicolor/256x256/apps/cura-icon.png", + os.path.join("..", "icons", "cura-icon_256x256.png"): "cura-icon.png", "cura.appdata.xml": "cura.appdata.xml", "AppRun": "AppRun" } From fa51b1bcfc9ce7ecb3f282a9f4787deb7ee6423d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 28 Apr 2023 13:33:48 +0200 Subject: [PATCH 4/4] Use system agnostic paths --- packaging/AppImage/create_appimage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/AppImage/create_appimage.py b/packaging/AppImage/create_appimage.py index 726d9fcb9b..f5d6eae353 100644 --- a/packaging/AppImage/create_appimage.py +++ b/packaging/AppImage/create_appimage.py @@ -30,10 +30,10 @@ def copy_metadata_files(dist_path, version): Copy metadata files for the metadata of the AppImage. """ copied_files = { - os.path.join("..", "icons", "cura-icon.svg"): "usr/share/icons/hicolor/scalable/apps/cura-icon.svg", - os.path.join("..", "icons", "cura-icon_64x64.png"): "usr/share/icons/hicolor/64x64/apps/cura-icon.png", - os.path.join("..", "icons", "cura-icon_128x128.png"): "usr/share/icons/hicolor/128x128/apps/cura-icon.png", - os.path.join("..", "icons", "cura-icon_256x256.png"): "usr/share/icons/hicolor/256x256/apps/cura-icon.png", + os.path.join("..", "icons", "cura-icon.svg"): os.path.join("usr", "share", "icons", "hicolor", "scalable", "apps", "cura-icon.svg"), + os.path.join("..", "icons", "cura-icon_64x64.png"): os.path.join("usr", "share", "icons", "hicolor", "64x64", "apps", "cura-icon.png"), + os.path.join("..", "icons", "cura-icon_128x128.png"): os.path.join("usr", "share", "icons", "hicolor", "128x128", "apps", "cura-icon.png"), + os.path.join("..", "icons", "cura-icon_256x256.png"): os.path.join("usr", "share", "icons", "hicolor", "256x256", "apps", "cura-icon.png"), os.path.join("..", "icons", "cura-icon_256x256.png"): "cura-icon.png", "cura.appdata.xml": "cura.appdata.xml", "AppRun": "AppRun"