;============================================================================= 
@Version 1.03
@SyntaxVersion 1.00
;============================================================================= 
;
; NetWare Mobile
; PINSTALL installation for NLMDELTA.NLM and the Online Documentation
;
; "CoPyRiGhT=(c) 1995 Novell, Inc.  All Rights Reserved."
; VeRsIoN=1.03
;
;============================================================================= 

@Other
  Description: "NETWARE MOBILE INSTALLATION"
@EndOther

;============================================================================= 

;
; Install Online Documentation
;

@Fileset
 
  Description:  "NetWare Mobile Documentation Installation"
  Name:         MBDOC
  Class:        OPTIONAL_OFF
  Help:         "Installs the NetWare Mobile documentation.\n"

;  Bytes:        884079
;  DiskBytes:    884079

  ; Load standard commands
  Command "ICMD"

  ; Get the name of the temp directory and copy the files to it
  GetPath TempDest,1,'SYS:\\SYSTEM\\TMP','The installation temporary directory is %s.'
  EraseFile 1, TempDest, "","",""
  GetPath ProductSource,1,'%{NWSRC}','',NWSRC
  Copyfile 0,0,0,2,0,ProductSource,'chngsrc.*','','',TempDest,.,'',''
  Copyfile 0,0,0,2,0,ProductSource,'updatdoc.*','','',TempDest,.,'',''
  Copyfile 0,0,0,2,0,ProductSource,'pinstall.*','','',TempDest,.,'',''
  Copyfile 0,0,0,2,0,ProductSource,'p_instal.*','','',TempDest,.,'',''
  Copyfile 0,0,0,2,0,ProductSource,'pconfig.*','','',TempDest,.,'',''
  Copyfile 0,0,0,2,0,ProductSource,'p_uninst.*','','',TempDest,.,'',''
  Copyfile 0,0,0,2,0,ProductSource,'space.dat','','',TempDest,.,'',''

  ; Copy the Document Files
  GetPath ProductSource,1,'%{NWSRC}\\DOC','',NWSRC
  Copyfile 1,1,0,2,0,ProductSource,.,'','',TempDest,.,'',''

  ; Install documentation
  NLMExec 1, '%{TempDest}\\CHNGSRC %{TEMPDEST}\\updatdoc.dat $(SRCDIR) %{TEMPDEST}'
  NLMExec 1, '%{TempDest}\\PINSTALL s=updatdoc.dat'

  ; Clean up
  EraseFile 1, TempDest, "","",""

@EndFileSet

;============================================================================= 

@Fileset
 
  Description:  "Specify Document Access Rights"
  Name:         MBDOCACCESS
  Class:        OPTIONAL_OFF
  Help:         "Allows the NetWare Mobile documentation to be installed as a public document."

  ; Load standard commands
  Command "ICMD"

  ; Get the user to say whether they want to documentation included
  ; in the list of public access files.
  Menu Action,"The NetWare Mobile documentation should be...",
              2, 0,
              "Removed from the list of public documents", 'REMOVE',
              "Added to the list of public documents",     'INSERT'

  ; Get the name of the temp directory and copy the files to it
  GetPath TempDest,1,'SYS:\\SYSTEM\\TMP','The installation temporary directory is %s.'
  EraseFile 1, TempDest, "","",""
  GetPath ProductSource,1,'%{NWSRC}','',NWSRC
  Copyfile 0,0,0,2,0,ProductSource,'updatdoc.*','','',TempDest,.,'',''

  ; Remove or add reference to the 
  ; documents from the standard dynatext installation file
  ; SYS:PUBLIC\SYSDOCS.CFG
  NLMExec 1, '%{TempDest}\\UPDATDOC SYS:PUBLIC\\SYSDOCS.CFG Windows COLLECTION %{Action} \\DOC\\$NWLANGUAGE\\NWMOB1=NETWARE MOBILE 1.0;'

  ; Clean up
  EraseFile 1, TempDest, "","",""

@EndFileSet

;============================================================================= 

@Fileset

  Description:  "Pre-install Netware Mobile on Server"
  Name:         NWMOB
  Class:        OPTIONAL_OFF
  Help:         "Pre-install Netware Mobile on Server"

  Attribute: 	0, 1
; Bytes: 	12497643

  ; Load standard commands
  Command "ICMD"

  ; Get the name of the temp directory and copy the files to it
  GetPath TempDest,1,'SYS:\\SYSTEM\\TMP','The installation temporary directory is %s.'
  EraseFile 1, TempDest, "","",""
  GetPath ProductSource,1,%{NWSRC},'',NWSRC

  Copyfile 1,1,0,2,0,
    ProductSource,.,'','NetWare Mobile Installation',
    TempDest,.,'',''

  ; Specify where we want to install the product to
  GetPath InstallPath,1,'SYS:\\SYSTEM\\NWMOBILE',''
  NLMExec 1, '%{TEMPDEST}\\SUBKEYWD %{TEMPDEST}\\INSTALL.DAT $(INSTALL_DIRECTORY) %{InstallPath}'

  ; Physically install the product
  NLMExec 1, '%{TEMPDEST}\\CHNGSRC %{TEMPDEST}\\INSTALL.DAT $(SRCDIR) %{TEMPDEST}'
  NLMExec 1, '%{TEMPDEST}\\PINSTALL s=INSTALL.DAT'

  ; Clean up
  EraseFile 1, TempDest, "","",""

@EndFileSet

;============================================================================= 

;
; Install NLMDELTA.NLM
;

@Fileset
 
  Description:  "NetWare Mobile NLMDELTA Installation"
  Name:         DELTA
  Class:        OPTIONAL_OFF
  Help:         "Installs the NetWare Mobile NLMDELTA accelerator NLM.\n"

  ; Load standard commands
  Command "ICMD"

  ; Get the name of the temp directory and copy the files to it
  GetPath TempDest,1,'SYS:\\SYSTEM\\TMP','The installation temporary directory is %s.'
  EraseFile 1, TempDest, "","",""
  GetPath ProductSource,1,'%{NWSRC}','',NWSRC

  Copyfile 0,0,0,2,0,ProductSource,'chngsrc.*','','',TempDest,'','',''
  Copyfile 0,0,0,2,0,ProductSource,'nlmdelta.*','','',TempDest,'','',''
  Copyfile 0,0,0,2,0,ProductSource,'pinstall.*','','',TempDest,'','',''
  Copyfile 0,0,0,2,0,ProductSource,'p_instal.*','','',TempDest,'','',''
  Copyfile 0,0,0,2,0,ProductSource,'pconfig.*', '','',TempDest,'','',''
  Copyfile 0,0,0,2,0,ProductSource,'p_uninst.*','','',TempDest,'','',''
  Copyfile 0,0,0,2,0,ProductSource,'space.dat', '','',TempDest,'','',''

  ; Append instructions to the PCONFIG.DAT file which will add the
  ; command 'load nlmdelta' to the file SYS:SYSTEM\AUTOEXEC.NCF
  AppendFile NWSRC,'pconfig.ncf','','',TEMPDEST,'pconfig.dat','',''

  ; Install product
  NLMExec 1, '%{TempDest}\\CHNGSRC %{TEMPDEST}\\nlmdelta.dat $(SRCDIR) %{TEMPDEST}'
  NLMExec 1, '%{TEMPDEST}\\PINSTALL s=nlmdelta.dat'

  ; Clean up
  EraseFile 1, TempDest, "","",""

@EndFileSet

