Skip to content

Commit

Permalink
Fixed bug introduced in last commit/build
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan_ball committed May 30, 2019
1 parent d195dc8 commit 4f9dafc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Launchd Package Creator/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class ViewController: NSViewController {
programArgs.isEnabled = false
programArgs.stringValue = ""
programArgsOptLabel.isHidden = false
usingApp = false
} else if targetExtension == "app" {
// Target has a .app extensin and use set /usr/bin/open as the program args
programArgs.stringValue = String("/usr/bin/open");
Expand All @@ -185,6 +186,7 @@ class ViewController: NSViewController {
// Either no shebang or we don't know how to deal with the shebang in the file
dialogOK(title: "Missing shebang", message: "Your script does not have a proper shebang as the first line. Either add a shebang into the script and try again or manually configure the Program Arguments.")
}
usingApp = false
} catch {
// bad things happened
}
Expand Down
8 changes: 7 additions & 1 deletion Launchd Package Creator/create_daemon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ public class create_daemon: NSObject {
let pkgBuildDir = sessionTempDir.appendingPathComponent("build/")
globalPkgTempLocation = "\(pkgBuildDir.path)/hello.pkg"

shell("/usr/bin/pkgbuild", "--quiet", "--root", "\(pkgRoot.path)", "--install-location", "/", "--scripts", "\(pkgScripts.path)", "--identifier", "\(globalIdentifier)", "--version", "\(globalVersion)", "--ownership", "recommended", "--component-plist", "\(componentPlistURL.path)", "\(globalPkgTempLocation)")
if usingApp == true {
shell("/usr/bin/pkgbuild", "--quiet", "--root", "\(pkgRoot.path)", "--install-location", "/", "--scripts", "\(pkgScripts.path)", "--identifier", "\(globalIdentifier)", "--version", "\(globalVersion)", "--ownership", "recommended", "--component-plist", "\(componentPlistURL.path)", "\(globalPkgTempLocation)")

} else {
shell("/usr/bin/pkgbuild", "--quiet", "--root", "\(pkgRoot.path)", "--install-location", "/", "--scripts", "\(pkgScripts.path)", "--identifier", "\(globalIdentifier)", "--version", "\(globalVersion)", "--ownership", "recommended", "\(globalPkgTempLocation)")
}

}

if buildType == "PKG" {
Expand Down

0 comments on commit 4f9dafc

Please sign in to comment.