diff --git a/QUICKSTART_DEVELOPER.md b/QUICKSTART_DEVELOPER.md new file mode 100644 index 0000000000000000000000000000000000000000..6fe77ff8eed9fb8663ed5c043dff44a64ae3853c --- /dev/null +++ b/QUICKSTART_DEVELOPER.md @@ -0,0 +1,24 @@ +# Quickstart guide for generator developers +- Download and install Java(8+), Maven, as well as Git. +- Clone this repository: + ```bash + cd your/project/directory + git clone https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware.git + ``` +- Build the project + - Using the command line: + ```bash + cd EMAM2Middleware + mvn clean install -s settings.xml + ``` + - Using Intellij Idea: + - Open and import the project + - Open the maven settings(ctrl+shift+a, search 'Maven settings'), tick 'Override' at 'User settings file' and select the 'settings.xml' from this Project + - Update all maven dependencies(ctrl+shift+a, seach 'Reimport All Maven Projects') + - Build the project(crtl+F9) +- Make your changes + +## Compiling the Projects +Options +1. Add your new generated test projects to the integration tests(check the scripts in [src/test/bash/](src/test/bash/) as well as [.gitlab-ci.yml](.gitlab-ci.yml)) and let the CI/CD system compile them. Alternatively you can use Docker to run the integration tests locally(reference [README.md](README.md) , Section 'Running the Integration tests locally') +2. Install all dependencies (reference [README.md](README.md) , Section 'Dependencies needed to compile the generated projects') and execute the generated compile scripts. \ No newline at end of file diff --git a/QUICKSTART_USER.md b/QUICKSTART_USER.md new file mode 100644 index 0000000000000000000000000000000000000000..890f083fbf14523860c0061f9e7ddfeabf1e25fe --- /dev/null +++ b/QUICKSTART_USER.md @@ -0,0 +1,28 @@ +# Quickstart guide for generator users +- Download the latest version of the generator from the [se-nexus](https://nexus.se.rwth-aachen.de/service/rest/repository/browse/public/de/monticore/lang/monticar/embedded-montiarc-math-middleware-generator/) (e.g. .../0.0.20-20190311.154342-1/embedded-montiarc-math-middleware-generator-0.0.20-20190311.154342-1-jar-with-dependencies.jar) and save it as mw-generator.jar +- Create a `project.json` config file for your project + - make sure your model directory and root model are correct + - for examples see: [valid.json](src/test/resources/config/valid.json), [emadl.json](src/test/resources/config/emadl.json) + - Refer to the main [readme.md](README.md)(section CLI) to see all options. +- Generate your project by running +```bash +java -jar mw-generator.jar project.json +``` + +- Refer to the main [readme.md](README.md)(Section: Dependencies needed to compile the generated projects) for instructions on how to install the needed dependencies for compilation + +- Compile your project by running one of the generated compile scripts. E.g.: +```bash +cd defined/output/directory +./compile.sh +# or on Windows +call compileMingw.bat +# or +call compileMsbuild.bat +# or to avoid path length error: +call substCompileMingw.bat +``` + +For two example Projects using this generator see: +- [Cooperative Intersection](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/applications/cooperativeintersection) (Uses EMAM, ROS, CoInCar Simulator) +- [Autonomous driving](https://git.rwth-aachen.de/autonomousdriving/torcs_dl) (Uses EMADL, ROS, Torcs Simulator) \ No newline at end of file diff --git a/README.md b/README.md index dbcb43367470a565c9d5e33a6189781e3a10bd2d..0efc69344be6201bcf996884cb78bea0371e6d78 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ This generator takes an EMAM or EMADL model and connects it to a middleware libr All communication of these 2 Components will then be tunneled trough the specified middleware: ![MiddlewareAdapter](/uploads/6e9c69e6b56554579551769174df3697/MiddlewareAdapter.png) +## Quickstart +If you want to use the generator for your project, check out [QUICKSTART_USER.md](QUICKSTART_USER.md). + +If you want to add features to this generator, check out [QUICKSTART_DEVELOPER.md](QUICKSTART_DEVELOPER.md) ## Writing your own Middleware Generator see [TUTORIAL_ADD_MIDDLEWARE.md](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware/blob/master/TUTORIAL_ADD_MIDDLEWARE.md)