Patches for linux

Patch uses paths that are valid only if one has its working copy in vcmi/ and original sources in vcmi.orig/

Doesn’t it have an option to ignore a leading parts on the path ?

On linux if I just do “patch -p1 < fdsf.diff”, it will ignore the vcmi/ part.

It seems it doesn’t… Unless I missed something? Or should I think about using different SVN client?

… or a developper-friendly OS. :wink:

The following patch completes a previous fix regarding ressources being substracted. It follows the behaviour of H3.
vcmi_fix_res2.zip (566 Bytes)

OS isn’t developer-friendly if it’s not capable of running MS Visual Studio. All fo the other IDEs I’ve heard about (I’ve heard of many of them) don’t have auto-completion as good as Intellisense and (to my big surprise) Visual Studio is the only IDE that makes debugging code that uses STL containers more pleasent.

BTW patch commited.

Quite a lot devs out there would never exchange Vim for Visual Studio :wink:
marksman.wordpress.com/2009/02/2 … -with-vim/

That said Visual Studio is a nice piece of software, but for sure it is not friendly toward developing mulitplatform programs.

I guess as far as IDE goes Eclipse is regarded as better IDE then VS by some people, though it’s main use is not C++ development. I heard Qtcreator is nice Linux ide for C++, but most Linux devs use Vim and dislike the whole idea of IDE be it Visual Studio or Eclipse. That said it’s all about preferences .

Someone wants to start an editor war here ? OK. They all suck except emacs. :smiley:

Here’s a new set of patches that fixe mostly a few visual bugs, not linux specific. Applies on top of the last sound patch (which is not yet is svn).
vcmi_patches2.zip (3.46 KB)

Committed in r827. Thanks!
I left

if (!slid->positionsAmnt) return;

checking, it prevents crashing when pressing “New game” and no maps are available. For that cause I’ve additionaly added complaining to the console after getting map infos.

I see. Even with that I can still crash the scenario screen. Something needs to be beaten into submission.

There should be check on pressing Single Scenario button in New Game menu. If there are no maps, player is not allowed to open scenario list.
[Though generally such situation is a pathology…]

I changed a few things and now you can open the load game or new game selection windows even if there’s no maps/games. The behaviour is about the same as H3.

vcmi_fix_nomap.diff might seem big, but it’s mainly moving things around. Now selected is init at -1 and stays that way until there is some data to display.
vcmi_linux_patches5.zip (8.04 KB)

Good to see that I wasnt the only one having issues compiling. I was making a PKGBUILD for Arch Linux, but got kinda stuck for a while with that build error seing as I dont know much C++.

I will post it here (and on AUR) once the above compile fix get into SVN and I have verified/tested the package.

ubuntux, patches commited: r833 (Pregame improvements) and r834 (G CC compilation fix). Thanks again! :slight_smile:
I’m impressed that you’ve been courage enough to fight with pregame code. Its possibly one of the ugliest parts of VCMI. It was created as provisional solution for choosing maps for VCMI 0.2. And as usual, provisional solution proves to be very durable (but still ugly).
It should be probably somewhen rewritten with the interface that rest of GUI in game uses. However it works too good to make me think it’s effort-worthy. (Especially if there is interest to replace it with lobby that would also offer more multilayer functionalities).

PS. Are you still not interested in direct SVN access?

OK. My sf user is fzago. I’ll keep fixing bugs for now.

The pregame code is not that bad. I think the whole project is pretty well architectured, and that’s more important than a few wobbly functions.

Jonnor,
When you build your package, you will have to rerun autoconf to generate the build system. The current makefile.in are not up-to-date. Before that, you should change -O1 in configure.ac into -Os or -O2. You may also need to change “defaultAI” in config/settings.txt.

ubuntux, I’ve added you to developers. You have now direct SVN commit access. Congratulations! :wink:
Please apply to the developers mailing list.


As for further changes, what about adding sound volume control? We would need two new functions in musichandler: one for setting volume of musics and another for sound effects.
Then I (or TowDragon) will add appropriate options to the Options Dialog.

Thanks.

I added the volume controls. You can use setSoundVolume() and setMusicVolume(). There’s also the corresponding get functions just in case.

i ant seem to get vcmi to compile properly, i still have the error with bootstrap not being linkable…

Emiren, that bug report is a bit short on information. Add some logs.

seems im unable to post in opensuse 11.1 + kde 4.2.2 + firefox 3.0.10, i had a similar problem that others where experiencing that eventhough boost was found it couldnt be linked against, tried all the howto’s on this page but to no awail, on an other side, i have managed to run VCMI on windows 7 RC 64bit