How To: Running the Code Generator on the Linux / Mac OS X
SOPERA’s How-To Series
Sometime ago in SOPERA we decided that it might help our users if we were to produce a couple of “How-Tos” in which we would list tips, tricks, or describe the ways in which you can use various SOPERA product components effectively and quickly.
SOPERA’s code generator is currently designed to work only on Microsoft Windows Operating Systems. In this How-To, we’re going to show you how to run the SOPERA code generator on Linux or Mac OS X systems.
Running the SOPERA Code Generator on Linux / Mac OS X
To run the SOPERA code generator on linux:
- Zip the contents of the /ServiceStudio MS Windows folder into a zip file. (You can extract the folder form the toolsuit installation file also.)
- Copy this servicestudio.zip file to you linux user home path (for example, in /home/soadev).
- Extract the archive file to a directory (for example, into /opt/SOPERA/ServiceStudio).
- Translate the cmd files set-env.cmd, build.cmd and codegen.cmd to a Linux sh file. Don’t forget to enable the execution of these sh files. They can be found in the folders: ServiceStudio/CodeGenerator , ServiceStudio/CodeGenerator/bin.
- Create a soft link in the ServiceStudio/CodeGenerator folder:
ln –s JeeWiz/resources/any/control JeeWiz\\resources\\any\\control - Enable the bash scripts’ ant file (run). The script file can be found in ServiceStudio/CodeGenerator/JeeWiz/external/ant1.7.0/bin.
- Add a slash in line 36 of the includeSpec.vm file:
Old: #set( $basicName="file:/${aSchema.xsdTargetFile}"
New: #set( $basicName="file://${aSchema.xsdTargetFile}"
You can find the file in this folder: ServiceStudio/CodeGenerator/JeeWiz/SBBresources/SBBservice/control/schema.
- Set the correct path of the ServiceBackbone folder in the properies file ServiceStudio/CodeGenerator/build.properties
- Now, test your code generator! You can find a test example at ServiceStudio/CodeGenerator/demos/library/bin (Please have a look at the codegen-library.cmd file.)