How rc scanner is built - VHDLTool/sonar-VHDLRC GitHub Wiki

The rc-scanner is a modified sonar-scanner.
It has been modified to embed an eclipse IDE instance and a workspace in a portable way.
It is recommended to read how the rc-scanner works before making one.

First, download sonar-scanner for your system.

Build rc-scanner

For Windows
For Linux

Build rc-scanner-windows

1-The rc-scanner.bat

Create a batch file in the bin folder next to sonar-scanner.bat, name it rc-scanner.bat:

rc-scanner.bat

:: This script launches sonar-scanner.bat giving it its current location
@ECHO OFF
%~dp0sonar-scanner.bat  -Dsonar.vhdlrc.scanner.home=%~dp0.. %*  

2-Assemble a portable eclipse

Install Portable Eclipse

Eclipse is not portable natively, you need to assemble a portable instance:
Download Portable Eclipse at SourceForge and Portable Java:

and install it following this procedure.
Basically unzip everything and copy portable java into /app/eclipse/java folder

The rc directory

Create a rc directory and put the content of the portable eclipse in it:

3-Install the ZamiaCad plugin

Launch the Exlipse.exe located in rc\App\eclipse and set the default workspace at ..\..\Data\workspace.
⚠️ Do not launch the EclipsePortable.exe
Install the ZamiaCad plugin following this procedure.

4-Configure the project in the workspace

5-The eclipsec.bat

Create a batch file eclipsec.bat that calls eclipsec.exe :

rc/App/eclipse/eclipsec.bat

@ECHO OFF
taskkill /IM eclipsec.exe
call %~dp0eclipsec.exe -clean -nosplash -application org.zamia.plugin.Check %*

Victory! you made it. 🏅

Build rc-scanner-linux

1-The rc-scanner

Create a bash file in the bin folder next to sonar-scanner, name it rc-scanner:

rc-scanner

#!/bin/bash
DIR="$(cd "$(dirname "$0")" && pwd)"
$DIR/sonar-scanner -Dsonar.vhdlrc.scanner.home=$DIR/.. "$@" 

2-Assemble eclipse

Download Eclipse Oxygen, which is natively portable.
Create an App and a Data directory in an rc directory :

Put the Eclipse Oxygen content in rc/App/eclipse/. (You should have eclispe runnable and eclipse.ini in rc/App/eclipse/)

3-Install the ZamiaCad plugin

Launch the Exlipse.exe located in rc\App\eclipse and set the default workspace at ..\..\Data\workspace.
Install the ZamiaCad plugin following this procedure.

4-Configure the project in the workspace

5-The eclipse_rc

Create a bash file eclipse_rc that calls eclipse :

rc/App/eclipse/eclipse_rc

#!/bin/bash
DIR="$(cd "$(dirname "$0")" && pwd)"
$DIR/eclipse -clean -nosplash -application org.zamia.plugin.Check "$@"

Victory! you made it. 🏅