Non-code fixes

I’ve got another round of fixes, see
I’ve set up Travis CI for vcmi (I had to polish it a bit before it started working as I wanted), you can see history of fully automated builds here:
It is free for open source projects.
I couldn’t make clang compile Qt parts (editor, launcher) and I had to disable them. They work fine with gcc, though. From my tests it looks like clang-3.2 and gcc-4.6 compile vcmiclient/server just fine, but I upgraded both of them: clang to 3.4 (I think it’s still unreleased) and gcc 4.8.
The build VMs use ubuntu 12.04 and it looks likely they will switch to 14.04 once next LTS becomes available.

To have it set up on your project, you have to do the following (copied from repository hooks page, for official vcmi this will be
We recommend using the Travis profile page at to manage your hooks.

  • Create an account at (you can sign in with GitHub)
  • Enter your credentials
  • The token which you can find on the Travis profile page
    optional: Enter the username who the Travis token belongs to (defaults to the repository owner)
  • optional: Enter the host of your Travis installation (defaults to, the protocol-prefix is optional and defaults to “http://”.
  • Make sure the “Active” checkbox is ticked, and click “Update Settings”.
  • Click on the “Travis” service name and then click the “Test Hook” link.
  • You should receive an email from Travis once the build has completed

You can use custom commands and if/when tests will be available, you can have them executed too. This will surely become useful when this kicks in: [

Other commits in that pull request provide tighter integration with github: file encoding changes (proper diacritical characters), markdown for readme and license, status button from travis.

Please note, that it was set up for my project, you’ll have to change janisozaur/vcmi to vcmi/vcmi in file (

I think that’s all I wanted to say in this message.
Please let me know how you find these changes? If you want something tested, other compiler, etc…

IIRC there were some bugs in Qt 5.0.0 so it may not work with clang. Right now I have Qt 5.0.2 which works just fine with clang-3.2.

We have files that are not ASCII/utf-8? This should be fixed.

If possible, I’d rather test oldest supported compilers (gcc-4.6, clang 3.1) instead of testing newest ones.

Will take a closer look a bit later but so far sounds interesting, although we have something like this on launchpad - daily builds of .deb packages:

yeah, there is a bug in qt, see,60150

there are two:

$ git describe --all --always --long
$ git ls-files | xargs file | grep "text" | grep -v \\\(ASCII\\\|UTF-8\\\)
AI/BattleAI/BattleAI.cbp:                                   XML document text
AI/EmptyAI/EmptyAI.cbp:                                     XML document text
AI/FuzzyLite/FuzzyLite.cbp:                                 XML document text
AI/StupidAI/StupidAI.cbp:                                   XML document text
AI/VCAI/VCAI.cbp:                                           XML document text
AUTHORS:                                                    ISO-8859 text, with CRLF line terminators
client/DPIaware.manifest:                                   XML  document text
client/Info.plist:                                          XML document text
client/VCMI_client.cbp:                                     XML document text
launcher/VCMI_launcher.rc:                                  Little-endian UTF-16 Unicode C++ program text, with CRLF, CR line terminators
launcher/mainwindow_moc.ui:                                 XML document text
launcher/modManager/cmodlistview_moc.ui:                    XML document text
launcher/settingsView/csettingsview_moc.ui:                 XML document text
lib/VCMI_lib.cbp:                                           XML document text
osx/osx-vcmibuilder/vcmibuilder/en.lproj/MainMenu.xib:      XML document text
osx/osx-vcmibuilder/vcmibuilder/vcmibuilder-Info.plist:     XML document text
osx/sparkle_appcast.xml:                                    XML document text
scripting/erm/ERM.cbp:                                      XML document text
server/VCMI_server.cbp:                                     XML document text
vcmi.workspace:                                             XML document text

If possible, I’d rather test oldest supported compilers (gcc-4.6, clang 3.1) instead of testing newest ones.

Oh, I’ve seen that before, yes. Switching to clang-3.2 (default in ubuntu 12.04) and gcc-4.6 is reaaaaally easy, you just remove all the custom commands and let it work :stuck_out_tongue:
You can execute tests here, though.
Known bugs:

  • Is there any way to automatically list required packages? I know I could add that PPA and use build-dep, but it would fail if you were to depend on a new package (at least until LP built and uploaded your package)
  • there are some issues with going past memory limit with gcc, I’m trying to solve it (both limit amount available to compiler on travis and in code)

Is there any way to set multiple operation systems in travis build matrix so we can test three main platforms?

I believe in free version (the one targeted at FOSS) it is ubuntu 12.04 only.

oh wait, you can “trick” travis to spawn you darwin:
just set language: objective-c
I’ll try to have it compiled later on, I’m not mac user though, so any suggestion welcome. gcc+clang?

I know this trick. But do not want darwin instead of linux. I want both of them

Technically they are listed in debian/control file (Build-Depends line).
Some smart grep/sed/whatever should be able to get what you need - don’t know any tool that does specifically this.

Note that right now it does not includes Qt5 - you’ll have to install it separately. I’ll update dependencies soon.

Yeah - some of our files are just too heavy in terms of compile time/memory usage. If you’ll manage to get at least some improvements on this time this would really helpful.

As per, and me failing to pull any tricks (language: - objective-c - cpp; matrix: include: language: cpp) it really is not available.
Good point with multi-platform testing, I didn’t actually think of that.