From 85c86c4a27aacf72a531d1db48495ba9fab987cd Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Thu, 25 Aug 2022 23:13:37 +0200 Subject: [PATCH] Removed zlib dep --- CMakeLists.txt | 2 +- Jenkinsfile | 2 +- LICENSE-zlib | 21 --------------------- README.md | 15 +++++++-------- RSETerrain/CMakeLists.txt | 6 ++---- RSETerrain/src/terrain_export.c | 1 - conanfile.txt | 2 -- 7 files changed, 11 insertions(+), 38 deletions(-) delete mode 100644 LICENSE-zlib diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ad3340..371946f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,5 +74,5 @@ install(TARGETS ${RSE_TERRAIN_TARGETS_LIST} # Install library includes install(FILES ${RSP_PUBLIC_HRDS} DESTINATION ${INSTALL_INC_DIR}) # Install dependancies -install(FILES ${PROJECT_BINARY_DIR}/bin/glew32.dll ${PROJECT_BINARY_DIR}/bin/libpng16.dll ${PROJECT_BINARY_DIR}/bin/zlib1.dll +install(FILES ${PROJECT_BINARY_DIR}/bin/glew32.dll ${PROJECT_BINARY_DIR}/bin/libpng16.dll DESTINATION ${INSTALL_BIN_DIR}) diff --git a/Jenkinsfile b/Jenkinsfile index f1e162c..fa42698 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { } environment { CI_OUTPUT_NAME = "RSETerrain" - CI_VERSION = "2.0.1" + CI_VERSION = "2.0.2" CI_BUILD_NUMBER = "$BUILD_NUMBER" } stages { diff --git a/LICENSE-zlib b/LICENSE-zlib deleted file mode 100644 index 1375708..0000000 --- a/LICENSE-zlib +++ /dev/null @@ -1,21 +0,0 @@ - - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu \ No newline at end of file diff --git a/README.md b/README.md index 8567cc1..3da2195 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ It's extract terrain datas from Rogue Squadron 3D (PC) game map files (hmp). This module can do: - Interpolate 3D model mesh of the terrain, -- Export it as OBJ model file (pretty heavy (~15MB), not to be use directly for display), +- Export it as OBJ model file (pretty heavy (~15MB), not to be use direcly for display), - Export an heightmap-like PNG, - Multiple inputs files. @@ -27,10 +27,10 @@ This module can do: ### Using -`RSETerrain [options] ` or you can simply drag&drop HMP files on it. +`RSETerrain [options] ` or you can simply drag&drop HOB files on it. -A futur main program can extract all HMP files directly from DAT file. -Due to issue with copyrights, I can't provide samples... You need to extract HMP files yourself. +A futur main program can extract all HOB files directly from DAT file. +Due to issue with copyrights, I can't provide samples... You need to extract HOB files yourself. @@ -38,19 +38,18 @@ Due to issue with copyrights, I can't provide samples... You need to extract HMP - -h Print this message - -v,-vv Activate verbose/debug output mode respectively -- -no-subdir Export models inside current folder -- -no-mtl Disable texture exporting -- -invZ Invert Z axis when parsing +- -subdir Export outputs to a sub-directory - -neg Negative heightmap output ### Dependencies +- libpng (1.6.37) - obj-lib: as obj file exporter. (https://git.jcsmith.fr/jackcartersmith/obj) ### Compiling You can compile on both Windows (MinGW) or native Linux system thanks to CMake, you only need to adjust your dependencies on Windows or use Conan packages manager (https://conan.io). -zlib-dev (zlib1g-dev) and libpng16-dev distrib packages can be used on debian/ubuntu. +libpng16-dev distrib package can be used on debian/ubuntu. To compile, just clone (**don't forget git submodules**) and launch cmake: diff --git a/RSETerrain/CMakeLists.txt b/RSETerrain/CMakeLists.txt index 9111e16..057ac51 100644 --- a/RSETerrain/CMakeLists.txt +++ b/RSETerrain/CMakeLists.txt @@ -13,8 +13,6 @@ include(CheckCSourceCompiles) add_definitions(-DCONF_NO_GL) # Used for obj-lib to not compile GL part # Import needed packages and references their include path -find_package(ZLIB 1.2.12 REQUIRED) -include_directories(${ZLIB_INCLUDE_DIR}) find_package(PNG 1.6.37 REQUIRED) include_directories(${PNG_INCLUDE_DIR}) #find_package(GLEW REQUIRED) # Enable when GL rendering is ready @@ -43,7 +41,7 @@ set_target_properties(rse-terrain PROPERTIES OUTPUT_NAME ${RSE_TERRAIN_NAME}) if(MSVC) # msvc does not append 'lib' - do it here to have consistent name set_target_properties(rse-terrain PROPERTIES IMPORT_PREFIX "lib") - target_link_libraries(rse-terrain PRIVATE rsp-terrain-libstatic ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${GLEW_LIBRARIES}) + target_link_libraries(rse-terrain PRIVATE rsp-terrain-libstatic ${PNG_LIBRARIES} ${GLEW_LIBRARIES}) else() - target_link_libraries(rse-terrain PRIVATE rsp-terrain-libstatic ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${GLEW_LIBRARIES} m) + target_link_libraries(rse-terrain PRIVATE rsp-terrain-libstatic ${PNG_LIBRARIES} ${GLEW_LIBRARIES} m) endif() diff --git a/RSETerrain/src/terrain_export.c b/RSETerrain/src/terrain_export.c index cb3734b..c2f5b5d 100644 --- a/RSETerrain/src/terrain_export.c +++ b/RSETerrain/src/terrain_export.c @@ -13,7 +13,6 @@ #include "options.h" #include #include -#include #include #include "obj/obj.h" #include "terrain_export.h" diff --git a/conanfile.txt b/conanfile.txt index 1786eae..32c589b 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,5 +1,4 @@ [requires] -zlib/1.2.12 libpng/1.6.37 glew/2.2.0 @@ -8,7 +7,6 @@ cmake cmake_find_package [options] -zlib:shared=True libpng:shared=True glew:shared=True