MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

MADDE templates

MADDE offers the following templates for creating new projects:

Templates provided by MADDE
Template name Template type Description
lib-simple lib Simple example for C/C++ library
opengl qtprog Qt OpenGL application template
qml-simple qtprog Simple QML template
qt-empty prog Empty project for Qt application
qt-lib-simple lib Simple example for Qt library
qt-simple qtprog Simple example for Qt programs
simple prog Simple example for C/C++ programs

Each template creates a project skeleton, including a file structure and some ready-made files, as a basis for the project. All templates create the following subdirectories under the project directory:

  • Subdirectory named debian, which contains configuration files needed to create the package later on. The description of the files can be found on Debian.org.
  • Subdirectory named src, which contains the source code file(s), such as:
    • *.c, which is a C source code file
    • *.cpp, which is a C++ source code file
    • *.h, which is a C/C++ header file
  • File named *.pro, which is a project file needed to create the Makefile with qmake.

For template-specific details and additional subdirectories and files created by the template, see the following list:

  • lib-simple:
    • The src subdirectory contains the simple.c and simple.h source code files.
    • The project file is named lib.pro.
  • opengl:
    • The src subdirectory contains the source code files glmain.cpp, glwidget.cpp and glwidget.h.
    • The project file is named <project_name>.pro.
    • A subdirectory named data includes the following folders:
      • 64x64, which contains the graphics file <project_name>.png, an icon file for Application Manager
      • 80x80, which contains the graphics file <project_name>.png, an icon file for Desktop menu
    • <project_name>.desktop file is a configuration file describing, for example, how the application is launched and how it appears in menus.
    • <project_name>.service file, which D-Bus needs to activate the application on demand and to make sure that only one instance of the application is running.
  • qml-simple:
    • The src subdirectory contains the source code files qtmain.cpp, qmlsimple.qrc and application.qml.
    • The project file is named <project_name>.pro.
    • A subdirectory named data includes the following folders:
      • 64x64, which contains the graphics file <project_name>.png, an icon file for Application Manager
      • 80x80, which contains the graphics file <project_name>.png, an icon file for Desktop menu
    • <project_name>.desktop file is a configuration file describing, for example, how the application is launched and how it appears in menus.
    • <project_name>.service is a file that D-Bus needs to activate the application on demand and to make sure that only one instance of the application is running.
  • qt-empty
    • The src subdirectory is empty.
    • The project file is named qt-empty.pro.
  • qt-lib-simple:
    • The src subdirectory contains the simple.c and simple.h source code files.
    • The project file is named qt-lib-simple.pro.
  • qt-simple:
    • The src subdirectory contains the source code file qtmain.cpp, which is a simple hello world in Qt.
    • The project file is named qt-simple.pro.
    • A subdirectory named data includes the following folders:
      • 64x64, which contains the graphics file <project_name>.png, an icon file for Application Manager
      • 80x80, which contains the graphics file <project_name>.png, an icon file for Desktop menu
    • <project_name>.desktop file is a configuration file describing, for example, how the application is launched and how it appears in menus.
    • <project_name>.service is a file that D-Bus needs to activate the application on demand and to make sure that only one instance of the application is running.
  • simple:
    • The src subdirectory contains the source code files main.cpp, simple.c, and simple.h.
    • The project file is named qtprog.pro.