/***$VER: DzA 2.2a (12.6.1997) CopyRight (C) DCG
***/
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 passcommand;nocommand:;call rtezrequest("Packer Is Missing in C...","Hmm","DzA 2.2a",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');passcommand:;d=date(J);if d~>'97212' then call stcommand;if open(ky,'s:_DzA.key','R') then;k=readln(ky);if k='SoLoNG&ThAnX' then call stcommand;p=rtgetstring(,"DzA V2.2a (Not Registered)"||NL||"Free Registration and KeyFile"||NL||"Or Enter PassWord (INeVeR???)"||NL||"EMail : stargate@microsys.it","DCG","DzA",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext rtgs_invisible=true');if p=='INeVeR???' then call stcommand;exit;stcommand:;call rtezrequest("Welcome to DzA...","DzA","DCG",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext');acommand:;call rtezrequest("Choose Option...","_Pack|Un_Pack|_Quit","DzA",'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;arccommand:;pac=apac;call rtezrequest("Choose Method...","_LhA|_LzX|_DmS|_Cancel","DzA",'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 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;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;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;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;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;'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;'lzx -r -e a -q ' dir rtresult.i;end;call timecommand;ralhcommand:;call time 'R';address command;do i=1 to rtresult.count;rtresult.i= delstr(rtresult.i,4,5);'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);'lzx -r -e a -q ' 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;'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;'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;'unzip -o -q ' file '-d' dir;call timecommand;???command:;call rtfreefilebuffer();call rtezrequest("Sorry Unknown FileType...","_OK","DzA",'rt_reqpos=reqpos_centerscr');call acommand;errcommand:;call rtfreefilebuffer();call rtezrequest("Hmm... Don't Think So...","_Oops|_Cancel","DzA",'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;timecommand:;call rtezrequest("Time Taken" time('E') "secs.","_WoW","DzA",'rt_reqpos=reqpos_centerscr');gocommand:;call rtfreefilebuffer();call rtezrequest("Continue...","_Sure|_NeW|_Quit","DCG",'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;otherwise;end;exit