home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Amiga
/
Workbench
/
Archivers
/
DzA_3.1.lha
/
dza
/
DzA
next >
Wrap
Text File
|
1998-03-12
|
7KB
|
279 lines
/*
**$VER: DzA 3.1 (01.03.1998) CopyRight (C) DzA⌐
**
** $Date:01.03.1998$
** $:SoLoNGAmiGA:$
*/
Options failat 21
NL = '0a'x
IF ~SHOW('LIBRARIES','rexxreqtools.library') THEN DO
IF ~ADDLIB('rexxreqtools.library',10,-30,0) THEN DO
SAY 'Cant Find <RexxReqtools.library> Please Install...=('
EXIT(10)
END
END
if exists('c:dms') then call npcommand
call nocommand
npcommand:
if exists('c:lha') then call nppcommand
call nocommand
nppcommand:
if exists('c:lzx') then call stcommand
nocommand:
call rtezrequest("Packer Is Missing in C...",,
"Hmm","DzA 3.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
/* DCG⌐ Start */
stcommand:
call rtezrequest("Welcome to DzA...",,
"DzA","DzA 3.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
acommand:
call rtezrequest("Choose Option...",,
"_Pack|Un_Pack|_Quit","DzA 3.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0 then exit
if rtresult == 1 then call arccommand
if rtresult == 2 then call extcommand
/* Pack */
arccommand:
pac = apac
call rtezrequest("Choose Method...",,
"_LhA|_LzX|_DmS|_Zip|_Cancel","DzA 3.1",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0 then call acommand
if rtresult == 1 then arc = lha
if rtresult == 2 then arc = lzx
if rtresult == 3 then arc = dms
if rtresult == 4 then arc = zip
if arc == dms then call dmscommand
pcommand:
file = rtfilerequest('Ram:', , "Choose File(s) to Pack", ,,
"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_patgad|freqf_selectdirs|
freqf_selectdirs|freqf_multiselect rtfi_matchpat=#?|#?.info")
if file = '' then call errcommand
ppcommand:
pac = apak
dir = rtfilerequest('Ram:', , "Path and Name for File", ,,
"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save")
if dir = '' then call errcommand
ldir = left(dir,9)
if ldir = 'Ram Disk:' then dir = delstr(dir,4,5)
call arcommand
/* UnPack */
extcommand:
pac = xpac
file = rtfilerequest('Ram:', , "Choose File to UnPack", ,,
"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_patgad rtfi_matchpat=#?.(lha|lzh|lzx|dms|zip)")
if file = '' then call errcommand
ext = upper(right(file,3))
if ext='DMS' then call udmcommand
exxcommand:
pac = xpak
dir = rtfilerequest('Ram:', , "Path for File", ,,
"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save|freqf_nofiles")
if dir = '' then call errcommand
ldir = left(dir,9)
if ldir = 'Ram Disk:' then dir = delstr(dir,4,5)
call xxtcommand
/* DmS */
dmscommand:
pac = dpac
dev = rtfilerequest('Ram:', , "Device to DmS", ,,
"rt_reqpos=reqpos_centerscr rtfi_volumerequest = 0")
if dev = '' then call errcommand
if dev ='Ram:' then call errcommand
dmmcommand:
pac = dpak
dir = rtfilerequest('Ram:', , "Path and Name for DmS", ,,
"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save")
if dir = '' then call errcommand
ldir = left(dir,9)
if ldir = 'Ram Disk:' then dir = delstr(dir,4,5)
call admcommand
udmcommand:
pac = udpc
dir = rtfilerequest('Ram:', , "Path for File", ,,
"rt_reqpos=reqpos_centerscr rtfi_flags = freqf_save|freqf_nofiles")
if dir = '' then call errcommand
if dir ='Ram:' then call errcommand
/* Commands */
/**/
xxtcommand:
ext = upper(right(file,3))
select
when ext='LHA' then call xlhcommand
when ext='LZX' then call xlzcommand
when ext='DMS' then call xdmcommand
when ext='LZH' then call xlhcommand
when ext='ZIP' then call zipcommand
when ext='???' then call ???command
when ext~='???' then call ???command
otherwise
end
/**/
arcommand:
select
when arc=lha then call alhcommand
when arc=lzx then call alzcommand
when arc=zip then call azpcommand
otherwise
end
/**/
alhcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then call ralhcommand
call time 'R'
address command
do i = 1 to rtresult.count
say 'PacKinG' rtresult.i 'to' dir
'lha -r -e a -q ' dir rtresult.i
end
call timecommand
/**/
alzcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then call ralzcommand
call time 'R'
address command
do i = 1 to rtresult.count
say 'PacKinG' rtresult.i 'to' dir
'lzx -r -e a -q ' dir rtresult.i
end
call timecommand
/**/
azpcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then call razpcommand
call time 'R'
address command
say 'PacKinG' file 'to' dir
'zip ' dir file
call timecommand
/**/
ralhcommand:
call time 'R'
address command
do i = 1 to rtresult.count
rtresult.i = delstr(rtresult.i,4,5)
say 'PacKinG' rtresult.i 'to' dir
'lha -r -e a -q ' dir rtresult.i
end
call timecommand
/**/
ralzcommand:
call time 'R'
address command
do i = 1 to rtresult.count
rtresult.i = delstr(rtresult.i,4,5)
say 'PacKinG' rtresult.i 'to' dir
'lzx -r -e a -q ' dir rtresult.i
end
call timecommand
/**/
razpcommand:
call time 'R'
address command
do i = 1 to rtresult.count
rtresult.i = delstr(rtresult.i,4,5)
say 'PacKinG' rtresult.i 'to' dir
'zip ' dir rtresult.i
end
call timecommand
/**/
xlhcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then file = delstr(file,4,5)
call time 'R'
address command
say 'UnPacKinG' file 'to' dir
'lha x -q ' file dir
call timecommand
/**/
xlzcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then file = delstr(file,4,5)
call time 'R'
address command
say 'UnPacKinG' file 'to' dir
'lzx x -q ' file dir
call timecommand
/**/
admcommand:
call time 'R'
address command
'dms read ' dir from dev
call timecommand
/**/
xdmcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then file = delstr(file,4,5)
call time 'R'
address command
'dms write ' file to dir 'nopause'
call timecommand
/**/
zipcommand:
rfile = left(file,9)
if rfile='Ram Disk:' then file = delstr(file,4,5)
call time 'R'
address command
say 'UnPacKinG' file 'to' dir
'unzip -o -q ' file '-d' dir
call timecommand
/* ??? */
???command:
call rtfreefilebuffer()
call rtezrequest("Sorry Unknown FileType...",,
"_OK","DzA",'rt_reqpos=reqpos_centerscr')
call acommand
/* Error */
errcommand:
call rtfreefilebuffer()
call rtezrequest("Hmm... Don't Think So...",,
"_Oops|_Cancel","DzA 3.1",'rt_reqpos=reqpos_centerscr')
if rtresult == 0 then call acommand
select
when pac=apac then call pcommand
when pac=apak then call ppcommand
when pac=xpac then call extcommand
when pac=xpak then call exxcommand
when pac=dpac then call dmscommand
when pac=dpak then call dmmcommand
when pac=udpc then call udmcommand
otherwise
end
/* TIME */
timecommand:
call rtezrequest("Time Taken" time('E') "secs.",,
"_WoW","DzA 3.1",'rt_reqpos=reqpos_centerscr')
/* GoAgain */
gocommand:
call rtfreefilebuffer()
call rtezrequest("Continue...",,
"_Sure|_NeW|_Quit","DzA 3.1",'rt_reqpos=reqpos_centerscr')
if rtresult == 0 then exit
if rtresult == 1 then call gcommand
if rtresult == 2 then call acommand
gcommand:
select
when ext='LHA' then call extcommand
when ext='LZX' then call extcommand
when ext='DMS' then call extcommand
when ext='LZH' then call extcommand
when ext='ZIP' then call extcommand
when arc=lha then call pcommand
when arc=lzx then call pcommand
when arc=dms then call dmscommand
when arc=zip then call pcommand
otherwise
end
exit