Compiling on Windows Guide - Feedback needed

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Farbarn_Jr
Engineer
Engineer
Posts: 3
Joined: 05 Feb 2015 11:48

Re: Compiling on Windows Guide - Feedback needed

Post by Farbarn_Jr »

Hi, I'm new to compiling nml files. I've followed Trnsportman's guide, passed the path checks with flying colours. Compiled the example swedish rails grf in a tar. Now I' trying to compile the latest nightly from frissrails, which I'm going to modify into something like a nutracks for the subarctic. (personal use only)

I'm stuck at the moment GIMP has to turn the sprite xcf file into a png file, n: command not found. Further on the python (both 2.7 and 3.x) fails. I tried to change some of the scripting with no luck. Anyone any comments, I'd like to learn more about coding and development.

At the moment, I'm working on a Windows 8.1 machine. If needed I can switch to Ubuntu/Linux Mint using a VM.
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Compiling on Windows Guide - Feedback needed

Post by Eddi »

GIMP is not part of nml. if a GRF relies on this program, you must install it separately.
Farbarn_Jr
Engineer
Engineer
Posts: 3
Joined: 05 Feb 2015 11:48

Re: Compiling on Windows Guide - Feedback needed

Post by Farbarn_Jr »

Sorry to mention it, but Transportman's guide mentions GIMP as one of the programs you have to install and I've followed the guide almost to the letter, and a little beyond. It could be that it is because GIMP nowadays is GIMP 2 (yes, I've removed the space in the directory and thus in PATH).

My best guess - for what it's worth - is that scripting is outdated due to evolving auxiliary programs like GIMP(2). However I'm definitely not an expert at using GIMP or PS.
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Compiling on Windows Guide - Feedback needed

Post by Eddi »

my guess is that some path has changed, and thus cannot be found even though it is installed.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Compiling on Windows Guide - Feedback needed

Post by Transportman »

Farbarn_Jr wrote:Sorry to mention it, but Transportman's guide mentions GIMP as one of the programs you have to install
My guide does not mention GIMP as one of the programs you have to install. The full list of programs you need is:
Setting up a Windows compile environment wrote:The following programs will be installed on your computer during this guide:
*NML
*TortoiseHg
*Python (version 2.7.x)
*MinGW and MSYS
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Compiling on Windows Guide - Feedback needed

Post by Alberth »

Python 2.7?
NML uses Python 3 (at least anything recent)

You may want to update that.
Being a retired OpenTTD developer does not mean I know what I am doing.
Farbarn_Jr
Engineer
Engineer
Posts: 3
Joined: 05 Feb 2015 11:48

Re: Compiling on Windows Guide - Feedback needed

Post by Farbarn_Jr »

Sorry Transportman, GIMP was mentioned by the Friss-lads if anyone would like to build from source. Their requirements did mention Numpy and SciPy too. Scipy doesn't install with python3.x just yet... (docs say otherwise...) Numpy appears to be happy.

Still figuring out how to get it working. I'll try to edit the scipting if I got the time to figure it all out.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Compiling on Windows Guide - Feedback needed

Post by Transportman »

Alberth wrote:Python 2.7?
NML uses Python 3 (at least anything recent)

You may want to update that.
Nope, it is correct. The Python 2.7 is for the version-number script (which does not work with Python 3), and NML comes with its own Python on Windows, so it all works fine
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Compiling on Windows Guide - Feedback needed

Post by Transportman »

Just a small update, for Windows 10 with the Anniversary update it is possible to use Windows Subsystem for Linux, allowing to run bash from Windows itself. I just spend the morning getting it to work (and having to thrash the whole thing several times).

I will write a guide next week so that others can also set it up. Then my old laptop also has the update, so that I have a clean environment to work on.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Compiling on Windows Guide - Feedback needed

Post by Transportman »

Shameless triple post, I finished the guide for W10 Anniversary update, it can be found here. Any feedback is appreciated.

I have no exact timings available, but the compile time for of the 2cc Trains In NML has been greatly reduced. My laptop on which I previously used the compile set-up as described in the old guide, took 5-10 minutes to compile the set (if not longer), while with the new set-up it only took 2 minutes and 15 seconds, even beating the DevZone compile farm by 15 seconds.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Compiling on Windows Guide - Feedback needed

Post by Sylf »

Nicely done.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 9 guests