/*

  Installation script for CU_SeeMe/2 Beta 1.1

  Creates folder and various other objects

*/

Call Init

say 'Welcome to CU-SeeMe/2 Beta 1.1'
say ''

/*

  if this is an update to an already existing installation
  then we do not want to overwrite the reflist.ini

*/

if stream('reflist.ini','c','query exists') = "" then
  'copy reflist.nin reflist.ini'

say 'please wait while I create WPS objects'

dir = directory()

id = dir"\readme.now"
exename = dir'\CUSEEME2.EXE'
exename2 = dir'\CUVID2.EXE'


call CreateObjects
call SysOpenObject "<CUSEEME2_FLDR>","DEFAULT","TRUE"

return

CreateObjects:

    If  SysCreateObject("WPFolder","CUSeeMe/2 Beta 1.1 for Os/2 ","<WP_DESKTOP>","OBJECTID=<CUSEEME2_FLDR>") then
    do
          If SysCreateObject("WPProgram", "CUSeeMe/2", "<CUSEEME2_FLDR>","EXENAME="exename";STARTUPDIR="dir";PROGTYPE=PM")  Then
          do
            If SysCreateObject("WPProgram", "CUVid/2", "<CUSEEME2_FLDR>","EXENAME="exename2";STARTUPDIR="dir";PROGTYPE=PM")  Then
            do
               Say 'Folder and program objects have been created'
               call  SysCreateObject "WPShadow", "READ.ME", "<CUSEEME2_FLDR>","SHADOWID="id
             end
          end
          Else
             Say 'Could not create program object'
    End
    Else
       Say 'Could not create folder '


return


Init :

  call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  call SysLoadFuncs

  /* trace ?r' */
return






