home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
shwfnt11.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-10-25
|
2KB
|
108 lines
/* install with german or english language support */
call RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
call SysLoadFuncs
call SysCls
say
say "ShowFont install utility"
say
say
say "please enter target drive/path :"
say "(default C:\SHOWFONT)"
pos = SysCurPos(4,34)
pull laufwerk
pos = SysCurPos(7,0)
map = SysDriveMap("A:")
ziellw = "C:\SHOWFONT\"
dp = ":"
bs = "\"
if substr(laufwerk,1,1) = ""
then ziel = ziellw
else ziel = laufwerk
if substr(ziel,2,1) = ""
then ziel = insert(dp,ziel,1)
if substr(ziel,3,1) = ""
then ziel = insert(bs,ziel,2)
if wordpos(substr(ziel,1,2),map) = 0
then do
say "drive does not exist!"
exit
end
if substr(ziel,length(ziel),1) = bs
then ziel = delstr(ziel,length(ziel),1)
if length(ziel) > 3 then do
rc = SysFileTree(ziel,"ergebnis","D")
dirfound = 0
if ergebnis.0 = 0 then do
say "directory does not exist, create ? y/n :"
pos = SysCurPos(7,45)
pull antwort
if antwort = "Y" then do
rc = SysMkDir(ziel)
if rc > 0 then do
say "could not create target directory !!!"
exit
end
else do
rc = SysFileTree(ziel,"ergebnis","D")
if ergebnis.0 > 0 then
dirfound = 1
end
end
end
else
dirfound = 1
end
if dirfound = 1 then do
pos = SysCurPos(7,0)
say "please choose language (1=english, 2=german) :"
pos = SysCurPos(7,48)
pull language
pos = SysCurPos(10,0)
if language < 1 then language = 1
if language > 2 then language = 1
"@copy showfont.exe >NUL" ziel
if language = 1 then do
ziel = insert(bs,ziel,length(ziel))
titel = "Show Font Utility"
"@copy showf_e.msg" ziel"showfont.msg >NUL"
end
if language = 2 then do
ziel = insert(bs,ziel,length(ziel))
titel = "OS/2 Fonts"
"@copy showf_g.msg" ziel"showfont.msg >NUL"
end
options = "EXENAME=" || ziel || "SHOWFONT.EXE;"
ziel = delstr(ziel,length(ziel),1)
options = options || "STARTUPDIR=" || ziel || ";"
rc=SysCreateObject('WPProgram',titel,'<WP_DESKTOP>',options,'u');
drive = substr(ziel,1,2)
drive
"@cd "ziel
'pause'
"start showfont.exe "ziel
end
call SysDropFuncs
exit