mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-19 09:45:46 -04:00
Fix double slashes in paths
This commit is contained in:
parent
c5aea7eddc
commit
e02f03ae15
2 changed files with 6 additions and 6 deletions
|
@ -429,7 +429,7 @@ class TaskManager: ObservableObject {
|
||||||
private static func isoTasks(for installer: Installer, filename: String, destination destinationURL: URL, temporaryDirectory temporaryDirectoryURL: URL) -> [MistTask] {
|
private static func isoTasks(for installer: Installer, filename: String, destination destinationURL: URL, temporaryDirectory temporaryDirectoryURL: URL) -> [MistTask] {
|
||||||
|
|
||||||
let temporaryImageURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).dmg")
|
let temporaryImageURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).dmg")
|
||||||
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Resources/createinstallmedia")
|
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Resources/createinstallmedia")
|
||||||
let temporaryCDRURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).cdr")
|
let temporaryCDRURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).cdr")
|
||||||
let isoURL: URL = destinationURL.appendingPathComponent(filename.stringWithSubstitutions(name: installer.name, version: installer.version, build: installer.build))
|
let isoURL: URL = destinationURL.appendingPathComponent(filename.stringWithSubstitutions(name: installer.name, version: installer.version, build: installer.build))
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ class TaskManager: ObservableObject {
|
||||||
|
|
||||||
// Workaround to make macOS Sierra 10.12 createinstallmedia work
|
// Workaround to make macOS Sierra 10.12 createinstallmedia work
|
||||||
if installer.version.hasPrefix("10.12") {
|
if installer.version.hasPrefix("10.12") {
|
||||||
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Info.plist")
|
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Info.plist")
|
||||||
try PropertyListUpdater.update(infoPlistURL, key: "CFBundleShortVersionString", value: "12.6.03")
|
try PropertyListUpdater.update(infoPlistURL, key: "CFBundleShortVersionString", value: "12.6.03")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ class TaskManager: ObservableObject {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
let installESDURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/SharedSupport/InstallESD.dmg")
|
let installESDURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/SharedSupport/InstallESD.dmg")
|
||||||
return [
|
return [
|
||||||
MistTask(type: .convert, description: "Installer Disk Image to ISO") {
|
MistTask(type: .convert, description: "Installer Disk Image to ISO") {
|
||||||
try await ISOConverter.convert(installESDURL, destination: temporaryCDRURL)
|
try await ISOConverter.convert(installESDURL, destination: temporaryCDRURL)
|
||||||
|
@ -528,14 +528,14 @@ class TaskManager: ObservableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func bootableInstallerTasks(for installer: Installer, volume: InstallerVolume) -> [MistTask] {
|
private static func bootableInstallerTasks(for installer: Installer, volume: InstallerVolume) -> [MistTask] {
|
||||||
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Resources/createinstallmedia")
|
let createInstallMediaURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Resources/createinstallmedia")
|
||||||
let mountPointURL: URL = URL(fileURLWithPath: volume.path)
|
let mountPointURL: URL = URL(fileURLWithPath: volume.path)
|
||||||
let tasks: [MistTask] = [
|
let tasks: [MistTask] = [
|
||||||
MistTask(type: .create, description: "Bootable Installer") {
|
MistTask(type: .create, description: "Bootable Installer") {
|
||||||
|
|
||||||
// Workaround to make macOS Sierra 10.12 createinstallmedia work
|
// Workaround to make macOS Sierra 10.12 createinstallmedia work
|
||||||
if installer.version.hasPrefix("10.12") {
|
if installer.version.hasPrefix("10.12") {
|
||||||
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/Info.plist")
|
let infoPlistURL: URL = installer.temporaryInstallerURL.appendingPathComponent("Contents/Info.plist")
|
||||||
try PropertyListUpdater.update(infoPlistURL, key: "CFBundleShortVersionString", value: "12.6.03")
|
try PropertyListUpdater.update(infoPlistURL, key: "CFBundleShortVersionString", value: "12.6.03")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -732,7 +732,7 @@ struct Installer: Decodable, Hashable, Identifiable {
|
||||||
URL(fileURLWithPath: "/Volumes/\(id)")
|
URL(fileURLWithPath: "/Volumes/\(id)")
|
||||||
}
|
}
|
||||||
var temporaryInstallerURL: URL {
|
var temporaryInstallerURL: URL {
|
||||||
temporaryDiskImageMountPointURL.appendingPathComponent("/Applications/Install \(name).app")
|
temporaryDiskImageMountPointURL.appendingPathComponent("Applications/Install \(name).app")
|
||||||
}
|
}
|
||||||
var temporaryISOMountPointURL: URL {
|
var temporaryISOMountPointURL: URL {
|
||||||
URL(fileURLWithPath: "/Volumes/Install \(name)")
|
URL(fileURLWithPath: "/Volumes/Install \(name)")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue