aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMichael Lapinsky2011-04-20 01:15:38 -0700
committerAdam Vandenberg2011-08-11 11:27:07 -0700
commit73d3edc804fd92d18eb466574f6847799aaa455c (patch)
tree3b398d4284c71e1e8d3c0620706e563cb43a884a /Library
parentf047187477ec6bf25e959d7053adfffdf7c45781 (diff)
downloadhomebrew-73d3edc804fd92d18eb466574f6847799aaa455c.tar.bz2
openttd: change to application bundle with open content packs
- Builds an application bundle instead of the CLI launcher - Downloads OpenGFX, OpenMSX and OpenSFX and installs them in the bundle - Updated the caveats to reflect the Open* packs and point you to instructions to install the original assets Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/openttd.rb33
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