/*

  REXX Script to install InJoy - and create a desktop folder

  Adaption for eComStation by Mensys - (c) 2001

*/

if RxFuncQuery('SysLoadFuncs') then do
   call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
   call SysLoadFuncs
end

say "Installing..."

dir = directory() || '\'

say "Creating folder"
call SysCreateObject "WPFolder", "InJoy Internet Dialer", "<WP_DESKTOP>", "OBJECTID=<INJOYFOLDER>;ICONVIEW=FLOWED,NORMAL;ALWAYSSORT=NO;ICONFONT=10.Helv;BACKGROUND=" || dir || "back.bmp,T;ICONFILE=" || dir || "FOLDER.ICO", "replace"
call SysCreateObject "WPFolder", "Utility programs", "<INJOYFOLDER>", "OBJECTID=<INJOYUTILFOLDER>;ICONVIEW=FLOWED,NORMAL;ALWAYSSORT=NO;ICONFONT=8.Helv;BACKGROUND=" || dir || "back.bmp,T", "replace"
call SysCreateObject "WPFolder", "Information", "<INJOYFOLDER>", "OBJECTID=<INJOYINFOFOLDER>;ICONVIEW=FLOWED,NORMAL;ALWAYSSORT=NO;ICONFONT=8.Helv;BACKGROUND=" || dir || "back.bmp,T", "replace"
say "Creating program objects"

call SysCreateObject "WPProgram", "KillJoy", "<INJOYUTILFOLDER>", "EXENAME=" || dir || "KILLJOY.EXE;STARTUPDIR=" || dir || ";ICONVIEW=FLOWED,NORMAL;ALWAYSSORT=YES;"
call SysCreateObject "WPProgram", "Reread firewall" || d2c(10) || "configuration", "<INJOYUTILFOLDER>", "EXENAME=" || dir || "SYNC.EXE;PARAMETERS=" || "-firewall", "replace"
call SysCreateObject "WPProgram", "Reread filter" || d2c(10) || "configuration", "<INJOYUTILFOLDER>", "EXENAME=" || dir || "SYNC.EXE;PARAMETERS=" || "-filter", "replace"

call SysCreateObject "WPProgram", "License"  || d2c(10) || "Agreement", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "LICENSE.TXT", "replace"
call SysCreateObject "WPProgram", "FAQ", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "FAQ.TXT", "replace"
call SysCreateObject "WPProgram", "File_ID.DIZ", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "FILE_ID.DIZ", "replace"
call SysCreateObject "WPProgram", "Firewall" || d2c(10) || "Plugin", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "FIREWALL.TXT", "replace"
call SysCreateObject "WPProgram", "Filter" || d2c(10) || "Plugin", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "FILTER.TXT", "replace"
call SysCreateObject "WPProgram", "IPSec" || d2c(10) || "Plugin", "<INJOYINFOFOLDER>", "EXENAME=NETSCAPE.EXE;PARAMETERS=" || "file:///" || dir || "docs\ipsec\welcome.htm", "replace"
call SysCreateObject "WPProgram", "Users Guide", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "USERGUID.TXT", "replace"
call SysCreateObject "WPProgram", "Readme", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "README.TXT", "replace"
call SysCreateObject "WPProgram", "Readme First", "<INJOYINFOFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\"  || "README.1ST", "replace"
call SysCreateObject "WPProgram", "F/X Communications" || d2c(10) || "(www.fx.dk)", "<INJOYINFOFOLDER>", "EXENAME=NETSCAPE.EXE;PARAMETERS=" || "http://www.fx.dk", "replace"

call SysCreateObject "WPProgram", "License for^eComStation", "<INJOYFOLDER>", "EXENAME=E.EXE;PARAMETERS=" || dir || "DOCS\" || "license.ecs", "replace"
call SysCreateObject "WPProgram", "InJoy", "<INJOYFOLDER>", "EXENAME=" || dir || "IN-JOY.EXE;STARTUPDIR=" || dir || ";ICONVIEW=FLOWED,NORMAL;ALWAYSSORT=YES;OBJECTID=<InJoy>;"

say "Installation completed - InJoy"
