Install and use the appimagetool

Can be set as an env variable in the script

Contributes to CURA-9365
This commit is contained in:
j.spijker@ultimaker.com 2022-07-01 13:01:16 +02:00 committed by Jelle Spijker
parent 66a38be94b
commit 8a3d94d2b9
2 changed files with 7 additions and 2 deletions

View file

@ -55,7 +55,8 @@ def copy_metadata_files(dist_path, version):
def generate_appimage(dist_path, appimage_filename):
appimage_path = os.path.join(dist_path, appimage_filename)
command = ["appimagetool", "--appimage-extract-and-run", f"{dist_path}/", appimage_path]
appimagetool = os.getenv("APPIMAGETOOL_LOCATION", "appimagetool")
command = [appimagetool, "--appimage-extract-and-run", f"{dist_path}/", appimage_path]
result = subprocess.call(command)
if result != 0:
raise RuntimeError(f"The AppImageTool command returned non-zero: {result}")