Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ide_en/user_guide/cvs.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ide_en/user_guide/cvs.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ide_en/user_guide/cvs.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ide_en/user_guide/cvs.html on line 8

Managing Source Code

In this chapter:

Introduction to source control in the IDE

Subversion (SVN) and CVS are the default source control management systems in the IDE. Other systems, such as ClearCase, may also be used.

Local history feature

The IDE lets you “undo” changes with its local history. While you're working on your code, the IDE automatically keeps track of the changes you make to your file; it lets you roll back to an earlier version of a file that you saved but didn't commit to source control.

For more information about the IDE's local history feature, see this link in the Workbench User Guide: Reference-->User interface information-->Development environment-->Local history.

Project files (.project and .cdtproject)

For each project, the IDE stores important information in these files:

You must include both of these files with your project when you commit your changes into source control.

SVN and the IDE

The Subversive plugin (or Subclipse, see the http://www.eclipse.org Web site) provides Subversion (SVN) integration for the IDE. The SVN plugin gives you the ability to work with this version-control system from the IDE workbench.

The SVN Repository Exploring perspective in the IDE workbench lets you bring code from SVN into your IDE workspace. Other developers can then make updates the source in SVN while you're working on a file. The SVN Repository Exploring perspective lets you easily check your modified code back into SVN, and the IDE helps you synchronize with SVN to resolve any conflicts you might encounter.


Note:

If you start use SVN with a currently checked-out project, you need to disconnect the project first. Select the project and click Team-->Disconnect, and then select Do not delete the SVN meta information in the Disconnect dialog so that the SVN working copy won't be deleted. As a result, you can use this working copy later with SVN and avoid the re-checkout process. Now, you can connect the project to the repository using SVN. Select the project and click Team-->Share Project. Select the SVN provider from the Share Project wizard; later you'll be prompted to choose the SVN location.

If you have project checked out by another SVN client (i.e. the project contains .svn folders), you can import it directly into your workspace, which causes an automatic connection to SVN if the appropriate SVN location is found. To import a project into your workspace, select File-->Import, expand General and select Existing projects into Workspace. Browse to the location of the project and select it.

If you edit a file outside of the IDE, the SVN plugin doesn't see the file changes. To refresh the file(s), you'll need to highlight the project node, and then press F5.


CVS and the IDE

The CVS Repository Exploring perspective lets you bring code from CVS into your workspace. If another developer changes the source in CVS while you're working on it, the IDE helps you synchronize with CVS and resolve any conflicts. You can also choose to automatically notify the CVS server whenever you start working on a file. The CVS server then notifies other developers who work on that file as well. Finally, the CVS Repository Exploring perspective lets you check your modified code back into CVS.


Note: The IDE connects to CVS repositories that reside only on remote servers — you can't have a local CVS repository (i.e. one that resides on your host computer) unless it's set up to allow CVS pserver, ext, or extssh connections.

Using the core Eclipse source control documentation in the IDE

Since the CVS Repository Exploring and the SVN Repository Exploring perspectives are core Eclipse features, you'll find complete documentation in the Eclipse Workbench User Guide and the Subversive User Guide.

SVN documentation

For SVN, the following table may help you find information quickly in the Subversive User Guide:

If you want to: Go to:
Find the information on everyday work with SVN Team support with SVN
Connect to a SVN repository Team support with SVN-->New SVN Repository Location Wizard
Show only those SVN repositories associated with your Workbench Team support with SVN-->SVN Repository View
Check code out of SVN Team support with SVN-->Actions-->Checking out
Synchronize with a SVN repository Team support with SVN-->SVN Workspace Synchronization
Ignore some resources while synchronizing Team support with SVN-->Actions-->Ignoring resources from Version Control
See who's also working on a file Team support with SVN-->SVN History View
See changes made by another user Team support with SVN-->Another user changes
Resolve SVN conflicts Team support with SVN-->Actions-->Merging
Prevent certain files from being committed to SVN Team support with SVN-->Actions-->Locking and unlocking resources
Create and apply a patch Team support with SVN-->Actions-->Patching
Track code changes that haven't been committed to SVN Team support with SVN-->Actions-->Extracting changes
Change a file to a base revision Team support with SVN-->Actions-->Reverting changes

CVS documentation

For CVS, follow these links:

The following table may help you find information quickly in the Workbench User Guide:

If you want to: Go to:
Connect to a CVS repository Tasks-->Working in the team environment with CVS-->Working with a CVS repository-->Creating a CVS repository location
Check code out of CVS Tasks-->Working in the team environment with CVS-->Working with projects shared with CVS-->Checking out a project from a CVS repository
Synchronize with a CVS repository Tasks-->Working in the team environment with CVS-->Synchronizing with the repository, particularly the Updating section
See who's also working on a file Tasks-->Working in the team environment with CVS-->Finding out who's working on what: watch/edit
Resolve CVS conflicts Tasks-->Working in the team environment with CVS-->Synchronizing with the repository-->Resolving conflicts
Prevent certain files from being committed to CVS Tasks-->Working in the team environment with CVS-->Synchronizing with the repository-->Version control life cycle: adding and ignoring resources
Create and apply a patch Tasks-->Working in the team environment with CVS-->Working with patches
Track code changes that haven't been committed to CVS Tasks-->Working with local history, especially the Comparing resources with the local history section
View an online FAQ about the CVS Repository Exploring perspective Reference-->Team Support with CVS-->CVS

Importing existing source code into the IDE

As with many tasks within the IDE, there's more than one method to bring existing source files into your workspace:


Note:

Whichever method you use to bring existing source files into your workspace, you always need to set up an IDE project in your workspace in order to work with the resources you're importing.

For instructions about creating a project, see Step 1: Creating an initial project for your source code.”


If you're importing code that uses an existing build system, you may need to provide a Makefile with all: and clean: targets that call your existing build system.

For example, if you're using the jam tool to build your application, your IDE project Makefile might look like this:

all:
    jam -fbuild.jam

clean:
    jam -fbuild.jam clean

Projects within projects

The source hierarchy for your code may be complex. For example, suppose the source hierarchy looks like this:


Source tree example


Example of a source tree hierarchy.

To work efficiently with this source in the IDE, each component and subcomponent should be a “subproject” within the one main project. (You could keep an entire hierarchy as a single project if you wish, but you'd probably find it cumbersome to build and work with such a monolith.)

The current version of the IDE doesn't support nesting projects as such; however, to import such a source tree, you would use the following process:

  1. Step 1: Creating an initial project for your source code
  2. Step 2: Creating a new project for each existing project or component in your source code tree
  3. Step 3: Linking the projects to a directory in the source tree
  4. Step 4: Building the component project in the linked folder

For information about container projects, see Using container projects in this chapter.

Step 1: Creating an initial project for your source code

You need to create a project that will contain your source code and related files. (The project will have an associated builder that incrementally compiles source files as they change.)

First, in your workspace, create a single project that reflects all the components that reside in your existing source tree:

  1. Select File-->New-->Project….
  2. Select the type of project you want to create. For example, expand C++ and select C++ Project, then click Next.

    New Project wizard

    By default, the C/C++ Development Tool (CDT) filters the Toolchain and Project types that show in the resulting lists based on the language support for the project type you select.

  3. Name your project (e.g. EntireSourceProjectA).
  4. To tell the IDE where the resources reside in the filesystem (since they don't reside in your workspace), disable the Use Default Location option.
  5. In the Location field, type the path to your source (or click Browse…).

    Next, you want to select a template for your project from the following:

  6. From the Project types list, expand Executable and select a project type. For example, a Hello World C++ Project provides you with a simple Hello World application in C++ format, and the IDE automatically creates a corresponding makefile.

    Select a template for a project type

  7. Select a required toolchain from the Toolchain list.
  8. Click Finish. If a message box prompts you to change perspectives, click Yes. You should now have a project that looks something like this in the corresponding Projects view:

    Entire source project example

Step 2: Creating a new project for each existing project or component in your source code tree

Now, you need to create an individual project (via File-->New-->Project…) for each of the existing projects (or components) in your source tree. In this example, you'd create a separate project for each of the following source components:

To create individual projects:

  1. Select File-->New-->Project….
  2. Select the type of project.
  3. In the Project name field, type a descriptive name for your project (e.g. Project_ComponentA).
  4. Enable the Use default location option because you want the IDE to create a project in your workspace for this and all the other components that comprise your project EntireSourceProjectA. In the next step, you'll link each project to the actual location of the directories in your source tree.
  5. Select a project type and toolchain.
  6. Click Finish, and you'll see Project_ComponentA in the C/C++ Projects view.

Step 3: Linking the projects to a directory in the source tree

Next, you'll link each individual project in the IDE to its corresponding directory in the source tree:

To link projects:

  1. Select File-->New-->Folder.
  2. Select your new project (Project_ComponentA) as the parent folder.
  3. Type a name for the folder (e.g. ComponentA).
  4. Click Advanced>>.
  5. Enable the Link to folder in the file system option.
  6. Type the path to that folder in your source tree (or use Browse… to locate and select one).

    New Folder, Advanced options

  7. Click Finish. Now, your Project_ComponentA project should show a folder called ComponentA, the contents of which actually reside in your source tree.

Step 4: Building the component project in the linked folder

Now, you need to tell the IDE to build Project_ComponentA in the ComponentA linked folder that you just created in your workspace:

  1. In the C/C++ Projects view, right-click Project_ComponentA, and then select Properties from the context menu.
  2. Select C/C++ Build on the left.

    Make Builder properties

  3. In the Builder settings tab, set the build directory to ComponentA in your workspace.

Now, when you start to build Project_ComponentA, the IDE builds it in the ComponentA folder in your workspace (even though the source actually resides in a folder outside your workspace).


Caution: Linked resources let you overlap files in your workspace, so files from one project can appear in another project. If you change a file or other resource in one location, the duplicate resource is also affected. For example, if you delete a duplicate resource, its original is also deleted.

Special rules apply when working with linked resources. Since a linked resource must reside directly below a project, you can't copy or move a linked resource into other folders. If you delete a linked resource from your project, the corresponding resource in the filesystem also isn't deleted. But if you delete child resources of linked folders, those child resources are deleted from the filesystem!


Filesystem drag-and-drop

On Windows hosts, you can select files or folders and drop them into projects in the Navigator view:

  1. Create a new project. If your existing code has an existing build procedure, use a C Project or C++ Project. If not, you can use a QNX C Project or QNX C++ Project.
  2. Switch to the Navigator view.
  3. Select one or more source files or folders from Windows Explorer, then drag them into the project. The files are copied into your project workspace.

Note: From Windows Explorer, you can also use Cut, Copy, and Paste to move or copy files into a project.

SVN repository

Using the SVN Repository Exploring perspective, you can check out modules or directories into existing projects, or into new projects.

CVS repository

Using the CVS Repository Exploring perspective, you can check out modules or directories into existing projects, or into new projects.

Importing code into the IDE

Importing code into the IDE from CVS or SVN differs slightly depending on what you're importing:

Importing a C/C++ project from CVS or SVN

To check out an existing C/C++ project (either a QNX, C, or C++ project) from the CVS repository into your workspace:

  1. Right-click the project in the CVS Repositories view and choose Check Out from the menu.

    The IDE creates a project with the same name as the CVS module in your workspace. The project is automatically recognized as a C/C++ or QNX C/C++ project (if the project has .project and .cdtproject files).

  2. If the project is a QNX project:
    1. Right-click the new project in the Navigator or C/C++ Projects view and choose Properties.
    2. Click the Build Variants tab, which shows a warning.
    3. Select one or more of the build variants.

      At least one platform should be selected

    4. Click OK.

To check out an existing C/C++ project (either a QNX, C, or C++ project) from the SVN repository into your workspace:

  1. In the SVN Repositories view, right-click a project and select Check Out from the menu.

    The IDE creates a project with the same name as the SVN module in your workspace. The project is automatically recognized as a C/C++ or QNX C/C++ project (if the project has .project and .cdtproject files).

  2. If the project is a QNX project:
    1. Right-click the new project in the Navigator or C/C++ Projects view and choose Properties.
    2. Click the Build Variants tab, which shows a warning:

      At least one platform should be selected

    3. Select one or more of the build variants, and then click OK.

Importing C/C++ code

To check out existing C/C++ code that isn't part of a CVS project:

  1. Right-click the module or directory in the CVS Repositories view and choose Check Out As… from the menu.

    The IDE shows the Check Out As wizard.


    Check Out As


    The Check Out As wizard.

  2. Choose how to check out this project:
  3. Choose the workspace location for this project, and then specify the CVS tag to check out. Click Finish to exit the Check Out As dialog.
  4. Click Next to continue.
  5. If you're creating or checking out a QNX project:
    1. Right-click the new project in the Navigator or C/C++ Projects view and choose Properties.
    2. Click the Build Variants tab, which shows a warning:

      At least one platform should be selected

    3. Select one or more of the build variants, and then click OK.
  6. If you're creating a Standard Make C/C++ project, create a new Makefile with appropriate all: and clean: targets.

To check out existing C/C++ code that isn't part of a SVN project:

  1. Right-click the module or directory in the SVN Repositories view, and choose Find/Check Out As… from the menu.

    The IDE shows the Check Out As wizard:

    Find/Check Out As

  2. Choose how to check out this project:
  3. Select the Checkout recursively and Ignore externals options, if required.
  4. Click Next.
  5. Select the project location.
  6. Click Finish.
  7. If you're creating or checking out a QNX project:
    1. Right-click the new project in the Navigator or C/C++ Projects view, select Properties, and then click on QNC C/C ++ Project on the left.
    2. Click the Build Variants tab, which shows a warning:

      At least one platform should be selected

    3. Select one or more of the build variants, then click OK.
  8. If you're creating a Make C/C++ project, create a new Makefile with appropriate all: and clean: targets.

Importing C/C++ code into an existing project

To import from CVS a directory full of C/C++ code into an existing project:

  1. Right-click the module or directory in the CVS Repositories view and choose Check Out As… from the menu.

    The IDE shows the Check Out As dialog.

  2. Choose Check out into an existing project, and then click Next. The IDE shows the Check Out Into dialog:

    Check Out Into

  3. Select an existing project from the list, and then click Finish to add the code from CVS to the selected project.

To import from SVN a directory full of C/C++ code into an existing project:

  1. Right-click the module or directory in the SVN Repositories view and choose Find/Check Out As… from the menu.

    The IDE shows the Find/Check Out As dialog.

  2. Choose Check out as a folder into an existing project, and then click Next.
  3. Select an existing project from the list, and then click Finish to add the code from SVN to the selected project.

Import wizard

Use the Import wizard to bring files or folders into an existing project from a variety of different sources, such as:

For details, see “Importing projects” in the Common Wizards Reference chapter.

Linked resources

As an alternative to dragging-and-dropping, you can link files and folders into a project. This method of linking resources lets you include files in your project, even if they need to reside in a specific place on your filesystem (because of a restrictive source control system, for example).

To add a linked resource to a project in the C/C++ Project or Navigator view:

  1. Right-click on a project, and then select either New-->File or New-->Folder.

    The New File or New Folder dialog appears.

  2. In the File Name or Folder Name field, type a new name for the file or folder.
  3. Click Advanced >>, and enable either the Link to file in the file system or Link to folder in the file system option.
  4. Type the full path to the file or folder, or click Browse… to select a specific file or folder.
  5. Click Variables… to define any path variables for use in the file or folder path.
  6. Click OK.
  7. Click Finish to link the file or folder into your project.

See Concepts-->Workbench-->Linked resources in the Workbench User Guide for more information about linked resources.

Using container projects

A container is a project that creates a logical grouping of subprojects. Containers can ease the building of large multiproject systems. You can have containers practically anywhere you want on the filesystem, with one exception: containers can't appear in the parent folders of other projects. The IDE doesn't support the creation of projects in projects.

Containers let you specify just about any number of build configurations (which are analogous to build variants in C/C++ projects). Each build configuration contains a list of subprojects and specifies which variant to build for each of those projects.


Note: Each build configuration may contain a different list and combination of subprojects (e.g. QNX C/C++ projects, Standard Make C/C++ projects, or other container projects).

Creating a container project


Note: To create a container, you must have at least one subproject that you want to contain.

To create a container project:

  1. Select File-->New-->Project…, and then QNX-->QNX C/C++ Container Project.
  2. Click Next.
  3. Name the container.
  4. Click Next.
  5. In the New Project dialog, click Add Project….
  6. Now select all the projects (which could be other containers) that you want to include in this container, and then click OK.

    Container contents

    Each subproject has an entry for make targets under the Target field. You can click on an entry to get a menu that lets you change the selection. The “Default” entry means “don't pass any targets to the make command.” QNX C/C++ projects interpret this as “rebuild.” If a subproject is also a container project, this field represents the build configuration for that container.


    Note: You can set the default for QNX C/C++ projects by opening the Preferences dialog box (Window-->Preferences in the menu), and then choosing QNX-->Container properties.

  7. If the project is a QNX C/C++ project, you can click its Variant entry to select the build variant for each project you wish to build. You can choose All (for every variant that has already been created in the project's folder) or All Enabled (for just the variants you've selected). Note that the concept of variants makes sense only for QNX C/C++ projects.
  8. If you wish, click the Stop on error entry to control whether the build process for the container stops at the first subproject to have an error or continues to build all the remaining subprojects.
  9. If you want to reduce clutter in the C/C++ Projects view, then create a working set for your container. The working set contains all the projects initially added to the container. Note that the working set and the container have the same name.

    Note: If you later add elements to or remove elements from a container project, the working set isn't updated automatically.

  10. Click Finish. The IDE creates your container project.

To select a working set, click the down-arrow at the top of the C/C++ Projects view pane, and then select the working set you want.

Setting up a build configuration

Just as QNX C/C++ projects have build variants, container projects have build configurations. Each configuration can be entirely distinct from other configurations in the same container. For example, you could have two separate configurations, say Development and Released, in your top-level container. The Development configuration would build the Development configuration of any subcontainers, as well as the appropriate build variant for any subprojects. The Released configuration would be identical, except that it would build the Released variants of subprojects.


Note: Note that the default configuration is the first configuration that was created when the container project was created.

To create a build configuration for a container:

  1. In the C/C++ Projects view, right-click the container.
  2. Select Create Container Configuration….
  3. In the Container Build Configuration dialog, name the configuration.
  4. Click Add Project, then select all the projects to be included in this configuration and click OK.
  5. Change the Variant and Stop on error entries for each included project, as appropriate.

    Note: If you want to change the build order, use the Shift Up or Shift Down buttons.

  6. Click OK.

Editing existing configurations

There are two ways to change existing configurations for a container project, both of which appear in the right-click menu:


Note: Although you can use either method to edit a configuration, you might find changing the properties easier because it shows you a tree view of your entire container project.

Note also that you can edit only those configurations that are immediate children of the root container.


Editing via project properties

You can use the container project's properties to:

To edit a configuration:

  1. Right-click the container project and select Properties.
  2. In the left pane, select Container Build Configurations.
  3. Expand the project in the tree view on the right.
  4. Select the configuration you want to edit. Configurations are listed as children of the container.
  5. Click the Edit button at the right of the dialog. This opens the familiar Container Build Configuration dialog (from the New Container wizard), which you used when you created the container.
  6. Make any necessary changes — add, delete, reorder projects, or change which make target or variant you want built for any given project.

    Note: While editing a configuration, you can include or exclude a component from the build just by selecting or deselecting the component. If you exclude a component from being built, it isn't removed from your container.

  7. Click OK, then click OK again (to close the Properties dialog).

Editing via the Build Container Configuration… item

You can access the Container Build Configuration dialog from the container project's right-click menu.

Note that this method doesn't show you a tree view of your container.

To edit the configuration:

  1. Right-click the container project, then select Build Container Configuration….
  2. Select the configuration you want to edit from the list.
  3. Click the Edit button. This opens the familiar Container Build Configuration dialog (from the New Container wizard), which you used when you created the container.
  4. Make any necessary changes — add, delete, reorder projects, or change which make target or variant you want built for any given project.
  5. Click OK to save your changes and close the dialog.
  6. Click Build or Cancel in the Build Container Configuration dialog.

Building a container project

Once you've finished setting up your container project and its configurations, it's very simple to build your container:

  1. In the C/C++ Projects view, right-click your container project.
  2. Select Build Container Configuration….
  3. Choose the appropriate configuration from the dialog.
  4. Click Build.

Note: A project's build variant that's selected in the container configuration is built, regardless of whether the variant is selected in the C/C++ project's properties. In other words, the container project overrides the individual project's build-variant setting during the build.

The one exception to this is the All Enabled variant in the container configuration. If the container configuration is set to build all enabled variants of a project, then only those variants that you've selected in the project's build-variant properties are built.


To build the default container configuration, you can also use the Build item in the right-click menu.

Importing a BSP or other QNX source packages

QNX BSPs and other source packages (e.g. DDKs) are distributed as .zip archives. The IDE lets you import these packages into the IDE:

When you import a: The IDE creates a:
QNX BSP source package System Builder project
BSP source package from Foundry27 System Builder project (see Importing a BSP package from Foundry27)
QNX C/C++ source package C or C++ application or library project

Step 1: Use File-->Import…

You import a QNX source archive using the standard Eclipse import dialog:


Import BSP


The Import wizard.


Note: If you're importing a source package or BSP, select QNX Source Package and BSP.

As you can see, you can choose to import either a QNX BSP or a “source package.” Although a BSP is, in fact, a package that contains source code, the two types are structured differently and generate different types of projects. If you try to import a BSP archive as a QNX Source Package, the IDE won't create a System Builder project.

Step 2: Select a method to use for import

Select the method that you want to use to import the package or BSP: from a local file archive, or from a SVN repository on Foundry27.


Select the method used to import the source package


Selecting the method to use to import the source package.

If you select a package archive file, you'll need to specify a name in the File Name field, or click Browse to locate and select a file. After you choose the archive file type, by default the wizard presents you with a list of the packages on your host:


Select BSP


Choosing a package to import.

Notice that as you highlight a package in the list, the IDE shows a description for that package.

If you select a file from a SVN repository on Foundry27, you'll need to select a package:


Select BSP


Choosing a package to import from Foundry27.

Step 3: Select the source projects

Each source package contains several components (or projects, in IDE terms). For the package you selected, the wizard gives you a list of each source project contained in the archive:


Select projects


Selected source projects to import.

You can decide to import only certain parts of the source package; simply uncheck the entries you don't want (they're all selected by default). Again, as you highlight a component, you'll see its description in the bottom pane.

Step 4: Select a working set

The last page of the import wizard lets you name your source projects. You can specify:


Importing: setting project


The Settings panel for specifying options for the project being created for the imported source package or BSP.

To specify the settings for the project being created:

  1. Optional: To change the destination directory for the projects, enter a new path in the Directory for Projects field, or click Browse… to select one. The default is your IDE workspace.
  2. Optional: In the Project Prefix field, type a prefix name that you'd like to use for the project other than the default one specified. This is prepended to the name of each project imported from the BSP.
  3. Optional: If this project is to belong to a working set (meaning that you want to group all related imported projects together as a set), select the Add project to working sets option, and then select the name of the working set to use for the BSP.

If this is the first time you perform a checkout from Foundry27, the SVN New Repository Wizard is displayed.

Importing from Foundry27 for the first time

You'll need to specify your user ID and password that correspond to your Foundry27 account. In addition, you'll need to be successfully authenticated before you can proceed to the next panel in the wizard.

Click Finish to begin importing the package.

You might see a list of dependent package(s) with warning message at the bottom of the panel. The package won't build if you don't checkout the dependencies for the selected package.


Note:

If required, you might have to select any required dependency checkbox(s); you'll need to select which dependent package(s) to checkout at the same time.


Imported BSP package from Foundry27

The IDE sets up the required project properties (compiler options, build targets, and so on) so that the projects are able to build after the checkout process. In addition, the IDE maintains the source tree layout (to preserve the current status of the checked out source), sets up prebuilt and staging areas for the project, when necessary, and also creates the BSP project.

If you plan to import a BSP into the IDE, remember to give each project a different name.


Note: If you import dual-endian BSPs, the wizard shows this informational message:

BSP import message

If you add build variants, you need to copy the CPU-specific files to the new variant's build directories.


Step 5: Build

When you finish with the wizard, it creates all the projects and brings in the source from the archive. After the checkout of the BSP completes, right-click on the BSP project and select Build; the src project will be auto-built by the BSP project. The IDE will build all of the source under one project. Because the IDE creates a dependency between the BSP project and the src project, you don't need to build the src project; only the BSP project.


Note: If you answer Yes, the IDE begins the build process, which may take several minutes (depending on how much source you've imported).

If you decide not to build now, you can always do a Rebuild All from the main toolbar's Project menu at a later time.

If you didn't import all the components from a BSP package, you can bring in the rest of them by selecting the System Builder project and opening the import wizard (right-click the project, and then select Import…). The IDE detects your selection and then extends the existing BSP (rather than making a new one).

When you import a QNX BSP, the IDE opens the QNX BSP Perspective. This perspective combines the minimum elements from the C\C++ Development Perspective and the System Builder Perspective.

QNX BSP perspective

When you import a QNX Board Support Package, the IDE opens the QNX BSP perspective, which combines the minimum elements from both the C/C++ Development perspective and the System Builder perspective:


BSP perspective


The BSP perspective.

Importing a BSP package from Foundry27

The IDE lets you:

Using the IDE, you can:

For information about setting options to export a BSP, see Setting export options for a BSP.”

Importing remote source packages from Foundry27

You can use the Import Wizard from the IDE to locate and import remote source packages from Foundry27. To import a BSP package from Foundry27:

  1. Click File-->Import, and then expand QNX.

    Importing from Foundry27

  2. Select QNX Source Package and BSP, and then click Next.

    Importing: Selecting a method for import

  3. Select Import from Foundry27 SVN repository and click Next.
  4. Select a package by specifying a name in the Search Package by Name field, or you can expand the existing packages in the Known Foundry27 Source Packages list.

    The panel shows the Foundry27 package in a tree structure. The packages are expandable if they contain sub-packages.

    The Description field provides a brief description about the selected package.

    Importing: setting package to import

  5. Select a package, and then click Next.

    Importing: setting project

  6. Optional: To change the destination directory for the projects, enter a new path in the Directory for Projects field, or click Browse… to select one. The default is your IDE workspace.
  7. Optional: In the Project Prefix field, type a prefix name that you'd like to use for the project other than the default one specified. This is prepended to the name of each project imported from the BSP.
  8. Optional: If this project is to belong to a working set (meaning that you want to group all related imported projects together as a set), select the Add project to working sets option, and then select the name of the working set to use for the BSP.

    If this is the first time you perform a checkout from Foundry27, the SVN New Repository Wizard is displayed.

    Importing from Foundry27 for the first time

    You'll need to specify your user ID and password that correspond to your Foundry27 account. In addition, you'll need to be successfully authenticated before you can proceed to the next panel in the wizard.

  9. Click Finish to begin importing the package.

    You might see a list of dependent package(s) with warning message at the bottom of the panel. The package won't build if you don't checkout the dependencies for the selected package.


    Note:

    If required, you might have to select any required dependency checkbox(s); you'll need to select which dependent package(s) to checkout at the same time.


    Imported BSP package from Foundry27

    The IDE sets up the required project properties (compiler options, build targets, and so on) so that the projects are able to build after the checkout process. In addition, the IDE maintains the source tree layout (to preserve the current status of the checked out source), sets up prebuilt and staging areas for the project, when necessary, and also creates the BSP project.

  10. After the checkout of the BSP completes, right-click on the BSP project and select Build; the src project will be auto-built by the BSP project.

    The IDE will build all of the source under one project. Because the IDE creates a dependency between the BSP project and the src project, you don't need to build the src project; only the BSP project.

Checking out BSP packages directly from the SVN Repositories view

To view and check out source packages directly from the source tree:

  1. Open the SVN Repositories view (use Window-->Show View, and then expand SVN).
  2. Set up Foundry27 repositories in the SVN Repositories view, or select an existing Foundry27 repository.
  3. If you haven't already logged into Foundry27, then you'll see the Authentication dialog where you must type your Foundry27 user ID and password.

    SVN Repositories view


    Note:

    In the SVN repository view, when you create a new repository location, we recommend that if permitted, you also save the password. This means the next time you select this repository location, the Authentication dialog doesn't display.


  4. Once authenticated, browse the available source tree for the list of remote packages.
  5. Locate the package that you want to import, and then select that package.
  6. Right-click on a source item from the tree, and then select Check Out to start the checkout process.
  7. After the checkout of the BSP completes, right-click on the BSP project and select Build.

Note: The Foundry27 Welcome page contains community news, posted downloads, and updated product marketing information. The Welcome page has links to remote Foundry27 pages and to local help pages.

Exporting projects

You can export projects to your filesystem or to an archive file by doing one of the following:

Using the Export… command

The Export wizard helps you export an entire project to your filesystem or an archive file.

To export one or more projects:

  1. Choose File-->Export… (or Export… from the Navigator context menu).

    The Export wizard appears:

    Export wizard

  2. To export your project to the filesystem, choose General-->File System. To export your project to an archive file, choose General-->Archive File. Click Next.

    The Export wizard's next panel appears:

    Export wizard

  3. Select the projects you want to export. You can also select or deselect specific files in each project.

    To select files based on their extensions, click the Select Types… button. The Select Types dialog box appears:

    Select Types dialog

    Click one or more extensions, and then click OK to filter the selected files in the Export wizard.

  4. Type the name of the directory (if you're exporting to the filesystem) or file (if you're exporting to an archive file) in the input field.
  5. When you're done, click Finish.

Note: If you export more than one project, and you import from the resulting filesystem or archive file, you'll get one project containing all of the projects you exported.

Exporting a System Builder project

You can export a System Builder project to a Mkxfs build file(s) by doing the following:

  1. Choose File-->Export… (or Export… from the Navigator context menu).

    The Export wizard appears:

    Export wizard

  2. To export your System Builder project to a Mkxfs build file(s), choose QNX-->System Builder project to Mkxfs Build File(s).
  3. Click Next.
  4. Select the projects you want to export. You can also select or deselect specific files in each project.

    To select files based on their extensions, click the Select Types… button. The Select Types dialog box appears:

    Select Types dialog

    Click one or more extensions, and then click OK to filter the selected files in the Export wizard.

  5. Type the name of the directory (if you're exporting to the filesystem) or file (if you're exporting to an archive file) in the input field.
  6. When you're done, click Finish.

Note:

To achieve same results as when using IDE build, when you export a build file, ensure that if you're using Override folders, you use -r option to pass the path to the override directory.



Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ide_en/user_guide/cvs.html on line 1889

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ide_en/user_guide/cvs.html on line 1889