The general process of setting up and using a development machine is described in
Set Up a Develoment Machine. That topic is written for a Mac using the Terminal. This topic calls out the steps that are different on a Windows machine. Follow the steps in
Set Up a Development Machine, and use the guidance here wherever Windows differs.
Paths and Commands
Throughout
Set Up a Development Machine, translate paths and commands for Windows:
- Enlistment location: One option for <LK_ENLISTMENT> is "C:\labkey\labkeyEnlistment".
- Home directory: Where the instructions refer to your home directory (~), use C:\Users\<you>.
- Path separators: Use backslashes in place of forward slashes. For example, <LK_ENLISTMENT>/server/modules becomes <LK_ENLISTMENT>\server\modules.
- Gradle commands: The instructions call the gradle wrapper as ./gradlew. On Windows, the enlistment includes gradlew.bat for this purpose. How you call it depends on your command-line shell:
| Shell | Example |
|---|
| Command Prompt | gradlew deployApp |
| PowerShell | .\gradlew deployApp |
Git Client
Instead of the Apple command line developer tools, install a Git client for Windows.
See the common documentation.
- Install GitHub Desktop:
- Install a command-line git option:
Java
When you
download the JDK, be certain to use the x64 version. To install it, run the .msi installer or unzip the archive to a chosen directory (for example, C:\labkey\apps\jdk-##).
PostgreSQL Database
- Install PostgreSQL: Download and run the Windows PostgreSQL one click installer.
- Run PostgreSQL in Docker: When you create the PostgreSQL container:
- Use a Windows folder for the database files, written with forward slashes. For example, C:/labkey/pgdata:/var/lib/postgresql in place of ~/labkey/pgdata:/var/lib/postgresql.
- Run the command in PowerShell, which handles the single quotes around the POSTGRES_PASSWORD value as shown. In Command Prompt, use double quotes instead.
Gradle Configuration
When you
create the global gradle.properties file:
- Create a .gradle folder in C:\Users\<you>, if it doesn't already exist.
- This folder may be hidden. To show hidden items in File Explorer, select View > Show > Hidden items.
- If the file explorer does not allow you to create a folder beginning with a period, navigate to that location and use a command prompt to type:
- Copy the file <LK_ENLISTMENT>\gradle\global_gradle.properties_template to C:\Users\<you>\.gradle.
- Rename the file so it is named just gradle.properties.
Environment Variables and System PATH
Instead of editing a shell startup file, set
the environment variables as Windows system environment variables.
- Open the Windows Start menu, search for "Edit the system environment variables", and click Environment Variables.
- JAVA_HOME
- Create or modify the system environment variable JAVA_HOME so it points to your JDK installation location (for example, C:\labkey\apps\jdk-##).
- PATH
- Add the JDK to your system PATH. Using the JAVA_HOME variable will simplify upgrades later:
- Add the <LK_ENLISTMENT>\build\deploy\bin location to your system PATH. For example:
C:\labkey\labkeyEnlistment\build\deploy\bin
- GIT_ACCESS_TOKEN
- Open a new command window so the changes take effect.
IntelliJ IDEA
The setup for IntelliJ is described in the
common documentation. On Windows:
- Settings are under File > Settings instead of IntelliJ IDEA > Settings. In IntelliJ's newer interface, click the four-bars menu in the upper left to find the File menu.
- For the NODE_PATH path variable, use a Windows path, for example, <LK_ENLISTMENT>\build\.node\node-v#.#.##\bin\node
- When you configure the target JDK, browse to your JDK installation location, for example, C:\labkey\apps\jdk-##.
- Check for updates using Help > Check for Updates...
- The shortcut for "Update Project" is Ctrl-T.
class="heading-1">Related Topics