It is currently Fri Jan 15, 2021 2:59 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Wed Jan 21, 2009 3:44 pm 
Offline
User
User

Joined: Tue Oct 28, 2008 1:08 pm
Posts: 42
How to write SFX packer with this lib Gnozal :) Tnx


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jan 21, 2009 4:18 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
besko wrote:
How to write SFX packer with this lib Gnozal :) Tnx
A quick (basic) example :
1. Create the SFX stub :
Code:
;
; EXE stub example
;
If PureLZMA_Archive_ReadSFX(ProgramFilename())
  ArchiveInfo.LZMA_ArchiveInfo
  If PureLZMA_Archive_FindFirst()
    ;
    PureLZMA_Archive_GetArchiveInfo(@ArchiveInfo)
    ; Extract file to exe directory
    PureLZMA_Archive_Extract(GetPathPart(ProgramFilename()) + GetFilePart(ArchiveInfo\FileName))
    ;
    While PureLZMA_Archive_FindNext() 
      ;
      PureLZMA_Archive_GetArchiveInfo(@ArchiveInfo)
      ; Extract file to exe directory
      PureLZMA_Archive_Extract(GetPathPart(ProgramFilename()) + GetFilePart(ArchiveInfo\FileName))
      ;
    Wend
  EndIf
  ;
  PureLZMA_Archive_Close()
EndIf
; Compile as SFX.exe

2. Create the SFX (adds compressed data to the stub) :
Code:
;
; Create SFX
;
If PureLZMA_Archive_CreateSFX("SFX.exe")
  PureLZMA_Archive_Compress(#PB_Compiler_Home + "Catalogs\Compiler.catalog", #False)
  PureLZMA_Archive_Close()
Else
  MessageRequester("ERRROR", "Could not open SFX stub !", #MB_ICONERROR)
EndIf

3. Execute SFX.exe, it will extract 'Compiler.catalog' to the current directory

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jan 21, 2009 5:33 pm 
Offline
User
User

Joined: Tue Oct 28, 2008 1:08 pm
Posts: 42
big Tnx Gnozal :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Feb 11, 2009 10:48 am 
Offline
User
User

Joined: Sun Dec 14, 2003 6:38 pm
Posts: 84
Location: Germany, Mechernich
Great Userlib !

Would it be possible to get it as static-Lib + import-Include ?
I have a prob with userlibs, since every new PB-Version change something.
(I hope the include of static-Libs would stay longer.. :-) )

Mike


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Feb 11, 2009 11:50 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
neotoma wrote:
I have a prob with userlibs, since every new PB-Version change something.
(I hope the include of static-Libs would stay longer.. :-) )
Imho a MSCOFF static lib [if the PB Compiler would support it] would not last longer (as a userlib is basically a static lib).
I have added a DLL version : http://freenet-homepage.de/gnozal/PureLZMA_DLL.zip

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 13, 2009 1:40 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update (PB4.30 userlib)

Changes
- added PureLZMA-Packer-Mem library in the PureLZMA package.
It allows to read PureLZMA archives included in data sections.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 13, 2009 5:28 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Jul 21, 2006 4:41 am
Posts: 2336
Location: Berlin, Germany
gnozal wrote:
- added PureLZMA-Packer-Mem library in the PureLZMA package.
It allows to read PureLZMA archives included in data sections.

You are godlike gnozal! :shock:

Do you want money for that? I would pay! 8)

_________________
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 14, 2009 8:56 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Fluid Byte wrote:
You are godlike gnozal! :shock:
There is only one god ...
... srod !

Ok, maybe two with Sparkie.

:D

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 14, 2009 3:23 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Jul 21, 2006 4:41 am
Posts: 2336
Location: Berlin, Germany
Both false! It's Fred! :shock:

_________________
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 27, 2009 8:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Sep 16, 2005 7:47 pm
Posts: 215
Location: Germany
Hello gnozal,

I use following procedure but I got a problem:

Code:
Procedure.l GetCryptedStateLZMA(ArcFile$)

If PureLZMA_Archive_Read(ArcFile$)
  ArchiveInfo.LZMA_ArchiveInfo
  Status = PureLZMA_Archive_FindFirst()
  While Status
    If PureLZMA_Archive_GetArchiveInfo(@ArchiveInfo)
      x = ArchiveInfo\LZMAFlags
      If x = #LZMA_Flag_Crypted
        Break
      EndIf
    EndIf
    Status = PureLZMA_Archive_FindNext()
  Wend
  PureLZMA_Archive_Close()
EndIf

ProcedureReturn x

EndProcedure

debug GetCryptedStateLZMA("D:\Temp\Archive.arc")


If the Archive is crypted, the returned value is '3'. but the doc says
the returned value is '2'. can it be that the doc is wrong ?

_________________
Ciao
AL90

Image
Pure FileMaster - a Total-Commander Clone


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 28, 2009 9:52 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
AL90 wrote:
If the Archive is crypted, the returned value is '3'. but the doc says the returned value is '2'. can it be that the doc is wrong ?

I assume the record is packed [#LZMA_Flag_Compressed] and crypted [#LZMA_Flag_Crypted], so flags = #LZMA_Flag_Crypted | #LZMA_Flag_Compressed (= 3 <> #LZMA_Flag_Crypted).
You should test it like this : x & #LZMA_Flag_Crypted.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 28, 2009 9:06 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Sep 16, 2005 7:47 pm
Posts: 215
Location: Germany
You right. This way will work now. I have so mistake the doc.
Thanks for quoting.

_________________
Ciao
AL90

Image
Pure FileMaster - a Total-Commander Clone


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Aug 17, 2009 12:30 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
New version compiled with PB4.40 BETA 1 : http://freenet-homepage.de/gnozal/PureLZMA_440.zip

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Thu Jan 27, 2011 9:59 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Feb 17, 2010 12:00 am
Posts: 1324
Location: (Embarrassed to say country)
Is there a way to use a callback for large files to display a progress bar?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Fri Jan 28, 2011 9:04 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
jassing wrote:
Is there a way to use a callback for large files to display a progress bar?
No.
PureLZMA uses LzmaCompress() and LzmaUnCompress(), without any streaming features.
I didn't try to use the other LZMA library functions : I'm not very good at C(++).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye