AROS World Exec
Development => AROS Software Development => Topic started by: AMIGASYSTEM on February 12, 2020, 04:45:20 PM
-
The new UnRAR 5.8 (http://archives.aros-exec.org/index.php?function=showfile&file=utility/archive/unrar.i386-aros.lha) cannot be used by ZuneARC because it requires a higher Stack, try adding it in ToolTypes but it doesn't work ;)
-
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 :
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;
}
-
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
-
Yannick in the configuration file i added UnLZX, now ZuneARC perfectly decompresses LZX archives ;)