
#
# 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
#
# 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
#
# 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
#
# 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
#
#
# Variables :
# $SRC : Origin directory given in the install window
# $DST : Destination directory given in the install window
# $WIN : Windows directory
#

#
# DIRECTORIES TO BE CREATED FROM DESTINATION PATH
#

01 MKDIR   $DST
   MKDIR   BIN
   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

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

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

#
# 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

#
# BINARY COM FILES (DOS APPLICATIONS)
#

07 COPY CLEANUP.COM   BIN
08 COPY CLR_USER.COM  BIN
09 COPY CUT.COM       BIN
10 COPY DSZ.COM       BIN
12 COPY EPURMESS.COM  BIN
13 COPY EPURWP.COM    BIN
14 COPY FV.COM        BIN
15 COPY ISDAY.COM     BIN
16 COPY MAINTINF.COM  BIN
17 COPY MAINTREJ.COM  BIN
18 COPY NEWDOC.COM    BIN
19 COPY REQDIR.COM    BIN
20 COPY REQFIL.COM    BIN
21 COPY SETUSER.COM   BIN
22 COPY SLEEP.COM     BIN
23 COPY TLABEL.COM    BIN
#24 COPY UPDWP.COM     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
42 COPY M_FILTER.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

#
# DOC FILES
#

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


#
# BINARY EXE FILES
#

51 COPY FBB_SVC.EXE   BIN
55 COPY INSTWFBB.EXE  BIN
60 COPY MULTI.EXE     BIN
61 COPY RUNFBB.EXE    BIN
62 COPY SATUPDAT.EXE  BIN
#63 COPY TFPCW.EXE     BIN
64 COPY WFBB.EXE      BIN

#
#
#

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

#
# HELP FILES
#

77 COPY WFBB.HLP      BIN
IF NOT EXIST SYSTEM\LANG\ENGLISH.HLP
  78 COPY ENGLISH.HLP   SYSTEM\LANG
ENDIF
IF NOT EXIST SYSTEM\LANG\FRANCAIS.HLP
  78 COPY FRANCAIS.HLP  SYSTEM\LANG
ENDIF

#
# PIF FILES FOR DOS APPLICATIONS
#

80 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 ?
    81 COPY INIT.SRV
  ENDIF
ELSE
  81 COPY INIT.SRV
ENDIF

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

IF EXIST $WIN\WINFBB.INI
  IF OK A previous version of WINFBB.INI already exists. Replace it ?
    81 COPY WINFBB.INI $WIN
  ENDIF
ELSE
  81 COPY WINFBB.INI $WIN
ENDIF

#
# SYSTEM FILES
#

IF NOT EXIST SYSTEM\BBS.SYS
  85 COPY BBS.SYS       SYSTEM
ENDIF
IF NOT EXIST SYSTEM\BEACON1.SYS
  86 COPY BEACON1.SYS   SYSTEM
ENDIF
IF NOT EXIST SYSTEM\CRON.SYS
  87 COPY CRON.SYS      SYSTEM
ENDIF
IF NOT EXIST SYSTEM\FORWARD.SYS
  87 COPY FORWARD.SYS   SYSTEM
ENDIF
IF NOT EXIST SYSTEM\INITTNC1.SYS
  88 COPY INITTNC1.SYS  SYSTEM
ENDIF
IF NOT EXIST SYSTEM\LANGUE.SYS
  89 COPY LANGUE.SYS    SYSTEM
ENDIF
IF NOT EXIST SYSTEM\MAINT1.SYS
  90 COPY MAINT1.SYS    SYSTEM
ENDIF
IF NOT EXIST SYSTEM\MEMO.SYS
  91 COPY MEMO.SYS      SYSTEM
ENDIF
IF NOT EXIST SYSTEM\PASSWD.SYS
  92 COPY PASSWD.SYS    SYSTEM
ENDIF
IF NOT EXIST SYSTEM\PORT.SYS
  92 COPY PORT.SYS      SYSTEM
ENDIF
IF NOT EXIST SYSTEM\PROTECT.SYS
  93 COPY PROTECT.SYS   SYSTEM
ENDIF
IF NOT EXIST SYSTEM\REJECT.SYS
  93 COPY REJECT.SYS    SYSTEM
ENDIF
IF NOT EXIST SYSTEM\SWAPP.SYS
  94 COPY SWAPP.SYS     SYSTEM
ENDIF
IF NOT EXIST SYSTEM\THEMES.SYS
  94 COPY THEMES.SYS    SYSTEM
ENDIF

IF NOT EXIST SYSTEM\MULTI.TXT
  94 COPY MULTI.TXT     SYSTEM
ENDIF

IF NOT EXIST SYSTEM\FWD\LA1B
  95 COPY LA1B          SYSTEM\FWD
ENDIF
IF NOT EXIST SYSTEM\FWD\F6ABJ
  95 COPY F6ABJ         SYSTEM\FWD
ENDIF
IF NOT EXIST SYSTEM\FWD\AMSAT
  96 COPY AMSAT         SYSTEM\FWD
ENDIF

#
# TEXT FILES
#

IF NOT EXIST SYSTEM\LANG\ENGLISH.TXT
  96 COPY ENGLISH.TXT   SYSTEM\LANG
ENDIF
IF NOT EXIST SYSTEM\LANG\FRANCAIS.TXT
  97 COPY FRANCAIS.TXT  SYSTEM\LANG
ENDIF
IF NOT EXIST SYSTEM\LANG\MODEM.ENT
  97 COPY MODEM.ENT     SYSTEM\LANG
ENDIF

#
# 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 INSTALLATION
#

