YAWPI: Yet Another Windows Program Installer ============================================ Version 1.2 =========== 1. Introduction _______________ YAWPI is a simple yet powerful and elegant Windows installation program. It features user selection of destination directory, full screen main window with color gradient (similar to MS-Setup) and display of meter bar (progress bar) for each program disk as well as numeric percentage progress per file or archive. YAWPI can copy files and uncompress archives (as well as nested archives) into subdirectories or the Windows directory. The decompression code is integrated in INSTALL.EXE. That means that you can compress your application very tightly without paying royalties for compression software. The source directory can be on the hard drive or on floppy drive. Multiple floppy diskettes are supported, as well as multiple .zip files distributed through BBS's and the Internet. The installation parameters are set by defining variables in a simple syntax similar to .INI files (i.e. Variable=Value). No scripts and no fancy script editors and generators - simply edit a few short text files - that's all there is to it!! If you start from the supplied samples you can have a complete package in half an hour. 2. Registration _______________ YAWPI is a shareware product. It means that you must register before using this software to distribute your application. The unregistered version has all the functionally of the registered version so you can prepare your configuration files and test the installation process before registering. However, the unregistered version displays the message "YAWPI - Unregistered Version" on the caption bar. With QUICK registration you simply receive a registration password that matches your name. As soon as you enter your name and password to the 'Register' dialog of the Seal editor, you can set the title of the caption bar to whatever you choose. Your password will work with future versions of YAWPI, so you can upgrade by simply downloading the latest version. Read the instructions at the end of this file on where to get the latest version. With FULL registration you will receive the full source code (C and C++) of YAWPI and AR, so you will be free to further fine tune it according to your needs. Edit the file "register.frm" (or click on the "Register" icon), fill in the details and send it with your payment by E-mail, fax of S-mail. 3. Windows 95 _____________ This version of YAWPI was compiled for Windows 3.1. It works well under Windows 95 but does not support long file names or long directory names (folders, that is...). INSTALL.EXE may be renamed to SETUP.EXE (or ANYTHING.EXE). 4. Compressed Archives ______________________ YAWPI supports archives compressed by the AR freeware utility. AR is not compatible with PKZIP but achieves almost the same compression rate. This is *far* better than using Microsoft COMPRESS on individual files. AR is freeware and is available with C source. The DOS based AR.EXE is included in this package. If your application uses a large number of small files you can save upto 15% of the space by using nested archives. The extra saving comes from the fact that compression algorithms work better on large files. You first combine your small files into one large *uncompressed* archive, then compress that file into a container archive. Here is how you do it with AR: AR s myprog.ar files*.* AR a myprog.arr myprog.ar "myprog.arr" is smaller than "myprog.ar" created by: AR a myprog.ar files*.* If you mark "myprog.arr" as a nested archive, YAWPI will perform the following steps during installation: 1. Extract "myprog.ar" from "myprog.arr". 2. Extract "files*.*" from "myprog.ar". 3. Delete "myprog.ar". Notes: 1. AR always saves and restores the file paths in the archive. This is equivalent to "pkzip -P" and "pkunzip -d". 2. To create a nested archive with pkzip use the following steps: pkzip -e0 myprog.zip files*.* pkzip myprog1.zip myprog.zip 5. INSTALL.CFG ______________ This file must be located on the first floppy disk (or in a subdirectory of the hard drive) together with "install.exe" (or "setup.exe"). It controls the look and contents of the main installation window. The following sections describe the variables that you can define in order to customize YAWPI for your application. 5.1 ProgramName Defines the name of the program being installed. Example: ProgramName=Magic Graphics 5.2 DefaultPath Defines the default destination path for installing the program. Example: DefaultPath=C:\MGRAPHIC 5.3 Title1 A centered title line at the top of the main window. Example: Title1=Magic Graphics 5.4 Title1Size Size of Title1 in points. This number is converted to pixels depending on the screen resolution. Use 50 points for large letters, 20 points for small letters, or any number in between. Example: Title1Size=25 5.5 Title1Color Color of Title1 in RGB. Example: Title1Color=30 187 0 5.6 Title2, Title2Size, Title2Color Same as Title1. This is a second title line. 5.7 TitleFont The font used for both titles. The default font is "Times New Roman". However, if you specify a font which does not exist on the user's system, Windows uses its default font of "Arial". 5.8 TitleShadeColor Color of shade for Title1 and Title2 in RGB. Example: TitleShadeColor=0 0 0 5.9 TopColor, BottomColor Define the background color at the top and bottom of the main window. You can get a solid background by setting TopColor and BottomColor to the same value. If TopColor is different than Bottom Color you get a color gradient. Example: TopColor=0 76 38 BottomColor=51 204 102 5.10 NumGradientSteps Defines the number of color gradient steps. This number should not exceed 200. Example: NumGradientSteps=32 5.11 DirExistsWarn If defined to "Y" (by default), YAWPI will warn the user if the destination directory already exists. To suppress this warning, define this variable to "N". Example: DirExistsWarn=N 5.12 DirNotFoundWarn If defined to "Y", YAWPI will warn the user if the destination directory is *not* found. This is useful for installation of upgrade versions or separate components of a larger software package. The default option is DirNotFoundWarn=N 5.13 Caption Sets the caption of the main window. Example: Caption=Magic Graphics Installation Note: This variable works only in the REGISTERED VERSION of YAWPI. 5.14 Username Registered user name, or developer of the application. This variable is entered automatically by the Seal editor. 5.15 Seal This variable is entered automatically by the Seal editor. It is an encrypted checksum of all the INSTALL.CFG variables described above. The purpose of the Seal variable is to prevent your users from pirating your registered version of YAWPI. If anyone modifies INSTALL.CFG without Sealing it again, YAWPI will display the "Unregistered Version" message on the caption bar. 6. Disk Sections ________________ Following all the variables described above are the disk sections. Each floppy disk has a section with a title of the form [Disk1] [Disk2] etc. The section title must be on a separate line. Within each disk section you list the files or archives on the disk. 6.1 Plain (uncompressed) Files Define each uncompressed file to be copied to the destination directory with the syntax: == If contains the term "$d", it is substituted by the destination path. If contains the term "$w", it is substituted by the user's Windows directory. Example: PICTURE.DAT==$d\DATA Will copy the file PICTURE.DAT to C:\MGRAPHIC\DATA. If the user had changed the default C:\MGRAPHIC to D:\MG, the file will be copied to D:\MG\DATA. Example: MYPROG.INI==$w Will copy the file MYPROG.INI to Windows directory (usually C:\WINDOWS). 6.2 Compressed Archives Define each compressed archive with the syntax: = Example: MYPROG.AR=$d\BIN Will extract the contents of MYPROG.AR to C:\MGRAPHIC\BIN. 6.3 Nested Archives Define each nested archive with the syntax: =@ Example: MYPROG.ARR=@$d Will first extract MYPROG.AR from MYPROG.ARR. Then extract the contents of MYPROG.AR into the destination directory. Finally, MYPROG.AR is deleted. Important Note: The container archive must contain a single archive with the same base name as the nested archive, and same extension truncated to two letters. Examples: MYPROG.ARR contains MYPROG.AR YR_PROG.XYZ contains YR_PROG.XY Read section 2 of this document again to see how to create nested archives. 6.4 .INI Files If your application uses a private .INI file you can list it so that it is merged with an existing .INI file of the same name (from previous versions) rather than overwrite it. =| Examples: MYPROG.INI=|$w MYAPP.INI=|$d The definitions inside an .INI file may contain symbols for directory substitution as follows: "$d" is substituted for the destination directory. "$s" is substituted for the source directory (useful when the application runs off a CD-ROM). "$w" is substituted for the user's Windows directory (usually C:\WINDOWS). Each .INI file must contain at least one section name of the form [
]. Example: [Magic Grahpics Application] BinDirectory=$d\BIN SamplesDirectory=$s\WAVE 7. THISDISK ___________ If you distribute your application on multiple floppy disks, you must place a THISDISK file on each floppy. YAWPI uses THISDISK files to verify that the correct floppy disk is in the drive. 7.1 DiskNumber Defines the disk number, starting with 1. Example: DiskNumber=1 7.2 NextDiskNumber Defines the next distribution disk for your application. On the last disk, do not define this variable (or define it to 0). Example: NextDiskNumber=2 Notes: If your application fits on a single floppy or when installing from the hard drive (drive C: or higher), THISDISK files are ignored. If your application consists of multiple .ZIP files, the user should unzip them into one subdirectory. All the [Disk*] sections are then merged into one "disk" at installation time, so the user will not be prompted for the next disk. 8. WIN.INI, SYSTEM.INI ______________________ If you need to add or modify a section in WIN.INI or SYSTEM.INI in the user's Windows directory, simply place these files with your modifications on the first distribution diskette. You can use "$d", "$w" and "$s" within your WIN.INI. These symbols are substituted before being added to Windows WIN.INI. See section 6.4. Sample WIN.INI: [windows] ScreenSaveActive=1 [Magic Screen Saver] MagicDir=$d Settings=0 0 3 5 Note: You may specify WIN.INI or SYSTEM.INI as .INI files (with "=|" syntax) but for compatibility with previous versions, WIN.INI and SYSTEM.INI are detected and merged even if they are not listed in the [Disk*] sections. 9. GROUPS.CFG _____________ This file defines the program group and icons to be added to the user's desktop. 9.1 Group Defines the name of the program group where the icons will be added. Example: Group=Magic Applications Group 9.2 Item1, Item2 ... Defines the icons in the selected group. Example: Item1=$d\myprog.exe,Magic Grahpics,$d\myprog.exe,1 Example: Item2=$w\notepad.exe $d\register.frm,Register Example: Item3=$d\dosapp.exe,Dos Magic,$d\dosapp.ico Each definition line consists of up to 4 parameters separated by commas. The first parameter defines the command line for starting the program. The second parameter defines the title under the icon. The third (optional) parameter defines the file that contains the icon. The fourth (optional) parameter defines the icon number within the file. 10. Seal Editor _______________ The Seal editor is a standard text editor with one additional feature - it seals INSTALL.CFG files. If you are a registered user of YAWPI you should enter your name and registration password to the Seal editor. From the 'File' menu select 'Register' and enter the information to the Register dialog. After you have finished preparing the INSTALL.CFG file, start the Seal editor and open INSTALL.CFG of your application. From the 'File' menu select 'Save and Seal'. It will save any editing changes you have made to the file and add your name and a special "seal" to INSTALL.CFG. The seal enables the 'Caption' variable so YAWPI will display your selected caption instead of "Unregistered Version" message. The seal is unique to each INSTALL.CFG. It is generated as an encrypted checksum of all the variables in in the file, not including [Disk*] sections. Therefore you have to seal INSTALL.CFG every time you modify the title or color of the main screen. There is no need to seal again when you add or remove files for installation. This feature guarantees that your users cannot pirate the registered version of YAWPI and use it to install another application. Note: do not distribute SEAL.EXE with your application. 11. Upgrading From Version 1.1 ______________________________ 11.1 .INI Files The feature of merging WIN.INI and SYSTEM.INI with the existing files has been extended to any .INI file. Read section 6.4. This is a new feature, upward compatibility is maintained. 11.2 Source Directory You can now specify "$s" in .INI files and GROUPS.CFG. This symbol is substituted by the source directory (where INSTALL.EXE was stated). This is useful for applicatinos running from CD-ROM. 11.3 NumGradientSteps > 40 Fixed a bug that prevented full screen paint when NumGradientSteps > 40. 11.4 New .AR Format The .AR format was modified in order to be *incompatible* with LHZ compression program. As a result, YAWPI 1.1 and 1.0 cannot read new .AR files generated by the new AR.EXE. The motivation for it will be explained below, but take note that: 1. YAWPI 1.2 can read old .AR files. 2. YAWPI 1.1 *cannot* read new .AR files. Now for the motivation. Because the old .AR format is identical to the LHZ archive format, the internal archives contained in the application were recognized by a program called ULP used by some BBS systems. The ULP program converts the .AR files into equivalent .ZIP files. When the user tries to install the application, he/she gets a message: "Archive XXX.AR not found". In other words, the conversion by ULP makes the application uninstallable!!! The new .AR format contains a 4 byte header that prevents ULP from recognizing it as a LHZ file. Problem is solved. If you have distributed your application on BBS's, be sure to upgrade to YAWPI 1.2, create new .AR files and release your application again. 12. Upgrading From Version 1.0 ______________________________ 12.1 Password Do not put your registration password in INSTALL.CFG. Instead, use the Seal editor as explained in section 10. The password you received is still valid. 12.2 THISDISK For backwards compatibility, files and archives can be listed in THISDISK instead of INSTALL.CFG. If you choose this way, do not put any [Disk*] sections in INSTALL.CFG. The only case in which you have to list your files and archives in INSTALL.CFG is when you distribute your application in multiple .ZIP files which the user unzips into one subdirectory. The individual THISDISK files then overwrite each other and if they contain file/archive information, some of it is lost. 12.3 Windows 95 Installation YAWPI Version 1.0 was tested with the Beta version of Win95. The release version of Win95 behaves differently, and program icons were not installed properly. This was fixed by changing the communication with Program Manager. 13. The Lastest Version ______________________ Check the following locations: 1. CompuServe: GO ASPFORUM, library 5 (PC Authors). 2. By ftp: ftp.rtlsoft.com /pub/misc 3. WWW: http://www.rtlsoft.com