How to use CDBuilder

Required step: create and configure a project in CDBuilder

Start CDBuilder and select Project⇒New to create a project. You will be asked for:

Project Input Directory
- directory where various files used for your CD will reside, e.g. database files and web content.

Put the database files into one subdirectory of that directory, and your web content - into another subdirectory.

Project Output directory
It's the directory where the prototype (tree of folders and files) of your CD/USB will be output to. It's recommended to specify a path relative to Project's Input directory, e.g. like "../out", so you could move all files related to your project to another disk or even computer and update a path only in single location-

Once you click OK, a New Project Wizard will start, asking you for a as few information as possible, using several screens. On any screen, default values are the recommended ones, so just skip to next screen if uncertain about anything.

You will be asked trivial questions, like what operating systems to support, what types of database servers it uses (MySQL, SQLite, etc), which programming languages to support (most probably it's using PHP) and so on.

Once the wizard completes, here is what to do next:

  1. Go to Make Prototype menu to build your prototype.
  2. After building the Prototype, just start your product by going to ProjectBrowse output directory and starting it the way you did when starting CDBuilder (i.e. click on runcd.exe on Windows or "Run CD on Mac OS X" on Mac).
  3. You will see CDInspector page (unless you've disabled it), just click Open Directory with Web Scripts button in CDInspector window - a file manager window (Explorer on PC and Finder on Mac) will appear. Copy your web scripts into that directory.
  4. Click Run PhpMyAdmin to import your data button in CDInspector window to import your .sql backups into a MySQL database.
  5. Then stop the Prototype (selecting "Stop Prototype" in CDBuilder from the dropdown list), and do Copy from prototypeCopy db files and web docs back from prototype to input dir to backport all changes you've made to Project's Input Directory.
  6. After that, alter Project Settings as you need in Project ⇒ Site Settings. Most probably you will need to disable CDInspector in General ⇒ Main Properties there.
  7. do Make prototypeClear dir with prototype then copy all files to recreate your Prototype using data only from your Project Input Directory.
  8. Start and test your Prototype. If it works properly, it means that all you need to recreate the Prototype is inside Project's input directory - so you can alter any site setting, Make prototypeClear dir with prototype then copy all files and get a working configuration.
  9. Optimize and pack the prototype using Optimize & Pack Prototype menu. See this video on how to pack Prototype for distribution on CD/DVD/USB and into downloadable OS-specific packages. It's not recommended to just zip its content using your favorite archive utility to get a downloadable ZIP file, or use your favorite disk burning tool to make ISO image - special well-tested tools for these purposes are already included with CDBuilder.

Of course you can re-run the wizard again using Project ⇒ Re-run settings wizard.. or visit Project ⇒ Site Settings to see and alter all settings besides basic ones.

Required step: Update database connection strings in your scripts:

If your product uses MySQL

For PHP-based websites
Nothing needs changes in PHP scripts at all as PHP scripts will use correct port number and database host name - they will be taken from a dynamically-generated php.ini.
For sites that are coded in Perl/Python/Java
Use host=127.0.0.1 in a database connection string.
For sites that are coded in Perl
update your DSN string to contain MySQL port number (stored in $ENV{MYSQL_PORT}) as done in /site/www/root/mysqldemo.pl from the trial cd.
You do not need to specify/update database username and password for database connection string in your scripts, since MySQL is started in a special mode that does not check a password supplied in connection string.

If your product uses SQLite

  • Convert SQLite databases to a proper format (understood by SQLite library shipped with the web server demo).
  • Update PHP and Perl scripts to use environment variables SQLITE_TABLES as a directory with SQLite database files in database connection strings as done in /site/www/root/sqlitedemo.php and /site/www/root/sqlitedemo.pl.

Optional step: Make your product more user friendly:

  • It's greatly recommended to put some text to /README.html, at least link to your website in the Internet and preferred way to contact you. Be sure to put some version number or release date into it so users will be able to tell you which product and which version they are using. In order CDBuilder to put this file automatically to your Project's Output directory, create a folder named "files-to-copy-to-output-directory" in your Project's Input directory and put your README.html there. CDBuilder by default will copy all files from the directory with that name to your Project's Output Directory.

  • Specify the path to the splash screen and CDROM icon (not favicon!) relative to the project's input directory in Project ⇒ Site Settings ⇒ General ⇒ Branding (click on Advanced to access settings for icon).

Optional step: Protect your code from theft and analysis:

  • To protect JavaScript from analysis and theft and for mangling of your html, you can use the Stunnix JavaScript Obfuscator;
  • To protect Perl scripts from analysis and theft, you can use Stunnix Perl-Obfus - an advanced obfuscator and encoder for Perl source code;
  • To protect PHP scripts from analysis and theft, you can use IonCube PHP encoder - it's already integrated into SAWS and is supported on all platforms!
  • To protect VBScript from analysis and theft and for mangling of your html you can use Stunnix VBScript and ASP Obfuscator;

Optional step: Request any help from us

Please contact us if you have any questions. If the PHP available with our evaluation software doesn't include the extension you need, or if you wish to make SAWS support other platforms, or need an Apache module to become supported by SAWS - we can also help you.

Required step: Create CDROM Trees

Click Build → "Rebuild Changed" - you should get a prototype of your cdrom in the project's output directory. It's recommended to use CDBuilder for creation of ISO files for burning to CD - just click "Tools", "Create ISO out of project's output directory..". Just burn it directly onto a CD.

The program that creates the ISO images or burns prototypes directly to CDROMs should preserve case of filenames for your CD to work on platforms other than Windows (the ISO creation facility of CDBuilder does this correctly, so it's greatly not recommended to use third-party tools instead of it). In order to be able top append or replace some data on the CD, it may be wise to burn CDs in multi-session mode and not close the last session.

If you need to create a desktop application from the CDROM, use the tree in the project output directory as a prototype for your application.

Suggested step: Enjoy!

Please enjoy our products and tell your friends about how fantastic this software worked for you!