1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge pull request #6139 from kambala-decapitator/minizip-ng

support using minizip-ng instead of minizip
This commit is contained in:
Ivan Savenko
2025-09-21 20:18:44 +03:00
committed by GitHub
4 changed files with 13 additions and 2 deletions

View File

@@ -496,7 +496,11 @@ if(TARGET zlib::zlib)
add_library(ZLIB::ZLIB ALIAS zlib::zlib)
endif()
find_package(minizip REQUIRED)
find_package(minizip)
if(NOT minizip_FOUND)
find_package(minizip-ng REQUIRED)
add_library(minizip::minizip ALIAS MINIZIP::minizip-ng)
endif()
if (ENABLE_CLIENT)
if (ENABLE_VIDEO)

View File

@@ -13,7 +13,7 @@ To compile, the following packages (and their development counterparts) are need
- CMake
- SDL2 with devel packages: mixer, image, ttf
- minizip
- minizip or minizip-ng
- zlib and zlib-devel
- Boost C++ libraries v1.48+: program-options, filesystem, system, thread, locale
- Recommended, if you want to build launcher or map editor: Qt 5, widget and network modules

View File

@@ -38,6 +38,7 @@ On the step where you need to replace **PROFILE**, choose:
1. [Install Homebrew](https://brew.sh/)
2. Install dependencies: `brew install boost minizip sdl2 sdl2_image sdl2_mixer sdl2_ttf tbb`
- you can also use minizip-ng instead of minizip
3. If you want to watch in-game videos, also install FFmpeg: `brew install ffmpeg` (you can also use an earlier FFmpeg version)
4. Install Qt dependency in either of the ways (note that you can skip this if you're not going to build Launcher and Map editor):
- `brew install qt@5` for Qt 5 or `brew install qt` for Qt 6

View File

@@ -9,9 +9,15 @@
*/
#pragma once
#if __has_include(<minizip-ng/unzip.h>)
#include <minizip-ng/unzip.h>
#include <minizip-ng/zip.h>
#include <minizip-ng/ioapi.h>
#else
#include <minizip/unzip.h>
#include <minizip/zip.h>
#include <minizip/ioapi.h>
#endif
// system zlib on old Androids isn't capable of using _64 functions: https://github.com/madler/zlib/pull/436
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 24)