Setup by Glenn Delahoy (C) Copyright 2003-2004 All rights reserved Description ----------- Setup creates very small installations quickly and easily without all the overhead of the big tools. Setup adds around 77KB to the total size of your installation as opposed to at least five times that for the big tools. Perfect for emailing a few files to your friends or distributing very small applications without the end user having to stress over how to install and run them. Includes options for compression and creating shortcuts. The installation is created via a script resulting in a single install file. The end user runs the install and the files are copied to the desired locations and appropriate shortcuts created for the user. Setup Editor ------------ If you're keen you can build the scripts by hand using notepad. However, it's much nicer and quicker to use the editor. The editor has two main sections: the first is the project information and the second is the installation script. Project Info ------------ Title The project title appears as the title of the final setup application. Prompt Any text you care to add to explain to the user what is about to happen. Output File This is the file name of the resulting installation file, including any version number and extension (eg Setup200.exe). Notes This is purely for you own information and is not compiled into the installation. Use Compression Compress the source files before creating the installation. Script ------ The script defines what will happen during the installation and what files will be included. Click the buttons on the right hand side to add, delete or modify items in the script. If an item is selected in the script when you click a button, that item will be modified with the new information. If there is no item selected, the new information is added to the end of the script. The up and down buttons allow you to shuffle items up and down the script to rearrange the script order. Of all the commands available to the script, only the Put command refers to files on your machine, all other commands refer to files and folders on the end user's machine. Insert Insert a new script item before the currently selected item. Delete Delete the currently selected script item. Put Put a file into the installation and install it in the given folder on the end user machine. See below for folder replaceable parameters. Execute Execute a given command and wait until it is finished before proceeding. See below for folder replaceable parameters. Run Execute a given command and continue immediately without waiting. See below for folder replaceable parameters. Copy Copy a file from one location to another on the end user machine. See below for folder replaceable parameters. Shortcut Create a shortcut in the given folder and point it to the given program and command line arguments. See below for shortcut replaceable parameters. Don't forget to include the full path, file name *and* extension. Clean Up Remove any files in the given folder that were put there by this installation. This does not necessarily clean out a folder, it just removes any files we put there. Quit Quit the installation immediately. If this command is missing the end user is prompted when the installation is complete. Folder Replaceable Parameters ----------------------------- When referring to folders on the end user machine, that is the machine that will be running your installation, a number of replaceable parameters are available which will be resolved at the time the installation is run. %wtemp% The user's temp folder %program% The Windows Program Files folder (where most programs are installed). Add your own application folder to this. %common% The Windows Common Files folder %system% The Windows System folder You can append additional sub folders to any of these as required. For example, the Setup program installs to "%program%\Setup". Shortcut Replaceable Parameters ------------------------------- When creating shortcuts on the end user machine a number of replaceable parameters are available which will be resolved at the time the installation is run. The most useful ones are: The desktop. The Programs folder of the Start menu (where most programs create their shortcuts). The Favorites folder The Startup folder on the Start menu. The top level of the Start menu. The Desktop folder. The Fonts folder. The Templates folder. The Start menu for all users. The Programs folder for all users. The Startup folder for all users. The Desktop folder for all users. The Favorites folder for all users. The Quick Launch bar on Win2K/XP. As with the folder replaceable parameters, you can append additional sub folders to any of these as required. For example, the Setup program creates a shortcut called "\Setup\Setup Editor". Building The Setup ------------------ When your script is complete, select Build from the File menu or press Ctrl-B to build the installation. Your setup application is created as defined by the Output File entry noted earlier. Compression ----------- If selected, Setup will compress your files before building the installation. When the end user runs the installation, the files are automatically decompressed. For larger installations, this will considerably reduce the size of the final installation executable. For smaller installations, it may actually increase the size of the final executable (due to the overhead of the compression itself). Self Extracting Zip Files ------------------------- Setup provides a quick and dirty mechanism for creating self extracting zip files. To create a SFX file select the Create SFX Zip option on the File menu. Select all the files you want included and press OK. Next give a name for the resulting SFX file. The SFX file is created. If you do not give a path in the file name it will be created in the same folder as the script you're currently editing. Normally this self extracting file will pop up a prompt before it begins. If you want to skip the prompt and allow the extraction to run silently, prepend the file name with an exclamation mark. For example "myinstall" becomes "!myinstall". Sample Script ------------- This is the entire script used by Setup to create its own installation. Action Parameter1 Parameter2 Notes ------ ---------- ---------- ----- Put Build.exe %program%\Setup Put the file in the target folder (create folder if necessary) Put readme.txt %program%\Setup Put the file in the target folder Put Setup.ex_ %program%\Setup Put the file in the target folder Put SetupEditor.exe %program%\Setup Put the file in the target folder Put ZipDll.dll %program%\Setup Put the file in the target folder Put ZipSFX.bin %program%\Setup Put the file in the target folder Shortcut \Setup\Setup Editor %program%\Setup\SetupEditor.exe Create a shortcut in the Start menu Run %program%\Setup\SetupEditor.exe Run the main app Run %program%\Setup\readme.txt Bring up the readme file Quit Quit the install ---------------------------------------------------------------- Issues ------ The engine has grown too big for my liking. I like to keep these things as tiny as possible so I will endeavour to shrink the engine in future releases. ---------------------------------------------------------------- Release Notes ------------- Version 2.20 ------------ Change 1: Added command line project file option. Version 2.10 ------------ Change 1: Added compression option. If selected, all source files will be compressed prior to inclusion in the final installation. Change 2: Removed automatic exclamation mark from 'Create SFX File' option. Change 3: Skip prompt to save when opening project after startup. Version 2.01 ------------ Change 1: Lost the bitmap on the setup dialog, oops! Is back now. Also got the transparency working right. Version 2.00 ------------ Change 1: Modified the CLEANUP command in the engine so it only removes the files that were put there by the script. Change 2: Added the LINK command to the engine to create shortcuts. Change 3: Removed the automatic quit from the RUN command in the engine. Change 4: Added a separate QUIT command to the engine. Change 5: Created a setup editor to make life easier for you and hopefully reduce the number of errors and typos created when writing the script by hand. ----------------------------------------------------------------- Comments/suggestions to: support@delahoy.com http://www.glenn.delahoy.com