Page 1 of 17

BuildOTTD

Posted: 07 May 2007 08:45
by kaan
Hi all

I made a little program that should ease the life of playtesters.
It is a pointy clicky interface to getting and building the source, made for windows.
It is build on top of MinGW and provides everything you would need to get the source, patch it and compile it. It is very much still in beta but I have got to a point where some external testing would be useful.

Version 1.0-RC1
Get it here (~12mb):
https://sourceforge.net/projects/bottd/

Install notes:
Please remember to install to a path without any spaces in it, like C:\BuildOTTD
You should also make sure that you have Microsoft .NET 2.0 framework installed.
You can find it here: http://www.microsoft.com/downloads/deta ... laylang=en

New in 1.0-RC1
Readme updated.
SDL removed.
Now retrieving branch and tags information from openttd.org instead of hardcoded values.
Enlarged Update and Compile button.

New in 0.4.0
Updated the user interface
Program will now work even if called from another working directory
Desktop shortcut now working
New icon (made by Zephyris)

New in 0.3.0
Lots of things has happened and this release is very near version 1.0.0 now.
The finished build is now copied to a userdefineable destination along with the buildlogs. Now also for the old make system.
Ability to grab the needed files from a *TTD install and copy them to the same destination as the compiled exe. This means that you can make ready to play builds in one click. Relevant settings in the options panel.
Better error message when not online (graceful exit)
Bugfix: Updating the source now works even if you previously made a mess of things with some patch :P
Added option to build latest nightly
New installer that almost halved the size of the install file (thanks Desolator)

New in 0.2.0
The finished build is now copied to a userdefineable destination along with the buildlogs. This is only implemented for the new make system though.

New in 0.1.5
Options panel
Bugfixes
A bit of this and that :P

New in 0.1.4
Added a Purge button that will delete the local source tree of the branch selected.
Some UI clean-up as well as some code clean-up (no more uncaught exceptions).

New in 0.1.3
Old make works now
Shiny new about box
logging make process now instead of showing it in a shell

Posted: 07 May 2007 09:00
by CMircea
Rapidshare. I can host it too, but this doesn't seem so useful to me, s you can simply install MSVC++ and you can compile any C* (C, C#, C++) application.

Posted: 07 May 2007 09:07
by kaan
Desolator wrote:Rapidshare. I can host it too, but this doesn't seem so useful to me, s you can simply install MSVC++ and you can compile any C* (C, C#, C++) application.
Most non-programmers don't really know how to use MSVC++, and besides its a 600+ mb download with directxSDK and all. Ill bet that these facts keep a lot of potential playtesters from actually trying it out. Additionally most people who get that far has a lot of problems applying a patch, if the sticky is to be believed.

I will look at rapidshare, thank you for the tip :)

Posted: 07 May 2007 14:10
by Psistorm
so basically, all you would need to compile the OTTD source + any patch would be this program? if so, this is a huge step forward to me, and Ill definitely use this program to test out patches :D

and I agree, most people cant use and/or dont want to bother with setting up such a large application to compile. so this program does come in very very handy!

Posted: 07 May 2007 15:37
by kaan
Psistorm wrote:so basically, all you would need to compile the OTTD source + any patch would be this program?
Yes, that is the idea, i sure do hope it works on other computers than my own ;)
if so, this is a huge step forward to me, and Ill definitely use this program to test out patches :D

and I agree, most people cant use and/or dont want to bother with setting up such a large application to compile. so this program does come in very very handy!
I look forward to hear about your experiences :)

Posted: 07 May 2007 15:43
by DeletedUser21
Wow, this will greatly improve beta testing on the forum! Can someone make this sticky? Normally people wait until binaries arrive (and then that is always too late because the testing has been done then) but now you can do it yourself in a few easy steps. :)

Posted: 07 May 2007 15:44
by TrueBrain
This is a very nice project! If you like, we do anyway, we would love to host this project within the openttd.org domain. This means including source files you used, and some documentation how to get it all to work ;) If you are interested, and I can't say it enough: we are, please do contact me. If possible via IRC (OFTC.net, #openttd, TrueBrain), or via email (truelight at openttd dot org).

Nice job, and keep up the good work :)

Posted: 07 May 2007 18:13
by CMircea
Hmm, everyone seems to like this. I gotta check it.

Posted: 07 May 2007 21:16
by gkirilov
kaan wrote:
Desolator wrote:Rapidshare. I can host it too, but this doesn't seem so useful to me, s you can simply install MSVC++ and you can compile any C* (C, C#, C++) application.
Most non-programmers don't really know how to use MSVC++, and besides its a 600+ mb download with directxSDK and all. Ill bet that these facts keep a lot of potential playtesters from actually trying it out. Additionally most people who get that far has a lot of problems applying a patch, if the sticky is to be believed.
You have no idea how right you are.
I hate the fact that i have to dl the MSVC++ and then some separate libraries. I used the cygwin and then mingw but it's just too much effort to install.
And sometimes I just can't wait until 20h to get the next nighly :D
Anyway, big thanks. I'll test it right now.

Posted: 07 May 2007 21:48
by ThunderAI
Compile failed on 9812.

Dirctory installed in:

G:\MPS\opentt_source

any ideas as to why?

there was no patch selected, just the default settings

Posted: 07 May 2007 21:58
by kaan
ThunderAI wrote:Compile failed on 9812.

Dirctory installed in:

G:\MPS\opentt_source

any ideas as to why?

there was no patch selected, just the default settings
did you remember to run setupfstab.exe first?

Posted: 07 May 2007 22:06
by ThunderAI
kaan wrote:
ThunderAI wrote:Compile failed on 9812.

Dirctory installed in:

G:\MPS\opentt_source

any ideas as to why?

there was no patch selected, just the default settings
did you remember to run setupfstab.exe first?
yup, i uninstalled it, then installed it again ran the setupfstab.exe it opened a command window then it closed. I ran the proper exe, downloaded and compiled the source and it crashes with this displayed:

Image

Posted: 07 May 2007 22:18
by kaan
Thank you very much for this detailed error report.
I don't know why this happened, but I will do my best to find out.

Posted: 07 May 2007 22:27
by ThunderAI
kaan wrote:Thank you very much for this detailed error report.
I don't know why this happened, but I will do my best to find out.
Just tryed it again, removed the directory after unsinstalling, then reinstalled, ran the two exes in order. Downloaded then comiled. same error.

I noticed it said some directories are missing and there are some code errors.

update:
fails on 9811 as well.
Here are three different errors about directories:
Image

Image

Posted: 07 May 2007 22:41
by kaan
I just tried to install to the same path that you used and i compile no problems.

the exe made some log files, could you post them? (svn.log etc.)
What version of windows do you have?

I will do some more tests but its getting late and im soon going to bed :)

Edit: also this file would be useful
c:\BuildOTTD\msys\home\ottdsrc\trunk\config.log

Posted: 07 May 2007 23:01
by ThunderAI
kaan wrote:I just tried to install to the same path that you used and i compile no problems.

the exe made some log files, could you post them? (svn.log etc.)
What version of windows do you have?

I will do some more tests but its getting late and im soon going to bed :)

Edit: also this file would be useful
c:\BuildOTTD\msys\home\ottdsrc\trunk\config.log
I must be doing something wrong because i can not get it to work, here are the logs

Code: Select all

Running configure with following options:

/usr/bin/sh ./configure --ignore-extra-parameters --build="" --host="" --cc-build="" --cc-host="" --cxx-build="" --cxx-host="" --windres="" --strip="" --awk="awk" --lipo="" --os="DETECT" --revision="" --endian="AUTO" --config-log="config.log" --prefix-dir="/usr/local" --binary-dir="games" --data-dir="share/games/openttd" --icon-dir="share/pixmaps" --personal-dir="" --install-dir="/" --custom-lang-dir="" --second-data-dir="" --enable-install="0" --enable-debug="0" --enable-profiling="0" --enable-dedicated="0" --enable-network="1" --enable-static="1" --enable-translator="0" --enable-assert="1" --enable-strip="1" --with-osx-sysroot="1" --enable-universal="1" --enable-osx-g5="0" --enable-unicode="1" --with-application-bundle="1" --with-sdl="1" --with-cocoa="1" --with-zlib="1" --with-png="1" --with-makedepend="1" --with-direct-music="1" --with-sort="1" --with-iconv="1" --with-midi="" --with-midi-arg="" --with-libtimidity="1" --with-freetype="1" --with-fontconfig="1" --with-psp-config="1" --CC="" --CXX="" --CFLAGS="" --LDFLAGS=""

Detecing awk...
Trying: echo "a.c b.c c.c" | tr ' ' \\n |  awk ' { ORS = " " } /\.c$/   { gsub(".c$",   ".o", $0); print $0; }' 2>/dev/null
Result: 'a.o b.o c.o '
checking awk... awk
checking build system type... CC/CXX not set (skipping)
executing gcc -dumpmachine
  returned mingw32
  exit code 0
checking build system type... mingw32
checking host system type... CC/CXX not set (skipping)
executing gcc -dumpmachine
  returned mingw32
  exit code 0
checking host system type... mingw32
detecting OS... MINGW
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... CC/CXX not set (skipping)
executing g++ -dumpmachine
  returned mingw32
  exit code 0
checking build c++... g++
checking host c++... CC/CXX not set (skipping)
executing g++ -dumpmachine
  returned mingw32
  exit code 0
checking host c++... g++
checking host windres... CC/CXX not set (skipping)
executing windres -V
  returned GNU windres 2.16.91 20060119
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  exit code 0
checking host windres... windres
checking host strip... CC/CXX not set (skipping)
executing strip -V
  returned GNU strip 2.16.91 20060119
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  exit code 0
checking host strip... strip
executing makedepend -f makedepend.tmp
  returned 
  exit code 0
checking makedepend... not found
checking static... yes
checking unicode... yes
using debug level... no
executing sdl-config --version
  returned 1.2.8
  exit code 0
checking SDL... found
checking COCOA... not OSX, skipping
checking GDI video driver... found
checking dedicated... not selected
checking network... found
checking translator... no
checking assert... enabled
detecting zlib
  trying /usr/include/zlib.h... no
  trying /usr/local/include/zlib.h... found
  trying /lib/libz.a... no
  trying /usr/lib/libz.a... no
  trying /usr/local/lib/libz.a... found
checking zlib... found
executing libpng-config --version
  returned 1.2.8
  exit code 0
checking libpng... found
executing freetype_config --version
  returned 
  exit code 127
checking libfreetype... not found
checking libfontconfig... WIN32, skipping
checking iconv... not OSX, skipping
checking psp-config... not PSP, skipping
detecting libtimidity
  trying /usr/include/timidity.h... no
  trying /usr/local/include/timidity.h... no
checking libtimidity... not found
checking direct-music... not found
running echo <array> | sort
  result was valid
checking sort... sort
checking endianess... AUTO
suppress language errors... no
checking stripping... strip -s
checking OSX sysroot... not OSX, skipping
checking OSX application bundle... not OSX, skipping
checking revision... svn detection
using CFLAGS...  -DMINGW -DWITH_REV -O2 -fomit-frame-pointer -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -mno-cygwin -DWIN -DWITH_SDL -Ic:/bottd/mingw/include/SDL -Dmain=SDL_main -DWITH_ZLIB -DWITH_PNG  -I/mingw/include/libpng12  -DUNICODE -D_UNICODE -DENABLE_NETWORK  -Wstrict-prototypes -Wdeclaration-after-statement -Wold-style-definition
using LDFLAGS... -lstdc++ -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 /usr/local/lib/libz.a -L/mingw/lib -lpng12 -lz   -mno-cygwin -Wl,--subsystem,windows -static

Posted: 08 May 2007 08:04
by gkirilov
ThunderAI wrote: ...
The error is about only 1 file sdl.h. And if you check the source you'll see that the file is NOT missing. I don't know why the compiler is complaining :?:

p.s. I got the same error.
p.s. IF you have the opportunity can you check-out the trunk with TortouseSVN at the same directory BuildOTTD uses and then use the BuildOTTD to compile.

Posted: 08 May 2007 10:17
by kaan
gkirilov wrote: The error is about only 1 file sdl.h. And if you check the source you'll see that the file is NOT missing. I don't know why the compiler is complaining :?:

p.s. I got the same error.
p.s. IF you have the opportunity can you check-out the trunk with TortouseSVN at the same directory BuildOTTD uses and then use the BuildOTTD to compile.
Thank you for confirming this error. I still cannot replicate it unfortunately. What windows version do you have?

Strange that it works when you use tortoiseSVN, I cant really begin to guess why :(

Could you please attach svn.log here?

Posted: 08 May 2007 10:47
by kaan
I just tried to run it on a Windows Vista x64 and that did make an entire new set of errors for me to think about ;)

Posted: 08 May 2007 10:49
by peter1138
gkirilov wrote:The error is about only 1 file sdl.h. And if you check the source you'll see that the file is NOT missing. I don't know why the compiler is complaining :?:
Note that SDL.h is NOT the same as sdl.h...