home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / w3_syst / setup.arj / README.TXT < prev    next >
Encoding:
Text File  |  1991-06-25  |  11.6 KB  |  291 lines

  1. Windows Setup Application Note v1.01
  2. =======================================================================
  3.  
  4. FILE BREAKDOWN
  5. ----------------------------------------
  6.  
  7. WINSETUP.ARC -> README.TXT : This file!
  8.  
  9.                 -----------------------------------------------------------                  
  10.  
  11.                 (SETUP.ARC's files should go into their own private dir)
  12.  
  13.                 SETUP.ARC    -> SETUP.C     : Setup stub loader source
  14.                                 SETUP.DEF   : DEF File
  15.                                 SETUP.MAK   : Make File
  16.  
  17.                 -----------------------------------------------------------                  
  18.  
  19.                 (COMPEPND.ARC's files should go into their own private dir)
  20.  
  21.                 COMPEPND.ARC -> COMPRESS.EXE: DOS Based File Compressor
  22.                                 EXPAND.EXE  : DOS Based File UnCompressor
  23.                         
  24.                 NOTE:   It is a good idea to provide the expand utility
  25.                         to your customers, so they can access the files
  26.                         on the original disk.
  27.  
  28.                 -----------------------------------------------------------                  
  29.  
  30.                 (BINCODE.ARC's files should go into their own private dir)
  31.  
  32.                 BINCODE.ARC  -> BINCODE.H   : BINXZ.EXE's header file
  33.  
  34.                                 BINCODE.C   : BINXZ Main Code
  35.                                 DIALOGS.C   : Dialog Box routines
  36.                                 IO.C        : Low-Level DOS routines in C
  37.                                 PARSE.C     : INF File Parser
  38.                                 PROGDDE.C   : Progman DDE Routines
  39.  
  40.                                 EXPAND.OBJ  : File decompression module
  41.  
  42.                                 GASGAUGE.H  : Gas Gauge header file
  43.                                 GASGAUGE.C  : Gas Gauge source file
  44.  
  45.                                 DOS.ASM     : Low-Level DOS routines in ASM
  46.  
  47.                                 BINCODE.DEF : DEF File for BINXZ.EXE
  48.  
  49.                                 BINCODE1.H  : BINXZ's Header file-- resources
  50.                                 BINCODE.RC  : Resource template
  51.                                 BINCODE.ICO : Setup Icon
  52.                                 BINCODE.DLG : Dialog Templates
  53.  
  54.                                 BINRET.MAK  : Retail Build make file
  55.                                 BINCODE.MAK : Debug build make file
  56.  
  57.                                 SETUP.INF   : Sample Setup.inf file
  58.  
  59.  
  60. NOTE:  Due to U.S. Government rules regarding the exporting of
  61.        encryption technologies, EXPAND.C cannot be distributed.
  62.  
  63.  
  64.  
  65. TOOLS
  66. -------------------------------------
  67.  
  68.   Windows SDK v3.00 or >
  69.   Windows     v3.00 or >
  70.   MS C        v6.00 or >
  71.   MASM        v5.1  or >
  72.   DOS         v3.1  or >
  73.  
  74.  
  75. HOW A RELEASE SETUP DISK LOOKS
  76. -------------------------------------
  77.  
  78.   The setup disk has two parts, SETUP.EXE and BINXZ.EXE.  Setup spawns 
  79.   BINXZ, which actually does the work.  If Setup determines that it
  80.   is running from a floppy disk, then it will copy BINXZ over to the
  81.   windows directory on the user's hard disk.  BINXZ will then run from
  82.   the hard disk and delete itself when done (ONLY if copied by SETUP.
  83.   If these files were already on a hard disk, then BINXZ wont delete 
  84.   itself).
  85.   
  86.   This is done so that the program can be well behaved (i.e. MOVEABLE,
  87.   DISCARDABLE), and still let the user change disks in drive A: without
  88.   losing the .EXE file.
  89.  
  90.   The first disk MUST have the following structure to it:
  91.  
  92.   A:\SETUP.EXE
  93.   A:\SETUP.INF
  94.   A:\BIN\BINXZ.EXE
  95.  
  96.   If this is to be run off of a hard disk or network, simply preserve
  97.   the BIN subdirectory; Setup will run off a network or hard drive.
  98.  
  99.   All files to be copied MUST be in subdirectories from the "root".
  100.   This is done to sheild the user from the oppurtunity to run the
  101.   application(s) directly from the setup disk.
  102.  
  103.  
  104. OUR SAMPLE DISK
  105. -------------------------------------
  106.  
  107.   A:\SETUP.EXE
  108.   A:\SETUP.INF
  109.   A:\BIN\BINXZ.EXE
  110.   A:\BIN\KILLER.EXE
  111.   A:\BIN\COOL.EXE
  112.   A:\DLL\KILLER.DLL
  113.   A:\DLL\COOL.DLL
  114.   A:\HLP\KILLER.HLP
  115.   A:\HLP\README.TXT
  116.  
  117.  
  118.   The files KILLER.* are for the "Killer App", the user has the option
  119.   to install these files.
  120.   
  121.   The files COOL.* are for the "Cool App", the user has the option to
  122.   install these files.
  123.   
  124.   The README.TXT file is required, the user does not have an option.
  125.   
  126.   We do not want the user to have to manually select KILLER.EXE, 
  127.   KILLER.DLL, and KILLER.HLP, instead we want them to select "Killer App",
  128.   and setup will know that "Killer App" actually refers to three files.
  129.   
  130.   The three files are:
  131.   
  132.     \BIN\KILLER.EXE
  133.     \DLL\KILLER.DLL
  134.     \HLP\HILLER.HLP
  135.   
  136.   The "nn" flag in the [apps] section of the .INF file would come
  137.   into play here.  We will arbitrarily pick one of these three files,
  138.   KILLER.EXE, and make the other two files "dependant" on this file.
  139.   Therefore, when KILLER.EXE is selected, all three are. The "nn" flag
  140.   for KILLER.EXE would be 02, indicating that the next 2 files are
  141.   dependent on KILLER.EXE.  These three files must be right after each
  142.   other.
  143.   
  144.   The Killer App is the main application, and we want this to have
  145.   an icon in Progman.  Before we can put in an icon, we must define
  146.   a group.  Due to limitations of Progman's DDE set, we cannot
  147.   enumerate the already existing groups.  Therefore, it is necessary
  148.   to create a new group.  The following lines in the .INF file define
  149.   Group "A":
  150.  
  151.   
  152.   [progman]
  153.     "A","Killer Apps","KILLER.GRP"
  154.  
  155.   
  156.   Since KILLER.EXE has an icon, we will put it in Group "A".  Therefore,
  157.   we need to use the "Ic" flag in the [apps] section. "IA" will place
  158.   the icon in Group "A".
  159.   
  160.   Since the user has the option to install KILLER.EXE, the "D" flag
  161.   in the [apps] section is also used.  This will cause this app to
  162.   be displayed in the Select Listbox (COMPLEX Setup ONLY), and allow
  163.   the user to select/deselect it.
  164.  
  165.   The KILLER.EXE file, which we picked earlier, must have a few
  166.   strings associated with it: The Icon title, the Description of
  167.   the app (Usually the same as the Icon Title), and the Comment
  168.   on the App (Usually about 70 chars long).  These three fields are
  169.   added to the end of the statement about KILLER.EXE in the [apps]
  170.   section.
  171.  
  172.   Finally, the Size of KILLER.EXE, KILLER.DLL, and KILLER.HLP combine
  173.   to be 70K.  Therefore, the "70" size indicator must be added to
  174.   the end.
  175.  
  176.   The final appearance of KILLER in the [apps] section looks like:
  177.  
  178.     "0","02DIA","0","BIN","KILLER.EXE","Killer","Killer","The Best App in the WORLD!","70"
  179.     "0","",     "0","DLL","KILLER.DLL"
  180.     "0","",     "0","HLP","KILLER.HLP"
  181.  
  182.  
  183.   Here is a breakdown for a uncompressed file:
  184.  
  185.     "0","02DIA","0",  "BIN","KILLER.EXE","Killer","Killer","The Best App in the WORLD!","70"
  186.      ^           ^     ^^^   ^^^^^^^^^^
  187.      |  (flags)  |      |      / / /      (icon)   (title)  (comment)
  188.      |           |      |     / / /                                                       (size)
  189.      |           |      |    / / /                                                        (size)
  190.      ------------+->A:\BIN\KILLER.EXE  copied to    C:\KA\KILLER.EXE
  191.                  |                                  ^ 
  192.                  |                                  |
  193.                  -----------------------------------|
  194.  
  195.   Here is a breakdown for a compressed file:
  196.  
  197.     "0","C02DIA","0",  "BIN","KILLER.EXE","Killer","Killer","The Best App in the WORLD!","70"
  198.      ^            ^     ^^^   ^^^^^^^^^^
  199.      |   (flags)  |      |      / / /      (icon)   (title)  (comment)
  200.      |            |      |     / / /                                                       (size)
  201.      |            |      |    / / /                                                        (size)
  202.      -------------+->A:\BIN\KILLER.EX$  copied to    C:\KA\KILLER.EXE
  203.                   |                                  ^ 
  204.                   |                                  |
  205.                   -----------------------------------|
  206.  
  207.   
  208.   The information for COOL.EXE is identical to above, except we will
  209.   not use the "IA" flag, since COOL is not cool enough to get a
  210.   Progman Icon.
  211.  
  212.   The README.TXT is required, therefore its line looks like:
  213.  
  214.     "0", "R", "0", "HLP", "README.TXT","ReadMe","ReadMe","","1"
  215.  
  216.  
  217. OTHER STUFF
  218. -------------------------------------
  219.  
  220.   There are three other parts in the INF file: [setup], [disks],
  221.   and [directories].  Here are some tips about each:
  222.  
  223.   [setup]
  224.   
  225.     This is information about the setup program:
  226.     ----------------------------------------------------------------------
  227.   
  228.     "PACKAGENAME","Killer App" :      This causes setup to refer to the
  229.                                       application it is trying to install
  230.                                       as "Killer App".  This should be the
  231.                                       name on the box.
  232.   
  233.     "CAPTIONNAME","Killer App Setup": This is the caption in all of the
  234.                                       setup dialogs, usually the Package
  235.                                       Name with the word "Setup" after it.
  236.   
  237.   [disks]
  238.   
  239.     This is information about the setup source disks:
  240.     ----------------------------------------------------------------------
  241.     "0","A:\","KA Setup Disk #1":     This means that disk #0, called
  242.                                       "KA Setup Disk #1", will by default
  243.                                       be located at A:\.  If the files
  244.                                       cannot be found, setup will also check
  245.                                       the directory setup was run from
  246.                                       (i.e. a network drive or hard disk,
  247.                                       or drive B:).  If it still cannot
  248.                                       find the file, the user will be 
  249.                                       prompted to insert "KA Setup Disk #1".
  250.  
  251.   [directories]
  252.  
  253.     This is information about the destination directories:
  254.     ----------------------------------------------------------------------
  255.     "0","C:\KA","Killer App Dir":     This is the parent directory. This
  256.                                       MUST be in the INF file. This is the
  257.                                       directory that appears in the dialog
  258.                                       box asking the user where they want
  259.                                       to install their files. MUST start
  260.                                       with "0".
  261.  
  262.     "A","\CHILD1","KA Dir Child 1":   Child directories will be built off
  263.                                       of the parent. If the user changes
  264.                                       the parent, the children will reflect
  265.                                       this. Valid names are "A"-"Z".
  266.                                     
  267.  
  268.  
  269.  
  270. THE SOURCE
  271. ----------------------------------------
  272.   
  273.  
  274.   The idea behind setup is that you never have to touch the source code.
  275.   However, many apps have special functionality requirements, and
  276.   some features are not in this appnote.  Some common features that
  277.   this appnote does not cover:
  278.  
  279.   1. Modifying the AUTOEXEC.BAT, CONFIG.SYS, or INI files.  Look at how the
  280.      code in the PARSE.C gets information from the INF file. It should
  281.      be very easy to add new data structures to allow you to
  282.      put this information in the INF file.
  283.  
  284.   2. Determining system hardware. This setup is meant to be run on a
  285.      working version of Windows.  It is not meant to install windows.
  286.      Therefore, determining system hardware should be done with conventional
  287.      windows calls (i.e. GetSystemMetrics).
  288.  
  289.  
  290.  
  291.