ZuneARC

AMIGASYSTEM · 1159

AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
on: February 12, 2020, 04:45:20 PM
The new UnRAR 5.8 cannot be used by ZuneARC because it requires a higher Stack, try adding it in ToolTypes but it doesn't work ;)


Yannick

  • Newbie
  • *
    • Posts: 37
    • Karma: +4/-0
Reply #1 on: February 13, 2020, 01:37:37 AM
You need to modify ZuneArc.cfg file.

Look for :
CmdName         ,RAR,
ExtractSingle   ,C:unrar x %arch %file %dest,
ExtractAll      ,C:unrar x %arch %dest,
ListContent     ,C:unrar l %arch,
ContentHeader   ,7,
ContentFooter   ,3,
ContentFmt      ,NAME SIZE CSIZE OTHE DATE DATE,
Add             ,#,
Remove          ,#,
Create          ,#,

And modify it like :
CmdName         ,RAR,
ExtractSingle   ,stack 64000;C:unrar x %arch %file %dest,
ExtractAll      ,stack 64000;C:unrar x %arch %dest,
ListContent     ,stack 64000;C:unrar l %arch,
ContentHeader   ,7,
ContentFooter   ,3,
ContentFmt      ,NAME SIZE CSIZE OTHE DATE DATE,
Add             ,#,
Remove          ,#,
Create          ,#,

the stack value needs to be adjusted to what's needed of course.

Yannick

PS: My former RAR port was adjusting stack automatically, the archive was on Aros Archive but has been replaced by the new version, here is the entry function to check and increase stack if needed :
Code: [Select]
int main(int argc, char *argv[])
{
   struct Process *myproc = (struct Process *)FindTask(NULL);
   IPTR stacksize = (IPTR)myproc->pr_Task.tc_SPUpper - (IPTR)myproc->pr_Task.tc_SPLower;
   int rc;

   if (stacksize >= REQUIRED_STACK_SIZE)
   {
      rc = unrar(argc, argv);
   }
   else
   {
      struct StartMessage msg;
      struct Process *child_proc;
      struct MsgPort *my_mp;
      struct MsgPort *child_mp;
      struct StartMessage *my_msg;

      child_proc = CreateNewProcTags(
         NP_Entry, proc_entry,
         NP_StackSize, REQUIRED_STACK_SIZE,
         TAG_END);
      if(!child_proc)
      {
         return RETURN_FAIL;
      }

      my_mp=&myproc->pr_MsgPort;
      child_mp=&child_proc->pr_MsgPort;

      msg.msg.mn_Node.ln_Type = NT_MESSAGE;
      msg.msg.mn_Length = sizeof(msg);
      msg.msg.mn_ReplyPort = my_mp;
      msg.argc = argc;
      msg.argv = argv;

      PutMsg(child_mp, &msg.msg);
      while (!(my_msg = (struct StartMessage *)GetMsg(my_mp))) WaitPort(my_mp);
      rc = my_msg->rc;
   }
   return rc;
}
« Last Edit: February 13, 2020, 01:44:11 AM by Yannick »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #2 on: February 13, 2020, 02:04:10 AM
Ok Thanks the config modification worked well but stack 64000 is not enough, UnRAR 5.8 requires a Stack 400000

UnRAR 5.8 supports all the RAR versions also RARv5
« Last Edit: February 13, 2020, 02:20:47 AM by AMIGASYSTEM »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #3 on: February 13, 2020, 07:21:43 AM
Yannick in the configuration file i added UnLZX, now ZuneARC perfectly decompresses LZX archives ;)