Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libzip wrapper fixes and improvements #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Anvell
Copy link

@Anvell Anvell commented Aug 12, 2017

As discussed here: https://forum.nim-lang.org/t/3077

Added:

  • Replacing files in zip
  • Renaming/removing
  • Ability to switch between deflate/store method
  • Fixed path issues on Windows
  • static link by default

Note: not compatible with old libzip_all.c

@Anvell Anvell changed the title Small fixes and improvements Libzip wrapper fixes and improvements Aug 12, 2017
@Araq
Copy link
Member

Araq commented Aug 13, 2017

Does it work on Windows?

@Anvell
Copy link
Author

Anvell commented Aug 14, 2017

Yes, I'm on Win only. Though if someone is using MSVC instead of MinGW it would require other linking directives?

zip/libzip.nim Outdated
# distribution, for details about the copyright.
#

## Interface to the `libzip <https://www.nih.at/libzip/index.html>`_ library by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fishy that GitHub thinks you've modified the whole file when the contents are the same...

I'm guessing you changed the newline characters for these files? You need to fix that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done :)

@iffy
Copy link

iffy commented Jul 23, 2018

What's the status on this PR? I'm new to nim and think I want a statically linked libzip. (I could be convinced otherwise, of course)

@Araq
Copy link
Member

Araq commented Jul 24, 2018

This PR needs to keep the possibility to link against the DLL/lib.so file.

@brentp
Copy link

brentp commented Mar 3, 2019

it would be useful for me to have static linking to a more recent libzip. How having:

when defined(zipSharedLib):
  when defined(macosx):
    {.pragma: mydll, dynlib: "libzip(|2|4).dylib".}
  else:
    {.pragma: mydll, dynlib: "libzip(|2).so(|.4|.2|.1|.0)".}
else:
  {.passl: "-static".}
  {.passl: "-lzip".}
  {.passl: "-lz".}

as the (additional) change?

@Araq
Copy link
Member

Araq commented Mar 4, 2019

@brentp Sounds good to me.

@brentp
Copy link

brentp commented Mar 4, 2019

@Anvell will you make those changes? Or shall I make a new PR from your branch?

@Anvell
Copy link
Author

Anvell commented Mar 5, 2019

Feel free to make new PR, I have not worked with Nim for some time :)

@brentp brentp mentioned this pull request Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants