Replace libzip for backup creation/extraction #31

Closed
opened 2023-08-27 16:04:07 +02:00 by williamjcm · 1 comment
Owner

Don't get me wrong, I like it. Its API is decent for a C lib, and it has all of the features I need.

However! It has one issue. While I never ran into it back when I still primarily used Windows because zlib was already installed "system"-wide via MSYS2, libzip's CMake project can't detect and use zlib if it's available to CMake through add_directory() (like as a Git submodule), and it's not gonna change any time soon.

The only candidate I found so far is minizip-ng, which can grab zlib (or optionally, zlib-ng) on its own if it's not found. There were some interesting zlib-free alternatives, but they were all missing the ability to get and set an archive's comment for some reason, and the old minizip in zlib's repo is unmaintained and unsupported.

If this works out, this change will be in 1.5 and shouldn't affect existing backups.

Don't get me wrong, I like it. Its API is decent for a C lib, and it has all of the features I need. ***However!*** It has one issue. While I never ran into it back when I still primarily used Windows because zlib was already installed "system"-wide via MSYS2, libzip's CMake project can't detect and use zlib if it's available to CMake through `add_directory()` (like as a Git submodule), [and it's not gonna change any time soon](https://github.com/nih-at/libzip/issues/252). The only candidate I found so far is [minizip-ng](https://github.com/zlib-ng/minizip-ng), which can grab zlib (or optionally, zlib-ng) on its own if it's not found. There were some interesting zlib-free alternatives, but they were all missing the ability to get and set an archive's comment for some reason, and the old minizip in zlib's repo is unmaintained and unsupported. If this works out, this change will be in 1.5 and shouldn't affect existing backups.
williamjcm added this to the v1.5.0 milestone 2023-08-27 16:04:07 +02:00
williamjcm added the
question
label 2023-08-27 16:04:07 +02:00
williamjcm self-assigned this 2023-08-27 16:04:07 +02:00
williamjcm removed this from the v1.5.0 milestone 2023-08-27 20:47:06 +02:00
williamjcm removed reference one-point-five 2023-08-27 20:47:12 +02:00
Author
Owner

My experience using minizip-ng definitely isn't what I expected.

Between various issues with its CMake project and its API lacking stuff like human-readable errors, I decided to just build the current dependencies manually and tweak the CMake project to allow for system deps.

If it continues to fail, I'll have one option left: using Windows just for coding, because MSYS2 can't be installed in Wine.

My experience using minizip-ng definitely isn't what I expected. Between various issues with its CMake project and its API lacking stuff like human-readable errors, I decided to just build the current dependencies manually and tweak the CMake project to allow for system deps. If it continues to fail, I'll have one option left: using Windows just for coding, because MSYS2 can't be installed in Wine.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: williamjcm/MassBuilderSaveTool#31
No description provided.