Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Contributing to Tiled

Thorbjørn Lindeijer edited this page · 19 revisions

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.

Checking Out the Source Using Git

Install Git

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.

Checking out Tiled

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.

Getting Started with Development

Install a C++ compiler

  • On Linux, make sure g++ is installed.
  • On Windows, I'd recommend getting the Qt package that includes MinGW (available since Qt 5.0.1).
  • On MacOS X, I believe you need to install Xcode.

Install Qt and zlib

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.

Compile and Run

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-qt4, qmake-qt5 or whatever else is appropriate for your system.

Building 64-bit version of Tiled on Windows

  • Get the latest Tiled source code from github
  • Install "Microsoft Visual Studio Express 2013 with Update 3 for Windows Desktop" - http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs
  • Use the Qt Online Installer for Windows from http://qt-project.org/downloads, unselect everything but "Qt 5.3 - msvc2013 64-bit OpenGL"
  • Open tiled.pro in Qt Creator, it should suggest setting it up with the default kit with Qt 5.3 and VS 2013. - Select 'tiled' in the target selector (above the Run button), optionally select 'Release' for a faster version, then press Run.

Contributing to Tiled

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:

https://guides.github.com/activities/contributing-to-open-source/#contributing

Something went wrong with that request. Please try again.