If you already know a bit of C++, contributing to the Qt version of Tiled is not hard! All you need to do is learn how to use the Git version control system and the Qt application framework. But you can do either as you go along.
Installing Git is going to be a bit different depending on your operating system. If you go to the Git download page, you should be able to find the appropriate link.
While you can use the Git gui to check out the repository, I'm only going to show you the way of the command line here. The Git repository is located here on github.com. You'll find Tiled at http://github.com/bjorn/tiled.
To make a local copy of this repository, use the command advertised there:
git clone git://github.com/bjorn/tiled.git cd tiled git log
As the last command shows, this not only gives you a local copy of the source code, but also includes all the development history, allowing you to browse the history quickly and find out what happened until now.
Get Qt from http://www.qt.io/download-open-source/. The default package ships with Qt Creator, which provides an easy way to compile & run Tiled, as well as being a powerful IDE for making changes to Tiled.
Tiled also depends on zlib for supporting compression. On Debian and Ubuntu, zlib can be installed as follows:
sudo apt-get install zlib1g-dev
On Windows there is no need to install zlib because Tiled can rely on the functions exported from the Qt Core library.
Once you have everything installed, you should be able to just open
tiled.pro in Qt Creator. If Qt Creator did not auto-detect your Qt libraries, set those up in the preferences (under Build & Run -> Qt Versions, and then set up a Kit for it and add this kit in the 'Projects' mode). Then, make sure the run target is set to 'tiled' and not one of the other applications shipping with Tiled. Finally you can press the Run button to have it compile and run the application.
If you prefer to stick with the command line, you'll find that you can compile and run Tiled using the following commands:
qmake # Generate the Makefiles make # Compile Tiled bin/tiled # Run Tiled
Note that on some systems the
qmake command is not available (or may default to Qt 3, which Tiled does not compile against). In that case, use
qmake-qt5 or whatever else is appropriate for your system.
The main purpose of this page, as the title indicates, was to get you contributing patches back to Tiled. There used to be a short introduction to git command line here, but I don't think that's very helpful anymore. Please read the following page if you're new to contributing to projects hosted on GitHub: