Merge pull request #15015 from leoheck/fix-appimage-icons

Fix AppImage icons on some Linux systems

Fixes #12915 
Fixes #14662

Implements CURA-10550
This commit is contained in:
Jelle Spijker 2023-04-28 13:37:46 +02:00 committed by GitHub
commit e8ef90da4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -30,6 +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"): 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"
@ -37,8 +41,12 @@ def copy_metadata_files(dist_path, version):
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")

View File

@ -0,0 +1 @@
<svg clip-rule="evenodd" fill-rule="evenodd" height="256" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 132.172 132.172" width="256" xmlns="http://www.w3.org/2000/svg"><path d="m100.173 98.5466c-15.8869-.609994-35.3315 2.28923-48.9157-3.17905-24.3063-9.7842-27.7934-53.2246.104934-65.6879 12.1457-5.42614 33.6425-2.51974 48.61-3.13676l.19055 18.8121-34.095-.0428811c-9.79181.313486-16.1444 7.5159-15.8705 17.6197.273239 10.0823 6.28435 16.693 16.3883 17.0668 10.9227.403931 22.7963.0428811 33.8111.00380515l-.223626 18.5442zm-55.1016-98.5466h87.1008v87.2658c-.169914.735857-.559649 1.39605-1.38302 2.21928l-41.3037 41.3037c-.823229.823375-1.48342 1.21311-2.21928 1.38302h-87.2658v-87.2658c.169914-.735857.559649-1.39605 1.38302-2.21928l37.2101-37.1365c4.22488-4.22488 4.74341-5.31272 6.47782-5.55024z" fill="#00abe5"/><path d="m100.173 98.5466l.223626-18.5442c-11.0147.0390759-22.8884.400126-33.8111-.00380515-10.104-.373782-16.1151-6.98449-16.3883-17.0668-.273824-10.1038 6.07872-17.3062 15.8705-17.6197l34.095.0428811-.19055-18.8121c-14.9675.617019-36.4643-2.28938-48.61 3.13676-27.8983 12.4633-24.4112 55.9037-.104934 65.6879 13.5842 5.46829 33.0288 2.56906 48.9157 3.17905z" fill="#fefefe"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB