Prepare your working copy

For those of you already familiar with contributing via a Git repository, I’ll make it short:
Please fork the repository and create pull requests when you finished your work.

Log in into BitBucket

If you don’t have one yet, the first thing you need to do, is create a Bitbucket account and log in to Bitbucket. If you already have an account, just log in.

Prepare your working copy

To be able to contribute to either code or data, you must prepare your personal working copy of the repository you are interested in. First get the correct link and go there.
Shadowrun Commlink is here.

If in doubt, contact me on Slack or via other channels.

Creating a fork

Collaboration works by having a master repository and a cloned repository for each contributor - that clone is called a “fork”. To create your personal fork, select the Three-Dots right of “Clone” in the top right corner, then find “fork this repository” in the pull down menu.

In the pop-up menu, Workspace should be defined by your Bitbucket login, if necessary, create a new project (or use an existing one if you like), then name the fork as you like.

Congratulations, you now have your personal copy of the repository. At the moment it is only available online and not yet on your computer, but we will change that now.

Clone/Check out your forked repository

For the next step, you need the Git URL to clone a repository. In the webfrontend of the repository, you find a “Clone” button in the upper right. It opens a dialog, that provides you with either a SSH or HTTPS URI.

I recommend the later, so use the pull down menu to switch to HTTPS. Copy the URL.

Minimal Setup

If you only want to contribute to XML and do not need to test your own builds, you only need a tool to handle the pulling and pushing from your Bitbucket fork to your computer.

Minimum setup is to install Git and Git GUI.

Add you repository URL, copied above.
Prior starting work on any change, go to Bitbucket and sync your fork, then go to Git GUI, use “Remote, Fetch, from Origin”, “Merge, Local Merge, Tracking Brach Origin/Master” to make sure your copy on the computer has latest level.

Developer Setup

If you want to edit code and trial complicated changes, you will need to install Java, Maven, Eclipse and M2E.

Download Java JDK (developer kit) and install.

Download Maven binary zip file, unzip to location of your choice and set the %JAVA_HOME% und %MAVEN_HOME% variables. For instructions see Maven page or this helpful video.

Download Eclipse and install “Eclipse for Java Developers” setup.

Install M2E plugin from within Eclipse software (Help → Install New Software, “Work with:” https://download.eclipse.org/technology/m2e/releases/latest/).

Open the “Git Repositories” view (Window → Show View → Other → Git → Git Repositories).

In the Git Repositories view there is a button to “Clone a Git Repository and add the clone to this view”. It opens a dialog where you can enter the URI from the step “Clone/Check out your forked repository” above.

Enter the Git URI

Select branches

Select local directory

When selecting a branch, you are usually interested in “master” and don’t need the others.

Especially for Eclipse you should ensure the option “Import all existing Eclipse projects …” is checked.

In addition, you need to get the generic “Commlink” repository, which contains the main app and the build scripts. That is located at Github here. Click on code and copy the HTTPS URI, then load that into Eclipse, same as above.

To use Maven with the Genesis plugins, Maven needs to be told, where it can find the Maven repository to resolve dependencies. This is done by providing a file named “settings.xml” in your users Maven directory (Linux: /home/<user>/.m2/settings.xml Windows: C:\User\<user>\.m2\settings.xml )

settings.xml

<?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <profiles> <profile> <id>Development</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>ossrh</id> <url>https://oss.sonatype.org/content/groups/public</url> <snapshots><enabled>true</enabled></snapshots> <releases><enabled>true</enabled></releases> </repository> <repository> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> <id>jfrog</id> <url>https://rpgframework.jfrog.io/artifactory/RPGFramework</url> </repository> </repositories> </profile> </profiles> </settings>

Working with Eclipse

Though all projects contain a minimal Eclipse project definition, not all relevant files are included in the repository. So, if you chose Eclipse as your IDE, you must refresh all projects - after you have set up Maven as mentioned above.

In Eclipse, go to “Window” - “Show View” - “Package Explorer”, right click on any project in the “Package Explorer” view, then “Maven” - “Update Project…” (or press ALT+F5). Then tick on “select all” and click “Ok”. Wait until the status information in the bottom right corner shows Maven is no longer working.

To start Commlink, go to the Package Explorer view, open "ComLink6" - "src/main/java" - "de.rpgframework.shadowrun6.comlink", then right click on “ComLinkStarter", select “run as” then “1 Java Application”.

If this does not work, contact us for a potential Teamviewer session to solve the issue.