mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 04:37:51 -06:00
Allow the build_macos script to build both dmg/pkg on the same runner
Why should we build the installer twice? Contributes to CURA-8415
This commit is contained in:
parent
23c407150c
commit
5a12ad2a71
1 changed files with 8 additions and 5 deletions
|
@ -21,6 +21,7 @@ def build_dmg(source_path: str, dist_path: str, filename: str, app_name: str) ->
|
|||
"--icon", app_name, "169", "272",
|
||||
"--eula", f"{source_path}/packaging/cura_license.txt",
|
||||
"--background", f"{source_path}/packaging/MacOs/cura_background_dmg.png",
|
||||
"--hdiutil-quiet",
|
||||
f"{dist_path}/{filename}",
|
||||
f"{dist_path}/{app_name}"]
|
||||
|
||||
|
@ -141,7 +142,9 @@ if __name__ == "__main__":
|
|||
parser.add_argument("source_path", type = str, help = "Path to Pyinstaller source folder")
|
||||
parser.add_argument("dist_path", type = str, help = "Path to Pyinstaller dist folder")
|
||||
parser.add_argument("cura_conan_version", type = str, help="The version of cura")
|
||||
parser.add_argument("filename", type = str, help = "Filename of the pkg/dmg (e.g. 'UltiMaker-Cura-5.1.0-beta-Macos-X64.pkg' or 'UltiMaker-Cura-5.1.0-beta-Macos-X64.dmg')")
|
||||
parser.add_argument("filename", type = str, help = "Filename of the pkg/dmg (e.g. 'UltiMaker-Cura-5.1.0-beta-Macos-X64' or 'UltiMaker-Cura-5.1.0-beta-Macos-X64')")
|
||||
parser.add_argument("build_pkg", type = bool, default = False, help = "build the pkg")
|
||||
parser.add_argument("build_dmg", type = bool, default = True, help = "build the dmg")
|
||||
parser.add_argument("app_name", type = str, help = "Filename of the .app that will be contained within the dmg/pkg")
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -149,7 +152,7 @@ if __name__ == "__main__":
|
|||
|
||||
app_name = f"{args.app_name}.app"
|
||||
|
||||
if Path(args.filename).suffix == ".pkg":
|
||||
create_pkg_installer(args.filename, args.dist_path, cura_version, app_name)
|
||||
else:
|
||||
create_dmg(args.filename, args.dist_path, args.source_path, app_name)
|
||||
if args.build_pkg:
|
||||
create_pkg_installer(args.filename + ".pkg", args.dist_path, cura_version, app_name)
|
||||
if args.build_dmg:
|
||||
create_dmg(args.filename + ".dmg", args.dist_path, args.source_path, app_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue