home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: OtherApp
/
OtherApp.zip
/
ellie03.zip
/
Register.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-07-30
|
3KB
|
81 lines
/* ╔═════════════════╤══════════════════════════════════════════════════════════╗
║ File last saved │19 Jun 1999 at 08:34:17 [] ║
╟─────────────────┼──────────────────────────────────────────────────────────╢
║ Filename │Register.cmd ║
║ Created │20 Aug 1998 at 17:14:57 ║
║ Comment │Registers Ellie's directory in OS2.INI ║
╚═════════════════╧══════════════════════════════════════════════════════════╝
*/
SIGNAL ON syntax
SIGNAL ON halt
if LoadRexxUtil() then EXIT 9
parse arg elliehome
if elliehome = '' then
elliehome = directory()
currver = SysIni(, 'AiG', 'Ellie_Ver')
if currver = 'ERROR:' then currver = 'None'
thisver = '0.3r2a'
say ' ─────────────────────────────────────────────────────────────────────'
say ' ** Install Ellie' thisver '** (1) Current version detected:' currver
say ' This program registers Ellie with OS2.INI'
say
say ' You are to run this program from the Ellie "home" directory'
say ' The data to be saved will be: ' elliehome
say ' ─────────────────────────────────────────────────────────────────────'
say ' Are you sure you want to continue..?' '07'x
call charout, ' Type YES to continue >___' || copies('08'x,3)
ky = linein()
select
when translate(ky) = 'YES' then
call Process
when translate(ky) = '' then do
say ' Shall I update the version number ?'
say ' Press N to cancel'
ky = linein()
if translate(ky) = 'N' then
EXIT 88
else
call SysIni , 'AiG', 'Ellie_Ver', thisver
end
otherwise
say ' Aborted!'
end
say ' Register program finished. (phase 1)'
EXIT
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
Process:
app = 'AiG'
key1 = 'Ellie_Home'
key2 = 'Ellie_Ver'
call SysIni , app, key1, elliehome
call SysIni , app, key2, thisver
return
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
syntax:
say sourceline(sigl)
say "syntax error on line ["sigl"]"
say errortext(rc)
trace ?R; NOP; EXIT
return
halt:
say "Ctrl-Break pressed. Halting..."
EXIT
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
LoadRexxUtil:
if rxFuncQuery('SysLoadFuncs') then do
if rxFuncAdd('SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs') then do
say 'Installation Error! (Phase 2) Unable to load RexxUtil library.' '07'x
say 'Please check that you have Rexx installed on your system.' '07'x
return 1; end
call SysLoadFuncs
end
return 0
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */