Skip to content

GettingStarted

Takashiro edited this page Sep 6, 2015 · 2 revisions
Cardirector Documentation

Getting Started

How to Build

~ stands for the root directory of Cardirector repo in the following texts.
  1. Download the latest Qt installers from Qt http://qt.io/download

  2. Install Qt and Qt Creator with the installer you choose according to your developing environment and targeting platform.

  3. Open ~/Cardirector.pro with Qt Creator and configure your build directory.

  4. Check the directory ~/include/, where there must be header files after qmake is executed.

  5. Click Build or press Ctrl + B.

  6. For different target OS, you'll get corresponding static library files in ~/lib/.

  7. You may need dynamic library files instead. Edit Cardirector.pro, removing staticlib from CONFIG, i.e, remove or comment the line below and then execute qmake again.

    CONFIG += staticlib

  8. After rebuilding, you'll find *.dll in ~/bin/ and *.lib in ~/lib/ targeting Windows, and *.so or *.dylib in ~/lib/ for other operating systems.

Apply Cardirector to Your Project

  1. Copy or move ~ into your Qt project.

  2. If you intend to use the static library of Cardirector, you'll have to add the line below in your .pro

    DEFINES += MCD_STATIC

  3. Configure INCLUDEPATH, adding Cardirector/include/ as one of your include path.

    INCLUDEPATH += Cardirector/include

  4. Add a new library path Cardirector/lib/ into LIBS.

    LIBS += -L"$$PRO_FILE_PWD/Cardirector/lib"

  5. For dynamic library of Cardirector on Windows, you'll need to move *.dll into the root directory of your project.

  6. For dynamic library of Cardirector on Android, you'll need to add the following line into your .pro

    ANDROID_EXTRA_LIBS += $$PWD/Cardirector/lib/libCardirector.so

  7. Add the following line to load the library.

    LIBS += -l$$qtLibraryTarget(Cardirector)

  8. In order to use resources and GUI module of Cardirector, you'll need to add MCD_INIT_GUI; into your main()

Clone this wiki locally