Building » History » Version 9
Sergey Smolov, 02/01/2020 02:51 PM
1 | 1 | Sergey Smolov | h1. Building |
---|---|---|---|
2 | |||
3 | 6 | Sergey Smolov | h2. Prerequisite |
4 | |||
5 | 7 | Sergey Smolov | To build the _Verilog Translator_ tool from sources, following components must be installed: |
6 | # *Git* |
||
7 | # *Java Development Kit (JDK) 1.11* or higher (use "AdoptOpenJDK":https://adoptopenjdk.net/ for Windows and *openjdk-11-jdk* for Ubuntu Linux based OS) |
||
8 | 1 | Sergey Smolov | |
9 | 7 | Sergey Smolov | For project building we use " *Gradle* ":http://gradle.org system. |
10 | 9 | Sergey Smolov | You can either install it, or use wrapper scripts (we use "Gradle 5.0":https://docs.gradle.org/5.0/release-notes.html in scripts). |
11 | 7 | Sergey Smolov | |
12 | 1 | Sergey Smolov | h2. Getting project source code |
13 | |||
14 | 5 | Sergey Smolov | Clone the project Git repository and it's submodules: |
15 | 2 | Sergey Smolov | <pre> |
16 | 1 | Sergey Smolov | $ git clone --recursive https://forge.ispras.ru/git/veritrans.git |
17 | </pre> |
||
18 | |||
19 | h2. Building and running Verilog Translator from command line |
||
20 | |||
21 | 7 | Sergey Smolov | 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. |
22 | 1 | Sergey Smolov | |
23 | To compile main classes run: |
||
24 | <pre> |
||
25 | gradle classes |
||
26 | </pre> |
||
27 | To compile test classes run: |
||
28 | <pre> |
||
29 | gradle testClasses |
||
30 | </pre> |
||
31 | To run all unit tests run: |
||
32 | <pre> |
||
33 | gradle test |
||
34 | </pre> |
||
35 | 4 | Sergey Smolov | _NOTE : to list all Gradle commands run:_ |
36 | 1 | Sergey Smolov | <pre> |
37 | gradle tasks |
||
38 | </pre> |
||
39 | |||
40 | 8 | Sergey Smolov | h2. Building from "Eclipse IDE":https://www.eclipse.org/ide/ |
41 | 1 | Sergey Smolov | |
42 | 8 | Sergey Smolov | * Generate the Eclipse IDE project and classpath files with "Gradle":https://gradle.org: |
43 | <pre>$ ./gradlew eclipse</pre> |
||
44 | * Create a workspace located in the directory with @veritrans@ |
||
45 | - Use the menu item @File/Switch Workspace...@ |
||
46 | - Browse the directory |
||
47 | * Import an existing project called @veritrans@ into the workspace |
||
48 | - Use the menu item @File/Import...@ |
||
49 | - Choose @General/Existing Projects into Workspace@ |
||
50 | - Select the @veritrans@ folder as the root directory |
||
51 | - Select the @veritrans@ project located in this directory |
||
52 | - Press the @Finish@ button |
||
53 | 1 | Sergey Smolov | |
54 | 8 | Sergey Smolov | h2. Building from "IntelliJ IDEA":https://www.jetbrains.com/idea/ |
55 | |||
56 | # From Welcome menu select "Import project". |
||
57 | # Select @veritrans@ directory, then press "OK". |
||
58 | # From "Import project" menu select "Import project from external model" -> Gradle, then press "Finish". |