-
Notifications
You must be signed in to change notification settings - Fork 24
Configuring the environment
This document describes how to set up your development environment to build, contribute and test VariaMos
- Required instalation
- System configuration
- IDE configuration
- Getting the sources
- SWI Prolog configuration for Windows and debug options
- Importing the project to Eclipse IDE
Gradle Build Tool
Current version 4.1
Gradle is the build tool that VariaMos uses for doing compilation and integration tasks.
"Gradle was designed for multi-project builds which can grow to be quite large, and supports incremental builds by intelligently determining which parts of the build tree are up-to-date, so that any task dependent upon those parts will not need to be re-executed" (Source: Gradle web site)
Download url: https://gradle.org/install/
SWIProlog 7.6.3
SWI-Prolog offers a comprehensive free Prolog environment.
Download url:
- (64 bits) http://www.swi-prolog.org/download/stable/bin/swipl-w64-763.exe
- (32 bits) http://www.swi-prolog.org/download/stable/bin/swipl-w32-763.exe
Java JDK 1.8
The JDK is a development environment for building applications, applets, and components using the Java programming language.
Note: Be careful, your JAVA version must be the same that your SWIProlog version: 64 bits for SWI Prolog 64 bits, or 32 bits for SWI Prolog 32 bits
Eclipse IDE for Java Developers
Recomended version: ECLIPSE Oxygen. This version includes a Git client and Gradle integration. Both tools are used through the project
Download url: https://eclipse.org/downloads//
GIT
Git is a free and open source distributed version control system.
Download url: https://git-scm.com/downloads//
Note: Only for Windows users, be sure you also install the Gitbash during your installation
Configure the following system variables:
CLASSPATH=.;C:\Program Files\swipl\lib\jpl.jar;C:\Program Files\swipl\lib\
Path=C:\Program Files\swipl\lib\jpl.jar;C:\Program Files\swipl\bin;%Path%
Restart Windows
JavaDoc comments Configure eclipse to add automatically the author each time a new class is created.
From Eclipse marketplace
Install the Minimalist Gradle Editor from the Eclipse Marketplace.
This plugin helps us to see Gradle files with colors and spaces for easy edition.
Activate autoformat for code
Open the Preferences (Window menu).
Search for: Save actions and activate the following options:
- Perform the selected actions on save
- Format source code (all lines)
- Organize imports
- Additional actions
Create an account on GitHub http://github.com
Access the VariaMos fork: https://github.com/SPLA/VARIAMOS and create a fork on your own account
Copy the HTTPS clone URL from your new fork
You can learn to use Git at http://git-scm.com/book/en/v2
Then you can also learn to use Github at https://guides.github.com/
An upstream remote repository is required to obtain updates from the source code.
Open the view Git Repositories
Right click on Remotes, Create Remotes...
Define the name (upstream), configure fetch
Paste the URI https://github.com/SPLA/VARIAMOS.git
Change the mapping to development (click Advanced... delete the existing mapping and create a development mapping)
To create the development mapping in the Fetch Ref Specifications, select ref/head/development in the Source ref field and refs/remotes/upstream/development in Destination ref field. Then click Add Spec and remove the other.
Right click on the project, Team, Remote, Fetch from..
Select the upstream remote repository
If the development sources are set (if not follow the last step in the previous section), click finish.
Right click on the project, Team, Merge (Or Rebase)
Resolve conflict with you local code if any (edit the conflicting files).
Change to Team Synchronizing view
Select for the elements Mark as Merged (after the conflicts are resolved).
Look for com.variamos.gui.editor.Main on the project com.variamos.gui. Right click and open ''Run Configurations...'' within the ''Run As'' menu. Open ''Main'' under ''Java Application'' and select ''(x)= Arguments'' tab. On the ''Program arguments'' box include: '''noupdate debug''' (this is important to avoid the report of fake execution statistics. Also, to show all the errors and messages on Eclipse instead of the application console). On the ''VM arguments'' box include: -Djava.library.path="C:\Program Files\swipl\bin;." After saving the configuration you should be able to run VariaMos correctly. The noupdate program argument blocks the search for new versions and execution counter (registered at variamos.com). The debug program argument allows to view the errors on the eclipse's console. The VM arguments allow the use of SWI Prolog functions.
- Open Eclipse IDE.
- Click on "File", then "Import".
- Expand "Gradle" option, Select "Existing Gradle Project".
- Search for the directory where VariaMos is saved.
- Click next until finish.
- Verify VariaMos was recognized, and click "Finish".