Page 53 of 154
Re: Cargo Distribution
Posted: 29 Nov 2009 16:49
by petert
OpenTTD uses quite a few branches in SVN and HG (see:
http://hg.openttd.org/), I don't see why those can't be used.
Re: Cargo Distribution
Posted: 29 Nov 2009 16:56
by jub
I didn't say, that they cannot be used, I can only say that git handles branches differently than HG. For example if you get cargodist branch from fonso's repository, you get only that branch and nothing else. In HG you would get by pull command all branches. But I'm not saying that this is the reason why fonso uses git.
Re: Cargo Distribution
Posted: 29 Nov 2009 17:07
by petert
Ahh, Ok.
On another note: Congratulations on being the replied to topic in the entire OpenTTD Development section! Over 1000 replies.
Re: Cargo Distribution
Posted: 30 Nov 2009 09:47
by fonso
With git it takes about a second to create a branch. I can keep those local if I want and I create and delete them all the time when I work. Usually if I want to try something new I open a branch, hack around some and then either make that permanent or remove it again. Also I can choose which branches to push and which branches to keep local. In my local repository I have about 3 times the amount of branches you see in the public repository. I don't think that any other VCS can handle that as nicely as git. The speed problem is because you only get the http transport protocol from the public repository. For me (as I have more privileges there) it's no problem. I'll see if I can offer you the native git protocol.
Re: Cargo Distribution
Posted: 30 Nov 2009 10:22
by tsjook
The debug symbols build (sloooow) crashed.
It's probably a grf handling error which has nothing to do with Cargodist, as can be seen on the screenshot included.
edit: Possible cause: new (uncompatible) handling of station newgrfs.
Default number of platforms selected is always 2, which actually builds just 1 platform. When clicking 1 @ number of platforms, game crashes as posted above. Not limited to Canadian stations set.
edit2: Bug also occurs when no station newgrfs are loaded at all.
Re: Cargo Distribution
Posted: 30 Nov 2009 10:34
by Hamilton2007
I got notifications of HEQS 0.5c.grf on the debug version, but it was to slow to have fun playing any further, so playing r18286 again, removed the HEQS grf and untill now no crash..
Re: Cargo Distribution
Posted: 30 Nov 2009 11:20
by Gremnon
fonso wrote:I'll see if I can offer you the native git protocol.
Speed isn't the only issue.
My laptop doesn't have the space to spare that git needs for pulling in the main cargodist branch.
Well, it does, if I don't want to do anything else on it at all.
This is why I like HG/SVN - I check out one revision only, nothing extra, GIT seems to me to pull in everything, even stuff I didn't ask for, want, or need.
Re: Cargo Distribution
Posted: 30 Nov 2009 11:44
by fonso
Gremnon wrote:
Speed isn't the only issue.
My laptop doesn't have the space to spare that git needs for pulling in the main cargodist branch.
Code: Select all
~/fonsinchen/openttd.git $ du -hs .
120M .
The whole repository is 120 MB in size. If your space is that limited I really can't help you. If it takes up much more space on your machine you're doing something wrong. Maybe try "git gc" occasionally.
Re: Cargo Distribution
Posted: 30 Nov 2009 12:12
by fonso
tsjook wrote:The debug symbols build (sloooow) crashed...
Yes, I can reproduce this one. It has been fixed in trunk with r18286. The fix is already merged into my repository. Please update to a newer version. However, as the bug was only introduced with r18280 and is fairly obvious I don't believe this is the crash we're looking for.
Re: Cargo Distribution
Posted: 30 Nov 2009 13:30
by Terkhen
Here is a new debug build, updated to the r18325 version of cargodist.
Edit: The PDB file is only required for debugging. You don't need to download it to test cargo distribution.
Edit2: Build outdated.
Re: Cargo Distribution
Posted: 30 Nov 2009 13:36
by petert
You're very lucky that you're able to build using MSVC, I've had lots of problems with it.
Re: Cargo Distribution
Posted: 30 Nov 2009 14:16
by Creat
petert I really don't understand why though. I've never had any issues with it. It should work pretty much out of the box, especially if you're using git to get the cargodist-sources...
Could you maybe be a bit more specific what keeps going wrong? Someone might actually be able to help

Re: Cargo Distribution
Posted: 30 Nov 2009 14:51
by petert
I don't understand these steps:
Code: Select all
Add the DirectX headers subdirectory through the openttd project properties -> C/C++ -> General -> Additional Include Directories
Add the DirectX SDK Lib subdirectory through the openttd project properties -> Linker -> General -> Additional Library Directories
There is no C/C++ directory in the project properties:
Re: Cargo Distribution
Posted: 30 Nov 2009 14:53
by Rubidium
That's because the message says "openttd project" and you show the "openttd solution", which also hints that there is an "openttd project".
Re: Cargo Distribution
Posted: 30 Nov 2009 15:30
by petert
Ok, so I've built the debug version of regular trunk, the build log can be found here (there was one warning):
http://petert.freeforums.org/download/file.php?id=31
Also, what is the point of all these object files? I have a debug build which I just opened, then all these object files. How do I build a regular version (with all the directories in one place)? Using the configuration Release? (The reason I doubt that is because I assume you use that for major releases like 0.7.3 and not patched builds)
Re: Cargo Distribution
Posted: 30 Nov 2009 15:51
by petert
I've also gotten the following error:
Code: Select all
3>Creating browse information file...
3>Microsoft Browse Information Maintenance Utility Version 9.00.30729
3>Copyright (C) Microsoft Corporation. All rights reserved.
3>BSCMAKE: error BK1506 : cannot open file '..\objs\Win32\Release\dmusic.sbr': No such file or directory
3>Build log was saved at "file://c:\MSYS\1.0\home\Peter\trunk\objs\Win32\Release\BuildLog.htm"
3>openttd - 2 error(s), 1 warning(s)
========== Build: 2 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Re: Cargo Distribution
Posted: 30 Nov 2009 16:28
by fonso
petert, that's a very strange situation you have there. Rubidium has changed the code which is probably creating that warning just today. However, cargodist changes this exact line, so if you have applied the latest version, you should get a different warning as there isn't any "min" there anymore. If you didn't apply the latest patch you should have seen rejects from patch. Could you please recheck that you have a clean version of trunk and a matching version of cargodist and that the patch applied without problems? Or, if you're using git, please check out the "cargodist" branch (in contrast to, for example, "master"). You can also post the file src/saveload/misc_sl.cpp here and I'll tell you which version that is.
Re: Cargo Distribution
Posted: 30 Nov 2009 16:32
by petert
I made a debug version from the latest trunk, I checked it out from svn://svn.openttd.org/ (r18351). I have not applied CargoDist, I want to get the regular compiles down and working. Attached is my saveload/misc_sl.cpp. Also, how do you determine the version of trunk I checked out from one file? Where would it show that?
Re: Cargo Distribution
Posted: 30 Nov 2009 16:43
by fonso
Ah, yes, then it's clear. I thought you were building cargodist. You should open a bug report about that warning, though.
Re: Cargo Distribution
Posted: 30 Nov 2009 16:53
by MagicBuzz
You didn't install DirectX SDK or you didn't correctly added the path to the compiler settings.
The best way to compile OTTD with MSVC is to :
- Not install the DirectX SDK
- Remove the pre-processor direct music statement
=> Right click on "openttd" project, the "properties", then go in the "configuration properties > c/c++ > preprocessor" then remove the "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" statement in the "preprocessor definitions" setting
- Remove the "dmusic.sbr" from the linker dependancies
=> In the project properties panel, open the "linker > input" menu, then remove the "dmusic.sbr" from the "additional dependancies" setting
The it will compile without MIDI support (ie you can't listen musics in OTTD)