Page 7 of 40

Posted: 10 Apr 2007 01:10
by DaleStan
Search the wiki for the word compile. Something interesting should appear.

Posted: 10 Apr 2007 06:52
by ColdIce
Yeah... thank you. Now I only have to browse 500 topics to find a program for compiling in windows! You know I asked here only because I didn't find something useful on google. Doesn't matter now, I will try to find myself a program and maybe I will find one! I will bother you later with other questions, I think, if you dont mind! :roll:

Posted: 10 Apr 2007 10:38
by TrueBrain
ColdIce: as Belugas already said just before you posted in this topic, check out:

http://wiki.openttd.org/index.php/Categ ... ng_OpenTTD

A little bit of browsing in this topic can be useful ;) I agree that searching for 'compiling' doesn't get you anywhere. I hope this helps you out. Good luck!

Posted: 11 Apr 2007 21:36
by MJS
Do I have a compiler problem if it hangs at

Code: Select all

make[1]: Leaving directory '/openttd/objs/lang'
make[1]: Entering directory '/openttd/objs/release'
[SRC] Compiling and Linking endian_check.exe
[SRC] Testing endianness for target
[SRC] DEP CHECK (all files)
make[1]: Leaving directory '/openttd/objs/release'
make[1]: Entering directory '/openttd/objs/release'
[SRC] Compiling and Linking endian_check.exe
[SRC] Testing endianness for target
[SRC] DEP CHECK (all files)
make[1]: Leaving directory '/openttd/objs/release'
and then keeps repeating these last steps, leaving and entering the /release directory, and performing DEP CHECK?

I must admit I have no experience at compiling. I am using Tortoise (no trouble there) and Cygwin on XP, and have downloaded all files to D:\Cygwin\Openttd - I hope it's not a problem this directory is underneath Cygwin itself.

Posted: 11 Apr 2007 22:54
by TrueBrain
MJS wrote:Do I have a compiler problem if it hangs at
(..)
and then keeps repeating these last steps, leaving and entering the /release directory, and performing DEP CHECK?

I must admit I have no experience at compiling. I am using Tortoise (no trouble there) and Cygwin on XP, and have downloaded all files to D:\Cygwin\Openttd - I hope it's not a problem this directory is underneath Cygwin itself.
I would personally suggest to use mingw. Not only is the resulting binary independing of any dll or other stupid jokes of cygwin, it has also been proven to work much better and stable.

Posted: 12 Apr 2007 03:04
by DaleStan
It's not Cygwin's fault you're telling it to build a Cygwin-dependent binary. Tell it to build a -mno-cygwin binary, and it'll do so.

It may, however, still be Cygwin's fault that its libpng doesn't work.

Posted: 12 Apr 2007 18:16
by MJS
DaleStan, should I interpret your reaction as pointing out that I'd better reinstall Cygwin?

Posted: 12 Apr 2007 20:47
by DaleStan
No. And, as it appears, Cygwin does not (AFAICT, without actually having built the binary, which I'm working on now) build Cygwin-dependent binaries, so that half of TrueLight's objection is no longer true.

TrueLight: As far as I can tell, Cygwin has not built Cygwin-dependent binaries since at least revision 7942. Am I missing something important?

Posted: 13 Apr 2007 18:03
by MJS
DaleStan wrote:No.
Ah, well, so then the error must be in what I am compiling - or I am making a strange error somewhere. I have already downloaded the trunk twice (using Tortoise). Each time, I proceed by moving to that folder in the Cygwin environment, type ./configure --disable-static, and then type make. Did I miss anything?



edit 14 April, 23:20 GMT: I reinstalled Cygwin, and now it compiled just fine, after I adjusted the ft2build.h file, as is so adequately explained at the wiki page on Cygwin.

I now have in my objs/release folder the complete compilation. I have copied the data folder from my regular OTTD (including all grfs) underneath it; but it won't work. When I start openttd.exe, I get a message that Windows can't start openttd as it can't locate cygfreetype-6.dll. (That file is under my cygwin\bin folder.)

Should I start openttd from within Cygwin? I've tried run openttd.exe, got a message the language files were not there, moved the \lang folder underneath the \release folder, and then when I give the command 'run openttd.exe', nothing happens - no error messages either.

edit 15 April, 0:16 GMTI guess what should work is when I copy all of my original ottd-stuff into a new folder ottd_compiled, then copy the new ottd.exe and the /lang folder into it, and then run the programme from within Cygwin using ./openttd. Excuse for not having realized earlier that I probably need all openttd files, and not just the language folder...

However, it still won't work. For some reason, I get error messages saying my grfs and my sample.cat are missing - but they're there, right in this folder :S. Any hints?

Posted: 15 Apr 2007 13:35
by MJS
Sorry for adding yet more info, but I'm quite glad to have been able to compile openttd.exe - and then finding it doesn't run because it can't find the files is a bit of a pity.

I've followed the advice that is given here to those who use a different compiler than Cygwin, and I have copied the /data and the /lang folder into the Cygwin /release folder where openttd.exe was compiled. However, now I don't get errors - just a black screen, with in the title bar 'OpenTTD r9621M'. (Have never seen the M before, but it might not be important at all.) Then, nothing. I run ./openttd from within Cygwin. Any suggestions?

Posted: 15 Apr 2007 21:34
by TrueBrain
MJS wrote:(..)(Have never seen the M before, but it might not be important at all.)(..)
The M simply means you have local modifications :) The rest I can't help you with...

Posted: 16 Apr 2007 02:23
by glx
openttd.exe should be in bin (it's automatically copied in this dir)

--disable-static means you'll need the dlls, and they should be in your path. So if they are only in cygwin path, you should start openttd from cygwin.

Posted: 17 Apr 2007 15:31
by JamieLei
I seem to have problems merging and compiling
I have both windows and linux although i'm much more competent in windows
Whenever I try to merge the source and the patch, this happens (pic1)
therefore when i compile using cygwin, i get these errors (pic2), and when i try to load OpenTTD i get these errors (pic3). Could anyone help?

Posted: 17 Apr 2007 23:34
by kaan
JameiLei wrote:I seem to have problems merging and compiling
I have both windows and linux although i'm much more competent in windows
Whenever I try to merge the source and the patch, this happens (pic1)
therefore when i compile using cygwin, i get these errors (pic2), and when i try to load OpenTTD i get these errors (pic3). Could anyone help?
pic1 is just to notify you that the code has changed in comparison to the last time you synced with the svn server, and that is what you want if you apply a patch. no trouble here.

pic2 show nothing that could cause concern. its is just warnings that the code contains variables that is never used. warnings is not the same as errors when you compile. What cant be seen by this screenshot is if the were more serius things that has happened while compiling, but since there is no mention of errors before the prompt i think it is ok.

pic3 ... i dont know anything about that.

one thing that would be nice to know is if you can compile and run the code without any modifications or patches.

Posted: 18 Apr 2007 09:00
by JamieLei
i feel really stupid now
the only cause of the errors upon startup was that i'd forgotten to copy over the grfs from the original game

thanks anyway

Posted: 23 Apr 2007 17:42
by MJS
glx wrote:openttd.exe should be in bin (it's automatically copied in this dir)

--disable-static means you'll need the dlls, and they should be in your path. So if they are only in cygwin path, you should start openttd from cygwin.
I have tried again. Compiling went wonderful, no problems there.

Now, I am still in the cygwin environment. I move to the /bin subfolder of the folder in which I typed 'make' (d:/cygwin/openttd in my case). There's an openttd.exe there; but then I get an error message (in a Windows window, not in the Cygwin command line interface) saying my language packs are missing. But they're there - right below the /bin directory is the /lang directory with everything in. I have also copied sample.cat and the other needed files (+ some other grfs) to /bin/data.

I'm sorry, I find the folder structure rather confusing. I also have a new folder /objs underneath the /openttd folder. Do I need to do anything with that?

Posted: 07 May 2007 17:35
by MJS
One more try. I've compiled everything, and I've found the /trunk/bin folder where Openttd.exe is. So in cygwin I go to /usr/src/ottd_trunk/bin, and type openttd there, right?

I get an error saying my language packs aren't properly installed. However, right underneath /bin I have got the /lang folder, with all *.lng files plus english.txt in there (as well as a few other files). Inside bin/objs there is another /lang folder, of which I have copied all contents into this lang folder as well, just to be sure... What have I done wrong?

Posted: 07 May 2007 18:47
by kaan
MJS wrote:One more try. I've compiled everything, and I've found the /trunk/bin folder where Openttd.exe is. So in cygwin I go to /usr/src/ottd_trunk/bin, and type openttd there, right?

I get an error saying my language packs aren't properly installed. However, right underneath /bin I have got the /lang folder, with all *.lng files plus english.txt in there (as well as a few other files). Inside bin/objs there is another /lang folder, of which I have copied all contents into this lang folder as well, just to be sure... What have I done wrong?
Actually you should probably copy a few cygwin dll files to the dir with openttd.exe and then try to run it from windows directly, it is a windows native file. I hope it helps, im not that much into cygwin, i use mingw myself.

Posted: 07 May 2007 19:42
by MJS
Hi kaan,

Thanks for helping me. I've copied all cygwin dlls (from Cygwins own /bin folder) to the /trunk/bin folder, and ran Openttd.exe from there.

I get just a black window, with the Ottd version number (OpenTTD r9806) in the title bar - but nothing else. Well, a ttd-style mousepointer, sometimes. It hangs immediately, and I don't see any crashlogs (does ottd provide crashlogs?)... Any further hints how I could find out what's wrong?

I've seen announcements of your new tool, and it looks promising - does it allow users to apply patches as well?

Posted: 07 May 2007 20:13
by kaan
MJS wrote:Hi kaan,

Thanks for helping me. I've copied all cygwin dlls (from Cygwins own /bin folder) to the /trunk/bin folder, and ran Openttd.exe from there.

I get just a black window, with the Ottd version number (OpenTTD r9806) in the title bar - but nothing else. Well, a ttd-style mousepointer, sometimes. It hangs immediately, and I don't see any crashlogs (does ottd provide crashlogs?)... Any further hints how I could find out what's wrong?

I've seen announcements of your new tool, and it looks promising - does it allow users to apply patches as well?
Im arfaid that i cannot help you with that problem.

As for the program i made: Yes you can include a patch.
That being said i will also have to say that this is the very first beta so im not sure if it work correctly.
The best advise i can give you is to follow the mingw instructions in the wiki witch i updated recently, i know that that works at least :)

http://wiki.openttd.org/index.php/Compiling_on_MinGW