GenSlu.pl is a Perl script tool which can generate solution and project files for Microsoft* Visual Studio .Net 2005*.
This script tool reads parameters from a configuration file, searches the sample code folders to find source (*.c++ ,*.c) and head ( *.h or *.hpp)files, and then creates Microsoft* Visual Studio .Net 2005* solutions and projects. The configuration file contains the parameters for compiler options, linker options and project attributes.
This tools can simplify the steps to build Microsoft* Visual Studio .Net 2005* for Intel® IPP samples.
The script works under Microsoft Windows* operating systems with ActivePerl* installed.
Note: Some of Intel® IPP samples need additional software support (e.g. Microsoft* DirectX* 9.0 SDK). Please refer to readme file (Readme.htm) in the sample directory for further information.
- Install ActivePerl* before running the script
- Configure your Microsoft Visual Studio .Net 2005* development environment by adding directories for the Intel IPP include files and library file.
Open Microsoft Visual Studio .Net 2005, Select Tools > Options > Projects and Solutions > VC++ Directories, and add directories for the Intel IPP include files and library file. Please refer to “Configuring Microsoft* Visual C++*.NET 2003 or Microsoft Visual C++*2005 Environment” in Intel IPP User’s Guide document (IPPDIR\doc\userguide_win_xx.pdf) for further information.
- Copy "GenSlu.pl” to the target sample code directory (For example, \ipp-samples\image-codecs\jpegview\).
- Go to sample code directory at command line. Use the following command to create project files:
‘samplename.conf’ is a configuration file which contains parameters for creating project files. One configuration examples for “JPEG Viewer Sample”(\ipp-samples\image-codecs\jpegview) is provided with this tool. For other samples, users need to create the configuration files first before running the script. Some configuration parameters and usage examples are explained below.
- After the successful build, solution and project files can be found at \Sample Folder\ build\MSVC2005
The parameter format in the configuration files is "name==value", and "#" is used for comments. The parameter syntax is described below
INCLUDES：include path for additional software components in the sample code. Most of the IPP samples can make this option NULL. A few samples need other software components (For example, Media Processing Sample requires Microsoft* DirectX* SDK). Add the include path of these software components if they are required by the sample code.
RESINCLUDES: include path for Resource file. It is NULL for most of IPP sample. If the sample uses resource file, add include path for resource folder.
LIBPATHS: Library path for some additional software components. Most of the IPP samples can make this option NULL.
LIBS: Intel IPP libraries name required for the sample. A few samples need other software components (e.g. Microsoft* DirectX* SDK), add libraries from other software components.
Note: You can check Makefile in the sample code directory to understand Intel IPP libraries and other libraries required by the sample code.
DEFINES: Macro definitions to build the sample code.
COMPOPT: Additional compiler options. For example, you can use /openmp to activate OpenMP support when compiling source code.
PROJECT: Solution and project files for the sample code.
The value format should be: <con|gui|lib|dll> <target project and solution files locations> <source code folder>.
The script tool will generate the Visual Studio .Net 2005* solutions that may include several projects. Each project is specified by this parameters, and will include all the source code files from <source code folder>.
The project categories can be con, gui, lib, dll, which represent the console application, GUI application, library, dynamic link library respectively.
The following are some examples:
The following line will create a console application. All source files (*.cpp,*.c) located at \app folder will be included into the project. The output project and solution file will be located at \build\MSVC2005\app.
PROJECT==CON build\MSVC2005\app app
Next is a more complicated example. By appending "\*" to the source code folder, each sub-folder under that source code folder will be created as a project. The following line will create a library project for every subfolder under \io.
PROJECT==lib build\MSVC2005\io io\*
Configuration file example:
#the following is a configuration file for JPEG Viewer sample
#includes path for other software components. The sample code does not use other software component, it is NULL.
#include path for resource file.
#Library path for other software components, Most of IPP samples can make this NULL.
#library name required by sample code. Check Makefile at sample code folder to understand libraries required in the sample code.
LIBS==ippcore.lib ipps.lib ippi.lib ippcc.lib ippj.lib
#Macro Definitions. Check Makefile at sample code folder to understand Macro Definitions in the sample code
DEFINES==STRICT _MBCS _CRT_SECURE_NO_DEPRECATE WINVER=0x0501
#additional compiler options
#project properties. Source files at \jpeg and \jpeg200 will be created as jpeg and jpeg2000 library projects. Source file at .\src will create as GUI application,and linking with jpeg and jpeg2000 libraries
PROJECT==lib build\MSVC2005\jpeg jpeg
PROJECT==lib build\MSVC2005\jpeg2000 jpeg2000
PROJECT==gui build\MSVC2005\src src
The script is only tested on the samples at the following folders: