Here at intelligent views (i-views) the build process consists of the following "components": - a small class (PrerquisiteBrowser) that all developer images contain
- a lot of product specific batch files that contain the names of all root parcel names and resources (splash screen etc.)
- a master batch file (make.bat)
- a deployment image that actually builds the runtime images
Deployment is initiated manually by evaluating:
PrerequisitesBrowser deployBatchFile: 'makeNameOfProduct.bat' targetDirectory: 'TargetDirectory'
The deployment requires no user interaction from here on. The PrerequisitesBrowser
- copies the build template directory to the target directory
- parses the product batch file
- reads the parcel names
- detects all prerequisites
- writes all required parcels to the target directory
- calls the product batch file
The product batch file then sets the parameters (environment variables) required to run the automated deployment image. A product batch files look like this:
set FILE=imagefilename
set PARCELS=RootParcelA, RootParcelB
set ORGEXE=visual.exe
set ICON=ka.ico
set SPLASH=ka.bmp
cd make
call make.bat
cd ..
The generic batch file then launches the deployment image. This deployment image is basically a plain base image + RuntimePackager + some automation code. The automation code loads the required parcels and the RTP file and then builds the target image. After this, the make.bat uses ResHacker to build a Windows executable with the correct splashscreen, icon, and VM. Deployment is now done.
Unit tests are not automatically performed, there is another batch file that can run Unit Tests in virtually any image (by loading some Unit Tests parcels and an headless Testrunner).
There are two annoying aspect of this build process:
- relies on a lot of batch files that are not versioned, can only be run on Windows machines and are generally non-smalltalkish
- deployment is performed on a developer machine, occupying CPU, RAM and Harddisk
To improve the build process, I'm currently considering the following changes: - Get rid of all batch files and replace them with Smalltalk Classes + code
- Use build configuration classes to represent a build. Even though it's tempting to use packages or bundles to represent build configurations (you get prereqs for free), using build classes (similar to the Subsystem hierarchy of VW7.4) allows more complex build configs.
- Create a deployment batch image whose sole purpose is to listen for build jobs and execute them on demand (either periodical or manually initiated jobs).
- Execute Unit Tests automatically after build
Holger Kleinsorgen (h.kleinsorgen _at_ i-views.de)