Skip to content

Instantly share code, notes, and snippets.

@FiXato
Forked from Narnach/openttd.rake
Created June 18, 2009 13:59
Show Gist options
  • Save FiXato/131914 to your computer and use it in GitHub Desktop.
Save FiXato/131914 to your computer and use it in GitHub Desktop.
OpenTTD Rakefile
# Rake tasks to install OpenTTD from their Subversion source.
# Note: this is used on a Macbook, so the configuration and installation are based on this.
def cmd(str)
puts str
system str
end
desc 'Configure sources for compilation'
task :configure do
cmd './configure --with-ccache --enable-strip --disable-universal --with-cocoa MAKEOPTS="-j5" CFLAGS="-pipe" CXXFLAGS="-pipe"'
end
desc 'Build the sources'
task :make => :configure do
cmd 'make'
end
desc 'Make a bundle'
task :make_bundle => :make do
cmd 'make bundle'
end
desc "Install bundle"
task :install do
cmd 'cp -r bundle/OpenTTD.app /Applications/'
end
desc 'Default to make a bundle'
task :default => :make_bundle
desc 'Update source'
task :update do
cmd 'svn up'
end
desc "Update and make bundle"
task :up => [:update, :make_bundle, :install]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment