home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
owf.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-03-13
|
4KB
|
173 lines
/* install-script for Object WorkFrame*/
Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
say "Instalation of Object WorkFrame starts..."
path = directory();
PARSE UPPER VAR path path;
SAY "Enter the path where you : (press enter for path: " path ")"
PULL pathFrom;
IF pathFrom = "" THEN
pathFrom = path;
again:
SAY "Enter a path where Object WorkFrame should be installed (X=exit):"
PULL pathTo;
IF pathTo = ""
then do
say "please enter a path to copy the files to"
signal again;
end
IF pathTo = "X"
then exit;
message:
say "Are you shure to install Object WorkFrame from <" pathFrom "> to <" pathTo "< ? (Y)es/(N)o/(E)xit";
pull response;
if response = "Y" then
do
if pathTo = pathFrom then /*dont copy files into themselfs*/
signal register;
dummy = directory( pathTo );
if dummy = "" then
do
/* create directory*/
rc = SysMkDir( pathTo);
if(rc > 0) /*error occured*/
then do
say "could not create directory " pathTo " errorcode was: " rc;
exit;
end;
end
say coping files;
copyPath = insert(pathFrom, "\addfile.exe");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wf.exe");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\browse.exe");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\makemake.exe");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\neglist.exe");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\watlink.exe");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\oolw3i03.dll");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\oolc3i03.dll");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\ibm_cpp.ini");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\emx_gcc.ini");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wpp.ini");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wcc.ini");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\neglist.lst");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wf.lst");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wf.cfg");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\emx.cfg");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\make.hlp");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wf.hlp");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\editor.bmp");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\debug.bmp");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\run.bmp");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\make.bmp");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\install.cmd");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\neglist.def");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\watlink.doc");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\readme.txt");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\wf.df");
copy copyPath pathTo;
copyPath = insert(pathFrom, "\template");
dirTo = insert(pathTo, "\template\");
xcopy "/E /S" copyPath dirTo;
END
else
do
if response = "E" then /*Exit*/
exit;
else /*jump to the beginning*/
signal again;
end
register:
curDir = pathTo;
instPath = 'ASSOCFILTER=*.OWF;EXENAME=';
instPath = insert(instPath, curDir);
instPath = insert(instPath, '\wf.exe;STARTUPDIR=');
instPath = insert(instPath, curDir);
SysIni( 'USER', 'Object WorkFrame', 'InstPath', curDir);
SysIni( 'OWF.INI', 'Object WorkFrame', 'FONT1', "8.Helv");
SysIni( 'OWF.INI', 'Object WorkFrame', 'FONT2', "8.Courier");
SysIni( 'OWF.INI', 'Object WorkFrame', 'FONT3', "8.Helv");
say "registering ObjectWorkFrame..."
if SysCreateObject('WPProgram', 'Object WorkFrame', '<WP_DESKTOP>', instPath) then
say "program registered";
else
say "registering Object WorkFrame failed, perhaps allready installed"
if SysCreateObject('WPDataFile', 'ObjectWorkFrame.OWF', '<WP_TEMPS>', 'TEMPLATE=YES') then
say "template registered"
else
say "registering template failed, perhaps allready installed\n"
say "installation complete"