Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjellespijker <j.spijker@ultimaker.com>2022-07-06 11:50:01 +0300
committerjellespijker <j.spijker@ultimaker.com>2022-07-06 11:50:01 +0300
commit4344ef066fd13ad9a6b343aeabe3937e80c6aecc (patch)
treeb773186431ee6fd4e3db04fcfda9a501d70aa946 /packaging
parent13d5d33ec86bca593105f22874c98bf27d11b787 (diff)
Fixed paths for the dmg_sign_notarize script
Contributes to CURA-9365
Diffstat (limited to 'packaging')
-rw-r--r--packaging/dmg/cura_background_dmg.png (renamed from packaging/icons/cura_background_dmg.png)bin57851 -> 57851 bytes
-rw-r--r--packaging/dmg/dmg_sign_noterize.py33
2 files changed, 16 insertions, 17 deletions
diff --git a/packaging/icons/cura_background_dmg.png b/packaging/dmg/cura_background_dmg.png
index e838608293..e838608293 100644
--- a/packaging/icons/cura_background_dmg.png
+++ b/packaging/dmg/cura_background_dmg.png
Binary files differ
diff --git a/packaging/dmg/dmg_sign_noterize.py b/packaging/dmg/dmg_sign_noterize.py
index 35c094e237..12fe6307fd 100644
--- a/packaging/dmg/dmg_sign_noterize.py
+++ b/packaging/dmg/dmg_sign_noterize.py
@@ -2,31 +2,28 @@ import os
import argparse # Command line arguments parsing and help.
import subprocess
-SOURCE_DIR = os.environ.get("SOURCE_DIR", ".")
-DIST_DIR = os.environ.get("DIST_DIR", os.path.join(SOURCE_DIR, "dist"))
-APP_PATH = os.path.join(DIST_DIR, "Ultimaker-Cura.app")
ULTIMAKER_CURA_DOMAIN = os.environ.get("ULTIMAKER_CURA_DOMAIN", "nl.ultimaker.cura")
-def build_dmg(filename: str) -> None:
+def build_dmg(source_path: str, dist_path: str, filename: str) -> None:
create_dmg_executable = os.environ.get("CREATE_DMG_EXECUTABLE", "create-dmg")
arguments = [create_dmg_executable,
"--window-pos", "640", "360",
"--window-size", "690", "503",
"--app-drop-link", "520", "272",
- "--volicon", f"{SOURCE_DIR}/packaging/icons/VolumeIcons_Cura.icns",
+ "--volicon", f"{source_path}/packaging/icons/VolumeIcons_Cura.icns",
"--icon-size", "90",
"--icon", "Ultimaker-Cura.app", "169", "272",
- "--eula", f"{SOURCE_DIR}/packaging/cura_license.txt",
- "--background", f"{SOURCE_DIR}/packaging/icons/cura_background_dmg.png",
- filename,
- APP_PATH]
+ "--eula", f"{source_path}/packaging/cura_license.txt",
+ "--background", f"{source_path}/packaging/dmg/cura_background_dmg.png",
+ f"{dist_path}/{filename}",
+ f"{dist_path}/Ultimaker-Cura.app"]
subprocess.run(arguments)
-def sign(filename: str) -> None:
+def sign(dist_path: str, filename: str) -> None:
codesign_executable = os.environ.get("CODESIGN", "codesign")
codesign_identity = os.environ.get("CODESIGN_IDENTITY")
@@ -34,12 +31,12 @@ def sign(filename: str) -> None:
"-s", codesign_identity,
"--timestamp",
"-i", f"{ULTIMAKER_CURA_DOMAIN}.dmg", # TODO: check if this really should have the extra dmg. We seem to be doing this also in the old Rundeck scripts
- filename]
+ f"{dist_path}/{filename}"]
subprocess.run(arguments)
-def notarize(filename: str) -> None:
+def notarize(dist_path: str, filename: str) -> None:
notarize_user = os.environ.get("MAC_NOTARIZE_USER")
notarize_password = os.environ.get("MAC_NOTARIZE_PASSWORD")
altool_executable = os.environ.get("ALTOOL_EXECUTABLE", "altool")
@@ -50,19 +47,21 @@ def notarize(filename: str) -> None:
"--primary-bundle-id", ULTIMAKER_CURA_DOMAIN,
"--username", notarize_user,
"--password", notarize_password,
- "--file", filename
+ "--file", f"{dist_path}/{filename}"
]
subprocess.run(arguments)
if __name__ == "__main__":
- parser = argparse.ArgumentParser(description = "Create AppImages of Cura.")
+ parser = argparse.ArgumentParser(description = "Create dmg of Cura.")
+ parser.add_argument("source_path", type=str, help="Path to Conan install Cura folder.")
+ parser.add_argument("dist_path", type=str, help="Path to Pyinstaller dist folder")
parser.add_argument("filename", type = str, help = "Filename of the dmg (e.g. 'Ultimaker-Cura-5.1.0-beta-Linux-X64.dmg')")
args = parser.parse_args()
- build_dmg(args.filename)
- sign(args.filename)
+ build_dmg(args.source_path, args.dist_path, args.filename)
+ sign(args.dist_path, args.filename)
notarize_dmg = bool(os.environ.get("NOTARIZE_DMG", "TRUE"))
if notarize_dmg:
- notarize(args.filename)
+ notarize(args.dist_path, args.filename)