Managing projects

Projects are containers for your source code and related files. Before you can develop apps in the Momentics IDE for BlackBerry, you must create a project to store your work.

When you create a file in a project, the Momentics IDE also creates a record (local history) of every time you change that file, and how you change it.

Use the New Project wizard whenever you want to create a project in the Momentics IDE.

  1. On the File menu, click New > BlackBerry Project.
  2. Follow the steps in the New BlackBerry Project wizard.

    There are several types of projects that you can create:

    Core Native application
    Creates a native C/C++ application using the core APIs. The following templates are available:
    • OpenGL — Create a sample project from an OpenGL ES 1.1 or OpenGL ES 2.0 application template that creates a simple animated application.
    • Screen — Create a sample project with a screen-based application template project.
    • Empty — Create an application project without any code.
    Cascades application
    Creates a native C++ application using the Cascades UI Framework. The following templates are available:
    • Standard empty project — Create a basic application that loads a QML file.
    • List view — Create an application that uses a list view.
    • Tabbed pane — Create an application that allows users to switch tabs.
    • Navigation pane — Create an application that uses a navigation pane to display a details screen.
    • Headless app — Create a headless application that can run in the background. The template creates a project folder for the UI component and a project folder for the service.
    • Card app — Create a card app that can send a message to a UI card.
    Static Library
    Creates a collection of object files that you can link into another application (libxx.a).
    Shared Library
    Creates a project that produces a C/C++ shared library.
    Adobe AIR Native Extension
    Creates a project that produces a shared library for AIR Native Extensions. The following templates are available:
    • HelloWorld — Create a project that produces an AIR Native Extension shared library from a template.
    • Empty — Create a project that produces an AIR Native Extension shared library without a code template.
    BlackBerry WebWorks Native Extension
    Creates a project for a custom extension for BlackBerry WebWorks HTML5 applications, with access to all of the BlackBerry 10 core APIs.

    When you click Finish, the Momentics IDE creates a launch configuration for your app and opens the C/C++ perspective, which features the Project Explorer and the editor.

Managed and Makefile builds

When you create a core native application, a library, or a native extension, you can select a managed or a makefile build.

A managed project doesn't use Makefiles, and the Momentics IDE UI controls all of the build settings.

You cannot build most Managed projects from the command line (it's possible in simple cases with some additional setup files). There are also restrictions on what and how you build, particularly if you use other tools in the build.

If you use the external make builder, a managed project can use Makefiles. It generates them automatically and they shouldn't be checked into source control. Managed make projects provide full Momentics IDE graphical control and configuration. A managed make project automatically generates the Makefile for you. It dynamically generates your makefile based on the contents of your project folders. A managed make monitors your project and automatically updates the Makefile when you add or remove files in a project.

Create a Makefile project for any project that has a Makefile by default. A Makefile project can launch anything as an external builder in any folder. The Momentics IDE starts make, and after make exits, the Momentics IDE refreshes the workspace to show what was created. You can change the make command or run specific make targets, but the Momentics IDE has no control over what make does.
Since the Momentics IDE doesn't know what make builds, it can have problems parsing source files (which it does internally to allow navigation, code completion, syntax highlighting, code generation, and refactoring). If you use a Makefile project, you must change the Indexer (the internal parser) to point to the Includes and the Defines that your parser uses for conditional compilation. The process of determining this is called discovery. To control discovery, right-click a project and select Properties > C/C++ Build > Discovery Options.

If you know which includes and defines you want to use, you can specify them directly. Right-click a project and select Properties > C/C++ General > Path and Symbols.

Last modified: 2014-06-24

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus