Use path to join paths

CURA-6867
This commit is contained in:
Joey de l'Arago 2023-01-11 11:57:51 +01:00
parent b96c0dce39
commit ddb4547598
2 changed files with 10 additions and 9 deletions

View file

@ -58,7 +58,7 @@ env:
CONAN_LOG_RUN_TO_OUTPUT: 1 CONAN_LOG_RUN_TO_OUTPUT: 1
CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }} CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
CONAN_NON_INTERACTIVE: 1 CONAN_NON_INTERACTIVE: 1
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY_2 }} CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }}
MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }} MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }}
MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }} MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }}
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }} MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}

View file

@ -25,8 +25,8 @@ def build_pkg(dist_path: str, app_filename: str, component_filename: str, instal
pkg_build_arguments = [ pkg_build_arguments = [
pkg_build_executable, pkg_build_executable,
"--component", "--component",
f"{dist_path}/{app_filename}", Path(dist_path, app_filename),
f"{dist_path}/{component_filename}", Path(dist_path, component_filename),
"--sign", codesign_identity, "--sign", codesign_identity,
"--install-location", "/Applications", "--install-location", "/Applications",
] ]
@ -38,18 +38,18 @@ def build_pkg(dist_path: str, app_filename: str, component_filename: str, instal
distribution_creation_arguments = [ distribution_creation_arguments = [
product_build_executable, product_build_executable,
"--synthesize", "--synthesize",
"--package", f"{dist_path}/{component_filename}", # Package that will be inside installer "--package", Path(dist_path, component_filename), # Package that will be inside installer
f"{dist_path}/distribution.xml", # Output location for sythesized distributions file Path(dist_path, "distribution.xml"), # Output location for sythesized distributions file
] ]
subprocess.run(distribution_creation_arguments) subprocess.run(distribution_creation_arguments)
# This creates the distributable package (Installer) # This creates the distributable package (Installer)
installer_creation_arguments = [ installer_creation_arguments = [
product_build_executable, product_build_executable,
"--distribution", f"{dist_path}/distribution.xml", "--distribution", Path(dist_path, "distribution.xml"),
"--package-path", dist_path, # Where to find the component packages mentioned in distribution.xml (UltiMaker-Cura.pkg) "--package-path", dist_path, # Where to find the component packages mentioned in distribution.xml (UltiMaker-Cura.pkg)
"--sign", codesign_identity, "--sign", codesign_identity,
f"{dist_path}/{installer_filename}", Path(dist_path, installer_filename),
] ]
subprocess.run(installer_creation_arguments) subprocess.run(installer_creation_arguments)
@ -63,7 +63,8 @@ def code_sign(dist_path: str, filename: str) -> None:
"-s", codesign_identity, "-s", codesign_identity,
"--timestamp", "--timestamp",
"-i", filename, # This is by default derived from Info.plist or the filename. The documentation does not specify which, so it is explicit here. **This must be unique in the package** "-i", filename, # This is by default derived from Info.plist or the filename. The documentation does not specify which, so it is explicit here. **This must be unique in the package**
f"{dist_path}/{filename}"] Path(dist_path, filename)
]
subprocess.run(sign_arguments) subprocess.run(sign_arguments)
@ -80,7 +81,7 @@ def notarize_file(dist_path: str, filename: str) -> None:
"--primary-bundle-id", ULTIMAKER_CURA_DOMAIN, "--primary-bundle-id", ULTIMAKER_CURA_DOMAIN,
"--username", notarize_user, "--username", notarize_user,
"--password", notarize_password, "--password", notarize_password,
"--file", f"{dist_path}/{filename}" "--file", Path(dist_path, filename)
] ]
subprocess.run(notarize_arguments) subprocess.run(notarize_arguments)