From: Claudio Cambra Date: Thu, 20 Jun 2024 07:59:10 +0000 (+0800) Subject: Fix paths in mac crafter X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~149 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fb582c43946379482fd91bf3a2ae375b4d004518;p=nextcloud-desktop.git Fix paths in mac crafter Signed-off-by: Claudio Cambra --- diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index b50b03ea2..5c7a05d25 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -48,7 +48,7 @@ struct MacCrafter: ParsableCommand { try installIfMissing("git", "xcode-select --install") try installIfMissing( "brew", - "curl -fsSL \(self.brewInstallShUrl) | /bin/bash", + "curl -fsSL \(brewInstallShUrl) | /bin/bash", installCommandEnv: ["NONINTERACTIVE": "1"] ) try installIfMissing("inkscape", "brew install inkscape") @@ -57,7 +57,7 @@ struct MacCrafter: ParsableCommand { print("Build tooling configured.") print("Configuring KDE Craft.") - let craftMasterDir = "\(self.buildPath)/craftmaster" + let craftMasterDir = "\(buildPath)/craftmaster" let fm = FileManager.default if fm.fileExists(atPath: craftMasterDir) { @@ -69,8 +69,6 @@ struct MacCrafter: ParsableCommand { print("Configuring Nextcloud Desktop Client blueprints for KDE Craft...") - let currentDir = fm.currentDirectoryPath - let repoRootDir = "\(currentDir)../../../.." let craftMasterIni = "\(repoRootDir)/craftmaster.ini" let craftMasterPy = "\(craftMasterDir)/CraftMaster.py" let craftTarget = "macos-clang-arm64" @@ -87,16 +85,18 @@ struct MacCrafter: ParsableCommand { if let codeSignIdentity { print("Code-signing Nextcloud Desktop Client libraries and frameworks...") - let craftLibDir = "\(self.buildPath)/\(craftTarget)/lib" + let craftLibDir = "\(buildPath)/\(craftTarget)/lib" let craftLibs = try fm.contentsOfDirectory(atPath: craftLibDir) for lib in craftLibs { guard isLibrary(lib) else { continue } try codesign(identity: codeSignIdentity, path: "\(craftLibDir)/\(lib)") } - let craftPluginsDir = "\(currentDir)/\(craftTarget)/plugins" + let craftPluginsDir = "\(buildPath)/\(craftTarget)/plugins" guard let craftPluginsEnumerator = fm.enumerator(atPath: craftPluginsDir) else { - throw MacCrafterError.failedEnumeration("Failed to list craft plugins directory.") + throw MacCrafterError.failedEnumeration( + "Failed to list craft plugins directory at \(craftPluginsDir)." + ) } for case let plugin as String in craftPluginsEnumerator {