Skip to content

Update README to document how to compile and install the latest code via Homebrew#104

Open
varenc wants to merge 1 commit into
jakehilborn:masterfrom
varenc:document-homebrew
Open

Update README to document how to compile and install the latest code via Homebrew#104
varenc wants to merge 1 commit into
jakehilborn:masterfrom
varenc:document-homebrew

Conversation

@varenc
Copy link
Copy Markdown
Contributor

@varenc varenc commented Nov 9, 2022

NOTE: This relies on jakehilborn/homebrew-jakehilborn#1 being merged.

The current github release is very out of date and from 2019. It's missing a few bug fixes. The inaccurate support for "scaling:off" comes to mind.

But instead of complaining about the lack of a recent releases, which are always a pain to update, we can instead just use homebrew to make it easy for users to compile and install the latest version of the code currently on github! This is particularly simple for displayplacer since it has no special build dependencies. I tested this myself and it worked fine instantly. Considering the pace of commits and relatively stable nature of master, I don't think this introduces too much risk.

This commit just updates the instructions to tell users to install with brew install --head displayplacer instead of brew install displayplacer. Homebrew may require users to install general xcode build tools, but I believe most homebrew users have already done that and homebrew makes it very simple to do so if needed. This also of course relies on the PR mentioned above also being merged.

(digression: I think brew install --head ... is an under utilized feature of homebrew taps. It obviates much of the pressure for the maintainer to provide a github release at all)

EDIT: I also noticed this recent PR, #99, where it seems to say the current version of master won't compile on Catalina. I don't have a Catalina system to repro, but assuming it's true then that also should be merged before this so that users compiling on Catalina will still succeed.

NOTE: This relies on jakehilborn/homebrew-jakehilborn#1 being merged.

The current github release is very out of date and from 2019. It's missing a few bug fixes. The inaccurate support for "scaling:off" comes to mind.

But instead of complaining about the lack of a recent releases, we can instead just use homebrew to make it easy for users to compile and install the latest version of the code currently on github. This is particularly simple for displayplacer since it has no special build dependencies.

Considering the pace of commits and relatively stable nature of master, I don't think this introduces too much risk.  (I think `install --head` is an under utilized feature of homebrew taps.  It obviates much of the need for the maintainer to constantly update the github releases!)

This commit just updates the instructions to tell users to install with `brew install --head displayplacer`. It of course relies on the PR mentioned above also being merged.

Also note that users that already tapped the homebrew tap will need to update it for `install --head` to work.  This should happen automatically after a `brew update`, which is something homebrew also does automatically after a certain amount of time.
@varenc varenc changed the title Update README to document how to compile and install the latest code Update README to document how to compile and install the latest code via Homebrew Nov 9, 2022
@enavarrocu
Copy link
Copy Markdown

@varenc
When I try to do brew install --head displayplacer I get:
image

@varenc
Copy link
Copy Markdown
Contributor Author

varenc commented Nov 12, 2022

@enavarrocu that's because this PR hasn't been merged: jakehilborn/homebrew-jakehilborn#1 . You're trying to do a --head install for a published formula that doesn't yet have a head definition.

You can test this by downloading the displayplacer formula from my branch and then directly install the formula from that file:

$ cd /tmp
$ wget https://raw.githubusercontent.com/varenc/homebrew-jakehilborn/add-head/Formula/displayplacer.rb
$ brew install --head -dv ./displayplacer.rb       # -dv enables debug+verbose output
...
==> Cloning https://github.com/jakehilborn/displayplacer.git
git clone --branch master -c advice.detachedHead=false https://github.com/jakehilborn/displayplacer.git /Users/chris/Library/Caches/Homebrew/displayplacer--git
...

(would actually love someone to test this and make sure it works fine for them!)

@jayrhynas
Copy link
Copy Markdown

(would actually love someone to test this and make sure it works fine for them!)

I tried installing from head using your formula and everything seems fine (macOS 13.1 (22C65))

@varenc
Copy link
Copy Markdown
Contributor Author

varenc commented Feb 13, 2023

Thanks @jayrhynas ! That's good to confirm. @jakehilborn ? 🙃

There's been some great bug fixes to displayplacer since the last binary release in 2019. And with homebrew making the compilation part so easy for the masses I think this documentation tweak could really help users actually benefit from all the recent fixes. (but requires jakehilborn/homebrew-jakehilborn#1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants