Page 1 of 1

CatchPack

Posted: Fri Feb 08, 2013 7:14 pm
by User_Russian
Propose to add the function CatchPack()
Result = CatchPack(#Pack, *Buffer, Size)
It is necessary, for example, if the Pack-file is in DataSection and includes all program resources (images, sounds, sprites, etc.).

Re: CatchPack

Posted: Fri Feb 08, 2013 7:23 pm
by ts-soft
+1

This is required for SFX (Self Extracting Files).

Re: CatchPack

Posted: Fri Feb 08, 2013 10:27 pm
by User_Russian
ts-soft wrote:This is required for SFX (Self Extracting Files).
I have just tried it and I have successfully managed to create a self-extracting archive of the code (slightly modified example from help).

Code: Select all

  UseZipPacker()
  
  ProgFile.s=ProgramFilename()
  Path.s=GetPathPart(ProgFile)
  
  ; Open the packed file
  If OpenPack(0, ProgramFilename()) 
    
    ; List all the entries
    If ExaminePack(0)
      While NextPackEntry(0)
        UncompressPackFile(0, PackEntryName(0))
      Wend
    EndIf
    
    ClosePack(0)
  EndIf
Create from the executable EXE-file.
Written at the end of the executable file, ready ZIP-archive.
At the end of the record the file size (number of bytes) in the form of long-variable.

You will have a self-extracting ZIP-archive.
Had just tried it and this method works.

Re: CatchPack

Posted: Thu Nov 11, 2021 8:36 am
by BarryG
User_Russian wrote: Fri Feb 08, 2013 7:14 pmadd the function CatchPack()
+1

Re: CatchPack

Posted: Thu Nov 11, 2021 10:03 am
by Cyllceaux
User_Russian wrote: Fri Feb 08, 2013 7:14 pm add the function CatchPack()
+1

Re: CatchPack

Posted: Thu Nov 11, 2021 6:28 pm
by GoodNPlenty
User_Russian wrote: ↑Fri Feb 08, 2013 11:14 am
add the function CatchPack()
+1

Re: CatchPack

Posted: Thu Nov 11, 2021 7:32 pm
by Caronte3D
+1

Re: CatchPack

Posted: Thu Nov 11, 2021 7:49 pm
by davido
+1

Re: CatchPack

Posted: Tue Mar 07, 2023 9:34 pm
by nsstudios
This would be really useful.
+1

Re: CatchPack

Posted: Sat Apr 15, 2023 2:00 pm
by Quin
+1

Re: CatchPack

Posted: Sun Apr 16, 2023 4:34 am
by idle
Ezpack supports that
viewtopic.php?p=399040#p399040

Re: CatchPack

Posted: Sun Apr 16, 2023 10:24 am
by nsstudios
:o
Thank you Idle, I've totally missed that!
Still, a native func would be nice, but this is awesome. Thank you for making that.

Re: CatchPack

Posted: Sun Apr 16, 2023 3:50 pm
by Quin
Oh, that's epic! Agreed with nsstudios, a native Procedure to do this would be great, but this is awesome! Thanks a ton!

Re: CatchPack

Posted: Sun Apr 16, 2023 8:57 pm
by idle
Thanks nsstudio and quin, yes native would be good.