From 3a53279f036981a1c8de32fe5ef5f156556166de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Galv=C3=A3o?= Date: Fri, 23 Jan 2015 01:41:28 +0000 Subject: [PATCH] change default install location for apps to /Applications --- CONTRIBUTING.md | 4 ++-- README.md | 2 +- USAGE.md | 14 +++++++------- doc/CASK_LANGUAGE_REFERENCE.md | 12 ++++++------ doc/FAQ.md | 4 ++-- doc/src/brew-cask.1.md | 2 +- lib/hbc/locations.rb | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4e01e25be910..468aff2f739a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -143,7 +143,7 @@ Fill in the following stanzas for your Cask: | `name` | the full and proper name defined by the vendor, and any useful alternate names (see also [Name Stanza Details](doc/CASK_LANGUAGE_REFERENCE.md#name-stanza-details)) | `homepage` | application homepage; used for the `brew cask home` command | `license` | a symbol identifying the license for the application. Valid category licenses include `:oss`, `:closed`, and `:unknown`. It is OK to leave as `:unknown`. (see also [License Stanza Details](doc/CASK_LANGUAGE_REFERENCE.md#license-stanza-details)) -| `app` | relative path to an `.app` bundle that should be linked into the `~/Applications` folder on installation (see also [App Stanza Details](doc/CASK_LANGUAGE_REFERENCE.md#app-stanza-details)) +| `app` | relative path to an `.app` bundle that should be linked into the `/Applications` folder on installation (see also [App Stanza Details](doc/CASK_LANGUAGE_REFERENCE.md#app-stanza-details)) Other commonly-used stanzas are: @@ -164,7 +164,7 @@ Additional stanzas you might need for special use-cases: | `binary` | relative path to a binary that should be linked into the `/usr/local/bin` folder on installation | `input_method` | relative path to a input method that should be linked into the `~/Library/Input Methods` folder on installation | `screen_saver` | relative path to a Screen Saver that should be linked into the `~/Library/Screen Savers` folder on installation -| `suite` | relative path to a containing directory that should be linked into the `~/Applications` folder on installation +| `suite` | relative path to a containing directory that should be linked into the `/Applications` folder on installation | `container :nested =>` | relative path to an inner container that must be extracted before moving on with the installation; this allows us to support dmg inside tar, zip inside dmg, etc. | `caveats` | a string or Ruby block providing the user with Cask-specific information at install time (see also [Caveats Stanza Details](doc/CASK_LANGUAGE_REFERENCE.md#caveats-stanza-details)) diff --git a/README.md b/README.md index c996f3762e49..6094600864bb 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ $ brew cask install google-chrome ``` And there we have it. Google Chrome installed with a few quick commands: no clicking, no dragging, no dropping. ```sh -$ open ~/Applications/"Google Chrome.app" +$ open /Applications/"Google Chrome.app" ``` ## Learn More diff --git a/USAGE.md b/USAGE.md index cb043d38d8e9..e395c823c169 100644 --- a/USAGE.md +++ b/USAGE.md @@ -65,7 +65,7 @@ $ brew cask uninstall google-chrome ``` This will both uninstall the Cask and remove symlinks which were created in -`~/Applications`. +`/Applications`. To uninstall all versions of a Cask, use `--force`: @@ -182,8 +182,8 @@ You can also modify the default installation locations used when issuing `brew c * `--caskroom=/my/path` determines where the actual applications will be located. Default is `/opt/homebrew-cask/Caskroom` * `--appdir=/my/path` changes the path where the symlinks to the applications (above) -will be generated. This is commonly used to create the links in the _root_ Applications directory -instead of the _home_ Applications directory by specifying `--appdir=/Applications`. Default is `~/Applications`. +will be generated. This can be used to, for example, create the links in the _home_ Applications directory +instead of the _root_ Applications directory by specifying `--appdir=~/Applications`. Default is `/Applications`. * `--prefpanedir=/my/path` changes the path for PreferencePane symlinks. Default is `~/Library/PreferencePanes` * `--qlplugindir=/my/path` changes the path for Quicklook Plugin symlinks. @@ -202,16 +202,16 @@ To make these settings persistent, you might want to add the following line to y ```bash # Specify your defaults in this environment variable -export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/etc/Caskroom" +export HOMEBREW_CASK_OPTS="--appdir=~/Applications --caskroom=/etc/Caskroom" ``` Note that you still can override the environment variable `HOMEBREW_CASK_OPTS` by _explicitly_ providing options in the command line: ```bash -# Will force the Chrome app to be linked to ~/Applications -# even though HOMEBREW_CASK_OPTS specified /Applications -$ brew cask install --appdir="~/Applications" google-chrome +# Will force the Chrome app to be linked to /Applications +# even though HOMEBREW_CASK_OPTS specified ~/Applications +$ brew cask install --appdir="/Applications" google-chrome ``` ## Advanced searching diff --git a/doc/CASK_LANGUAGE_REFERENCE.md b/doc/CASK_LANGUAGE_REFERENCE.md index 26d391666e6f..657e3d69a584 100644 --- a/doc/CASK_LANGUAGE_REFERENCE.md +++ b/doc/CASK_LANGUAGE_REFERENCE.md @@ -86,7 +86,7 @@ Each Cask must declare one or more *artifacts* (i.e. something to install) | name | multiple occurrences allowed? | value | | ------------------ |------------------------------ | ----------- | -| `app` | yes | relative path to an `.app` that should be linked into the `~/Applications` folder on installation (see also [App Stanza Details](#app-stanza-details)) +| `app` | yes | relative path to an `.app` that should be linked into the `/Applications` folder on installation (see also [App Stanza Details](#app-stanza-details)) | `pkg` | yes | relative path to a `.pkg` file containing the distribution (see also [Pkg Stanza Details](#pkg-stanza-details)) | `binary` | yes | relative path to a binary that should be linked into the `/usr/local/bin` folder on installation | `colorpicker` | yes | relative path to a ColorPicker plugin that should be linked into the `~/Library/ColorPickers` folder on installation @@ -97,7 +97,7 @@ Each Cask must declare one or more *artifacts* (i.e. something to install) | `qlplugin` | yes | relative path to a QuickLook plugin that should be linked into the `~/Library/QuickLook` folder on installation | `screen_saver` | yes | relative path to a Screen Saver that should be linked into the `~/Library/Screen Savers` folder on installation | `service` | yes | relative path to a service that should be linked into the `~/Library/Services` folder on installation -| `suite` | yes | relative path to a containing directory that should be linked into the `~/Applications` folder on installation (see also [Suite Stanza Details](#suite-stanza-details)) +| `suite` | yes | relative path to a containing directory that should be linked into the `/Applications` folder on installation (see also [Suite Stanza Details](#suite-stanza-details)) | `artifact` | yes | relative path to an arbitrary path that should be symlinked on installation. This is only for unusual cases. The `app` stanza is strongly preferred when linking `.app` bundles. | `installer` | yes | describes an executable which must be run to complete the installation. (see [Installer Stanza Details](#installer-stanza-details)) | `stage_only` | no | `true`. Assert that the Cask contains no activatable artifacts. @@ -440,7 +440,7 @@ follows the `url` value. Example: [libreoffice.rb](../Casks/libreoffice.rb). ## App Stanza Details In the simple case of a string argument to `app`, a symlink is created in -the target `~/Applications` directory using the same basename as the source +the target `/Applications` directory using the same basename as the source file. For example: ```ruby @@ -450,7 +450,7 @@ app 'Alfred 2.app' causes the creation of this symlink ```bash -~/Applications/Alfred 2.app +/Applications/Alfred 2.app ``` which points to a source file such as @@ -461,7 +461,7 @@ which points to a source file such as ### Renaming the Target -You can rename the target link which appears in your `~/Applications` +You can rename the target link which appears in your `/Applications` directory by adding a `:target` key to `app`. Example (from [scala-ide.rb](../Casks/scala-ide.rb): ```ruby @@ -499,7 +499,7 @@ like [changing case](../Casks/diffmerge.rb) or [removing an extension](../Casks/ Some distributions provide a suite of multiple applications, or an application with required data, to be installed together in a -subdirectory of `~/Applications`. +subdirectory of `/Applications`. For these Casks, use the `suite` stanza to define the directory containing the application suite. Example (from [sketchup.rb](../Casks/sketchup.rb)): diff --git a/doc/FAQ.md b/doc/FAQ.md index 7263c91b33e9..0d88b1cbbb2e 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -36,14 +36,14 @@ install applications directly into /usr/local. We don't know up-front precisely what files are going to be in the dmg/zip/tgz/etc, so it's really helpful to have a place to dump all of them safely, then iterate through and act on the files we care about. For an `.app` file -this may be symlinking it into `~/Applications` or `/Applications`, for a `.pkg` file +this may be symlinking it into `/Applications` or `~/Applications`, for a `.pkg` file this might be running the installer. For a Screen Saver it may be symlinking it into the appropriate directory for it to show up in System Preferences. The reason we implement this project on top of Homebrew was based on a belief that their methodology for managing applications has a lot of merit. We'd prefer to try and work things so that we can keep ourselves Homebrewy both in -implementation and idioms. Trying to manage all of `~/Applications` would move +implementation and idioms. Trying to manage all of `/Applications` would move the project more towards a standalone system, which would mean reimplementing a lot of the Homebrew stuff we lean on now. diff --git a/doc/src/brew-cask.1.md b/doc/src/brew-cask.1.md index e8544cf27f3b..226fcd70fd0e 100644 --- a/doc/src/brew-cask.1.md +++ b/doc/src/brew-cask.1.md @@ -143,7 +143,7 @@ in a future version. Give additional feedback during installation. * `--appdir=`: - Target location for Application links. The default value is `~/Applications`. + Target location for Application links. The default value is `/Applications`. * `--colorpickerdir=`: Target location for Color Picker links. The default value is `~/Library/Color Pickers`. diff --git a/lib/hbc/locations.rb b/lib/hbc/locations.rb index 2887d6a596ea..435d702b7a41 100644 --- a/lib/hbc/locations.rb +++ b/lib/hbc/locations.rb @@ -17,7 +17,7 @@ def caskroom=(caskroom) end def appdir - @appdir ||= Pathname.new('~/Applications').expand_path + @appdir ||= Pathname.new('/Applications').expand_path end def appdir=(_appdir)