How to build a Synergy project from the command line
Overview
Goal
Prerequisites
Setup
- Copy the subfolder called "Utilities" of the E2Studio version you are using in a folder of your choice.
- Install the GCC compiler toolchain to be used with the SSP version of your project on the machine where you want to build. Please consult the SSP release notes to find out the exact compiler version you require
- Copy the Synergy project in the folder you want to use as a repository for the build.
- Store the associated Synergy license in a folder of your choice
- Create a DOS batch file to configure the minimal environment required to build the project.
The content of the batch file might look like the following:
ECHO off
REM -------------------------------------------
REM these are the needed environment variables
REM modify the paths below according to the installation folders on your machine
REM -------------------------------------------
REM location of the e2studio Utilities folder where make and isdebuild are located
set E2STUDIO_UTILITIES=c:\test\Utilities
REM GCC compiler should have been configured during isde installation but
REM we set it here too just in case
set GCC_COMPILER=C:\work\dev\toolchains\GNU\4.8.2014q3\bin
REM this is the path to the ams license for compiling
set AMS_LICENSE_PATH=c:\test\license\SSP_License.xml
REM -------------------------------------------
REM do not modify anything below this point
REM -------------------------------------------
if not exist "%GCC_COMPILER%" goto GCC_PATH_ERROR
if not exist "%E2STUDIO_UTILITIES%" goto E2STUDIO_PATH_ERROR
if not exist "%AMS_LICENSE_PATH%" goto SYNERGY_LICENSE_ERROR
SET PATH=%GCC_COMPILER%;%E2STUDIO_UTILITIES%;C:\MinGW\msys\1.0\bin;%PATH%
:PATH_SET
echo ===================================================================
echo Environment variables configured correctly.
echo GCC COMPILER : %GCC_COMPILER%
echo E2 STUDIO BUILD FOLDER : %E2STUDIO_UTILITIES%
echo Synergy license file : %AMS_LICENSE_PATH%
echo ===================================================================
goto END_PROGRAM
:E2STUDIO_PATH_ERROR
echo ===================================================================
echo ERROR: You need to set the path for E2Studio 'Utilities' folder
echo ===================================================================
goto END_PROGRAM
:GCC_PATH_ERROR
echo ===================================================================
echo ERROR: You need to set the path for GCC compiler
echo ===================================================================
goto END_PROGRAM
:SYNERGY_LICENSE_ERROR
echo ===================================================================
echo ERROR: You need to set the path for the Synergy license
echo ===================================================================
goto END_PROGRAM
:END_PROGRAM
pause
a sample batch file is attached here (please rename it to .bat in order to use the file)
- replace the values for the environment variables in the batch file, with the values which are local to your machine. These are:
- The E2Studio utilities folder, E2STUDIO_UTILITIES
- The installation directory of the Synergy license file, AMS_LICENSE_PATH
- The installation directory of the GCC compiler, GCC_COMPILER
- open a command line prompt and run the batch file
- invoke the makefile located in the build directory, for example <project_name>\Debug\, by typing 'make' (without quotes)
What's Next
If everything is configured properly, the project should build successfully as if the build was invoked from within the e2 studio graphical environment.