diff --git a/.github/workflows/Test_windows.yml b/.github/workflows/Test_windows.yml index d95178a..ee477fd 100644 --- a/.github/workflows/Test_windows.yml +++ b/.github/workflows/Test_windows.yml @@ -12,7 +12,7 @@ on: env: BUILD_TYPE: Release - VERSION_NAME: 1.1 + VERSION_NAME: 1.2 jobs: Build_exec: diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b745e5..157d7b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/out/ ) project( "SW Packer" VERSION - 1.1 + 1.2 DESCRIPTION "Pack all resources into one file" LANGUAGES diff --git a/README.md b/README.md index 6e7d298..7f3b5ed 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The compilation is simple, you can choose between two target: Packer and Unpacke ```shell mkdir "build" && cd build cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=[Debug/Release] .. -cmake --build . --target SWEngine-[packer/unpacker]_1.1 --config [Debug/Release] +cmake --build . --target SWEngine-[packer/unpacker]_1.2 --config [Debug/Release] ``` #### Option You can define an option by using : `-D[option]=[value]` diff --git a/cmake/Packer.cmake b/cmake/Packer.cmake index ba30fbb..37a0d6f 100644 --- a/cmake/Packer.cmake +++ b/cmake/Packer.cmake @@ -61,7 +61,7 @@ endif() ## STATIC LIBRARY LINKING ## <=====================================> -if (${STATIC_LIB_NAME}) +if (NOT ${STATIC_LIB_NAME} STREQUAL "") target_link_libraries(${EXEC} PUBLIC ${STATIC_LIB_NAME} diff --git a/sources/unpack/UnPackFile.cpp b/sources/unpack/UnPackFile.cpp index f88d518..48a96e3 100644 --- a/sources/unpack/UnPackFile.cpp +++ b/sources/unpack/UnPackFile.cpp @@ -5,6 +5,7 @@ #include #include +#include #include "UnPackFile.hpp" #include "File.hpp" @@ -74,6 +75,7 @@ void sw::UnPackFile::createFile(sw::chunkHeader &chunkHeader, std::string path, if (!outFile.is_open()) throw sw::FileException("File cannot be created"); outFile.write((char *)buffer, chunkHeader.sizeBase); + outFile.close(); free(buffer); } catch (const sw::FileException& e) { sw::Log::AddLog("Cannot create file: " + path, sw::Log::WARNING);