PureCAB library : compress / extract CAB archives

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

PureCAB library : compress / extract CAB archives

Post by gnozal »

PureCAB library

Overview

Code: Select all

The purpose of PureCAB is to handle CAB files [MS-Cabinet].

Note : This library does not support InstallShield archives [also CAB extension].
Functions
PB4.xx : http://gnozal.ucoz.com/PureCAB_.htm

Example

Code: Select all

; Compression callback
Procedure.l MyCustom_Compression_StatusCallBack(Filename.s, PerCent.f)
  ; Filename : current processed filename
  ; PerCent  : current compression progression [0-100%]
  Debug "Packing " + Filename + " - " + StrF(PerCent, 2) + "%"
EndProcedure
; Set compression callback
PureCAB_SetCompressionCallback(@MyCustom_Compression_StatusCallBack())
; Create Archive
Handle = PureCAB_Create("c:\PureBasic410\Program\test.cab")
If Handle
  PureCAB_Compress(Handle, "c:\WINDOWS\Coffee Bean.bmp", "Another Name.bmp")
  PureCAB_Compress(Handle, "c:\PureBasic410\Help\Win32.hlp")
  PureCAB_Compress(Handle, "c:\WINDOWS\FeatherTexture.bmp")
  PureCAB_Compress(Handle, "c:\WINDOWS\Gone Fishing.bmp")
  PureCAB_Compress(Handle, "c:\PureBasic410\Help\SOCK2.HLP")
  PureCAB_Close(Handle)
  Debug "Done"
Else
  Debug "Failed creating cab"
EndIf
Download
Only available for Purebasic Windows x86
PB4.0x-4.2x : http://gnozal.ucoz.com/PureCAB_.zip
PB4.3x : http://gnozal.ucoz.com/PureCAB_430.zip
PB4.4x : http://gnozal.ucoz.com/PureCAB_440.zip
PB4.5x : http://gnozal.ucoz.com/PureCAB_450.zip
PB4.6x : http://gnozal.ucoz.com/PureCAB_460.zip
PB5.0x : http://gnozal.ucoz.com/PureCAB_500.zip
Last edited by gnozal on Wed Dec 10, 2008 11:21 am, edited 1 time in total.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Nice little Library, thank you :)

By any chance are you planning on expanding it to support InstallShield archives (.cab) maybe in the near future?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

SFSxOI wrote:By any chance are you planning on expanding it to support InstallShield archives (.cab) maybe in the near future?
No chance, sorry !
IS archives are completely different from m$ cabinet files, the only thing in common is the extension.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
X0r
Enthusiast
Enthusiast
Posts: 138
Joined: Tue May 01, 2007 3:49 am
Location: Germany

Re: PureCAB library : compress / extract CAB archives

Post by X0r »

Please would you also offer an unicode version?
Thanks!
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCAB library : compress / extract CAB archives

Post by gnozal »

Forge wrote:Please would you also offer an unicode version?
The PB4.6x version should be unicode compatible.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: PureCAB library : compress / extract CAB archives

Post by X »

It is great that you have all of these libraries and tools. What prevents them from being released in a a x64 flavor?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureCAB library : compress / extract CAB archives

Post by gnozal »

X wrote:It is great that you have all of these libraries and tools. What prevents them from being released in a a x64 flavor?
Let's see...
I don't use a x64 OS. But the OS is the easy part, and a user already sent me a Se7en x64 CD !
The big part is the library conversion, and some of them (very few actually) may use some older public domain C code not ported to x64.

The other issues on my side are :
- (free) time
- a PC recent enough to run Se7en
- a x64 version of jaPBe ;-)

However, only x86 software will run on all OS's, and there are still a lot of x86 machines out there.

I will migrate to x64 eventually, but don't expect any schedule.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: PureCAB library : compress / extract CAB archives

Post by X »

Oh no problemo. I was curious. Wonderful libraries and tools!
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: PureCAB library : compress / extract CAB archives

Post by Fangbeast »

Gnozal, I realise you are busy these days but I am desperate..Is there any chance to update PureCAB to PB 5.21?

Unfortunately, I had to update and that broke PureCAB and I can run my tool..

Regards and Merry Christmas, Fang.
Amateur Radio, D-STAR/VK3HAF
Post Reply