|
Automatic Builds with CASL
Tutorial Description
The purpose of this tutorial is to demonstrate how CASL
can be scripted to automatically build projects for multiple
ESD's (Electronic-Sales-Distribution). ESD's such as
PalmGear, Handango, PocketGear, etc. require custom versions
of your applications to identify where the customer should
purchase your products. CASL allows for an advanced
method of creating a build system that can build multiple
versions of your product from a single double-click of an
icon or execute a build automatically using Windows
scheduler. This tutorial will cover the basics and
include a sample project you can use to see how it all
works.
Prerequisites
- You will first need to have the latest version of
CASL (i.e. CASL 4.3) installed. If you are unsure
of how to do this, please see the
Download page.
- Some understanding of
batch files and using a text editor to modify those
files (.cmd or .bat files) is assumed.
- For best results running this tutorial, it is
assumed that you have WinZip 9.x installed with the free
command-line support add-on. If you do not use
WinZip (or a different version), you may need to modify
the buildproduct.cmd file to use the zip tool of your
choosing or change the folder name according to the
version you are using.
Download
CASLBuild.zip (~ 15k)
- This is the associated sample batch
files and CASL project used below.
Steps
- Unzip the CASLBuild.zip project to the root of your
c-drive. You should have a main directory of 'CASLBuild'
and three subdirectories under there. One for 'Batch',
'Products' and 'Release'.
- If your CASL43 directory is in the default during
the installation (i.e C:\Program Files\CASLsoft\CASL43),
then you do not need to make any changes at this point
to the buildall.cmd. If, however, the CASL43 path is
different, you'll need to change the following line to
the correct location where the CASLIDE can be found:
@set CASLIDEPath="C:\Program
Files\CASLsoft\CASL43\"
- This build was designed to work with WinZip. If you
use WinZip, be sure to download the free command-line
add-on from http://www.winzip.com/wzcline.htm . There
may be additional command-line zip tools (i.e. PKZIP)
that may work too. If you don't use WinZip, then you
might need to change the line in the '\batch\buildproduct.cmd'
to match the command-line parameters of the zip tool
that you use. The line associated with this in the
buildproduct.cmd is:
"C:\Program
Files\WinZip\wzzip"
- Included in this archive is a simple CASL
application called 'Widget'. It has one form and just a
little bit of CASL code. Just enough to show you how the
'Project Variables' (menu bar 'Project' 'Project
Variables') can be used to provide partner-specific
information in your build process. When you run the
buildall.cmd file (double-click the file), it will use
this example project and build a PalmOS version for
PalmGear, Handango and a PPC version for Handango.
- Now you are ready to build. Double-click the 'buildall.cmd'
file in your '\Batch\' subdirectory. You'll see a few
screens appear, the CASL IDE will launch the project,
compile, build the installer, then the batch will zip
the archives and place them in the '\Release'
subdirectory. These .zip files are files that you would
have created with your own products and would be ready
for posting to your partner sites.
- The batch file 'buildall.cmd' can be easily modified
to build any or all of your products by simply
double-clicking a shortcut on your desktop.
Another possible use of this command is to automatically
schedule builds at varied intervals using
Windows Scheduler. This may be particularly
useful if you have multiple developers working on a
project and would like to have a centralized repository
for running the latest code for a given project.
Home | News | Community | Products | Download | Support | Sales | About CASL
|