Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips > Additional Libraries
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.


zip & unzip library (with source)


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-01-2007, 12:00 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default zip & unzip library (with source)

Two functions (currently only for desktop, requires .NET 2.0).
CreateZip(zipFileName, sourceDirectory, recurseDirectories, fileFilter)
ExtractZip(zipFileName, targetDirectory, fileFilter)

Implements (wraps is a better word) part of #developZipLib class FastZip


Attached are:
dzZipLib.zip, VB source code and #develop project.
ZipTest1.zip, B4PPC source.

You also need to download ICSharpCode.SharpZipLib.dll from http://www.sharpdevelop.net

I ask for your understanding because of the very very early development stage.
Attached Files
File Type: zip dzZipLib.zip (2.7 KB, 134 views)
File Type: zip ZipTest1.zip (3.7 KB, 131 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #2 (permalink)  
Old 06-03-2007, 04:11 AM
Knows the basics
 
Join Date: May 2007
Posts: 98
Default

Hi. Can you please explain what goes in to each parameter, what types of arguments and what they are for? BTW, you've done an awesome job! I am thrilled this exists! Take care.
Reply With Quote
  #3 (permalink)  
Old 06-03-2007, 11:09 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi,

CreateZip(zipFileName as String, sourceDirectory as String, recurseDirectories as Boolean, fileFilter as String)

zipFileName: The zip file to be ceated. Ex. AppPath & "\test.zip"
sourceDirectory: Where the files to zip are. Ex. AppPath or \Temp
recurseDirectories: Add directoriies Info or not. Ex. true
fileFilter: Files with what extension to add. Ex. .txt or .sbp

ExtractZip(zipFileName as string, targetDirectory as String, fileFilter as String)

zipFileName: The zip file to be unzipped. Ex. AppPath & "\test.zip"
targetDirectory: In which folder should put the files. Ex. AppPath or \Temp
fileFilter: Files with what extension to unzip. Ex. .txt or .sbp
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #4 (permalink)  
Old 06-04-2007, 05:04 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,143
Default

Thank you dzt, you are doing a great job.
Reply With Quote
  #5 (permalink)  
Old 07-02-2007, 08:49 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default new version

Zip and Unzip Library for Basic4PPC. Targets .NET 1.1 (desktop) and .NET 1.0 (device) and needs ICSharpCode.SharpZipLib.dll (open source zip library)
Has 4 functions. All of them works for desktop, but 3 of them works for the device.
For CreateZip (desktop only) and ExtractZip (device and desktop) see previous post.

Short description for 2 new functions:

ZipFiles(FilesToZip, ZipFile)
FilesToZip an array of string containing full path filenames to zip
ZipFile a string containing full path of zip file to be created

UnzipFiles(TargetDirectory, ZipFile)
TargetDirectory a string containing full path to folder where zipped files will exists after unzip. If the folder doesn't exists it will be created by the library.
ZipFile a string containing full path of zip file to be unzipped.

For how to use this library see attached b4ppc sample file.
To download compiled DLLs press here http://www.terracom.gr/basic4ppc/dzZipLib_DLLs_only.zip
To download dzZipLib vb.net source press here http://www.terracom.gr/basic4ppc/dzZipLib-2.zip
To download ICSharpCode.SharpZipLib c# source code go to www.sharpdevelop.net

Regards
Attached Files
File Type: sbp ziptest1.sbp (1.4 KB, 81 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #6 (permalink)  
Old 07-03-2007, 09:28 PM
Junior Member
 
Join Date: Jun 2007
Location: Alabama, US
Posts: 10
Send a message via Skype™ to adukes
Default

Quote:
Originally Posted by dzt View Post
Two functions (currently only for desktop, requires .NET 2.0).
CreateZip(zipFileName, sourceDirectory, recurseDirectories, fileFilter)
ExtractZip(zipFileName, targetDirectory, fileFilter)

Implements (wraps is a better word) part of #developZipLib class FastZip


Attached are:
dzZipLib.zip, VB source code and #develop project.
ZipTest1.zip, B4PPC source.

You also need to download ICSharpCode.SharpZipLib.dll from http://www.sharpdevelop.net

I ask for your understanding because of the very very early development stage.

When I unzip and load the ZipTest1 app in the Basic4ppc editor to test with, I get this Basic4ppc message: An error occured. The format of the 'dzZipLib.dll' is invalid. I also get this when I click OK on the Components dialog box with dzZipLib.dll loaded. Any ideas anyone?
Reply With Quote
  #7 (permalink)  
Old 07-03-2007, 09:57 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

use ICSharpCode.SharpZipLib.dll and dzZipLib.dll from the second version I've posted. They are both compiled for .NET 1.0.
In the first post they are compiled for .NET 2.0 and I think that this is the problem. Do you have .NET 2.0 installed?
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #8 (permalink)  
Old 07-05-2007, 05:26 PM
Junior Member
 
Join Date: Jun 2007
Location: Alabama, US
Posts: 10
Send a message via Skype™ to adukes
Default

Quote:
Originally Posted by dzt View Post
use ICSharpCode.SharpZipLib.dll and dzZipLib.dll from the second version I've posted. They are both compiled for .NET 1.0.
In the first post they are compiled for .NET 2.0 and I think that this is the problem. Do you have .NET 2.0 installed?
I downloaded the second version and it worked. But I do have .Net 2.0 installed. To be specific I have version 2.0.50727. I got this from Visual Studio 2005..Help..About. I would think either version should work. If I look in Add and Remove Programs it shows I have .Net 1.1 and 2.0 installed. Should I remove version 1.1? Maybe there is a .Net 2.0 service pack I do not have.
Reply With Quote
  #9 (permalink)  
Old 07-05-2007, 08:10 PM
Knows the basics
 
Join Date: May 2007
Posts: 98
Default

Hi.
When I load the library into the IDE on the Pocket PC I get this error when using the .net 1.0 version:
Could not load type IPCSharpCode.SharpZipLib.Zip.FastZip from assembly Version=0.85.1.271, Culture=neutral, PublicKeyToken=1B03E6ACF116
Am I missing something? I have both the DZTZipLib.dll and the ICSharpCode .dll you provided. Any help would be cool! Thanks, and I am still excited about this library. BTW, you have any plans on doing sound libraries, like being able to play and control multiple sounds? Thanks, and keep up the great work!

Last edited by Louis : 07-05-2007 at 08:12 PM. Reason: Misspelled words
Reply With Quote
  #10 (permalink)  
Old 07-06-2007, 11:09 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi,

I'll try to make some things clear.

Basic4ppc (desktop and device version is a .NET 1 application (desktop 1.1 and device 1.0 SP3).
The same .NET version targets EXEs that it produces.

To run Basic4ppc and/or produced EXEs under .NET 2.0 (especially when they are using .NET 2.0 DLLs) needs some additional care.

Look here http://www.basic4ppc.com/netcf2.html and for additional informatiocn I suggest you to take a look here http://www.pluralsight.com/blogs/jim.../08/17909.aspx

Now I'll try to be more specific.

adukes, that is why you take an error message when you are trying to open ziptest1.sbp with the .NET 2.0 dzZipLib.dll I've posted at the beginning of this thread. You need a config file. See the first link in this post and download config file for desktop. But I suggest you to use DLLs from the second version I've posted. You loose nothing and you have some benefits (two more functions, PPC compatibility).

Louis, for the same reason you need a config file for your device. Download it from the first link.

Be careful, what Basic4PPC needs to run under .NET 2.0, needs your compiled application too. A config file. Try to rename dBasic.exe.config or Basic4ppc.exe.config to YourApp.exe.config and put it in the same folder as YourApp.exe.

I hope I helped,

regards
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop Execution of source on PDA badkarma Basic4ppc Wishlist 4 04-28-2008 04:00 AM
New Listview Library (with source) Filippo Additional Libraries 14 09-20-2007 08:29 AM
Source Files package? Rod Questions & Help Needed 10 08-15-2007 06:12 PM
CLI arguments to run source file LineCutter Basic4ppc Wishlist 4 06-07-2007 09:40 PM
The best folder for your source code Erel Code Samples & Tips 0 05-01-2007 08:17 PM


All times are GMT. The time now is 10:04 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0