Install Instructions Windows

collingreen edited this page Dec 4, 2014 · 3 revisions

Windows

The following is a list of prequisites for running the Game Closure DevKit on Windows. Download the following projects and refer to the sections below for configuration tips.

Web and Native Development

  • msysgit (> 1.7.10)
    • The full installer should be used since it contains the git bash command prompt that is needed to run devkit and the commands below. The default options during the installation process will work with the GC Devkit. This is extremely important! You need this to execute all devkit commands!
  • Node.js (>= 0.10)
  • npm
  • Java JDK
  • Chrome
    • The Chrome web browser is the preferred development environment because of its superior debugging tools. This is the browser we use to develop the Game Closure DevKit and test against.

Android Development

  • Android SDK
    • The full adt bundle comes as a zip file rather than an installer and is not required. The download listed under use existing editor will also work, is smaller, and also provides an installer.
  • Android NDK
  • Apache Ant

For more information, see the Android Setup Guide.

###Installation Tip

The easiest way to install these packages is through their respective installers. Note the location that each of the above dependencies is installed to because they will need to be added to your Windows environment PATH. For some of the above dependencies they come as zip downloads rather than installers. In these cases, they need to be unzipped and the location of the unzipped files needs to be added to your PATH. [This is true for the Android NDK, ant build tools, and the Android SDK when using the adt bundle]

Add the tools to your PATH

Once the above dependencies are downloaded and installed, it is important that the following directories are listed in your PATH environment variable. Note that the location of these directories depends on where you installed the dependencies.

Web and Native Development

  • {npm install location}
  • {java install location}\jdk1.7.0_13\bin

Android Development

  • {android-ndk install location}\android-ndk-r9\prebuilt\windows\bin
  • {android-ndk install location}\android-ndk-r9
  • {ant install location}\apache-ant-1.8.4\bin
  • {android-sdk install location}\android-sdk\tools
  • {android-sdk install location}\android-sdk\platform-tools

Depending on your version of Windows, the full path to the NDK bin directory may look like this instead:

  • {android-ndk install location}\android-ndk-r9\prebuilt\windows-x86_64\bin

If you need assistance configuring the path refer to this document which describes how to configure the java environment variables.

For example, your path may contain the following after adding everything. Note that some of the paths below are added automatically by installers and Windows. Also be aware that these paths will be different based on the location where you installed the dependencies.

C:\android-ndk-r9\prebuilt\windows\bin;
C:\android-ndk-r9;
C:\Program Files\Java\jdk1.7.0_13\bin;
C:\apache-ant-1.8.4\bin;
C:\Users\gc\AppData\Local\Android\android-sdk\tools;
C:\Users\gc\AppData\Local\Android\android-sdk\platform-tools;
C:\Users\gc\AppData\Roaming\npm\;
%SystemRoot%\system32;%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files\nodejs\

###JAVA HOME Your JAVA_HOME environment variable should also be set to the location of your java directory. For example: C:\Program Files\Java\jdk1.7.0_13

For more information on managing environment variables in Windows, see Microsoft's official docs.

Installing Devkit

Now, install devkit. NOTE: You may run into some weird errors if you don't own your global node_modules folder.

npm install -g devkit

Usage

That's it! Run devkit to see the available commands. NOTE: you need to be using the git-bash prompt installed above when running all devkit commands!

Troubleshooting

Error: Could not import '.globals'

This is usually from running devkit outside of the git-bash prompt. Try again using git-bash.