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

Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

petert wrote:Also, what is the point of all these object files?
All of those object files are just intermediate output from the compiler. The only files that are important is the .exe (obviously) and possibly the .pdb file (to make crash logs useful/readable).
All the general output is in the 'bin' directory. It contains all the files that aren't dependent on the selected build version (debug/release) and the selected platform (x86/x64). All you need to get a working version is to copy the freshly compiled .exe file from the appropriate "objs"-subdirectory (for example objs\Win32\Release\openttd.exe) to the bin directory and start it. You can also define a post-build-event in the openttd-project options to do that automatically for you, if you prefer it. I don't like to automate it since I often compile multiple versions (debug/release and/or x64 versions) and want to stay in control of which version I'm currently running. My guess it that this is also the reason it's separated in the first place.

Just as a note: there really isn't any difference in compiling a trunk or a Cargodist version with the small exception of how you update the source code. Just install git, open up a git-bash (there's a start menu entry for it) and go to some directory where you want to keep your Cargodist version. Now clone the git repository as indicated on the first post of this thread (or the wiki page):

Code: Select all

git clone http://fickzoo.com/fonsinchen/openttd.git
git checkout origin/cargodist
Now every time you want to update to the latest version all you need to do is:

Code: Select all

git pull
git checkout origin/cargodist
If the pull-command only outputs a note starting with 'You are not currently on any branch' there hasn't been an update since you last pulled from the repository.
Now just start Visual Studio, open the solution and hit compile (possibly setting the desired configuration/platform before).
As I've mentioned a few pages back you VS needs to be able to call git to get a proper version string for OpenTTD, so [git_install_dir]\bin\git.exe has to be part of the 'PATH' environment variable or the version-project won't be able to report a proper version (which will appear in OpenTTDs title bar and on the task bar button).
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Cargo Distribution

Post by MagicBuzz »

Creat wrote:
petert wrote:Also, what is the point of all these object files?
[...]
All you need to get a working version is to copy the freshly compiled .exe file from the appropriate "objs"-subdirectory (for example objs\Win32\Release\openttd.exe) to the bin directory and start it. You can also define a post-build-event in the openttd-project options to do that automatically for you, if you prefer it.
Another solution in MSVC is to copy the requiered original data files in the data directory, then...
Simply choose the version you want to compile (release, debug, win32 or x64) and press the "play" button (or press F5)
=> It will compile then run into debug mode (even with the release compilation) so you can add break points and/or see exactely which statement raise errors and test each variables easily.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

MagicBuzz wrote:The it will compile without MIDI support (ie you can't listen musics in OTTD)
But I would like to be able to listen to music. I'll continue to try to fix it.
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

Could it be that Cargodist and ECS not work well together?
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: Cargo Distribution

Post by XeryusTC »

petert wrote:
MagicBuzz wrote:The it will compile without MIDI support (ie you can't listen musics in OTTD)
But I would like to be able to listen to music. I'll continue to try to fix it.
Get a 3rd party music player. I'm sure they understand the TTD music files after you rename them to .midi.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: Cargo Distribution

Post by Michi_cc »

petert wrote:
MagicBuzz wrote:The it will compile without MIDI support (ie you can't listen musics in OTTD)
But I would like to be able to listen to music. I'll continue to try to fix it.
Disabling DirectMusic does not disable music altogether. There is still the Win32 MCI driver, which will be enough in most cases.

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

Re: Cargo Distribution

Post by petert »

It will? Ok, good. I don't want the people I compile for to not have all features of the trunk games along with the patch.
huldu
Engineer
Engineer
Posts: 29
Joined: 14 Nov 2009 19:45

Re: Cargo Distribution

Post by huldu »

I did a clean install of windows earlier today and i only had vanilla openttd. Its near impossible to play without cargodist. The regular transfer system fails so often it really makes me angry hehe.

Anyway, whats the latest bin build for openttd+cargodist?:) I had one i grabbed a week ago or something, but it had a few very minor bugs i wrote up but lost the paper :(
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

There aren't any new ones ATM, but you can get the diff file at fonso's awesome page of diffs.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Hamilton2007 wrote:Could it be that Cargodist and ECS not work well together?
Could you be more specific, please? What exactly is the problem and can I get a savegame showing it?
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 »

This is with an absolute clean checkout of r18325, with the trunk patch. It just doesn't work.
Attachments
patch.txt
(3.64 KiB) Downloaded 65 times
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

petert wrote:This is with an absolute clean checkout of r18325, with the trunk patch. It just doesn't work.
This is another glitch in the patch system. It occured when I merged the changes from my laptop back to my desktop. Actually the revision this patch applies to is r18351. I've updated everything to r18368 and pulled the fake r18325 patches. Now the revision in TRUNK_VERSION.txt is actually the correct one.
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 »

Thanks, I knew I wasn't crazy. I will have a binary by tonight.
negulus
Engineer
Engineer
Posts: 2
Joined: 14 Oct 2008 11:13

Re: Cargo Distribution

Post by negulus »

Hello

This is the result of the compile

misc_sl.cpp
..\src\saveload\misc_sl.cpp(55) : warning C4344: Verhaltensänderung: Verwendung von expliziten Vorlagenargumenten löste einen Aufruf an 'T min<ZoomLevel>(const T,const T)' aus
with
[
T=ZoomLevel
]
die reguläre Funktion 'int min(const int,const int)' bietet eine bessere Übereinstimmung
Wenn erwartet wird, dass 'int min(const int,const int)' aufgerufen wird, muss daraus eine explizite Spezialisierung gemacht werden

can you help me plz
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Cargo Distribution

Post by MagicBuzz »

Please, try to compile the trunk before compiling with patches...

This warning in MSVC comes from the trunk, not the patch.

Also, this is a warning, not an error (and if you read the message, it is absolutely safe)
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

I keep getting crashes with cargodist, gonna play Gramnon's patchpack for a while (=without CD) cause i start almost every day a new game with cardodist... :?

Will add my latest crash.sav
Attachments
crash.sav
(1.22 MiB) Downloaded 56 times
crash.txt
(13.62 KiB) Downloaded 54 times
User avatar
keoz
Transport Coordinator
Transport Coordinator
Posts: 321
Joined: 16 Jul 2009 10:04

Re: Cargo Distribution

Post by keoz »

Just to tell it once more.

Cargodist is really great. I could no more find any interest in playing OTTD without it.

Still thanks for your work, fonso.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Psistorm
Traffic Manager
Traffic Manager
Posts: 173
Joined: 05 Jun 2004 12:22

Re: Cargo Distribution

Post by Psistorm »

keoz wrote:Just to tell it once more.

Cargodist is really great. I could no more find any interest in playing OTTD without it.

Still thanks for your work, fonso.
Agreed. Cargodist really makes the game more challenging and more fun. The only thing Id love more is to get my hands on a build with cargodist + improved timetables (for splitting PAX trains evenly. manually just doesnt work out for me even after some trying). But until someone makes a patchpack, Ill happily play this build, Im having lots of fun with it.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Hamilton2007 wrote:I keep getting crashes with cargodist, gonna play Gramnon's patchpack for a while (=without CD) cause i start almost every day a new game with cardodist... :?

Will add my latest crash.sav
Who's binaries did you use? If mine, these are absolutely useless, you need to compile with MSVC to get useful crash reports. Have your read Rubidium's reply?
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

Yeah i know, but those builds with msvc posted in this thread are way to slow to enjoy playing them..
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests