diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/openttd.rb | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/Library/Formula/openttd.rb b/Library/Formula/openttd.rb index 50aa7f71e..6ea8e8fdb 100644 --- a/Library/Formula/openttd.rb +++ b/Library/Formula/openttd.rb @@ -9,15 +9,36 @@ class Openttd < Formula depends_on 'xz' def install - system "./configure", "--without-application-bundle", "--prefix-dir=#{prefix}" - system "make install" - bin.install "bin/openttd" + system "./configure", "--prefix-dir=#{prefix}" + system "make bundle" + + def install_asset(url) + ohai "Downloading asset: #{url}" + curl url, '-O' + + file = File.basename url + system '/usr/bin/unzip', '-qq', file + rm file + end + + cd 'bundle/OpenTTD.app/Contents/Resources' do + cd 'data' do + install_asset 'http://bundles.openttdcoop.org/opengfx/releases/0.3.3/opengfx-0.3.3.zip' + install_asset 'http://bundles.openttdcoop.org/opensfx/releases/0.2.3/opensfx-0.2.3.zip' + end + cd 'gm' do + install_asset 'http://bundles.openttdcoop.org/openmsx/releases/0.3.1/openmsx-0.3.1.zip' + end + end + + prefix.install 'bundle/OpenTTD.app' end def caveats; <<-EOS.undent - Note: This does not install any art assets. You will be prompted - on first run to download an asset set. - Having an original TTD CD will help. + OpenTTD.app installed to: #{prefix} + If you have access to the sound and graphics files from the original + Transport Tycoon Deluxe, you can install them by following the + instructions in section 4.1 of #{prefix}/README EOS end end |
