Skip to content

Commit 7b85d7c

Browse files
committed
GH-1876 Fork and update quazip
* It is added as a new submodule: https://github.com/MultiMC/quazip/tree/multimc-1 * Its build system has been entirely replaced to remove the existing issues with it * It now has working unit tests * No more patches needed * It has a static linking exception in its license now, but we use it shared anyway
1 parent 1eb6e77 commit 7b85d7c

File tree

8 files changed

+10
-561
lines changed

8 files changed

+10
-561
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "depends/libnbtplusplus"]
22
path = libraries/libnbtplusplus
33
url = https://github.com/MultiMC/libnbtplusplus.git
4+
[submodule "libraries/quazip"]
5+
path = libraries/quazip
6+
url = https://github.com/MultiMC/quazip.git

CMakeLists.txt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,6 @@ endif()
6767
include(ExternalProject)
6868
set_directory_properties(PROPERTIES EP_BASE External)
6969

70-
# Add quazip
71-
add_definitions(-DQUAZIP_STATIC)
72-
set(QUAZIP_VERSION "0.7.1")
73-
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz)
74-
file(DOWNLOAD http://downloads.sourceforge.net/project/quazip/quazip/${QUAZIP_VERSION}/quazip-${QUAZIP_VERSION}.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz)
75-
endif()
76-
ExternalProject_Add(QuaZIP
77-
SOURCE_DIR <BINARY_DIR>/../Source/quazip-${QUAZIP_VERSION}
78-
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/.. ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz
79-
PATCH_COMMAND patch -p0 -i ${CMAKE_SOURCE_DIR}/quazip.patch
80-
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
81-
)
82-
include_directories("${CMAKE_CURRENT_BINARY_DIR}/External/Install/QuaZIP/include/quazip")
83-
if(UNIX)
84-
set(QUAZIP_LIBRARIES -L"${CMAKE_CURRENT_BINARY_DIR}/External/Install/QuaZIP/lib" quazip z)
85-
else()
86-
set(QUAZIP_LIBRARIES -L"${CMAKE_CURRENT_BINARY_DIR}/External/Install/QuaZIP/lib" quazip)
87-
endif()
88-
8970
option(NBT_BUILD_SHARED "Build NBT shared library" ON)
9071
option(NBT_USE_ZLIB "Build NBT library with zlib support" OFF)
9172
option(NBT_BUILD_TESTS "Build NBT library tests" OFF) #FIXME: fix unit tests.
@@ -98,6 +79,7 @@ add_subdirectory(libraries/hoedown) # markdown parser
9879
add_subdirectory(libraries/launcher) # java based launcher part for Minecraft
9980
add_subdirectory(libraries/javacheck) # java compatibility checker
10081
add_subdirectory(libraries/xz-embedded) # xz compression
82+
add_subdirectory(libraries/quazip) # zip manipulation library
10183
add_subdirectory(libraries/pack200) # java pack200 compression
10284
add_subdirectory(libraries/rainbow) # Qt extension for colors
10385
add_subdirectory(libraries/iconfix) # fork of Qt's QIcon loader

LGPL_EXCEPTION.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

LICENSE.LPGLv21

Lines changed: 0 additions & 502 deletions
This file was deleted.

api/logic/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,9 @@ set_target_properties(MultiMC_logic PROPERTIES CXX_VISIBILITY_PRESET hidden VISI
490490
generate_export_header(MultiMC_logic)
491491

492492
# Link
493-
target_link_libraries(MultiMC_logic xz-embedded unpack200 systeminfo ${QUAZIP_LIBRARIES} ${NBT_NAME} ${ZLIB_LIBRARIES})
493+
target_link_libraries(MultiMC_logic xz-embedded unpack200 systeminfo MultiMC_quazip ${NBT_NAME} ${ZLIB_LIBRARIES})
494+
494495
qt5_use_modules(MultiMC_logic Core Xml Network Concurrent)
495-
add_dependencies(MultiMC_logic QuaZIP)
496496

497497
# Mark and export headers
498498
target_include_directories(MultiMC_logic PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" PRIVATE "${ZLIB_INCLUDE_DIRS}")

libraries/pack200/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ set(PACK200_SRC
2626
src/zip.h
2727
)
2828

29-
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
29+
if (Qt5_POSITION_INDEPENDENT_CODE)
30+
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
31+
endif()
3032

3133
add_library(unpack200 STATIC ${PACK200_SRC})
3234
target_include_directories(unpack200 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" PRIVATE ${ZLIB_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/src")

libraries/quazip

Submodule quazip added at 2c40fc8

quazip.patch

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)