Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Test_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

env:
BUILD_TYPE: Release
VERSION_NAME: 1.1
VERSION_NAME: 1.2

jobs:
Build_exec:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]`
Expand Down
2 changes: 1 addition & 1 deletion cmake/Packer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions sources/unpack/UnPackFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <fstream>
#include <filesystem>
#include <iostream>

#include "UnPackFile.hpp"
#include "File.hpp"
Expand Down Expand Up @@ -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);
Expand Down