Skip to content

Instantly share code, notes, and snippets.

@Narnach
Created June 18, 2009 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Narnach/131913 to your computer and use it in GitHub Desktop.
Save Narnach/131913 to your computer and use it in GitHub Desktop.
# 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