Urgent : ZIP - some more questions
Urgent : ZIP - some more questions
Hello,
I use FWH 10.1 and the latest xHarbour Builder (Nov. 09).
I have read many topics about zip and unzip, but I have never succeeded in making a working ZIP-exe and UNZIP-exe.
Please can someone provide me with a working example? Which lib-files have to be used ?
Thank you very much in advance.
I use FWH 10.1 and the latest xHarbour Builder (Nov. 09).
I have read many topics about zip and unzip, but I have never succeeded in making a working ZIP-exe and UNZIP-exe.
Please can someone provide me with a working example? Which lib-files have to be used ?
Thank you very much in advance.
Last edited by driessen on Fri Feb 12, 2010 1:19 pm, edited 1 time in total.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Urgent : ZIP
Dear Mr.Michel
Zip & Unzip functions require hbzip.lib and zlib.lib
so Should include the xHarbour Libs hbzip.lib and zlib.lib
Here is a function to extract a zip file including its folder paths
Regards
Anser
Zip & Unzip functions require hbzip.lib and zlib.lib
so Should include the xHarbour Libs hbzip.lib and zlib.lib
Here is a function to extract a zip file including its folder paths
Code: Select all
*------------------------------------*
Function ExtractZip(cDrive)
*------------------------------------*
Local aFiles,lOk,cDriveLetter
// Zip and Unzip functions, should include the libs named HbZip & zlib available in \xHarbour\lib
cDriveLetter:=cDrive+"\" // For eg G:\
// Array containing the list of files in the Zip with Path
aFiles := hb_GetFilesInZip("Test.Zip")
// The 3rd Parameter should be .T. if you need to extract contents of zip file as per Path
lOk := hb_unzipfile("Test.Zip",,.T.,,cDriveLetter,aFiles,NIL)
Return lOk
Anser
Re: Urgent : ZIP
Dear Mr.Michel,
To create a zip
Unzip
http://forums.fivetechsupport.com/viewt ... =3&t=14682
Regards
Anser
To create a zip
Code: Select all
lOk := hb_ZipFile( cTarget , ;
aFiles , ;
nCompress , ;
bZip , ;
lOverwrite , ; // overwrite
cPassword , ;
lWithPath,; // with path
lWithDrive )
Code: Select all
lOk := hb_UnZipFile( cZip , ;
bOnUnZipFile , ;
lWithSubDir , ;
cPassword , ;
cZipDir + "\" ,;
aFiles ,;
bProgress)
Regards
Anser
Re: Urgent : ZIP
hello driessen,
I have build a lib for zip and unzip with xharbour pelles c
if you want, please send an e-mail that i send you
Regard
Santo
I have build a lib for zip and unzip with xharbour pelles c
if you want, please send an e-mail that i send you
Regard
Santo
Re: Urgent : ZIP
To Santo.
Please can you send it to info@juda.be ?
Thanks a lot.
To Anser,
I tried to link hpzip.lib and zlib.lib into my application. But I use the commercial xHarbour (Builder) and I got an error "Couldn't build". I think there is a difference between the free xHarbour and the commercial xHarbour.
Any idea what now ?
Thanks a lot for your help.
Please can you send it to info@juda.be ?
Thanks a lot.
To Anser,
I tried to link hpzip.lib and zlib.lib into my application. But I use the commercial xHarbour (Builder) and I got an error "Couldn't build". I think there is a difference between the free xHarbour and the commercial xHarbour.
Any idea what now ?
Thanks a lot for your help.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Urgent : ZIP
Michel
with xharbour commercial you need to link
xhbzipdll.lib
xhbzip.lib
both are located in \xhb\lib
Richard
with xharbour commercial you need to link
xhbzipdll.lib
xhbzip.lib
both are located in \xhb\lib
Richard
Re: Urgent : ZIP
Hello Driessen
i have sended to you the zip library for xharbour
Regards
Santo
i have sended to you the zip library for xharbour
Regards
Santo
Re: Urgent : ZIP
Santo,
Thanks a lot for your e-mail.
I did some test immediately.
Unfortunately I got an error while linking :
Thanks.
Thanks a lot for your e-mail.
I did some test immediately.
Unfortunately I got an error while linking :
Did I miss something ?xLINK: error: Unresolved external symbol '__chkstk referenced from winzip.lib(zip.obj)'
Thanks.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Urgent : ZIP
Hello everybody,
I did some test with linking the libraries xhbzîp.lib and xhbzipdll.lib.
Now I got no errors anymore while compiling and linking.
This is the test I tried :
Unfortunately, I got a GPF on the second line.
Anyone any idea why ?
Thanks.
I did some test with linking the libraries xhbzîp.lib and xhbzipdll.lib.
Now I got no errors anymore while compiling and linking.
This is the test I tried :
Code: Select all
ZipFiles := hb_GetFilesInZip("C:\TEST.ZIP")
hb_UnZipFile("C:\Test.Zip",,,,"C:\UNZIP\",ZipFiles,NIL)
Anyone any idea why ?
Thanks.
Last edited by driessen on Sat Feb 06, 2010 4:51 pm, edited 1 time in total.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Urgent : ZIP
Hello Driessen
this is the lib correct
http://www.veneziasoft.com/download/winzipok.zip
Regards
Santo
this is the lib correct
http://www.veneziasoft.com/download/winzipok.zip
Regards
Santo
Re: Urgent : ZIP
Santo,
Thank you very much for all your efforts.
It's working great now.
Regards,
Thank you very much for all your efforts.
It's working great now.
Regards,
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Urgent : ZIP
Driessen, i have gpf too.driessen wrote:Hello everybody,
I did some test with linking the libraries xhbzîp.lib and xhbzipdll.lib.
Now I got no errors anymore while compiling and linking.
This is the test I tried :Unfortunately, I got a GPF on the second line.Code: Select all
ZipFiles := hb_GetFilesInZip("C:\TEST.ZIP") hb_UnZipFile("C:\Test.Zip",,,,"C:\UNZIP\",ZipFiles,NIL)
Anyone any idea why ?
Thanks.
I've resolved with
Code: Select all
PROC UnZipFile(cFileZip,cDir)
LOCAL aExtract := HB_GetFilesInZip(cFileZip)
LOCAL cFile, oErr
FOR EACH cFile IN aExtract
TRY
HB_UnZipFile(cFileZip,,,,cDir,cFile,NIL)
CATCH oErr
DO CASE
CASE oErr:genCode == EG_ZERODIV
OTHERWISE
MsgStop(oErr:Description)
EXIT
ENDCASE
END
RETURN
Re: Urgent : ZIP
Patrizio,
Thanks a lot for you suggestion.
Regards.
Thanks a lot for you suggestion.
Regards.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Urgent : ZIP
Hello,
hb_zipfile() and hb_unzipfile() is working fine now, thanks to all the help of my FWH-friends.
But I have an additional question.
Is it possible to make an executable zip-file in FWH ?
To explain what I mean, I refer to my old DOS-period.
In those days, we had commands like PKZIP.EXE and PKUNZIP.EXE. There was also an ZIP2EXE.EXE which we could use to change a ZIP-file (e.g. TEST.ZIP) into an EXE-file (e.g. TEST.EXE). This executable could be started to UNZIP the file automatically.
I hope I was able to explain my question well.
Thanks a lot in advance for any help.
hb_zipfile() and hb_unzipfile() is working fine now, thanks to all the help of my FWH-friends.
But I have an additional question.
Is it possible to make an executable zip-file in FWH ?
To explain what I mean, I refer to my old DOS-period.
In those days, we had commands like PKZIP.EXE and PKUNZIP.EXE. There was also an ZIP2EXE.EXE which we could use to change a ZIP-file (e.g. TEST.ZIP) into an EXE-file (e.g. TEST.EXE). This executable could be started to UNZIP the file automatically.
I hope I was able to explain my question well.
Thanks a lot in advance for any help.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Urgent : ZIP - some more questions
Hello,
I have some more questions about hbzipfile() and hbunzipfile().
For my first question, I refer to my previous message with a question about ZIP2EXE. I'm still looking for a solution.
My second question :
How do I handle zipping files from a folder, including all the files in the subfolders ?
Thanks a lot in advance for any help.
I have some more questions about hbzipfile() and hbunzipfile().
For my first question, I refer to my previous message with a question about ZIP2EXE. I'm still looking for a solution.
My second question :
How do I handle zipping files from a folder, including all the files in the subfolders ?
Thanks a lot in advance for any help.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7