@@ -7,23 +7,41 @@ It builds a single file `.swfp` with all resources inside.
77The compilation is simple, you can choose between two target: Packer and Unpacker.
88``` shell
99mkdir " build" && cd build
10- cmake -G " Visual Studio 17 2022" - DCMAKE_BUILD_TYPE=[Debug/Release] ..
11- cmake --build . --target SWEngine-[packer/unpacker]_0 .1 --config [Debug/Release]
10+ cmake -G " Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=[Debug/Release] ..
11+ cmake --build . --target SWEngine-[packer/unpacker]_1 .1 --config [Debug/Release]
1212```
13+ #### Option
14+ You can define an option by using : ` -D[option]=[value] `
15+ - CMAKE_BUILD_TYPE: Debug/Release
16+ - SWFP_COMP: ON/OFF
1317
1418## Usage
1519### Packer
1620Simply run the executable and give the directory you want to pack.
1721``` shell
18- ./SWEngine-packer_0.1 [PATH_TO_DIRECTORY]
22+ ./SWEngine-packer [PATH_TO_DIRECTORY]
1923```
2024
2125### UnPacker
2226Simply run the executable and give the directory where the file ` .swfp ` file is.
2327``` shell
24- ./SWEngine-unpacker_0.1 [PATH_TO_SWFP_FILE]
28+ ./SWEngine-unpacker [PATH_TO_SWFP_FILE]
2529```
2630
31+ ### Compression
32+ You're able to add a compression process in the packer (and decompress for unpacker).
33+ To do so, go to ` Packer.cpp ` and find the ` SWFP_COMP ` macro and edit the code above to add
34+ your own compression process. For ` UnPacker.cpp ` find ` SWFP_COMP ` and edit the code above.
35+
36+ To enable the compression process use ` -DSWFP_COMP=ON ` (default: OFF).
37+
38+ Note: There is a default compression algorithm: [ zstd] ( https://github.com/facebook/zstd ) . \
39+ The header is already include in the project just build a __ static__ libraries and add it to the cmake. \
40+ Add ` zstd_static ` to ` STATIC_LIB_NAME ` and ` ${CMAKE_SOURCE_DIR}/libraries/zstd_static.lib ` to ` STATIC_LIB ` in the CMakeLists.txt.
41+
2742## Authors
28- The project is made by [ Guillaume Soisson] ( https://github.com/Alvarwow69 ) . \
29- This project is based on raysan5 works for [ rres] ( https://github.com/raysan5/rres )
43+ The project is made by [ Guillaume Soisson] ( https://github.com/Alvarwow69 ) .
44+
45+ ## Credits
46+ This project is based on raysan5 works for [ rres] ( https://github.com/raysan5/rres ) \
47+ This project use [ zstd] ( https://github.com/facebook/zstd ) to provide default compression process.
0 commit comments