These is a very basic instruction set for building Mograsim from source.
It assumes you know nothing about Eclipse Plug-In development, Maven, or Git.
**Note: Mograsim in built automatically by GitLab CI, packaging the repository only requires one extra **
- Java JDK 11 or later (or Oracle Implementation)
- Eclipse 2019-03 or later (TODO: do earlier versions work?)
- (optional) Git
- In Eclipse, click on "Help" -> "Install New Software...".
- Next to "Work With:", select "The Eclipse Project Updates".
- Tick "Eclipse PDE Plug-in Developer Resources" (expand "Eclipse Plugin Development Tools" or type "PDE" in the search bar to see it).
- Click on "Next >" two times, read and accept the license, and click on "Finish".
- Wait for the installation to complete (may take a while). When prompted, restart Eclipse.
Can be done via Git or via EGit (Eclipse Git).
- In Eclipse, click on "Window" -> "Show View" -> "Other...".
- Select "Git Repositories" (expand "Git" to see it); click on "Open".
- In the "Git Repositories" view, click on "Clone a Git repository".
- Enter the repository URL ("Host", "Repository path", and "Protocol" should fill automatically); click on "Next >".
- Select only "master"; click on "Next >".
- Enter the directory you want the Mograsim projects to be saved in.
- Tick "Clone submodules" and "Import all existing Eclipse projects after clone finishes"; click on "Finish".
- In a command prompt (Terminal on Linux; git-bash on Windows), execute
git clone --recurse-submodules --single-branch -b master <repository URL> <target directory>
. - (optional) Import the repository in Eclipse:
- In Eclipse, open the "Git Repositories" view as described in the first two steps in a).
- In the "Git Repositories" view, click on "Add an existing local Git repository".
- Enter the directory of the repository and tick the repository you see in the list below; click on "Add". (If there is another repository ending with "SWTHelper", ignore it).
- Import the projects into the workspace:
- Click on "File" -> "Import...".
- Select "Existing Projects into Workspace" (expand "General" to see it); click on "Next >".
- Tick "Select root directory:" and "Search for nested projects".
- Next to "Select root directory:", enter the directory of the repository; click on "Finish".
Note: After importing the projects, probably an automatic workspace build will start. Wait for it to finish before continuing.
- In the project explorer or package explorer, right-click on "net.mograsim", click on "Run As" -> "Maven build...".
- Make sure to run Maven with JDK 11
- Next to "Goals", enter "clean verify"; click on "Run" and wait for it to finish (this will take a while).
- Select all projects, right-click, and click on "Refresh".
The update site now should be built and is located in net.mograsim.plugin.updatesite/target/repository. In there you should see, among other files, a folder named "features", a folder named "plugins" containing some jar files, and two jar files called "artifacts.jar" and "content.jar".
To install Mograsim from this site, follow the Getting Started guide,
but in the dialog for adding a software site, instead of using the online update site address,
click on "Local..." and select <repository directory>/releng/net.mograsim.plugin.updatesite/target/repository/
.
More information about the build, structure and environment can be found in the development environment description.