Craft the desktop client in the mac builder script
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 19 Jun 2024 10:33:07 +0000 (18:33 +0800)
committerClaudio Cambra <developer@claudiocambra.com>
Mon, 8 Jul 2024 07:41:45 +0000 (15:41 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
admin/osx/craft-client.swift

index 76a03d8baef99de4302c2f38ce4a4a06870c3b81..9afd751e2fe7c60d4b04235aac1883e6610333d0 100644 (file)
@@ -86,3 +86,22 @@ if fm.fileExists(atPath: craftDir) {
     print("Cloning KDE Craft...")
     shell("git clone -q --depth=1 https://invent.kde.org/packaging/craftmaster.git \(craftDir)")
 }
+
+print("Configuring Nextcloud Desktop Client blueprints for KDE Craft...")
+
+let repoRootDir = "\(currentDir)/../.."
+let craftMasterIni = "\(repoRootDir)/craftmaster.ini"
+let craftMasterPy = "\(craftDir)/CraftMaster.py"
+let craftTarget = "macos-clang-arm64"
+let craftCommand = "python3 \(craftMasterPy) --config \(craftMasterIni) --target \(craftTarget) -c"
+let clientBlueprintsGitUrl = "https://github.com/nextcloud/desktop-client-blueprints.git"
+shell("\(craftCommand) --add-blueprint-repository \(clientBlueprintsGitUrl)")
+
+print("Crafting KDE Craft...")
+shell("\(craftCommand) craft")
+
+print("Crafting Nextcloud Desktop Client dependencies...")
+shell("\(craftCommand) --install-deps nextcloud-client")
+
+print("Crafting Nextcloud Desktop Client...")
+shell("\(craftCommand) --src-dir \(repoRootDir) nextcloud-client")