Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Correct way of installing phantomjs #11225

Closed
wants to merge 3 commits into from

Conversation

fabiomcosta
Copy link
Contributor

This is the correct way of installing phantomjs according to Aryia, the project creator http://ariya.ofilabs.com/2012/02/phantomjs-and-mac-os-x.html . It's a lot faster too (does not require the installation of QT and the downloaded file is +50% smaller).

Also updates from 1.4.1 to 1.5.0

…at his blog: http://ariya.ofilabs.com/2012/02/phantomjs-and-mac-os-x.html . It's a lot faster (does not require the installation of QT and the downloaded file is +50% smaller) .
@MikeMcQuaid
Copy link
Member

Seems reasonable to me.

@Sharpie
Copy link
Contributor

Sharpie commented Mar 27, 2012

Does this work on Leopard? If not, an error needs to be added.

@fabiomcosta
Copy link
Contributor Author

Hmm, I'm not sure, I'm running Snow Leopard, and the article says it runs on both Lion and Snow Leopard.
Is there a simple way to check if it works on Leopard?

@adamv
Copy link
Contributor

adamv commented Mar 27, 2012

Note that Phantom.js recommends not using Homebrew at all.

@MikeMcQuaid
Copy link
Member

Sure but I can't imagine he'd complain if we ship his binary.

@fabiomcosta
Copy link
Contributor Author

@adamv he doesn't recommends it because there wasn't a proper installation of phantomjs.

@fabiomcosta
Copy link
Contributor Author

As pointed out here http://ariya.ofilabs.com/2012/03/the-evolution-of-phantomjs-build-workflow.html:

This Mac OS X static build is rather popular because (1) you can freely move the executable to any machine, any place > you want (2) you don’t need to install Qt or other software, it is self-contained and guaranteed to work on a fresh install > of Snow Leopard or later version.

I'll add the check for snow_leopard or greater.

@ariya
Copy link

ariya commented Mar 28, 2012

Looks good, thanks for taking care of this! Now I can recommend brew for PhantomJS Mac users :)

One minor thing: Info.plist should be in the same place (see http://code.google.com/p/phantomjs/issues/detail?id=281), otherwise Dock icon might appear. Unfortunately Info.plist will be too generic to be placed in the $prefix/bin (and I don't have any solution for this).

@Sharpie
Copy link
Contributor

Sharpie commented Mar 28, 2012

Unfortunately Info.plist will be too generic to be placed in the $prefix/bin (and I don't have any solution for this

Install phantomjs and Info.plist to libexec and then link phantomjs from libexec to bin.

@fabiomcosta
Copy link
Contributor Author

@Sharpie, just did that and it still does not work.

@fabiomcosta
Copy link
Contributor Author

@Sharpie this is what I did https://gist.github.com/2223256 , as you proposed, and still didn't work.
Still, I don't think this should block the pull request.

@ariya
Copy link

ariya commented Mar 29, 2012

I suggest solving the possible appearance of Dock icon as early as possible. Otherwise PhantomJS issue tracker/forum might receive the user's notice again and I don't like to answer "..because you are using Homebrew...".

@MikeMcQuaid
Copy link
Member

@fabiomcosta Your latest gist works for me. Force-push it here and I'll commit it.

@fabiomcosta
Copy link
Contributor Author

@MikeMcQuaid it works but the dock icon still shows up for me. Did it show up for you?

@MikeMcQuaid
Copy link
Member

The dock icon is meant to show up so that's good :) It shows up for me.

@fabiomcosta
Copy link
Contributor Author

One minor thing: Info.plist should be in the same place (see http://code.google.com/p/phantomjs/issues/detail?id=281), otherwise Dock icon might appear. Unfortunately Info.plist will be too generic to be placed in the $prefix/bin (and I don't have any solution for this).

:/

@MikeMcQuaid
Copy link
Member

With it and the executable in libexec and the executable symlinked and run as "phantomjs" (rather than a direct path) it works for me.

@fabiomcosta
Copy link
Contributor Author

strange... whats your OS? I'm on Snow Leopard, doesn't work here :S the icon is showing.

@MikeMcQuaid
Copy link
Member

The icon is meant to show! Please just update the pull request.

@fabiomcosta
Copy link
Contributor Author

@MikeMcQuaid the icon is not meant to the shown, thats what is being requested on the the link that @ariya posted http://code.google.com/p/phantomjs/issues/detail?id=281

@MikeMcQuaid
Copy link
Member

My apologies, I assumed that was a typo. I don't see any easy way of solving this and I think we just include it without it. @ariya feel free to tell them this is a limitation of the Homebrew version.

@nandub
Copy link
Contributor

nandub commented Mar 30, 2012

Per the issue http://code.google.com/p/phantomjs/issues/detail?id=281 you need to add Info.plist into the bin. I made a change to your gist see https://gist.github.com/2256743 it works now the icon does not show on the Dock anymore.

@fabiomcosta
Copy link
Contributor Author

@nandub Info.plist is too generic to be put into the bin folder, doesn't look right...

@nandub
Copy link
Contributor

nandub commented Mar 31, 2012

Agree, but this should do until someone can create a better plist. I'm not familiar with this type of files so I don't know what else to change or add.

@MikeMcQuaid
Copy link
Member

Disable the symlinking and see if it still works. If it does, we'll use that.

@MikeMcQuaid
Copy link
Member

That is the symlink of Info.plist from /usr/local/Cellar/phantomjs/1.5.0/bin to /usr/local/bin.

@nandub
Copy link
Contributor

nandub commented Mar 31, 2012

@MikeMcQuaid from the gist @fabiomcosta created I forked it then I added the Info.plist symlink, per @ariya comment, he doesn't want to see the ghost icon in the Dock.

@nandub
Copy link
Contributor

nandub commented Mar 31, 2012

"Disable the symlinking and see if it still works. If it does, we'll use that."

If you remove the Info.plist symlink then the icon will show up in the Dock, this is what @ariya is trying to avoid.

@MikeMcQuaid
Copy link
Member

Then it looks like we either merge as-is with the dock icon problem or remove Phantom JS. @adamv @mxcl @Sharpie @mistydemeo @jacknagel @ariya Thoughts?

@ariya
Copy link

ariya commented Mar 31, 2012

Dock icon should not be a showstopper, it's annoying but not critical.

If there is a way to show a message after the installation about the dock icon situation and give a link to the issue, that's a way to inform the user.

@fabiomcosta
Copy link
Contributor Author

@ariya here's how it shows ater installing:

caveat message

there you go, thank you guys for the help!

@ariya
Copy link

ariya commented Mar 31, 2012

@fabiomcosta Fabulous! :)

@MikeMcQuaid
Copy link
Member

Squashed and pushed. Thanks @fabiomcosta and @ariya!

@fabiomcosta
Copy link
Contributor Author

nice!

@ariya
Copy link

ariya commented Apr 1, 2012

@MikeMcQuaid Awesome, thanks!

@jkp
Copy link

jkp commented Apr 1, 2012

The current caveat re the dock icon: we could solve this by copying the Info.plist to the Cellar and then installing a wrapper script that calls the Cellar binary rather than symlinking....is there any reason not to do this? It works nicely.

@fabiomcosta
Copy link
Contributor Author

@jkp looks fine, it's worth a new ticket or issue. I'll try to do that when I get time.

sorin-ionescu pushed a commit to sorin-ionescu/legacy-homebrew that referenced this pull request Apr 1, 2012
Use the upstream binaries to avoid building a copy of Qt.

Fixes Homebrew#11225.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
@MikeMcQuaid
Copy link
Member

@jkp If it works: pull request please :)

@MikeMcQuaid
Copy link
Member

The wrapper script fixes this issue in 10640ea @ariya @fabiomcosta. Thanks @ronny!

@jkp
Copy link

jkp commented Apr 4, 2012

Great! Sorry, I hadn't got round to this yet - thanks for getting to it first.

@ariya
Copy link

ariya commented Apr 4, 2012

++awesome

@ronny
Copy link
Contributor

ronny commented Apr 4, 2012

Just happened to have some cycles to spare. Thanks guys!

@fabiomcosta
Copy link
Contributor Author

nice! thanks @ronny and @MikeMcQuaid

Sharpie pushed a commit to Sharpie/homebrew that referenced this pull request Sep 12, 2012
Use the upstream binaries to avoid building a copy of Qt.

Fixes Homebrew#11225.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this pull request Dec 17, 2012
Use the upstream binaries to avoid building a copy of Qt.

Fixes Homebrew#11225.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
@chrmoritz chrmoritz mentioned this pull request Sep 10, 2013
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants