Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from nodes-ios/RealmSupport
Browse files Browse the repository at this point in the history
Doesn't prompt to copy to applications when used with homebrew
  • Loading branch information
kasperwelner committed Mar 29, 2016
2 parents 1d794e9 + a9e4cac commit 7c45a03
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Carthage/Checkouts/model-generator
10 changes: 8 additions & 2 deletions Model Boiler/Classes/Support/Extensions.swift
Expand Up @@ -34,7 +34,7 @@ extension NSApplication {
}

func verifyAppInstallLocation() {
if !isInApplications() {
if !isInApplications() && !isInBrewsFolder() {

let alert = NSAlert()
alert.addButtonWithTitle("Install in Applications folder")
Expand Down Expand Up @@ -72,9 +72,15 @@ extension NSApplication {

return sourcePath == expectedPath
}

func isInBrewsFolder() -> Bool {
let sourcePath = NSBundle.mainBundle().bundlePath

return sourcePath.containsString("homebrew-cask/Caskroom")
}

func moveToApplicationsIfNecessary() throws {
if isInApplications() { return }
if isInApplications() || isInBrewsFolder() { return }

let bundle = NSBundle.mainBundle()
let sourcePath = bundle.bundlePath
Expand Down
Expand Up @@ -170,7 +170,7 @@ class StatusBarController: NSObject, NSMenuDelegate {
SettingsManager.setSetting(.OnlyCreateInitializer, enabled: newState)

if let camelCaseItem = optionsMenu.itemWithTag(MenuItem.OnlyCreateInitializer.rawValue) {
camelCaseItem.state = newState == true ? NSOffState : NSOnState
camelCaseItem.state = newState == true ? NSOnState : NSOffState
}
}

Expand Down
4 changes: 2 additions & 2 deletions Model Boiler/Supporting Files/Info.plist
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.1.3</string>
<string>2.1.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>13</string>
<string>14</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit 7c45a03

Please sign in to comment.