wesnoth on homebrew

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

wesnoth on homebrew

Post by iceiceice »

I took a look at this, it looks pretty cool:

http://brew.sh/

I was going to suggest that it might be a really good way to distribute wesnoth to OS X users.

However to my surprise I found that we are actually on it!

https://github.com/Homebrew/homebrew-ga ... wesnoth.rb

It looks like it hasn't been updated since wesnoth 1.11.7 though. Is anyone maintaining it? Does anyone know who is / was maintaining it?

It would be nice if we could get it updated for 1.12 release. Also, it looks to me like a good alternate solution to this topic:
http://forums.wesnoth.org/viewtopic.php?f=5&t=40551
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: wesnoth on homebrew

Post by Iris »

Moved to Release Announcements, Compiling & Installation.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
ancestral
Inactive Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: wesnoth on homebrew

Post by ancestral »

I’ve volunteered myself as a guinea pig and have been working closely with iceiceice to get this working. This is fantastic if you want/need to run the latest unreleased version.

Right now we have it building against master successfully in OS X. We're working on an option for creating an app bundle as well. This is great news for potentially automating builds.


This line installs Homebrew, a package manager for OS X; if you already have Homebrew, skip this:

Code: Select all

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The following installs Wesnoth:

Code: Select all

brew tap homebrew/games
brew install cairo --without-x11
brew install pango --without-x11
brew install --HEAD wesnoth
--HEAD means take the newest build from master. If you want the latest stable release, leave this flag out. If you want the latest development release, use --devel.

You can skip installing cairo and pango if you already have XQuartz on your computer. (If you don’t, you will need to install those using the --without-x11[ flags first, as it listed above.)

Until the bundling is finished, to open Wesnoth, you’ll start it from the Terminal by simply typing wesnoth.
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer
User avatar
FaeLord
Posts: 343
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Re: wesnoth on homebrew

Post by FaeLord »

Ok, the cairo and pango installs seemed to have gone well. However, when I did

Code: Select all

brew install wesnoth
I got an error: No available formula for wesnoth.

Any ideas?
Wesnoth stole my summer . . . again.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: wesnoth on homebrew

Post by iceiceice »

Try

Code: Select all

brew tap homebrew/games
maybe?
User avatar
FaeLord
Posts: 343
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Re: wesnoth on homebrew

Post by FaeLord »

Didn't have git. It's installing wesnoth now. We'll see how it pans out. :twisted:

Thanks
-=FL=-
Wesnoth stole my summer . . . again.
User avatar
FaeLord
Posts: 343
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Re: wesnoth on homebrew

Post by FaeLord »

Installed 1.12 and the build completed. Upon trying to launch from terminal I got:

Code: Select all

20141227 17:06:22 error filesystem: Failed to dereference /proc/self/exe: No such file or directory
20141227 17:06:23 error filesystem: Could not open '/Users/mac/.wesnoth1.12/preferences' for reading.
Data directory: /usr/local/Cellar/wesnoth/1.12/share/wesnoth
User configuration directory: /Users/mac/.wesnoth1.12
User data directory: /Users/mac/.wesnoth1.12
Cache directory: /Users/mac/.wesnoth1.12/cache
Illegal instruction
:doh:
Wesnoth stole my summer . . . again.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: wesnoth on homebrew

Post by iceiceice »

Hmm... unfortunately I have no idea what Illegal instruction means here... I have never seen wesnoth make that error before.

I think the /proc/self/exe and preferences errors are a red herring, most likely the final error means either "broken library" or "segfault" essentially...

Most likely the only way to make sense of this is to post a core dump from the program, if you do I will try to boot it up and see what is broken.

http://stackoverflow.com/questions/9412 ... n-mac-os-x
http://stackoverflow.com/questions/2080 ... n-mac-os-x

The other thing you can try is to build without the "boost filesystem" option... I tweaked the brew formula for wesnoth to do this, you can try to install my modified version with

Code: Select all

brew install https://gist.githubusercontent.com/cbeck88/49b0de6ab31fe5f4260a/raw/4c11b0bbd6b06f170b28ccad5989e5f37b69c1e0/wesnoth.rb
It's a shot in the dark, but this uses the older libs so it might help.
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: wesnoth on homebrew

Post by Iris »

FaeLord wrote:

Code: Select all

20141227 17:06:22 error filesystem: Failed to dereference /proc/self/exe: No such file or directory
[...]
Illegal instruction
iceiceice wrote:Hmm... unfortunately I have no idea what Illegal instruction means here... I have never seen wesnoth make that error before.
That message comes from the shell, not Wesnoth. It means that the Wesnoth process got terminated with SIGILL (signal 4), which is usually raised on Unix-like systems if the processor attempts to execute an invalid opcode (#UD/fault 06h on x86/x86_64). This would likely be the case if you built Wesnoth or one of its dependencies with compiler options that emit code your processor does not recognize while the binary image itself is deemed compatible at exec time (e.g. attempting to run code built with -m32 -march=ivybridge on an Intel 486).
iceiceice wrote:I think the /proc/self/exe and preferences errors are a red herring, most likely the final error means either "broken library" or "segfault" essentially...
The /proc/self/exe warning being printed at all is an oversight in the Boost.filesystem-based filesystem code. This will be fixed in 1.12.1 (commit).
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: wesnoth on homebrew

Post by iceiceice »

The other thing you might try is, if homebrew doesn't technically support your architecture (I think its supposed to be 10.6+ ...) you can try to use "tigerbrew", a fork by one of the homebrew devs which aims to support 10.4+. I think you can most likely use the same wesnoth formulas, its just that all the build scripts for the dependencies might be tweaked slightly to suport ppc.

https://github.com/mistydemeo/tigerbrew
User avatar
ancestral
Inactive Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: wesnoth on homebrew

Post by ancestral »

FaeLord, let us know if you tried Tigerbrew or if that doesn’t work.
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer
User avatar
FaeLord
Posts: 343
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Re: wesnoth on homebrew

Post by FaeLord »

I did Tigerbrew intially. I'll try the rest when I have a few moments. Sadly my vehicle has broken down twice in a row or I would have just bought a new computer at this point.
Wesnoth stole my summer . . . again.
Post Reply