packer problem

Just starting out? Need help? Post your questions and find answers here.
lule
User
User
Posts: 31
Joined: Fri Sep 17, 2010 8:22 pm

packer problem

Post by lule »

Hi,

I've got problems with packer functions
AMD64, Windows 7 , PureBasic 5.11 (Windows - x64)

Code: Select all

UseBriefLZPacker()
;UseZipPacker()
;UseLZMAPacker()

If CreatePack(0, GetHomeDirectory() + "test.zip")
	For i = 1 To 100
		AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
		AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i)+".png")
	Next
	ClosePack(0)
EndIf
With UseZipPacker() pack file limit size : 693Ko after, files are not included
With UseBriefLZPacker(), cannot open file result with 7zip last version
With UseLZMAPacker(), no pack file generated
Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy.
PureBasic 6.10 LTS (Linux - x64)
lule
User
User
Posts: 31
Joined: Fri Sep 17, 2010 8:22 pm

Re: packer problem

Post by lule »

Am I doing something wrong, or is it a bug?
Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy.
PureBasic 6.10 LTS (Linux - x64)
Blankname
Enthusiast
Enthusiast
Posts: 120
Joined: Sun Oct 14, 2012 9:11 am

Re: packer problem

Post by Blankname »

Code: Select all

UseZipPacker()

If CreatePack(0, GetHomeDirectory() + "test.zip")
   For i = 1 To 100
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i)+".png")
   Next
   ClosePack(0)
EndIf
Works fine for me.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: packer problem

Post by ts-soft »

UseZipPacker works fine.
UseBriefLZPacker cant be unpacked by another packer, there is no default-packfile format, you can unpack it by PureBasic.
UseLZMAPacker doesn't support packing Archivfiles, only unpacking, see the helpfile.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
lule
User
User
Posts: 31
Joined: Fri Sep 17, 2010 8:22 pm

Re: packer problem

Post by lule »

Code: Select all

UseZipPacker()
If FileSize(GetHomeDirectory() + "test.zip")
	DeleteFile(GetHomeDirectory() + "test.zip")
EndIf
If CreatePack(0, GetHomeDirectory() + "test.zip")
   For i = 1 To 100
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp", "Dir"+Str(i)+"\Geebee"+Str(i)+".bmp")
      AddPackFile(0, #PB_Compiler_Home + "examples/sources/Data/world.png", "Dir"+Str(i)+"\world"+Str(i)+".png")
   Next
   ClosePack(0)
EndIf
Always the same problem. There is no "Dir" upper 48 in the zip file as result of my Code. Is it a bug?
Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy.
PureBasic 6.10 LTS (Linux - x64)
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: packer problem

Post by Crusiatus Black »

It works fine here, it creates a zipfile with Dir1 to Dir100 with in each directory two files.
I must say, I tried this code with PB 5.2, not 5.11
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: packer problem

Post by IdeasVacuum »

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply