OpenGFX+ Trains ----------------------------------- This version: OpenGFX+ Trains 0.1.0 Contents: 1 About 2 Quickstart 3 Build requirements 4 Building from source 4.1 Setup 4.2 Speed issues 5 License 6 Credits ------- 1 About ------- OpenGFX+ Trains enhances the rolling stock. Designed to work match OpenGFX style Name of this Repo: OpenGFX+ Trains 0.1.0 Repository version: 54 GRF_ID: "OG+" 02 MD5 sum: 6cdf0ea9bd0a630ec4d978c90d7e4f19 ogfx-trains.grf -------------- 2 Quickstart -------------- Copy the grf in your data dir and activate it. -------------------- 3 Build requirements -------------------- This Makefile system is easiest to setup if you employ a certain directory structure for your NewGRF project. Clone this project and fill in your NewGRF content. Make sure to adopt Makefile.config to your needs. Requirements for running this Makefile successfully: NML (only nml-style project) gcc md5sum (or md5 on Mac) make mercurial (recommended) python (recommended) If you want to bundle the grf, you'll need additionally tar zip bzip2 unix2dos (optional) Windows only: On Windows systems this means that you'll need to install MinGW and MSys in order to obtain a posix compatible environment. Then the makefile can be called the very same way as it is on linux and mac systems. MinGW/MSys contain the above mentioned programmes (except renum and grfcodec of course) and can be obtained from http://www.mingw.org/ That site also features an excellent walk-through o how to install it. If you use for OpenTTD data folder a non-default path or Windows with a non-English localization make sure to copy Makefile.local.sample to Makefile.local and edit the line with INSTALLDIR = accordingly so that it shows the full path to your OpenTTD / TTDP data directory. ---------------------- 4 Building from source ---------------------- Before this build system can be applied to a newgrf, you have to adopt a few lines in Makefile.config, mainly you'll have to replace "mynewgrf" by the actual name of your newgrf. Also make sure to change that in the .hgignore file. If the Makefile is too slow, you may try different dependency checks or skip those completely. Available options for dependency generation are: mdep: uses a python script. Default when used in a hg repository normal: uses gcc and bash to scan for dependencies none: disable the dependency generation (mostly) Makefile.local allows to choose the method via the declaration of DEP_CHECK_TYPE. The Makefile offers different targets. A brief overview is given here: all: This is the default target, if also no parameter is given to make. It will simply build the grf file, if it needs building depend: Re-run the dependency check. Usually not manually needed. docs: Build the documentation files bundle: This target will create a directory called "-nightly" and copy the grf file there and the documentation files, readme.txt, changelog.txt and license.txt bundle_zip This will zip the bundle directory into one zip for distribution bundle_tar This will tar the bundle directory into a tar archive for distribution or upload to bananas bundle_src Creates a source bundle install: This will create a tar archive (like bundle_tar) and copy it into the INSTALLDIR as specified in Makefile.local (or the default dir, if that isn't defined). Don't rely on a good detection of the default installation directory. It's especially bound to fail on windows machines. distclean: This phony target cleans everything from a source bundle which wasn't shipped. clean: This phony target will delete all files which this Makefile will create mrproper: This phony target will delete also all directories created by different Makefile targets remake: It's a shortcut for first cleaning the dir and then making the grf anew. addcheck: Check whether there are some files required but not part of the repository. check: Check the md5sum of the built newgrf against the supplied md5sum (Intended to be used when building from tar balls) 4.1 Setup --------- You'll need to adopt the repository to your new NewGRF. There are a few files which need modification: - Makefile.config - .hgignore - docs/changelog.ptxt - docs/readme.ptxt - docs/license.ptxt (you may choose GPL v2 or newer, if you use this template newgrf and build system) Further it can be recommended to use the hgeol extension of mercurial (for versions newer than 1.5.4). See http://mercurial.selenic.com/wiki/EolExtension for details. Using the default configuration is often fine, just edit your .hgrc and add this extension: [extensions] eol = 4.1 Speed issues ---------------- A note concerning the speed of the makefile: It seems that the required tools using MinGW and / or msys are thoroughly slow on windows. A few example run times for OpenGFX, same processor type (both core 2 duo, 2.26GHz for the windows machine, 2.0 GHz for the OSX machine). Note that the values given are the 'real' time. Even though this varies more and is dependent on the processor load, that's what you have to wait for; the 'user' times are quite low on the windows machine (~16s), but that by no means reflects the build time. Times are from OpenGFX r539 with makefile r199. DEP_CHECK_TYPE windows bash native native in VM (OSX) none 1m23.360s - 0m32.781s mdep 1m54.484s 0m30.164s 0m33.807s normal 2m37.857s - 0m36.528s --------- 5 License --------- This NewGRF was written by Ingo von Borstel (aka planetmaker) and is free to use for anyone under the terms of the GNU Pulic License v2 or higher. See license.txt. The source code can be obtained from the #openttdcoop DevZone at http://dev.openttdcoop.org/projects/ogfx-trains or via mercurial checkout hg clone http://hg.openttdcoop.org/ogfx-trains --------- 6 Credits --------- Authors: Lead programmer: Ingo von Borstel (aka planetmaker) General coding: Terkhen Graphics: Toyland rail wagons: molace Temperate rail wagons: buttercup, DanMacK, Uzurpator, Zephyris Tropical rail wagons: buttercup, DanMacK, Uzurpator, Zephyris Arctic rail wagons: buttercup, DanMacK, Uzurpator, Zephyris Single trains and consits: Turner Turbo train: DanMacK Special thanks to #openttdcoop and especially Ammler who provides and works a lot on maintaining the Development Zone where this repository is hosted and who also frequently gives much valuable input. Thanks also to Alberth, Terkhen Yexo, Rubidium and Ammler who frequently give valuable input in form of advice and patches to this project. Last but not least thanks to all the NewGRF authors whose NewGRFs can be my playground for this project.