Skip to content
This repository was archived by the owner on Oct 27, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,39 @@ The following is the list of changes, which the commit history should easily ref
We are working on the [TouchCORE](http://touchcore.cs.mcgill.ca) (formerly TouchRAM) project in the [Software Engineering Laboratory](http://www.cs.mcgill.ca/~joerg/SEL/SEL_Home.html) at [McGill University](http://www.mcgill.ca). When we started developing our application, MT4j v0.98 was freshly released. Unfortunately, it was never updated since, which lead us to making some adjustments our own (besides extending some of MT4j's components in our project). We always had the problem of running it with Java 7 and higher on OSX, because of JOGL 1.x only working with the JRE provided by Apple. We worked with this constraint for a long time, but finally made the switch due to other constraints, thanks to some helpful pointers we found in the [UltraCom project](https://github.com/lodsb/UltraCom/tree/proc2) (which unfortunately has many more modifications to MT4j).

Because there are probably more people out there facing the same problem, we are sharing this updated version. Hope it helps! :)

## How!

This sections explains how to configure Eclipse to actually build this library for further reuse:

### Project configurations

* Clone this repo
* Make sure Eclipse uses JDK 1.8 as runtime and compiler compliance:
* Right-click on project -> properties -> Java Build Path -> Libraries -> Remove JDK13, add JDK 1.8 (```brew cask install adoptopenjdk8```)
* Right-click on project -> properties -> Java Compiler -> Enable project specific settings, compiler compliance level = 1.8
* Clean and build: Project -> Clean...
* Make sure the tests pass:
* mt4j-core -> examples -> basic.helloworld -> Right-click: StartHelloWorld -> Run as... -> Java application

### Build a JAR

* Right click on ```build.xml``` -> Run As... -> Ant Build
Alternatively: ```cd mt4j-core; ant create_run_jar```
* This generates a new file, for further use as MT4J-library: **mt4j-core/mt4j.jar**

> *Note:* Unfortunately the Ant build requires the compiled classes in a ```bin```subfolder (Created by Eclipse: ```clean & build```). So you can not avoid Eclipse.

### Mavenize it

* To build a local Maven artifact, based on this jar:
```mvn install:install-file -Dfile=mt4j.jar -DgroupId=friend.of.mcgillsel -DartifactId=mt4j -Dversion=mspatch-1.0 -Dpackaging=jar -DcreateChecksum=true```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is friend.of.... as the group ID required? Otherwise just use ca.mcgill.sel

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitate to use ca.mcgill.sel. Usually the groupId are the source-authors (who we are not). So it would be misleading to use our own id here. On the other hand it would be bold to use the signature of mt4j's official authors. I found it best to indicate in the signature that it is related to our work at sel/mcgill, but unofficial.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the version set as mspatch-1.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an indicator, that it is a patched version of the original mt4j, and that it is the first maven release. Have another one in the queue, that would then become 1.1 etc...

* From here on you can simply refer to mt4j in your Maven projects, using the following snippet:
```xml
<dependency>
<groupId>friend.of.mcgillsel</groupId>
<artifactId>mt4j</artifactId>
<version>mspatch-1.0</version>
</dependency>
```