Project

General

Profile

Building » History » Revision 8

Revision 7 (Sergey Smolov, 01/22/2020 03:33 PM) → Revision 8/9 (Sergey Smolov, 01/22/2020 04:40 PM)

h1. Building 

 h2. Prerequisite 

 To build the _Verilog Translator_ tool from sources, following components must be installed: 
 # *Git* 
 # *Java Development Kit (JDK) 1.11* or higher (use "AdoptOpenJDK":https://adoptopenjdk.net/ for Windows and *openjdk-11-jdk* for Ubuntu Linux based OS) 

 For project building we use " *Gradle* ":http://gradle.org system.  
 You can either install it, or use wrapper scripts (we use "Gradle 4.10.3":https://docs.gradle.org/4.10.3/release-notes.html in scripts). 

 h2. Getting project source code 

 Clone the project Git repository and it's submodules: 
 <pre> 
 $ git clone --recursive https://forge.ispras.ru/git/veritrans.git 
 </pre> 

 h2. Building and running Verilog Translator from command line 

 Two Gradle wrapper scripts are included in the project repository: one for Linux-based OS (*gradlew*), another for Windows OS (*gradlew.bat*). To make the guide uniform, a "gradle" acronym will be used in the following examples. 

 To compile main classes run: 
 <pre> 
 gradle classes 
 </pre> 
 To compile test classes run: 
 <pre> 
 gradle testClasses 
 </pre> 
 To run all unit tests run: 
 <pre> 
 gradle test 
 </pre> 
 _NOTE : to list all Gradle commands run:_ 
 <pre> 
 gradle tasks 
 </pre> 

 

 h2. Building and running Verilog Translator from "Eclipse IDE":https://www.eclipse.org/ide/ Eclipse IDE 

 * Generate the # Install "Buildship":https://marketplace.eclipse.org/content/buildship-gradle-integration Gradle integration plugin for Eclipse IDE project and classpath files with "Gradle":https://gradle.org: 
   <pre>$ ./gradlew eclipse</pre> IDE. 
 * # Create a workspace located @init.gradle@ file in the $HOME/.gradle directory with @veritrans@ 
   - Use and write the menu item @File/Switch Workspace...@ following to it: 
 <pre> 
 allprojects 
 { 
   - Browse the directory apply plugin: 'eclipse' 

   it.eclipse 
   { 
     classpath.downloadJavadoc = true 
   } 
 * } 
 </pre> 
 # Import an existing project called @veritrans@ Verilog Translator's sources into the workspace 
   - Eclipse workspace: 
 * Use the menu item @File/Import...@ 
   - "File/Import...". 
 * Choose @General/Existing Projects into Workspace@ 
   - "Gradle/Gradle Project". 
 * Select the @veritrans@ folder "veritrans" directory as the root directory 
   - directory, press "Next". 
 * Select the @veritrans@ "Gradle wrapper (recommended)" import option. 
 * Press the "Finish" button: the project located will be opened in this directory 
   - Press the @Finish@ button 

 h2. Building from "IntelliJ IDEA":https://www.jetbrains.com/idea/ 

 # From Welcome menu select "Import project". 
 # Select @veritrans@ directory, then press "OK". 
 # From "Import project" menu select "Import project from external model" -> Gradle, then press "Finish". 

 Eclipse IDE.