Page 1 of 1

PureBasic Interface to 7-Zip

Posted: Fri Jan 30, 2015 9:23 pm
by JHPJHP

Re: PureBasic Interface to SevenZip

Posted: Fri Jan 30, 2015 10:14 pm
by JHPJHP
After reading the following post, I searched for newer 32/64bit libraries that supported LZMA2: http://www.purebasic.fr/english/viewtop ... 77#p460177
- not tested, but documentation suggests that the newer libraries support the compression method

Information:
- Command Line Commands
- Command Line Switches

---------------------------------------------------------------------------

Updated:
- added 9 examples
-- SevenZip_Add.pb : adds files to an archive (creates the 7z file if needed)
-- SevenZip_Delete.pb: deletes files from an archive
-- SevenZip_Extract1.pb: extracts the contents of an archive including folders
-- SevenZip_Extract2.pb: extracts the contents of an archive excluding folders
-- SevenZip_List.pb: lists detailed technical information for the files in an archive
-- SevenZip_Password.pb: adds password protected files to an archive (creates the 7z file if needed)
-- SevenZip_Test.pb: test the integrity of files in an archive
-- SevenZip_Update.pb: updates files in an archive without needing to decompress and recompress the entire archive (creates the 7z file if needed)
-- SevenZipOpenArchive.pb: displays a list of folder/files contained within an archive
- added 1 test file: 7z938-extra.7z

Re: PureBasic Interface to SevenZip

Posted: Sat Jan 31, 2015 9:25 am
by Kwai chang caine
Again a great project of JHPJHP :shock:
Thanks a lot for all the works you sharing with us 8)

Re: PureBasic Interface to SevenZip

Posted: Sat Jan 31, 2015 10:39 am
by JHPJHP
Hi Kwai chang caine,

Thank you for your kind words.

-------------------------------------------------

Updated:
- added 1 example
-- SevenZip_Miscellaneous.pb: displays information from a variety of Functions

-------------------------------------------------

Updated the example: SevenZip_Miscellaneous.pb.
- formatted the information to be more readable, includes various date/time conversions

Re: PureBasic Interface to SevenZip

Posted: Sat Jan 31, 2015 2:56 pm
by PureGuy
Great work JHPJHP :D
Thanks a lot for that update and all the nice examples.

"IncludeFile" do not work with PB5.24, due to the change made in PB5.30.

Re: PureBasic Interface to SevenZip

Posted: Sun Feb 01, 2015 5:47 am
by JHPJHP
Hi PureGuy,

Thank you for your comments, and for pointing out the issue with the Include files.

--------------------------------------------------------------------

Updated:
- fix the issue with the Include files, should now run in PureBasic 5.24 LTS (x86 / x64)

NB*: Made other small changes, nothing worth documenting.

--------------------------------------------------------------------

Updated:
- renamed 1 example
-- SevenZip_Add.pb to SevenZip_Add1.pb
- added 2 examples
-- SevenZip_Add2.pb: adds files to an archive (creates the executable if needed)
-- SevenZip_Help.pb: displays help information in the debug window
- added 1 binary
-- 7z.sfx (x86 / x64)
- added 1 reference
-- 7-zip.chm

I was testing the [a]dd parameter with the -sfx switch used to create a self-extracting executable, but it kept opening a dialog box first. After some research I found that the use of an sfx file allows for control/suppression of the dialog: SevenZip_Add2.pb.

I've also added the -hide switch to the examples, supressing the 7-zip information window from showing; debug window will display the returned information.

Re: PureBasic Interface to SevenZip

Posted: Sun Feb 01, 2015 9:31 am
by JHPJHP
Updated:
- added 1 include: procedures.pbi
- added 2 binaries: 7z.exe, 7z.dll (x86 / x64)
- added 1 test file: 7-ZipPortable.exe

*** 7z.exe and 7z.dll are not needed for regular use, but have been included to extend the supported formats ***

In this post I stated that the Z-zip command line tool did not support Packed executables. While this is true, the main executable combined with it's DLL can be run from a command prompt, extending support.

I've created a simple RunProgram Procedure that will execute the desired command if the previous call to the Interface fails.
- most examples have been modified to the new format; update also includes various improvements

-------------------------------------------------------------------

Some important updates have been applied to the Interface allowing for more user control, including some bug fixes.

Re: PureBasic Interface to SevenZip

Posted: Sun Feb 01, 2015 9:43 pm
by RASHAD
You are doing a very good job for the forum JHPJHP
I mean it for all your stuff
Thanks

Re: PureBasic Interface to SevenZip

Posted: Mon Feb 02, 2015 1:31 am
by JHPJHP
Hi RASHAD,

You're welcome, and thank you for commenting; my respect for all the help you provide this forum as well.

Cheers!

-----------------------------------------------------------

Updated:
- applied a couple small improvements
- applied changes that gives the user more control
- fixed a problem with a few date settings

-----------------------------------------------------------

Updated:
- SevenZip_Password.pb: modified from multi-file selection to folder selection
- SevenZip_Update.pb: modified to allow the selecting of an existing archive

Re: PureBasic Interface to SevenZip (7-zip)

Posted: Sat Feb 07, 2015 3:26 am
by Poshu
This could become handy, thanks!

Re: PureBasic Interface to 7-Zip

Posted: Wed Dec 12, 2018 6:30 am
by JHPJHP
Hi Poshu,

You're welcome, I hope it can be of some use.

---------------------------------------

Updated:
- latest binaries (2018-12-11)

NB*: I did not do must testing, please let me know of any issues.