Search Unity

UniZIP - free zipper/unzipper

Discussion in 'Assets and Asset Store' started by tsubaki_t1, Jan 3, 2014.

  1. tuandq77

    tuandq77

    Joined:
    Nov 18, 2015
    Posts:
    6
    it can't work with Xcode 7.2 and unity 5.2.
    Pls help me :(
     
  2. skydel0

    skydel0

    Joined:
    Dec 9, 2013
    Posts:
    1
    luispedrofonseca likes this.
  3. tuandq77

    tuandq77

    Joined:
    Nov 18, 2015
    Posts:
    6
  4. narf03

    narf03

    Joined:
    Aug 11, 2014
    Posts:
    207
    no longer updated ? Password support ?
     
  5. Manish-Unity

    Manish-Unity

    Joined:
    Jun 11, 2014
    Posts:
    2
    Hi tsubaki_t1,
    Thanks for the UnityZip plugin.
    I have a doubt on Unziping the Standalone zip build from server. It gives always error for "dircotory not found". while unziping the subfolder in it.
     
  6. Evasion4D

    Evasion4D

    Joined:
    Aug 8, 2013
    Posts:
    16
    Hi,

    I'am using Unity 5.4 on Mac
    In use with the editor, the two examples work perfectly
    But not in standalone OS X and Windows

    In sample2, Dir is well created and opened
    But icon.zip file is not created

    What wrong ?
    Thanks
     
  7. glitchers

    glitchers

    Joined:
    Apr 29, 2014
    Posts:
    52
    Hi,

    This is a great package, I got this working in the Editor (Mac 5.4.3) and Android in no time at all. I'm running into issues with iOS. I set the `-fno-objc-arc` flags on the files but I am running into some issues with `zip.o` + `unzip.o`.

    ld: warning: arm64 function not 4-byte aligned: ltmp0 from /Users/hugo/Project/glitche.rs/unity/catch-hero/catch-hero/Builds/new_os_updgrade/ios_131_31_shqid/Libraries/libiPhone-lib.a(unwind_test_arm64.o)

    ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/hugo/Project/glitche.rs/unity/catch-hero/catch-hero/Builds/new_os_updgrade/ios_131_31_shqid/Libraries/libiPhone-lib.a(unwind_test_arm64.o)

    Undefined symbols for architecture arm64:

    "_inflateInit2_", referenced from:

    _unzOpenCurrentFile3 in unzip.o

    (maybe you meant: _unity_z_inflateInit2_, _il2cpp_z_inflateInit2_ )

    "_deflateEnd", referenced from:

    _zipCloseFileInZipRaw in zip.o

    (maybe you meant: _unity_z_deflateEnd, _il2cpp_z_deflateEnd )

    "_inflateEnd", referenced from:

    _unzCloseCurrentFile in unzip.o

    (maybe you meant: _unity_z_inflateEnd, _il2cpp_z_inflateEnd )

    "_crc32", referenced from:

    _zipWriteInFileInZip in zip.o

    _unzReadCurrentFile in unzip.o

    -[ZipArchive addFileToZip:newname:] in ZipArchive.o

    (maybe you meant: _unity_z_crc32_combine, _il2cpp_z_crc32_combine , _il2cpp_z_crc32 , _unity_z_crc32 , _crc32_combine64 )

    "_deflateInit2_", referenced from:

    _zipOpenNewFileInZip3 in zip.o

    (maybe you meant: _il2cpp_z_deflateInit2_, _unity_z_deflateInit2_ )

    "_deflate", referenced from:

    _zipWriteInFileInZip in zip.o

    _zipCloseFileInZipRaw in zip.o

    (maybe you meant: _unity_z_deflateBound, _unity_z_deflateEnd , _il2cpp_z_deflateCopy , _il2cpp_z_deflatePrime , _il2cpp_z_deflateSetDictionary , _il2cpp_z_deflateInit_ , _il2cpp_z_deflateParams , _unity_z_deflateReset , _il2cpp_z_deflate , _il2cpp_z_deflateInit2_ , _il2cpp_z_deflateTune , __ZN21GZipStream_t18341874629get_offset_of_deflateStream_1Ev , _unity_z_deflateInit_ , _il2cpp_z_deflateEnd , _il2cpp_z_deflateReset , _unity_z_deflate_copyright , _unity_z_deflateParams , __ZNK21GZipStream_t18341874619get_deflateStream_1Ev , _unity_z_deflate , _il2cpp_z_deflateSetHeader , _il2cpp_z_deflate_copyright , _unity_z_deflateTune , _unity_z_deflateSetDictionary , _il2cpp_z_deflateBound , _unity_z_deflateCopy , __ZN21GZipStream_t18341874619set_deflateStream_1EP25DeflateStream_t2030147241 , _unity_z_deflateInit2_ , _unity_z_deflateSetHeader , _unity_z_deflatePrime )

    "_inflate", referenced from:

    _unzReadCurrentFile in unzip.o

    (maybe you meant: _unity_z_inflateSetDictionary, _unity_z_inflateInit2_ , _unity_z_inflatePrime , _unity_z_inflate , _unity_z_inflateEnd , _il2cpp_z_inflateCopy , _il2cpp_z_inflateGetHeader , _il2cpp_z_inflateSetDictionary , _il2cpp_z_inflate_fast , _il2cpp_z_inflateInit_ , _unity_z_inflateInit_ , _il2cpp_class_is_inflated , __Z27scripting_class_is_inflatedP14ScriptingClass , _il2cpp_method_is_inflated , _il2cpp_z_inflate , _il2cpp_z_inflateEnd , _il2cpp_z_inflateInit2_ , _unity_z_inflateReset , _inflateUndermine , _unity_z_inflateSyncPoint , _il2cpp_z_inflate_table , _unity_z_inflateSync , _il2cpp_z_inflateSync , _il2cpp_z_inflatePrime , _inflate_copyright , _unity_z_inflateGetHeader , _il2cpp_z_inflateSyncPoint , _il2cpp_z_inflateReset , _il2cpp_z_inflate_copyright , _unity_z_inflateCopy , _inflate_fast , _inflate_table )

    "_get_crc_table", referenced from:

    _zipOpenNewFileInZip3 in zip.o

    _unzOpenCurrentFile3 in unzip.o

    (maybe you meant: _il2cpp_z_get_crc_table, _unity_z_get_crc_table )

    ld: symbol(s) not found for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)
     
  8. glitchers

    glitchers

    Joined:
    Apr 29, 2014
    Posts:
    52
    I found the solution to my iOS problem here.

    It was complaining about undefined symbols for _inflateInit2_, _deflateEnd, _inflateEnd, _crc32, _deflateInit2_, _deflate, _inflate, _get_crc_table if any finds this from Google.

    If you add "-lz" to your "Other Linker Flags" in Build Settings in XCode it will build!
     
  9. brunoleos

    brunoleos

    Joined:
    May 14, 2014
    Posts:
    30
    When I try to build the generated project from Unity in Xcode, I get undefined symbols for architecture armv7 errors when linking. The symbols are:
    _zip
    _unzip
    _addZipFile

    I've tried adding the folder ZipArchive from PluginsCode, as instructed in README.md, at the Classes folder of my Xcode project, and also at Libraries/Plugins/iOS folder, but get the same errors.

    What can I do to succeed the build?
     
  10. cyrillee_92

    cyrillee_92

    Joined:
    Jan 19, 2017
    Posts:
    1
    how to do that? your link is failed and I add lz to the other linker Flags, it still has same error
     
  11. Nubog

    Nubog

    Joined:
    Mar 30, 2017
    Posts:
    1
    Great work! Thank you!
     
  12. LynxVision

    LynxVision

    Joined:
    Aug 18, 2012
    Posts:
    7
    Hi Tsubaki, how are you?

    We are trying to deploy a project using your unizip script to iOS,
    and we get an error in Xcode: ARC forbids explicit message send of: 'release'
    and ARC forbids explicit message send of: 'dealloc'

    Can you help us fix those errors?
    Do you have a newer release of that unity pkg?

    Thanks for any help!
     
  13. sun_stealer

    sun_stealer

    Joined:
    Oct 4, 2016
    Posts:
    24
    Hi all! This library works brilliantly in the Editor, but whenever I build a standalone Windows x86 or x86_64 player I get the following error:

    ArgumentException: Encoding name 'IBM437' not supported
    Parameter name: name
    at System.Text.Encoding.GetEncoding (System.String name) [0x00000] in <filename unknown>:0
    at Ionic.Zip.ZipFile..cctor () [0x00000] in <filename unknown>:0
    Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Ionic.Zip.ZipFile
    at ZipUtil.Unzip (System.String zipFilePath, System.String location) [0x00000] in <filename unknown>:0
    at UnzipAndRead+<Load>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
    at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0



    What might be the issue? Does it lack some dependencies, how do I fix this?
     
  14. StrelnikovEugene

    StrelnikovEugene

    Joined:
    May 26, 2017
    Posts:
    1
    I solved linked error in Xcode by adding UnityZipFile.mm from unity Assets/plugins/ios folder to Xcode project
     
  15. AgentMilkshake1

    AgentMilkshake1

    Joined:
    Apr 7, 2014
    Posts:
    2
    Hey all,

    I've seen you all working through some problems that I've been getting with XCode. Can I just get some confirmation from people on the following:

    • Exactly where in my XCode project should the Plugins>iOS>ZipArchive folder go? UnityZipFile.mm has the error for ZipArchive.h not found. To remove this I moved the ZipArchive.h and ZipArchive.mm into the same folder level as UnityZipFile.mm but I'm unsure whether this will break the functionality.
    • Secondly, the ARC problems (release, dealloc), can I get confirmation from people that the ARC disabling on the individual files worked?
    Thanks,
    Sam
     
  16. Crz-t

    Crz-t

    Joined:
    May 31, 2016
    Posts:
    6
    Hi ! i need uncompress large files in multiple parts,but this pluggin works in Windows/Mac..i can't uncompress it in Android...(only can uncompress simple file)..can u help me ? Does this pluggin works with split files in Android ?

    thanks :)
     
    Last edited: Jul 13, 2017
  17. Saikat_2016

    Saikat_2016

    Joined:
    Dec 21, 2016
    Posts:
    10
    My PC Config is Win 7_64bit... I made a build for window but the Zip utility is not unzip my file what can I do...please help me....
     
  18. Kubic75

    Kubic75

    Joined:
    Jan 2, 2017
    Posts:
    83
    The plugin works for me on Android but in XCode 8.3.3 I get "ZipArchive.h" file not found, although I copied it into XCode and its listed in Build Phases / Compile Sources.

    Now I copied the files at the right place:


    but then get these errors:



    Then I added -frno-objc-arc to these files and still get:

     
    Last edited: Aug 30, 2017
  19. WasimBashir

    WasimBashir

    Joined:
    Nov 24, 2017
    Posts:
    5
    i used this asset and it works like charm , but how can i add a directory to zip
     
  20. soranhanmul

    soranhanmul

    Joined:
    Aug 21, 2017
    Posts:
    6
    @tsubaki_t1

    I want to download the zipFile and unlock the password,


    public static void Unzip (string zipFilePath, string location)
    {
    #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
    Directory.CreateDirectory (location);

    using (ZipFile zip = ZipFile.Read (zipFilePath)) {
    zip.Password = "aaaa"; //zip password
    if (ZipFile.CheckZipPassword(zipFilePath, "aaaa"))
    {
    zip.ExtractAll(location, ExtractExistingFileAction.OverwriteSilently);
    }
    }
    #elif UNITY_ANDROID
    using (AndroidJavaClass zipper = new AndroidJavaClass ("com.tsw.zipper")) {
    zipper.CallStatic ("unzip", zipFilePath, location);
    }
    #elif UNITY_IPHONE
    unzip (zipFilePath, location);
    #endif
    }


    I Changed Editor Code, and now that works well. but Now I got Problem With Android...

    how can i unlocking the zip on android?
     
  21. AlexiJohansen123

    AlexiJohansen123

    Joined:
    Apr 5, 2016
    Posts:
    17
    Has anyone been able to build this for Ios11 arm64? I get linker errors.
     
  22. IvanTesseract

    IvanTesseract

    Joined:
    Jul 1, 2013
    Posts:
    71
    Can this do in-memory zipping out of the box?
     
  23. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    120
    I always receive this error in xcode:

    Code (CSharp):
    1. Undefined symbols for architecture arm64:
    2.   "_OBJC_CLASS_$_ZipArchive", referenced from:
    3.       objc-class-ref in UnityZipFile.o
    4. ld: symbol(s) not found for architecture arm64
    5. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    I tried it out with other architectures as well but the error is the same..
     
  24. ecrisvar

    ecrisvar

    Joined:
    Dec 20, 2018
    Posts:
    1
    thanks to the person who create this have a nice days