Cargo Distribution

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post 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.
jub
Engineer
Engineer
Posts: 67
Joined: 17 Jul 2003 13:46
Location: Sudice, Czech Republic
Contact:

Re: Cargo Distribution

Post 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.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Ahh, Ok.

On another note: Congratulations on being the replied to topic in the entire OpenTTD Development section! Over 1000 replies.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post 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.
The guy on the picture is not me, it's Alonso.
User avatar
tsjook
Traffic Manager
Traffic Manager
Posts: 197
Joined: 22 Apr 2009 18:33

Re: Cargo Distribution

Post 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.
Attachments
crash 18284-debug build.rar
(517.52 KiB) Downloaded 61 times
Last edited by tsjook on 30 Nov 2009 11:15, edited 2 times in total.
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post 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..
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Cargo Distribution

Post 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.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post 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.
The guy on the picture is not me, it's Alonso.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post 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.
The guy on the picture is not me, it's Alonso.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Cargo Distribution

Post 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.
Last edited by Terkhen on 02 Dec 2009 22:38, edited 2 times in total.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

You're very lucky that you're able to build using MSVC, I've had lots of problems with it.
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post 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 :)
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post 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:
Attachments
I don't see a C/C++ tab?
I don't see a C/C++ tab?
project_properties.png (47.87 KiB) Viewed 1745 times
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Cargo Distribution

Post 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".
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post 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)
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post 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 ==========
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post 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.
The guy on the picture is not me, it's Alonso.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post 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?
Attachments
misc_sl.cpp
(4.21 KiB) Downloaded 56 times
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Ah, yes, then it's clear. I thought you were building cargodist. You should open a bug report about that warning, though.
The guy on the picture is not me, it's Alonso.
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Cargo Distribution

Post 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)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests