Search Unity

Zip Library

Discussion in 'Windows' started by kit, Jul 18, 2014.

  1. kit

    kit

    Joined:
    Jun 16, 2011
    Posts:
    87
    Hi,

    Please tell, is there any existing ZIP library that maybe used in Windows Phone and Windows Store applications?

    Thanks.
     
  2. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
  3. kit

    kit

    Joined:
    Jun 16, 2011
    Posts:
    87
    >>>I use Ionic zip

    Thanks!
    Is there source code for "Ionic zip"? Or it is just dll ?
     
  4. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Yeah, it's open source.
     
  5. kit

    kit

    Joined:
    Jun 16, 2011
    Posts:
    87
  6. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    You can't use it in Unity project because it targets different version of .net framework. You can use it only in a resulting project generated by Unity for Windows Store and in plugins.

    So if you want it in Unity project you have to make some public interface implemented in the generated project or write a plugin.
     
  7. kit

    kit

    Joined:
    Jun 16, 2011
    Posts:
    87
    Thanks a lot!

    Seems this is some hack :) I think this creates some issues during debug process. Nevertheless, thank you!
     
  8. kit

    kit

    Joined:
    Jun 16, 2011
    Posts:
    87
    I'm still have questions. Please help

    In Assets/Plugins folder I'm able to put only .NET Framework 3.5 libraries. ZipArchive needs .Net Framework 4.5 (plase see: http://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive(v=vs.110).aspx)

    So, I'm still not able to use ZipArchive in Windows Store application. Please tell me, is there is some solution? Maybe some port between Assets/Plugins and Assets\Plugins\Metro\ libraries.

    Thanks
     
  9. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I was wrong then.

    Public interface is your only option I guess. I do that all the time. It's lazy and ugly, but works.
     
  10. kit

    kit

    Joined:
    Jun 16, 2011
    Posts:
    87
    Thanks.

    I created plugin for each platform. When it was able, we use native classes to unzip files, otherwise we use "Ionic zip".
     
  11. andrew99

    andrew99

    Joined:
    Apr 2, 2014
    Posts:
    2
    Hi,

    How did you make ionic zip works in Windows Phone? It works fine in editor, but I keep getting build errors when trying to build into WP8 project. A alot of : "Error : ..... doesn't exists in target framework".
    I've tried both Net 2.0 and Net 2.0 Subset.
    I've also tried using the dotNetZip 1.9.1.8 from the official site (error in build), and also the one modified for Unity
    in this link : https://github.com/HalfVoxel/DotNetZip (can be compiled, but failed in extracting file, empty extract, no error message was triggered)

    I'm using Unity 4.5.3f3