home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Educate
/
Educate.zip
/
dsky.zip
/
INSTALL.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1996-09-07
|
2KB
|
80 lines
/* INSTALL.CMD **** Install program for Dark Sky ******************************/
call RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
call SysLoadFuncs
PGMNAME = "Dark Sky"
EXEFILE = "DSKY.EXE"
HLPFILE = "DSKY.HLP"
DBFILE = "DSKY.DB"
CTYFILE = "DSKY.CTY"
INIFILE = "DSKY.INI"
say "This install program creates a """ || PGMNAME || """ program object"
say "(icon) on your desktop. Do you wish to proceed? (y/n)"
pull answer .
answer = substr(answer, 1,1)
if answer <> 'Y' then exit 1
/* Get the current directory */
curdir = directory()
/* Check for EXEFILE */
Call SysFileTree curdir || '\' || EXEFILE, file, 'F'
if file.0 = 0 then
do
say "Can not locate" EXEFILE "(Program file)"
exit 1
end
/* Check for HLPFILE */
Call SysFileTree curdir || '\' || HLPFILE, file, 'F'
if file.0 = 0 then
do
say "Can not locate" HLPFILE "(Help file)"
exit 1
end
/* Check for DBFILE */
Call SysFileTree curdir || '\' || DBFILE, file, 'F'
if file.0 = 0 then
do
say "Can not locate" DBFILE "(Sky database)"
exit 1
end
/* Check for CTYFILE */
Call SysFileTree curdir || '\' || CTYFILE, file, 'F'
if file.0 = 0 then
do
say "Can not locate" CTYFILE "(City database file)"
say "Do you still wish to proceed? (y/n)"
pull answer .
answer = substr(answer, 1,1)
if answer <> 'Y' then exit 1
end
/* Check for INIFILE */
Call SysFileTree curdir || '\' || INIFILE, file, 'F'
if file.0 <> 0 then
do
say "Reset" PGMNAME "to original defaults? (y/n)"
pull answer .
answer = substr(answer, 1,1)
if answer = 'Y' then
"@ERASE" INIFILE
end
/* Create object */
if SysCreateObject("WPProgram", PGMNAME, "<WP_DESKTOP>",,
"EXENAME="curdir||'\'||EXEFILE||";"||,
"STARTUPDIR="curdir, "update") then
do
say PGMNAME "has been added to your desktop."
say "Double click on this icon to start the program."
end
else
say "Can not add" PGMNAME "to your desktop."
exit 0