Skip to content

Development Environment Setup

Steven Soloff edited this page Feb 15, 2017 · 2 revisions

Overview

This article describes how to set up a Gamegineer development environment.

Software

Many of the development tools used by Gamegineer are not stored in version control simply due to the large size of their distributions. Therefore, it is necessary to install this software outside of the formal development process. As an administrative user, install the software packages that follow. Note that only specific versions have been approved for use in a Gamegineer development environment; wildcards have been used where appropriate.

Java SE JDK

Install version 1.8.0_121 of the Java SE 8 JDK. The JDK is required for most everything in the development process, including building and testing the software.

Eclipse IDE

Install version Neon.2 of the Eclipse for RCP and RAP Developers. Gamegineer is a collection of OSGi bundles built on the Eclipse Equinox OSGi core framework. The Eclipse IDE provides the tools necessary to build such OSGi bundles.

It is expected that any version of the Eclipse IDE later than Neon.2 can be used as a development environment as long as the developer properly sets the target platform for their Eclipse IDE workspace.

Execution Environment Descriptions

Install the latest execution environment descriptions for the version of Eclipse you are using. See the Eclipse wiki for installation instructions.

Maven

Install version 3.3.9 of Apache Maven. Maven is used to implement portions of the build process.

Git

Install version 2.11.x of the Git client. A Git client is required for the developer to access the Gamegineer version control repository.

Configuration

Development Environment Shell

A script is used to start a shell that ensures all developers are using the same settings in their development environment. This script depends on your specific workstation configuration and thus cannot be provided in a generalized form. A script template is provided in the version control repository at https://raw.githubusercontent.com/gamegineer/dev/master/other/org.gamegineer.other.settings/shell/templates/dev-environment.bat.

Download this template to an appropriate location on your workstation, for example in your local profile. Using a text editor, open the script template and supply appropriate values for the environment variables between the BEGIN-CUSTOM-VARIABLES and END-CUSTOM-VARIABLES markers. You may wish to create a shortcut to this script using a target of cmd /k full-path-to-script. Executing this shortcut will open a shell that represents the root of the development environment.

It is very important that all development activities originate from this shell. For example, do not start the Eclipse IDE from a separate shortcut, rather you should use the provided eclipse-dev macro to ensure the IDE is supplied with the correct environment variables. This shell also serves as the launching point for any Ant or Maven builds you may initiate.

Maven Settings

The Maven build process depends upon some user-defined settings that cannot be provided in the project files stored in version control (e.g. passwords). A Maven settings template is provided in the version control repository at https://raw.githubusercontent.com/gamegineer/dev/master/other/org.gamegineer.other.settings/maven/templates/settings.xml.

Download this template to ~/.m2/settings.xml. Using a text editor, open the settings template and supply appropriate values where directed by the presence of CUSTOM-VARIABLES comments.

Workspace

Create Workspace

Start Eclipse and create a new workspace in the folder you specified for the WORKSPACE_HOME environment variable above. To speed up this process, you may want to disable automatic builds using the Project > Build Automatically menu command. At the completion of this process, re-enable automatic builds using the same command.

Configure m2e

Open the workspace preferences dialog (Windows > Preferences) and go to the Maven > Installations page. Click Add..., browse to the location of Maven you installed above, and click OK. Ensure the new Maven installation is checked. Finally, click OK to close the workspace preferences dialog.

Import Projects

Open the import dialog (File > Import...). Expand the Maven node, select Check out Maven Projects from SCM, and click Next.

Before continuing you must install the m2e EGit SCM connector from the m2e Marketplace. Click the m2e Marketplace link. Check the m2e-egit team provider, and click Finish. Follow the instructions provided in the wizard to complete the installation. You may be required to restart Eclipse. After this step, return to the Target Location page of the import wizard and continue with the next step.

Select git in the SCM URL combo box, and enter ssh://[email protected]/gamegineer/dev.git in the adjacent text field. Uncheck the Checkout All Projects option. Click Finish. The wizard will close and the projects at the specified URL will be downloaded. This may take several minutes to complete. When the download is complete, the Import Maven Projects wizard will appear. Select all items that begin with /target-platform, and click the Deselect Tree button. Select all items that begin with /third-party, and click the Deselect Tree button. Click Finish. The wizard will close and the selected projects will be installed into the workspace. This may take several minutes to complete.

Select all projects in the workspace, and select Replace With > HEAD Revision from the context menu. Click Yes to All when prompted to overwrite unversioned files.

Select all projects in the workspace, and select Maven > Update Project... from the context menu. Uncheck the Update project configuration from pom.xml button, and click OK.

Target Platform

The default Gamegineer target platform is stored in the workspace at org.gamegineer.main/default.target. Open this file and click the Set as Target Platform link in the upper-right corner of the editor window.

You must repeat this process whenever you or another developer changes the target platform.

API Baseline

Open the workspace preferences dialog (Windows > Preferences) and go to the Plug-in Development > API Baselines' page. Click Add Baseline.... Select A target platform, and click Next. Name the new baseline Default Gamegineer Target. Select the target named default. Click Reset to load the target, and click Finish to create the baseline. Finally, click OK to close the workspace preferences dialog.

You must repeat this process (using Edit... instead of Add Baseline...) whenever you or another developer changes the target platform.

Import Settings

The org.gamegineer.other.settings project contains the standard workspace settings to be used by all Gamegineer developers.

In a new workspace, you must import each file under eclipse/<version>/templates into the corresponding section of your workspace preferences (Window > Preferences). Each folder under templates is arranged in a hierarchy identical to how the Eclipse Preferences dialog is structured.

The path for the user-defined spelling dictionary under General > Editors > Text Editors > Spelling should be set to ${project_loc:org.gamegineer.other.settings}/eclipse/templates/general/editors/text-editors/spelling/user-dictionary.txt.

You will then proceed to configure your workspace as you desire (e.g. arrange views, adjust editor colors, etc.). Gamegineer developers are permitted to store their personal workspace preferences under eclipse/<version>/users. Export your preferences to a file in this directory with the same name as your SourceForge user ID (e.g. joe_developer.epf**). Please avoid modifying another user's preferences. **

Nexus

Each developer should have their own local instance of Nexus. A local Nexus repository is useful when testing changes to certain build goals, such as changing the target platform or generating the project website. Installation of Nexus should be done according to the process described in Build Server Setup.