home *** CD-ROM | disk | FTP | other *** search
- Windows Setup Application Note v1.01
- =======================================================================
-
- FILE BREAKDOWN
- ----------------------------------------
-
- WINSETUP.ARC -> README.TXT : This file!
-
- -----------------------------------------------------------
-
- (SETUP.ARC's files should go into their own private dir)
-
- SETUP.ARC -> SETUP.C : Setup stub loader source
- SETUP.DEF : DEF File
- SETUP.MAK : Make File
-
- -----------------------------------------------------------
-
- (COMPEPND.ARC's files should go into their own private dir)
-
- COMPEPND.ARC -> COMPRESS.EXE: DOS Based File Compressor
- EXPAND.EXE : DOS Based File UnCompressor
-
- NOTE: It is a good idea to provide the expand utility
- to your customers, so they can access the files
- on the original disk.
-
- -----------------------------------------------------------
-
- (BINCODE.ARC's files should go into their own private dir)
-
- BINCODE.ARC -> BINCODE.H : BINXZ.EXE's header file
-
- BINCODE.C : BINXZ Main Code
- DIALOGS.C : Dialog Box routines
- IO.C : Low-Level DOS routines in C
- PARSE.C : INF File Parser
- PROGDDE.C : Progman DDE Routines
-
- EXPAND.OBJ : File decompression module
-
- GASGAUGE.H : Gas Gauge header file
- GASGAUGE.C : Gas Gauge source file
-
- DOS.ASM : Low-Level DOS routines in ASM
-
- BINCODE.DEF : DEF File for BINXZ.EXE
-
- BINCODE1.H : BINXZ's Header file-- resources
- BINCODE.RC : Resource template
- BINCODE.ICO : Setup Icon
- BINCODE.DLG : Dialog Templates
-
- BINRET.MAK : Retail Build make file
- BINCODE.MAK : Debug build make file
-
- SETUP.INF : Sample Setup.inf file
-
-
- NOTE: Due to U.S. Government rules regarding the exporting of
- encryption technologies, EXPAND.C cannot be distributed.
-
-
-
- TOOLS
- -------------------------------------
-
- Windows SDK v3.00 or >
- Windows v3.00 or >
- MS C v6.00 or >
- MASM v5.1 or >
- DOS v3.1 or >
-
-
- HOW A RELEASE SETUP DISK LOOKS
- -------------------------------------
-
- The setup disk has two parts, SETUP.EXE and BINXZ.EXE. Setup spawns
- BINXZ, which actually does the work. If Setup determines that it
- is running from a floppy disk, then it will copy BINXZ over to the
- windows directory on the user's hard disk. BINXZ will then run from
- the hard disk and delete itself when done (ONLY if copied by SETUP.
- If these files were already on a hard disk, then BINXZ wont delete
- itself).
-
- This is done so that the program can be well behaved (i.e. MOVEABLE,
- DISCARDABLE), and still let the user change disks in drive A: without
- losing the .EXE file.
-
- The first disk MUST have the following structure to it:
-
- A:\SETUP.EXE
- A:\SETUP.INF
- A:\BIN\BINXZ.EXE
-
- If this is to be run off of a hard disk or network, simply preserve
- the BIN subdirectory; Setup will run off a network or hard drive.
-
- All files to be copied MUST be in subdirectories from the "root".
- This is done to sheild the user from the oppurtunity to run the
- application(s) directly from the setup disk.
-
-
- OUR SAMPLE DISK
- -------------------------------------
-
- A:\SETUP.EXE
- A:\SETUP.INF
- A:\BIN\BINXZ.EXE
- A:\BIN\KILLER.EXE
- A:\BIN\COOL.EXE
- A:\DLL\KILLER.DLL
- A:\DLL\COOL.DLL
- A:\HLP\KILLER.HLP
- A:\HLP\README.TXT
-
-
- The files KILLER.* are for the "Killer App", the user has the option
- to install these files.
-
- The files COOL.* are for the "Cool App", the user has the option to
- install these files.
-
- The README.TXT file is required, the user does not have an option.
-
- We do not want the user to have to manually select KILLER.EXE,
- KILLER.DLL, and KILLER.HLP, instead we want them to select "Killer App",
- and setup will know that "Killer App" actually refers to three files.
-
- The three files are:
-
- \BIN\KILLER.EXE
- \DLL\KILLER.DLL
- \HLP\HILLER.HLP
-
- The "nn" flag in the [apps] section of the .INF file would come
- into play here. We will arbitrarily pick one of these three files,
- KILLER.EXE, and make the other two files "dependant" on this file.
- Therefore, when KILLER.EXE is selected, all three are. The "nn" flag
- for KILLER.EXE would be 02, indicating that the next 2 files are
- dependent on KILLER.EXE. These three files must be right after each
- other.
-
- The Killer App is the main application, and we want this to have
- an icon in Progman. Before we can put in an icon, we must define
- a group. Due to limitations of Progman's DDE set, we cannot
- enumerate the already existing groups. Therefore, it is necessary
- to create a new group. The following lines in the .INF file define
- Group "A":
-
-
- [progman]
- "A","Killer Apps","KILLER.GRP"
-
-
- Since KILLER.EXE has an icon, we will put it in Group "A". Therefore,
- we need to use the "Ic" flag in the [apps] section. "IA" will place
- the icon in Group "A".
-
- Since the user has the option to install KILLER.EXE, the "D" flag
- in the [apps] section is also used. This will cause this app to
- be displayed in the Select Listbox (COMPLEX Setup ONLY), and allow
- the user to select/deselect it.
-
- The KILLER.EXE file, which we picked earlier, must have a few
- strings associated with it: The Icon title, the Description of
- the app (Usually the same as the Icon Title), and the Comment
- on the App (Usually about 70 chars long). These three fields are
- added to the end of the statement about KILLER.EXE in the [apps]
- section.
-
- Finally, the Size of KILLER.EXE, KILLER.DLL, and KILLER.HLP combine
- to be 70K. Therefore, the "70" size indicator must be added to
- the end.
-
- The final appearance of KILLER in the [apps] section looks like:
-
- "0","02DIA","0","BIN","KILLER.EXE","Killer","Killer","The Best App in the WORLD!","70"
- "0","", "0","DLL","KILLER.DLL"
- "0","", "0","HLP","KILLER.HLP"
-
-
- Here is a breakdown for a uncompressed file:
-
- "0","02DIA","0", "BIN","KILLER.EXE","Killer","Killer","The Best App in the WORLD!","70"
- ^ ^ ^^^ ^^^^^^^^^^
- | (flags) | | / / / (icon) (title) (comment)
- | | | / / / (size)
- | | | / / / (size)
- ------------+->A:\BIN\KILLER.EXE copied to C:\KA\KILLER.EXE
- | ^
- | |
- -----------------------------------|
-
- Here is a breakdown for a compressed file:
-
- "0","C02DIA","0", "BIN","KILLER.EXE","Killer","Killer","The Best App in the WORLD!","70"
- ^ ^ ^^^ ^^^^^^^^^^
- | (flags) | | / / / (icon) (title) (comment)
- | | | / / / (size)
- | | | / / / (size)
- -------------+->A:\BIN\KILLER.EX$ copied to C:\KA\KILLER.EXE
- | ^
- | |
- -----------------------------------|
-
-
- The information for COOL.EXE is identical to above, except we will
- not use the "IA" flag, since COOL is not cool enough to get a
- Progman Icon.
-
- The README.TXT is required, therefore its line looks like:
-
- "0", "R", "0", "HLP", "README.TXT","ReadMe","ReadMe","","1"
-
-
- OTHER STUFF
- -------------------------------------
-
- There are three other parts in the INF file: [setup], [disks],
- and [directories]. Here are some tips about each:
-
- [setup]
-
- This is information about the setup program:
- ----------------------------------------------------------------------
-
- "PACKAGENAME","Killer App" : This causes setup to refer to the
- application it is trying to install
- as "Killer App". This should be the
- name on the box.
-
- "CAPTIONNAME","Killer App Setup": This is the caption in all of the
- setup dialogs, usually the Package
- Name with the word "Setup" after it.
-
- [disks]
-
- This is information about the setup source disks:
- ----------------------------------------------------------------------
- "0","A:\","KA Setup Disk #1": This means that disk #0, called
- "KA Setup Disk #1", will by default
- be located at A:\. If the files
- cannot be found, setup will also check
- the directory setup was run from
- (i.e. a network drive or hard disk,
- or drive B:). If it still cannot
- find the file, the user will be
- prompted to insert "KA Setup Disk #1".
-
- [directories]
-
- This is information about the destination directories:
- ----------------------------------------------------------------------
- "0","C:\KA","Killer App Dir": This is the parent directory. This
- MUST be in the INF file. This is the
- directory that appears in the dialog
- box asking the user where they want
- to install their files. MUST start
- with "0".
-
- "A","\CHILD1","KA Dir Child 1": Child directories will be built off
- of the parent. If the user changes
- the parent, the children will reflect
- this. Valid names are "A"-"Z".
-
-
-
-
- THE SOURCE
- ----------------------------------------
-
-
- The idea behind setup is that you never have to touch the source code.
- However, many apps have special functionality requirements, and
- some features are not in this appnote. Some common features that
- this appnote does not cover:
-
- 1. Modifying the AUTOEXEC.BAT, CONFIG.SYS, or INI files. Look at how the
- code in the PARSE.C gets information from the INF file. It should
- be very easy to add new data structures to allow you to
- put this information in the INF file.
-
- 2. Determining system hardware. This setup is meant to be run on a
- working version of Windows. It is not meant to install windows.
- Therefore, determining system hardware should be done with conventional
- windows calls (i.e. GetSystemMetrics).
-
-
-