homebrew-cask/README.md

69 lines
4.3 KiB
Markdown
Raw Normal View History

# Homebrew-Cask
_“To install, drag this icon…” no more!_
2013-04-05 16:10:59 +08:00
2016-06-14 04:11:40 +08:00
Homebrew-Cask extends [Homebrew](http://brew.sh) and brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Google Chrome and Adium.
2016-06-14 04:11:40 +08:00
We do this by providing a friendly Homebrew-style CLI workflow for the administration of macOS applications distributed as binaries.
Its implemented as a `homebrew` [external command](https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/External-Commands.md) called `cask`.
[![Build Status](https://img.shields.io/travis/caskroom/homebrew-cask/master.svg)](https://travis-ci.org/caskroom/homebrew-cask)
[![Code Climate](https://img.shields.io/codeclimate/github/caskroom/homebrew-cask.svg)](https://codeclimate.com/github/caskroom/homebrew-cask)
[![Coverage Status](https://img.shields.io/coveralls/caskroom/homebrew-cask.svg)](https://coveralls.io/r/caskroom/homebrew-cask)
2015-09-17 23:32:03 +08:00
[![Join the chat at https://gitter.im/caskroom/homebrew-cask](https://img.shields.io/badge/gitter-join%20chat-blue.svg)](https://gitter.im/caskroom/homebrew-cask)
2015-09-07 21:23:51 +08:00
## Lets try it!
2015-09-16 06:24:11 +08:00
2015-12-22 20:33:44 +08:00
To start using Homebrew-Cask, you just need [Homebrew](http://brew.sh/) installed.
2015-09-16 06:24:11 +08:00
```bash
$ brew cask install google-chrome
2016-01-11 19:37:41 +08:00
==> Downloading https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg
==> Moving App 'Google Chrome.app' to '/Applications/Google Chrome.app'
🍺 google-chrome staged at '/usr/local/Caskroom/google-chrome/latest' (3 files, 288K)
```
2015-09-16 06:24:11 +08:00
And there we have it. Google Chrome installed with a few quick commands: no clicking, no dragging, no dropping.
2015-09-16 06:24:11 +08:00
```bash
[WIP] Change artifact behavior to moving instead of symlinking (#13966) * Change app artifact to move instead of link First step towards change in installation behavior mentioned in [13201] * Fix handling of binaries linked from inside of app bundles Also adds `appdir` method for interpolation in stanzas * Change appdir to root Applications directory * Update 2-app tests * Refactor: add options, ivars to `Installer`, `Download` In preparation for upcoming changes, this commit cleans up some code. The commit includes: - In order to reduce unnecessary object passing, make both the `force` and `skip_cask_deps` option into instance variables of the `Installer` class - Introduce options hashes to initializers of both the `Installer` and `Download` class - When the `install --force` command enters the fetch phase, make it explicit in the code that fetching is never enforced in that case. - Update tests * Force overwrite artifacts on `--force` reinstall This commit changes the behavior of a `Moved` artifact such that if the target already exists, `brew cask install --force` will remove the existing target before moving the staged artifact. In that case, the warning message will say *overwriting* instead of *not moving*. The behavior of plain `brew cask install` remains unchanged; the same goes for the warning message for that case. * Change remaining artifacts to move instead of symlink * Update casks to use appdir in binary paths * Forcibly overwrite artifacts, modifying flags and using `sudo` if needed - This commit implements [the proposed behavior for `install --force`](https://github.com/caskroom/homebrew-cask/pull/13966#issuecomment-220830387) when a target already exists and has either permission problems or is not owned by the user. - The changes apply only when the `force` option is given. - Reused the existing safeguard from the `.pkg` artifact to prevent deleting important directories by bug or mistake - The two existing blacklists `SYSTEM_DIRS` and `UNDELETABLE_DIRS` have been consolidated into the `Hbc::MacOS` module. - `UNDELETABLE_DIRS` now also contains all the entries from `SYSTEM_DIRS` which was a to-do anyway. - The two blacklists are now also frozen for good measure. - The utility method `permissions_rmtree` was moved to `Hbc::Utils`. - The `tried_permissions` part in `Utils` now falls back correctly when there are also ownership issues at the same time. - Introduced a separate `current_user` method for mocking. - Added an optional feature to `FakeSystemCommand` so it can now act as a proxy to `SystemCommand`. - Added tests for various `permissions_rmtree` cases.
2016-06-01 03:23:21 +08:00
$ open /Applications/"Google Chrome.app"
```
2015-09-16 06:24:11 +08:00
2016-01-11 21:56:20 +08:00
## Learn More
2016-02-09 10:12:35 +08:00
* Find basic documentation on using Homebrew-Cask in [USAGE.md](USAGE.md)
2015-09-16 06:24:11 +08:00
* Want to contribute a Cask? Awesome! See [CONTRIBUTING.md](CONTRIBUTING.md)
2016-01-23 13:14:24 +08:00
* Want to hack on our code? Also awesome! See [hacking.md](doc/development/hacking.md)
2016-01-15 09:57:32 +08:00
* More project-related details and discussion are available in the [documentation](doc)
## Reporting bugs
Like most pieces of software, Homebrew-Cask has bugs — and we are busy fixing them! If you find a new bug tell us about it, but before you do make sure the problem isnt simply an outdated setup on your side, by following [this guide](doc/reporting_bugs/pre_bug_report.md).
If your issue persists, follow these instructions to the appropriate course of action:
2013-09-23 02:37:18 +08:00
* [A cask fails to install](doc/reporting_bugs/a_cask_fails_to_install.md)
* [My problem isnt listed][bug_report_template]
## Requests
* Start an issue on GitHub following one of these templates:
* [Feature request][feature_request_template]
* [Cask request][cask_request_template]
## Questions? Wanna chat?
Were really rather friendly! Here are the best places to talk about the project:
2015-12-10 22:47:04 +08:00
* If none of the templates above is appropriate, [open an issue](https://github.com/caskroom/homebrew-cask/issues/new).
* Join us (and [caskbot](https://github.com/passcod/caskbot)) on IRC at `#homebrew-cask` on Freenode
* Join us on [Gitter](https://gitter.im/caskroom/homebrew-cask)
2016-01-11 19:37:41 +08:00
## License
Code is under the [BSD 2 Clause (NetBSD) license](LICENSE)
[bug_report_template]: https://github.com/caskroom/homebrew-cask/issues/new?title=Bug%20report%3A&body=%28Remember%20to%20run%20%60brew%20update%3B%20brew%20cleanup%3B%20brew%20cask%20cleanup%60%20before%20reporting%20your%20issue.%20It%20usually%20fixes%20things%21%29%0A%0A%23%23%23%20Description%20of%20issue%0A%0A%0A%0A%23%23%23%20Output%20of%20%60brew%20cask%20%3Ccommand%3E%20--verbose%60%0A%0A%60%60%60%0A%28paste%20output%20here%29%0A%60%60%60%0A%0A%23%23%23%20Output%20of%20%60brew%20doctor%60%0A%0A%60%60%60%0A%28paste%20output%20here%29%0A%60%60%60%0A%0A%23%23%23%20Output%20of%20%60brew%20cask%20doctor%60%0A%0A%60%60%60%0A%28paste%20output%20here%29%0A%60%60%60%0A
[cask_request_template]: https://github.com/caskroom/homebrew-cask/issues/new?title=Cask%20request%3A&body=%23%23%23%20Cask%20details%0A%0A%28Please%20fill%20out%20as%20much%20as%20possible%29%0A%0A%2A%2AName%2A%2A%20-%0A%0A%2A%2AHomepage%2A%2A%20-%0A%0A%2A%2ALicense%2A%2A%20-%0A%0A%2A%2ADownload%20URL%2A%2A%20-%0A%0A%2A%2ADescription%2A%2A%20-%0A
[feature_request_template]: https://github.com/caskroom/homebrew-cask/issues/new?title=Feature%20request%3A&body=%23%23%23%20Description%20of%20feature%2Fenhancement%0A%0A%0A%0A%23%23%23%20Justification%0A%0A%0A%0A%23%23%23%20Example%20use%20case%0A%0A%0A%0A