As promised, a set of instructions for getting all that's needed for compiling FIRS and perhaps other stuff too. Let's call this the first draft.
Please feel free to make any comments and suggestions. This can of course be copied elsewhere if you wish...free and gratis. A credit would be nice. I know formatting is essentially non-existent at the moment.
==================================================================
Compiling FIRS - For novices - For Windows.
Novices refers to those who haven't tried something like this before. This installation was done on windows XP. I have a feeling that some aspects of this setup will not function in W98 (if anyone is still using that) so Win XP is the absolute minimum...and that's becoming obsolete.
-------------------
You
NEED the following. If something is missing or not properly installed then the compile won't work. Trust me, I know.
MinGW. See the wiki page for installing this.
http://wiki.openttd.org/Compiling_on_Wi ... troduction
(Other compiliers are available but the wiki has comprehensive instructions for MinGW)
These are the files I downloaded and the locations. You should get the latest stable versions unless indicated otherwise.
NML 0.3.0 or later.
http://bundles.openttdcoop.org/nml/releases/
Python 2.7.6 (THIS version, not a later version).
https://www.python.org/downloads/
Setuptools (needed to install Chameleon and Markdown).
https://pypi.python.org/pypi/setuptools#downloads setuptools-3.4.4.zip
Chameleon (templates).
https://pypi.python.org/pypi/Chameleon Chameleon-2.15.tar.gz
Markdown (text to html).
https://pypi.python.org/pypi/Markdown Markdown-2.4.zip or Markdown-2.4.tar.gz
Tortoisehg (source management system).
http://tortoisehg.bitbucket.org/download/windows.html version 2.11.2
Tortoise docs
http://tortoisehg.readthedocs.org/en/latest/index.html
FIRS source code (all of it)
http://dev.openttdcoop.org/projects/firs hg checkout clone via tortoisehg
This is used to pull the source to your machine and 'manage' it correctly. Read the tortoise docs!
Download all of these.
---------------------------------------
Install MinGW (See the wiki page as indicated above)
Install Python 2.7 (fairly easy). Just install it where you like.
Unpack Chameleon, Markdown and Setuptools into the Python folder. I put them into a folder I called Scripts but I'm not sure if that is right or necessary. It may well be fine to have them in their own folders.
Open a command prompt and move across to setuptools folder. (I'm presuming you know how to do that?)
'type' python setup.py install
This will install the program from the files you just extracted.
That should install setuptools. If it works, lots of text will scroll in the window. Look out for any indication of errors. That's not what you will be wanting to see. (If python can't be found then see below "Setting the paths")
Now move over to the Chameleon folder and do the same command. Check for error reports.
Now move over to the Markdown folder and do the same command. Check for error reports.
Unpack the NML files into a folder. I called mine NML.
The Firs sourcecode should be downloaded. It is generally best to use TortoiseHG (or some similar system) to get a proper version of the source. That's what I did. Doing it this way ensures that you get ALL the latest code in the correct folders, and in one go. You may need to read some documentation to get this right.
That should be the end of the installations.
----------------
Setting the paths:
You need to ensure that the necessary paths are added so that when you issue commands, the correct files can be found by the operating system.
To do this, rightclick "My Computer", select "Properties", "Advanced", "Environmental Variables"
Look for "Path" in the lower window. Select that line and click "Edit".
Now CAREFULLY add the necessary paths for Python, MinGW and NML... separated with a semicolon and obviously relevant for your installation. Don't use \utils\ if you put them in \programs\ !! Also don't erase the current path selection. It's easy to do if you're not careful. If in doubt, press CANCEL and have another try.
Example >>> (existing paths);c:\utils\nml;c:\utils\python;c:\utils\MinGW
----------------
You can now migrate (in the console window) to the firs folder where there will be a file called 'makefile'. To properly test the system, let's compile the current version of the code.
'type' make
The firs source should now be compiled into a huge 13meg+ file (firs.nml), a firs.grf file (this is the one you need) and a firs.tar file. Compiling takes a few minutes, depending on how powerful your PC is...
If you got this far, congratulations. Now if you're so inclined you can make changes to the Firs source and recompile to have a new grf with your personal modifications. It's likely you will need to research NML and possibly python to understand the current code and allow you to understand the changes you make.
Finally, this should open the gate to obtaining source code for other grf files and making changes there too. If you wish to help someone with their grf, just ask them, I'm sure they will appreciate the help.
You can now also compile the ottd source and that opens up a whole world of coding. You can modify existing code and write your own patches.