Objective Grid : PART I User’s Guide : Chapter 6 Reducing the Size of Your Application : The Build Wizard
The Build Wizard
The Objective Grid Build Wizard lets you customize the Objective Grid libraries to your needs. The Build Wizard allows you to link only those features you really want to use into the library and exclude any unwanted features and cell types. The Build Wizard automatically generates a makefile for building a custom library and DLL based on your settings. Other files generated by Build Wizard are header files with configuration information and a Control Factory Class file. The Control Factory Class will be linked into the library and serves as default Control Factory Class for all your applications. Applications can still provide an individual Control Factory Class or use the default Control Factory Class provided by the library.
You can find the Objective Grid Build Wizard in the Utils\Grid directory of your Objective Grid installation. The filename is <stingray-installdir>\Utils\Grid\BuildWiz.exe. The Build Wizard can be run from the Objective Grid program group under the Start menu. When run, the Build Wizard walks you through a series of pages, collecting information about which features from the product you use, what library names you wish to target etc. After you’ve answered these questions, the Build Wizard will generate the makefile that meets your specifications and write that makefile to <stingray-installdir>\src\grid.mak. You will be given the choice of starting Visual Studio on the resultant makefile or simply exiting from the Build Wizard. If you choose to exit, you are responsible for opening the makefile yourself in Developer Studio and building the Objective Grid library.
If you want to use the Build Wizard for multiple library configurations (for example, one configuration that has database support and one configuration that has no database support), you can assign each configuration a unique name in the first page when running the Build Wizard. The Build Wizard will generate a header file config/<NAME>.h in the “Include” directory of the Objective Grid installation and also store the set of chosen features in the file <NAME>.BWC in the Utils directory (<NAME> is a place holder for the configuration name you specify). You can rerun the Build Wizard any time and adjust the selections you made for a specific configuration.
Be sure to use different library names for each configuration and re-link the Objective Grid library after running the Build Wizard for each configuration. You can’t build the libraries multiple different configurations all at once. You have to run Build Wizard for each configuration before building the libraries.
The Build Wizard seamlessly integrates with the existing Objective Grid library “autolink” function. This means linking to the appropriate Objective Grid library is as simple as including the header file with the configuration information in your application's precompiled header. If you don’t include explicitly include a header file with configuration information Objective Grid will use config/gxstndrd.h as default. GXSTNDRD is the default configuration name for the Objective Grid libraries. (This generated file that is to be included has to be before any other grid header includes)
The Build Wizard loads its configuration information from the file BuildWiz.ini in the Utils directory and various .BWI files in the BWInfo subdirectory. Alteration of the file BuildWiz.ini and other .BWI files will allow you to further customize the build process, including adding your own source files, but please understand that this action is not supported by Rogue Wave!
Alteration of these files are done at your own risk. (We recommend that you keep a backup of the files before proceeding.)
DLL Naming
When building a custom configuration of Objective Grid, it is important that you specify a unique DLL target name. When a subset of the Objective Grid features are built or you make a change to Objective Grid source or header files, the signature of the library changes. Therefore, when you build a DLL that incorporates a subset of Objective Grid features or your own changes, the target DLL must be treated as a completely unique DLL. If you change the signature of Objective Grid and do not specify a DLL target name, other applications that link to the Objective Grid DLL may fail.
Building the Libraries
NOTE >> If you are going to build with Unicode, uncheck the option ExcelReadWrite in Build Wizard.
After you have run Build Wizard, you can build the libraries. The following steps show how to build them:
1. Start Visual Studio.
2. Open <stingray-installdir>\src\grid<ver>.sln, where <ver> represents the VC++ version.
3. After the .sln file is loaded, choose the build configuration you want. The choices are Non-Unicode (default) and Unicode builds.
NOTE >> Unicode is not supported in this version of the Excel read/write classes. When building Grid libraries with Unicode, an alternative to the read/write classes is Excel Automation, discussed in “Excel Automation with Objective Grid.”
4. Start the build.