#
# Installation file for WINFBB
#
#
# Allowed commands are :
#
# MKDIR  : create directory
# MKDIR DirName
#
# COPY   : uncompress and copy a file into the specified directory
#          $DST is assumed as the base of the copy. If DirName is
#          ommitted, file will be copied in $DST
# COPY FileName DirName
#
# DEL    : Deletes a file
# DEL FileName
#
# DISK   : Prompts for changing disk
# DISK NumberOfDisk
# A file named DISK1.@@@ (1 for 1st disk, and so on) must exist in each
# disk as a label.
#
# EXEC   : executes a program and waits for completion
# EXEC Directory_of_execution program arguments ...
#
# GROUP  : create a group
# GROUP GroupName
#
# ITEM   : add an item to the previously created group
# ITEM FullFileName ItemName
#
# NAME   : Defines the name of the application (may hold spaces)
# NAME NameOfApplication
#
# VALUE  : creates of change a KeyWord=Value in a section of a system file
# VALUE SystemIniFile Section KeyWord=Value
#
# REBOOT : prompts the user to reboot WINDOWS or the whole SYSTEM
# REBOOT WINDOWS
# REBOOT SYSTEM
#
# TARGET : Defines the default target directory
# TARGET DefaultDirectory
#
# if a command is preceeded by a number, it updates the position of the gauge
# from 0 to 100%.
#
# TEST Statements :
# IF [NOT] OK Texte to be displayed in the OK/NO dialog window
#    commands ...  (If answer is [NOT] OK)
# ELSE
#    commands ...
# ENDIF
#
# IF [NOT] EXIST FileName
#    commands ...  (If FileName [NOT] EXISTS)
# ELSE
#    commands ...
# ENDIF
#
# All IF stement must be ended with a ENDIF statement
# ELSE section is not mandatory
#
#IF NOT OK "Continue installation"
#10 ABORT
#100 ENDIF
#
#
# Variables :
# $SRC : Origin directory given in the install window
# $DST : Destination directory given in the install window
# $WIN : Windows directory
#

NAME WinFBB 7.00a
TARGET C:\FBB

#
# ASK for 1st DISK (DISK must hold an empty file named DISK1.@@@)
#

# Optional if only 1 disk
DISK 1

#
# Prepare for installation, show README.1ST and ask if continue.
#

01 MKDIR   $DST
01 MKDIR   BIN
01 COPY README.1ST
01 COPY INSTALL.EXE BIN
01 EXEC $DST $WIN\NOTEPAD.EXE README.1ST

IF NOT OK Go on installing FBB now ?
  DEL README.1ST
  DEL BIN\INSTALL.EXE
  ABORT
ELSE

# 
# DIRECTORIES TO BE CREATED FROM DESTINATION PATH, except $DST and BIN,
# which have already been created.
#

01 MKDIR   DOC
   MKDIR   DOCS
   MKDIR   OLDMAIL
   MKDIR   PG
   MKDIR   STATS
   MKDIR   SYSTEM
   MKDIR   USERS
   MKDIR   USERS\YAPP
   MKDIR   UTIL
   MKDIR   SYSTEM\LANG
   MKDIR   SYSTEM\LOG
   MKDIR   SYSTEM\SAT
   MKDIR   SYSTEM\FWD
   MKDIR   SYSTEM\WP

   MKDIR   MAIL
   MKDIR   MAIL\MAIL0
   MKDIR   MAIL\MAIL1
   MKDIR   MAIL\MAIL2
   MKDIR   MAIL\MAIL3
   MKDIR   MAIL\MAIL4
   MKDIR   MAIL\MAIL5
   MKDIR   MAIL\MAIL6
   MKDIR   MAIL\MAIL7
   MKDIR   MAIL\MAIL8
   MKDIR   MAIL\MAIL9

   MKDIR   BINMAIL
   MKDIR   BINMAIL\MAIL0
   MKDIR   BINMAIL\MAIL1
   MKDIR   BINMAIL\MAIL2
   MKDIR   BINMAIL\MAIL3
   MKDIR   BINMAIL\MAIL4
   MKDIR   BINMAIL\MAIL5
   MKDIR   BINMAIL\MAIL6
   MKDIR   BINMAIL\MAIL7
   MKDIR   BINMAIL\MAIL8
   MKDIR   BINMAIL\MAIL9

#
# Directory for example-files from this version, files that may already exist
#
 
   MKDIR   EXAMPLES.700
   COPY README.1ST EXAMPLES.700

#
# FILES TO BE COPIED (FILENAME -> DIRECTORY)
#

#
# BATCH FILES
#

02 COPY DSZ.BAT       BIN
IF EXIST BIN\RUNFBB.BAT
  IF OK RUNFBB.BAT already exists. Replace it ?
    03 COPY RUNFBB.BAT    BIN
  ENDIF
ELSE
  03 COPY RUNFBB.BAT    BIN
ENDIF

  03 COPY RUNFBB.BAT    EXAMPLES.700

#
# BINARY COM-FILES AND EXE-FILES
#

07 COPY CLEANUP.COM   BIN
07 COPY CLR_USER.COM  BIN
08 COPY CUT.COM       BIN
08 COPY DSZ.COM       BIN
09 COPY EPURMESS.COM  BIN
09 COPY EPURWP.COM    BIN
10 COPY FV.COM        BIN
10 COPY ISDAY.COM     BIN
11 COPY MAINTINF.COM  BIN
11 COPY NEWDOC.COM    BIN
12 COPY REQDIR.COM    BIN
12 COPY REQFIL.COM    BIN
13 COPY SETUSER.COM   BIN
13 COPY SLEEP.COM     BIN
14 COPY FBB_SVC.EXE   BIN
14 COPY INSTWFBB.EXE  BIN
15 COPY MULTI.EXE     BIN
15 COPY RUNFBB.EXE    BIN
16 COPY SATUPDAT.EXE  BIN
16 COPY WFBB.EXE      BIN



#
# WAV SOUNDS
#

25 COPY CONNECT.WAV   BIN
25 COPY SYSCALL.WAV   BIN

#
# WINDOWS DLLs
#

25 COPY BC453RTL.DLL  BIN
30 COPY BIDS47.DLL    BIN
35 COPY OWL253A.DLL   BIN
41 COPY ICOM.DLL      UTIL
41 COPY ICOM.COM      UTIL
42 COPY M_FILTER.DLL  UTIL
43 COPY PROGTX.DLL    UTIL

#
# FBB COMMUNICATION DRIVER FOR WINDOWS
#

IF EXIST $WIN\SYSTEM\FBBCOMM.DRV
  IF OK FBBCOMM.DRV already exists. Replace it ?
    45 COPY FBBCOMM.DRV   $WIN\SYSTEM
  ENDIF
ELSE
  45 COPY FBBCOMM.DRV   $WIN\SYSTEM
ENDIF

#
# SATELLITE DATABASE
#

46 COPY SATEL.DAT     SYSTEM\SAT
47 COPY SAT.EXE       SYSTEM\SAT
   COPY SAT.EXE       EXAMPLES.700
47 COPY SAT.PIF       SYSTEM\SAT
   COPY SAT.PIF       EXAMPLES.700
47 EXEC $DST\SYSTEM\SAT $DST\SYSTEM\SAT\SAT.PIF
   EXEC $DST\EXAMPLES.700 $DST\EXAMPLES.700\SAT.PIF
47 DEL $DST\SYSTEM\SAT\SAT.EXE
   DEL $DST\EXAMPLES.700\SAT.EXE
47 DEL $DST\SYSTEM\SAT\SAT.PIF
   DEL $DST\EXAMPLES.700\SAT.PIF

#
# DOC FILES
#

48 COPY CHANGES.DOC   DOC
48 COPY CHANGES.DOC   EXAMPLES.700
48 COPY FBBMUX.DOC    DOC
48 COPY FBBMUX.DOC    EXAMPLES.700
49 COPY MULTI.DOC     DOC
49 COPY MULTI.DOC     EXAMPLES.700
49 COPY WA8DED21.DOC  DOC
49 COPY WA8DED21.DOC  EXAMPLES.700
50 COPY DSZ.DOC       DOC
50 COPY DSZ.DOC       EXAMPLES.700
50 COPY FV.DOC        DOC
50 COPY FV.DOC        EXAMPLES.700



#74 COPY TFWIN.DLL     BIN
#76 COPY TFWIN.INI     $WIN

#
# PIF FILES FOR DOS APPLICATIONS
#

77 COPY DSZ.PIF       BIN
   COPY FBB_SVC.PIF   BIN
   COPY RUNFBB.PIF    BIN

#
# MAIN CONFIGURATION FILES
#
# INIT.SRV is the only file to be put in FBB directory
# WINFBB.INI will be put in the WINDOWS directory
#

IF EXIST INIT.SRV
  IF OK A previous version of INIT.SRV already exists. Replace it ?
    78 COPY INIT.SRV
  ENDIF
ELSE
  78 COPY INIT.SRV
ENDIF
  78 COPY INIT.SRV EXAMPLES.700

IF EXIST EPURMESS.INI
  IF OK A previous version of EPURMESS.INI already exists. Replace it ?
    78 COPY EPURMESS.INI
  ENDIF
ELSE
  78 COPY EPURMESS.INI
ENDIF
78 COPY EPURMESS.INI EXAMPLES.700

IF EXIST $WIN\WINFBB.INI
  IF OK A previous version of WINFBB.INI already exists. Replace it ?
    78 COPY WINFBB.INI $WIN
  ENDIF
ELSE
  78 COPY WINFBB.INI $WIN
ENDIF
78 VALUE WINFBB.INI MAIN Position=0;0;500;315
78 COPY WINFBB.INI EXAMPLES.700

IF NOT EXIST $WIN\SYSTEM\CTL3DV2.DLL
  78 COPY CTL3DV2.DLL $WIN\SYSTEM
ENDIF

79 COPY MODLABEL.EXE
79 COPY MODLABEL.PIF

#
# SYSTEM FILES
#

IF NOT EXIST SYSTEM\BBS.SYS
  80 COPY BBS.SYS       SYSTEM
ENDIF
COPY BBS.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\BEACON1.SYS
  81 COPY BEACON1.SYS   SYSTEM
ENDIF
COPY BEACON1.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\CRON.SYS
  82 COPY CRON.SYS      SYSTEM
ENDIF
COPY CRON.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\FORWARD.SYS
  82 COPY FORWARD.SYS   SYSTEM
ENDIF
COPY FORWARD.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\INITTNC1.SYS
  83 COPY INITTNC1.SYS  SYSTEM
ENDIF
COPY INITTNC1.SYS EXAMPLES.700

83 COPY INITTNC.DED SYSTEM
83 COPY INITTNC.PK SYSTEM
83 COPY INITTNC.DED EXAMPLES.700
83 COPY INITTNC.PK EXAMPLES.700

IF NOT EXIST SYSTEM\LANGUE.SYS
  84 COPY LANGUE.SYS    SYSTEM
ENDIF
COPY LANGUE.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\MAINT1.SYS
  85 COPY MAINT1.SYS    SYSTEM
ENDIF
COPY MAINT1.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\MEMO.SYS
  85 COPY MEMO.SYS      SYSTEM
ENDIF
COPY MEMO.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\PASSWD.SYS
  86 COPY PASSWD.SYS    SYSTEM
ENDIF
COPY PASSWD.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\PORT.SYS
  87 COPY PORT.SYS      SYSTEM
ENDIF
COPY PORT.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\PROTECT.SYS
  88 COPY PROTECT.SYS   SYSTEM
ENDIF
COPY PROTECT.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\REJECT.SYS
  88 COPY REJECT.SYS    SYSTEM
ENDIF
COPY REJECT.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\SWAPP.SYS
  89 COPY SWAPP.SYS     SYSTEM
ENDIF
COPY SWAPP.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\THEMES.SYS
  89 COPY THEMES.SYS    SYSTEM
ENDIF
COPY THEMES.SYS EXAMPLES.700

IF NOT EXIST SYSTEM\MULTI.TXT
  89 COPY MULTI.TXT     SYSTEM
ENDIF
COPY MULTI.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\FWD\LA1B
  90 COPY LA1B          SYSTEM\FWD
ENDIF
COPY LA1B EXAMPLES.700

IF NOT EXIST SYSTEM\FWD\F6ABJ
  90 COPY F6ABJ         SYSTEM\FWD
ENDIF
COPY F6ABJ EXAMPLES.700

IF NOT EXIST SYSTEM\FWD\AMSAT
  91 COPY AMSAT         SYSTEM\FWD
ENDIF
COPY AMSAT EXAMPLES.700

IF NOT EXIST SYSTEM\REDIST.SYS
  91 COPY REDIST.SYS    SYSTEM
ENDIF
COPY REDIST.SYS EXAMPLES.700

DISK 2

#
# HELP FILES
#

92 COPY WFBB.HLP      BIN
IF NOT EXIST SYSTEM\LANG\ENGLISH.HLP
  93 COPY ENGLISH.HLP   SYSTEM\LANG
ENDIF
COPY ENGLISH.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\FRANCAIS.HLP
  93 COPY FRANCAIS.HLP  SYSTEM\LANG
ENDIF
COPY FRANCAIS.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\NORSK8.HLP
  94 COPY NORSK8.HLP  SYSTEM\LANG
ENDIF
COPY NORSK8.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\NORSK.HLP
  94 COPY NORSK.HLP SYSTEM\LANG
ENDIF
COPY NORSK.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\CATALA.HLP
  97 COPY CATALA.HLP  SYSTEM\LANG
ENDIF
COPY CATALA.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\DANSK.HLP
  97 COPY DANSK.HLP  SYSTEM\LANG
ENDIF
COPY DANSK.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\DEUTSCH.HLP
  97 COPY DEUTSCH.HLP  SYSTEM\LANG
ENDIF
COPY DEUTSCH.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\ESPAGNOL.HLP
  97 COPY ESPAGNOL.HLP  SYSTEM\LANG
ENDIF
COPY ESPAGNOL.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\HRVATSKI.HLP
  97 COPY HRVATSKI.HLP  SYSTEM\LANG
ENDIF
COPY HRVATSKI.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\ITALIANO.HLP
  97 COPY ITALIANO.HLP  SYSTEM\LANG
ENDIF
COPY ITALIANO.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\NEDERLAN.HLP
  97 COPY NEDERLAN.HLP  SYSTEM\LANG
ENDIF
COPY NEDERLAN.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\PORTUGUE.HLP
  97 COPY PORTUGUE.HLP  SYSTEM\LANG
ENDIF
COPY PORTUGUE.HLP EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\SVENSKA.HLP
  97 COPY SVENSKA.HLP  SYSTEM\LANG
ENDIF
COPY SVENSKA.HLP EXAMPLES.700






#
# TEXT FILES
#

IF NOT EXIST SYSTEM\LANG\ENGLISH.TXT
  97 COPY ENGLISH.TXT   SYSTEM\LANG
ENDIF
COPY ENGLISH.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\FRANCAIS.TXT
  97 COPY FRANCAIS.TXT  SYSTEM\LANG
ENDIF
COPY FRANCAIS.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\NORSK.TXT
  97 COPY NORSK.TXT  SYSTEM\LANG
ENDIF
COPY NORSK.TXT EXAMPLES.700
  
IF NOT EXIST SYSTEM\LANG\NORSK8.TXT
  97 COPY NORSK8.TXT  SYSTEM\LANG
ENDIF
COPY NORSK8.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\CATALA.TXT
  97 COPY CATALA.TXT  SYSTEM\LANG
ENDIF
COPY CATALA.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\DANSK.TXT
  97 COPY DANSK.TXT  SYSTEM\LANG
ENDIF
COPY DANSK.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\DEUTSCH.TXT
  97 COPY DEUTSCH.TXT  SYSTEM\LANG
ENDIF
COPY DEUTSCH.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\ESPAGNOL.TXT
  97 COPY ESPAGNOL.TXT  SYSTEM\LANG
ENDIF
COPY ESPAGNOL.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\HRVATSKI.TXT
  97 COPY HRVATSKI.TXT  SYSTEM\LANG
ENDIF
COPY HRVATSKI.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\ITALIANO.TXT
  97 COPY ITALIANO.TXT  SYSTEM\LANG
ENDIF
COPY ITALIANO.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\NEDERLAN.TXT
  97 COPY NEDERLAN.TXT  SYSTEM\LANG
ENDIF
COPY NEDERLAN.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\PORTUGUE.TXT
  97 COPY PORTUGUE.TXT  SYSTEM\LANG
ENDIF
COPY PORTUGUE.TXT EXAMPLES.700

IF NOT EXIST SYSTEM\LANG\SVENSKA.TXT
  97 COPY SVENSKA.TXT  SYSTEM\LANG
ENDIF
COPY SVENSKA.TXT EXAMPLES.700






#
# Firmware-files
#
97 COPY PK87U16K.ROM
97 COPY PK87U32K.ROM
97 COPY PK88U16K.ROM
97 COPY PK88U32K.ROM
97 COPY TF18.ROM
97 COPY TF24.ROM
97 COPY TF4.ROM
97 COPY TF8.ROM
97 COPY TFPK.ROM
97 COPY TFPKM.ROM


#
# UTIL-files
#

COPY LISEZMOI.DOC STATS
COPY LISEZMOI.DOC EXAMPLES.700
COPY LOG.DOC STATS
COPY LOG.DOC EXAMPLES.700
COPY LOGCALL.EXE STATS
COPY LOGFBB.CNF STATS
COPY LOGFBB.CNF EXAMPLES.700
COPY LOGSTATF.EXE STATS
COPY LOGSTATU.EXE STATS

#
# Main FBB-docs
#

COPY FBB700.DOC DOC
COPY FBB700.DOC EXAMPLES.700


IF NOT EXIST SYSTEM\LANG\MODEM.ENT
  97 COPY MODEM.ENT     SYSTEM\LANG
ENDIF
COPY MODEM.ENT EXAMPLES.700



IF EXIST SYSTEM\YAPPLBL.SYS
  97 EXEC $DST MODLABEL.PIF
ENDIF

DEL MODLABEL.PIF

#
# UPDATE THE GROUP AND ITEMS OF WINDOWS
#

98 GROUP FBB for Windows
   ITEM BIN\RUNFBB.EXE   WinFBB
   ITEM BIN\INSTWFBB.EXE WinFBB configuration
   ITEM BIN\INSTALL.EXE  Installation

#
# UPDATE THE SYSTEM.INI AND THE PATH IN AUTOEXEC.BAT
#

IF OK SYSTEM.INI will be modified to replace the COMM.DRV driver
  VALUE SYSTEM.INI boot comm.drv=fbbcomm.drv
ENDIF

IF OK SYSTEM.INI will be modified to increase the environment size to 2KB
  VALUE SYSTEM.INI NonWindowsApp CommandEnvSize=2048
ENDIF

IF OK AUTOEXEC.BAT will be modified to add the PATH
  PATH $DST\BIN
  IF OK Your AUTOEXEC.BAT has been modified. AUTOEXEC.BAT has been saved in AUTOEXEC.FBB
  ENDIF
ENDIF

#
# RUN THE CONFIGURATION PROGRAM IN $DST DIRECTORY
#

99 EXEC $DST $DST\BIN\INSTWFBB.EXE


#
# THE INSTALLATION IS FINISHED. THE SYSTEM WILL BE REBOOTED TO GET THE PATH
#

IF OK The system will now be rebooted to update the parameters
  REBOOT SYSTEM
ENDIF

#
# END OF NORMAL INSTALLATION
#

#
# Delete README.1ST and INSTALL.EXE if installation not started
#


100 ENDIF
