Browse Source

Import libultraship as a submodule (#1943)

Co-authored-by: briaguya <briaguya>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: David Chavez <davi@dcvz.io>
pull/1932/merge
briaguya 2 weeks ago committed by GitHub
parent
commit
3914781ebf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      .github/workflows/generate-builds.yml
  2. 3
      .gitmodules
  3. 3
      CMakeLists.txt
  4. 4
      OTRExporter/CMakeLists.txt
  5. 25
      OTRExporter/OTRExporter/CMakeLists.txt
  6. 2
      OTRExporter/OTRExporter/DisplayListExporter.cpp
  7. 2
      OTRExporter/OTRExporter/VersionInfo.h
  8. 11
      OTRGui/CMakeLists.txt
  9. 2
      OTRGui/src/impl/baserom_extractor/baserom_extractor.h
  10. 2
      README.md
  11. 168
      StormLib/.gitignore
  12. 479
      StormLib/CMakeLists.txt
  13. 22
      StormLib/Info.plist
  14. 21
      StormLib/LICENSE
  15. 34
      StormLib/PostBuild.bat
  16. 132
      StormLib/Premake5.lua
  17. 25
      StormLib/Publish.bat
  18. 39
      StormLib/README.md
  19. 3
      StormLib/StormLib.kdev4
  20. 2104
      StormLib/StormLib.xcodeproj/project.pbxproj
  21. 139
      StormLib/StormLib_vs08.sln
  22. 5017
      StormLib/StormLib_vs08.vcproj
  23. 2663
      StormLib/StormLib_vs08_dll.vcproj
  24. 2101
      StormLib/StormLib_vs08_test.vcproj
  25. 162
      StormLib/StormLib_vs19.sln
  26. 1187
      StormLib/StormLib_vs19.vcxproj
  27. 830
      StormLib/StormLib_vs19.vcxproj.filters
  28. 537
      StormLib/StormLib_vs19_dll.vcxproj
  29. 838
      StormLib/StormLib_vs19_dll.vcxproj.filters
  30. 549
      StormLib/StormLib_vs19_test.vcxproj
  31. 839
      StormLib/StormLib_vs19_test.vcxproj.filters
  32. 78
      StormLib/doc/History.txt
  33. 318
      StormLib/doc/The MoPaQ File Format 0.9.txt
  34. 433
      StormLib/doc/The MoPaQ File Format 1.0.txt
  35. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-deDE.txt
  36. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-enGB.txt
  37. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-enSG.txt
  38. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-enUS.txt
  39. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-esES.txt
  40. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-esMX.txt
  41. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-frFR.txt
  42. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-itIT.txt
  43. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-koKR.txt
  44. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-plPL.txt
  45. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-ptBR.txt
  46. 1
      StormLib/doc/d3-authenticationcode/d3-authenticationcode-zhTW.txt
  47. 1
      StormLib/doc/hots-authenticationcode/hots-authenticationcode-bgdl.txt
  48. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-deDE.txt
  49. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-enGB.txt
  50. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-enUS.txt
  51. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-esES.txt
  52. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-esMX.txt
  53. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-frFR.txt
  54. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-itIT.txt
  55. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-koKR.txt
  56. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-plPL.txt
  57. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-ptBR.txt
  58. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-ruRU.txt
  59. 1
      StormLib/doc/sc2-authenticationcode/sc2-authenticationcode-zhTW.txt
  60. 60
      StormLib/make-msvc.bat
  61. 46
      StormLib/make.bat
  62. 14
      StormLib/sources
  63. 24
      StormLib/src/DllMain.c
  64. 79
      StormLib/src/DllMain.def
  65. 114
      StormLib/src/DllMain.rc
  66. 2928
      StormLib/src/FileStream.cpp
  67. 217
      StormLib/src/FileStream.h
  68. 2045
      StormLib/src/SBaseCommon.cpp
  69. 183
      StormLib/src/SBaseDumpData.cpp
  70. 3101
      StormLib/src/SBaseFileTable.cpp
  71. 618
      StormLib/src/SBaseSubTypes.cpp
  72. 1124
      StormLib/src/SCompression.cpp
  73. 1316
      StormLib/src/SFileAddFile.cpp
  74. 570
      StormLib/src/SFileAttributes.cpp
  75. 654
      StormLib/src/SFileCompactArchive.cpp
  76. 276
      StormLib/src/SFileCreateArchive.cpp
  77. 64
      StormLib/src/SFileExtractFile.cpp
  78. 483
      StormLib/src/SFileFindFile.cpp
  79. 607
      StormLib/src/SFileGetFileInfo.cpp
  80. 687
      StormLib/src/SFileListFile.cpp
  81. 658
      StormLib/src/SFileOpenArchive.cpp
  82. 418
      StormLib/src/SFileOpenFileEx.cpp
  83. 1175
      StormLib/src/SFilePatchArchives.cpp
  84. 897
      StormLib/src/SFileReadFile.cpp
  85. 1054
      StormLib/src/SFileVerify.cpp
  86. 441
      StormLib/src/StormCommon.h
  87. 74
      StormLib/src/StormLib.exp
  88. 1136
      StormLib/src/StormLib.h
  89. 473
      StormLib/src/StormPort.h
  90. 401
      StormLib/src/adpcm/adpcm.cpp
  91. 26
      StormLib/src/adpcm/adpcm.h
  92. 1094
      StormLib/src/bzip2/blocksort.c
  93. 1573
      StormLib/src/bzip2/bzlib.c
  94. 282
      StormLib/src/bzip2/bzlib.h
  95. 509
      StormLib/src/bzip2/bzlib_private.h
  96. 672
      StormLib/src/bzip2/compress.c
  97. 104
      StormLib/src/bzip2/crctable.c
  98. 626
      StormLib/src/bzip2/decompress.c
  99. 205
      StormLib/src/bzip2/huffman.c
  100. 84
      StormLib/src/bzip2/randtable.c
  101. Some files were not shown because too many files have changed in this diff Show More

24
.github/workflows/generate-builds.yml

@ -9,7 +9,9 @@ jobs: @@ -9,7 +9,9 @@ jobs:
extract-assets:
runs-on: [ self-hosted, asset-builder ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Extract assets
run: |
cp ../../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64
@ -25,7 +27,9 @@ jobs: @@ -25,7 +27,9 @@ jobs:
needs: extract-assets
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
@ -83,7 +87,9 @@ jobs: @@ -83,7 +87,9 @@ jobs:
needs: extract-assets
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
@ -146,7 +152,9 @@ jobs: @@ -146,7 +152,9 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
@ -181,7 +189,9 @@ jobs: @@ -181,7 +189,9 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
@ -219,7 +229,9 @@ jobs: @@ -219,7 +229,9 @@ jobs:
run: |
choco install ninja
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: ccache
uses: dcvz/ccache-action@27b9f33213c0079872f064f6b6ba0233dfa16ba2
with:

3
.gitmodules vendored

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
[submodule "libultraship"]
path = libultraship
url = https://github.com/kenix3/libultraship.git

3
CMakeLists.txt

@ -120,9 +120,8 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -120,9 +120,8 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
################################################################################
# Sub-projects
################################################################################
add_subdirectory(libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship)
add_subdirectory(libultraship ${CMAKE_BINARY_DIR}/libultraship)
add_subdirectory(ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD)
add_subdirectory(ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)
add_subdirectory(OTRExporter)
add_subdirectory(soh)
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|NintendoSwitch|CafeOS")

4
OTRExporter/CMakeLists.txt

@ -82,7 +82,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -82,7 +82,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Sub-projects
################################################################################
if (NOT TARGET libultraship)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship ${CMAKE_BINARY_DIR}/libultraship)
endif()
if (NOT TARGET ZAPD)
@ -90,7 +90,7 @@ if (NOT TARGET ZAPD) @@ -90,7 +90,7 @@ if (NOT TARGET ZAPD)
endif()
if (NOT TARGET ZAPDUtils)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)
endif()
add_subdirectory(OTRExporter)

25
OTRExporter/OTRExporter/CMakeLists.txt

@ -158,12 +158,16 @@ endif() @@ -158,12 +158,16 @@ endif()
target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPD/
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/ZAPDUtils
${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/tinyxml2
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/libultraship
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/libultraship/Lib/spdlog/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/libultraship/Lib/Fast3D/U64
${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib/src
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/resource/types
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/spdlog/include
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/src/graphic/Fast3D/U64
${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/extern/StormLib/src
.
)
@ -234,16 +238,5 @@ add_dependencies(${PROJECT_NAME} @@ -234,16 +238,5 @@ add_dependencies(${PROJECT_NAME}
)
# Link with other targets.
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
set(ADDITIONAL_LIBRARY_DEPENDENCIES
"$<$<CONFIG:Debug>:"
"ZAPDUtils;"
"OTRLib"
">"
)
endif()
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC "${ADDITIONAL_LIBRARY_DEPENDENCIES}")

2
OTRExporter/OTRExporter/DisplayListExporter.cpp

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
#include "../ZAPD/ZFile.h"
#include <Utils/MemoryStream.h>
#include <Utils/BitConverter.h>
#include "Lib/StrHash64.h"
#include "StrHash64/StrHash64.h"
#include "spdlog/spdlog.h"
#include "PR/ultra64/gbi.h"
#include <Globals.h>

2
OTRExporter/OTRExporter/VersionInfo.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#include <map>
#include <vector>
#include "Resource.h"
#include "src/resource/Resource.h"
#define MAJOR_VERSION Ship::Version::Deckard

11
OTRGui/CMakeLists.txt

@ -19,19 +19,19 @@ include_directories(src/game) @@ -19,19 +19,19 @@ include_directories(src/game)
include_directories(include)
if (NOT TARGET libultraship)
add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship)
add_subdirectory(../libultraship ${CMAKE_BINARY_DIR}/libultraship)
endif()
if (NOT TARGET ZAPD)
add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD)
endif()
if (NOT TARGET ZAPDUtils)
add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)
add_subdirectory(../libultraship/extern/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)
endif()
if (NOT TARGET OTRExporter)
add_subdirectory(../OTRExporter/OTRExporter ${CMAKE_BINARY_DIR}/OTRExporter)
endif()
if (NOT TARGET storm)
add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib)
add_subdirectory(../libultraship/extern/StormLib ${CMAKE_BINARY_DIR}/StormLib)
endif()
file(GLOB_RECURSE HEADERS src/*.h)
@ -54,6 +54,11 @@ add_dependencies(OTRGui Assets) @@ -54,6 +54,11 @@ add_dependencies(OTRGui Assets)
target_link_libraries(${PROJECT_NAME} PUBLIC raylib)
target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship
.
)
INSTALL(TARGETS OTRGui DESTINATION . COMPONENT ship)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets
DESTINATION .

2
OTRGui/src/impl/baserom_extractor/baserom_extractor.h

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#ifndef EXTRACT_BASEROM_H_
#define EXTRACT_BASEROM_H_
#include "../../libultraship/libultraship/GameVersions.h"
#include "src/resource/GameVersions.h"
#include <cstdio>
#include <string>

2
README.md

@ -128,7 +128,7 @@ To get this step working on your fork, you'll need to add a machine to your own @@ -128,7 +128,7 @@ To get this step working on your fork, you'll need to add a machine to your own
- Confirm that `zapd.exe` exists in the `/assets/extractor` folder
## Nightly Builds
Nightly builds of Ship of Harkinian are available [here](https://builds.shipofharkinian.com/)
Nightly builds of Ship of Harkinian are available here: [Windows](https://nightly.link/HarbourMasters/Shipwright/workflows/generate-builds/develop/soh-windows.zip), [macOS](https://nightly.link/HarbourMasters/Shipwright/workflows/generate-builds/develop/soh-mac.zip), [Linux](https://nightly.link/HarbourMasters/Shipwright/workflows/generate-builds/develop/soh-linux.zip), [Switch](https://nightly.link/HarbourMasters/Shipwright/workflows/generate-builds/develop/soh-switch.zip), [Wii U](https://nightly.link/HarbourMasters/Shipwright/workflows/generate-builds/develop/soh-wiiu.zip)
## The Harbour Masters Are...

168
StormLib/.gitignore vendored

@ -1,168 +0,0 @@ @@ -1,168 +0,0 @@
#################
## Eclipse
#################
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
#################
## Visual Studio
#################
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover
*.o
*.dylib
## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
# ReSharper is a .NET coding add-in
_ReSharper*
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
############
## Windows
############
# Windows image file caches
Thumbs.db
# Folder config file
Desktop.ini
#############
## Python
#############
*.py[co]
# Packages
*.egg
*.egg-info
dist
build
nxbuild
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
# Mac crap
.DS_Store
**/project.xcworkspace
**/xcuserdata

479
StormLib/CMakeLists.txt

@ -1,479 +0,0 @@ @@ -1,479 +0,0 @@
set(PROJECT_NAME StormLib)
#project(StormLib)
cmake_minimum_required(VERSION 3.10)
set(LIBRARY_NAME storm)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CMakeDependentOption)
option(BUILD_SHARED_LIBS "Compile shared libraries" OFF)
option(STORM_SKIP_INSTALL "Skip installing files" OFF)
option(STORM_BUILD_TESTS
"Compile StormLib test application" OFF
# "BUILD_TESTING" OFF # Stay coherent with CTest variables
)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(Source_Files__Windows
src/lzma/C/LzFindMt.c
src/lzma/C/Threads.c
)
endif()
set(SRC_FILES
src/adpcm/adpcm.cpp
src/huffman/huff.cpp
src/jenkins/lookup3.c
src/lzma/C/LzFind.c
src/lzma/C/LzmaDec.c
src/lzma/C/LzmaEnc.c
src/pklib/explode.c
src/pklib/implode.c
src/sparse/sparse.cpp
src/FileStream.cpp
src/SBaseCommon.cpp
src/SBaseDumpData.cpp
src/SBaseFileTable.cpp
src/SBaseSubTypes.cpp
src/SCompression.cpp
src/SFileAddFile.cpp
src/SFileAttributes.cpp
src/SFileCompactArchive.cpp
src/SFileCreateArchive.cpp
src/SFileExtractFile.cpp
src/SFileFindFile.cpp
src/SFileGetFileInfo.cpp
src/SFileListFile.cpp
src/SFileOpenArchive.cpp
src/SFileOpenFileEx.cpp
src/SFilePatchArchives.cpp
src/SFileReadFile.cpp
src/SFileVerify.cpp
src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c
src/libtomcrypt/src/misc/crypt_libc.c
${Source_Files__Windows}
)
if(MSVC)
# This file is used to create a DLL on windows
# Use BUILD_SHARED_LIBS to create StormLib.dll
set(STORM_DEF_FILES
src/DllMain.def
)
endif()
set(TOMCRYPT_FILES
src/libtomcrypt/src/hashes/hash_memory.c
src/libtomcrypt/src/hashes/md5.c
src/libtomcrypt/src/hashes/sha1.c
src/libtomcrypt/src/math/ltm_desc.c
src/libtomcrypt/src/math/multi.c
src/libtomcrypt/src/math/rand_prime.c
src/libtomcrypt/src/misc/base64_decode.c
src/libtomcrypt/src/misc/crypt_argchk.c
src/libtomcrypt/src/misc/crypt_find_hash.c
src/libtomcrypt/src/misc/crypt_find_prng.c
src/libtomcrypt/src/misc/crypt_hash_descriptor.c
src/libtomcrypt/src/misc/crypt_hash_is_valid.c
src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c
src/libtomcrypt/src/misc/crypt_prng_descriptor.c
src/libtomcrypt/src/misc/crypt_prng_is_valid.c
src/libtomcrypt/src/misc/crypt_register_hash.c
src/libtomcrypt/src/misc/crypt_register_prng.c
src/libtomcrypt/src/misc/zeromem.c
src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c
src/libtomcrypt/src/pk/asn1/der_decode_boolean.c
src/libtomcrypt/src/pk/asn1/der_decode_choice.c
src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c
src/libtomcrypt/src/pk/asn1/der_decode_integer.c
src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c
src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c
src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c
src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c
src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c
src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c
src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c
src/libtomcrypt/src/pk/asn1/der_decode_utctime.c
src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c
src/libtomcrypt/src/pk/asn1/der_encode_bit_string.c
src/libtomcrypt/src/pk/asn1/der_encode_boolean.c
src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.c
src/libtomcrypt/src/pk/asn1/der_encode_integer.c
src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.c
src/libtomcrypt/src/pk/asn1/der_encode_octet_string.c
src/libtomcrypt/src/pk/asn1/der_encode_printable_string.c
src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.c
src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.c
src/libtomcrypt/src/pk/asn1/der_encode_set.c
src/libtomcrypt/src/pk/asn1/der_encode_setof.c
src/libtomcrypt/src/pk/asn1/der_encode_short_integer.c
src/libtomcrypt/src/pk/asn1/der_encode_utctime.c
src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.c
src/libtomcrypt/src/pk/asn1/der_length_bit_string.c
src/libtomcrypt/src/pk/asn1/der_length_boolean.c
src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c
src/libtomcrypt/src/pk/asn1/der_length_integer.c
src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c
src/libtomcrypt/src/pk/asn1/der_length_octet_string.c
src/libtomcrypt/src/pk/asn1/der_length_printable_string.c
src/libtomcrypt/src/pk/asn1/der_length_sequence.c
src/libtomcrypt/src/pk/asn1/der_length_utctime.c
src/libtomcrypt/src/pk/asn1/der_sequence_free.c
src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c
src/libtomcrypt/src/pk/asn1/der_length_short_integer.c
src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c
src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c
src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c
src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c
src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c
src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c
src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c
src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c
src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c
src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c
src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c
src/libtomcrypt/src/pk/rsa/rsa_exptmod.c
src/libtomcrypt/src/pk/rsa/rsa_free.c
src/libtomcrypt/src/pk/rsa/rsa_import.c
src/libtomcrypt/src/pk/rsa/rsa_make_key.c
src/libtomcrypt/src/pk/rsa/rsa_sign_hash.c
src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c
)
set(TOMMATH_FILES
src/libtommath/bncore.c
src/libtommath/bn_fast_mp_invmod.c
src/libtommath/bn_fast_mp_montgomery_reduce.c
src/libtommath/bn_fast_s_mp_mul_digs.c
src/libtommath/bn_fast_s_mp_mul_high_digs.c
src/libtommath/bn_fast_s_mp_sqr.c
src/libtommath/bn_mp_2expt.c
src/libtommath/bn_mp_abs.c
src/libtommath/bn_mp_add.c
src/libtommath/bn_mp_addmod.c
src/libtommath/bn_mp_add_d.c
src/libtommath/bn_mp_and.c
src/libtommath/bn_mp_clamp.c
src/libtommath/bn_mp_clear.c
src/libtommath/bn_mp_clear_multi.c
src/libtommath/bn_mp_cmp.c
src/libtommath/bn_mp_cmp_d.c
src/libtommath/bn_mp_cmp_mag.c
src/libtommath/bn_mp_cnt_lsb.c
src/libtommath/bn_mp_copy.c
src/libtommath/bn_mp_count_bits.c
src/libtommath/bn_mp_div.c
src/libtommath/bn_mp_div_2.c
src/libtommath/bn_mp_div_2d.c
src/libtommath/bn_mp_div_3.c
src/libtommath/bn_mp_div_d.c
src/libtommath/bn_mp_dr_is_modulus.c
src/libtommath/bn_mp_dr_reduce.c
src/libtommath/bn_mp_dr_setup.c
src/libtommath/bn_mp_exch.c
src/libtommath/bn_mp_exptmod.c
src/libtommath/bn_mp_exptmod_fast.c
src/libtommath/bn_mp_expt_d.c
src/libtommath/bn_mp_exteuclid.c
src/libtommath/bn_mp_fread.c
src/libtommath/bn_mp_fwrite.c
src/libtommath/bn_mp_gcd.c
src/libtommath/bn_mp_get_int.c
src/libtommath/bn_mp_grow.c
src/libtommath/bn_mp_init.c
src/libtommath/bn_mp_init_copy.c
src/libtommath/bn_mp_init_multi.c
src/libtommath/bn_mp_init_set.c
src/libtommath/bn_mp_init_set_int.c
src/libtommath/bn_mp_init_size.c
src/libtommath/bn_mp_invmod.c
src/libtommath/bn_mp_invmod_slow.c
src/libtommath/bn_mp_is_square.c
src/libtommath/bn_mp_jacobi.c
src/libtommath/bn_mp_karatsuba_mul.c
src/libtommath/bn_mp_karatsuba_sqr.c
src/libtommath/bn_mp_lcm.c
src/libtommath/bn_mp_lshd.c
src/libtommath/bn_mp_mod.c
src/libtommath/bn_mp_mod_2d.c
src/libtommath/bn_mp_mod_d.c
src/libtommath/bn_mp_montgomery_calc_normalization.c
src/libtommath/bn_mp_montgomery_reduce.c
src/libtommath/bn_mp_montgomery_setup.c
src/libtommath/bn_mp_mul.c
src/libtommath/bn_mp_mulmod.c
src/libtommath/bn_mp_mul_2.c
src/libtommath/bn_mp_mul_2d.c
src/libtommath/bn_mp_mul_d.c
src/libtommath/bn_mp_neg.c
src/libtommath/bn_mp_n_root.c
src/libtommath/bn_mp_or.c
src/libtommath/bn_mp_prime_fermat.c
src/libtommath/bn_mp_prime_is_divisible.c
src/libtommath/bn_mp_prime_is_prime.c
src/libtommath/bn_mp_prime_miller_rabin.c
src/libtommath/bn_mp_prime_next_prime.c
src/libtommath/bn_mp_prime_rabin_miller_trials.c
src/libtommath/bn_mp_prime_random_ex.c
src/libtommath/bn_mp_radix_size.c
src/libtommath/bn_mp_radix_smap.c
src/libtommath/bn_mp_rand.c
src/libtommath/bn_mp_read_radix.c
src/libtommath/bn_mp_read_signed_bin.c
src/libtommath/bn_mp_read_unsigned_bin.c
src/libtommath/bn_mp_reduce.c
src/libtommath/bn_mp_reduce_2k.c
src/libtommath/bn_mp_reduce_2k_l.c
src/libtommath/bn_mp_reduce_2k_setup.c
src/libtommath/bn_mp_reduce_2k_setup_l.c
src/libtommath/bn_mp_reduce_is_2k.c
src/libtommath/bn_mp_reduce_is_2k_l.c
src/libtommath/bn_mp_reduce_setup.c
src/libtommath/bn_mp_rshd.c
src/libtommath/bn_mp_set.c
src/libtommath/bn_mp_set_int.c
src/libtommath/bn_mp_shrink.c
src/libtommath/bn_mp_signed_bin_size.c
src/libtommath/bn_mp_sqr.c
src/libtommath/bn_mp_sqrmod.c
src/libtommath/bn_mp_sqrt.c
src/libtommath/bn_mp_sub.c
src/libtommath/bn_mp_submod.c
src/libtommath/bn_mp_sub_d.c
src/libtommath/bn_mp_toom_mul.c
src/libtommath/bn_mp_toom_sqr.c
src/libtommath/bn_mp_toradix.c
src/libtommath/bn_mp_toradix_n.c
src/libtommath/bn_mp_to_signed_bin.c
src/libtommath/bn_mp_to_signed_bin_n.c
src/libtommath/bn_mp_to_unsigned_bin.c
src/libtommath/bn_mp_to_unsigned_bin_n.c
src/libtommath/bn_mp_unsigned_bin_size.c
src/libtommath/bn_mp_xor.c
src/libtommath/bn_mp_zero.c
src/libtommath/bn_prime_tab.c
src/libtommath/bn_reverse.c
src/libtommath/bn_s_mp_add.c
src/libtommath/bn_s_mp_exptmod.c
src/libtommath/bn_s_mp_mul_digs.c
src/libtommath/bn_s_mp_mul_high_digs.c
src/libtommath/bn_s_mp_sqr.c
src/libtommath/bn_s_mp_sub.c
)
set(BZIP2_FILES
src/bzip2/blocksort.c
src/bzip2/bzlib.c
src/bzip2/compress.c
src/bzip2/crctable.c
src/bzip2/decompress.c
src/bzip2/huffman.c
src/bzip2/randtable.c
)
set(ZLIB_FILES
src/zlib/adler32.c
src/zlib/compress.c
src/zlib/crc32.c
src/zlib/deflate.c
src/zlib/inffast.c
src/zlib/inflate.c
src/zlib/inftrees.c
src/zlib/trees.c
src/zlib/zutil.c
)
set(TEST_SRC_FILES
test/StormTest.cpp
)
add_definitions(-D_7ZIP_ST -DBZ_STRICT_ANSI)
set(LINK_LIBS)
find_package(ZLIB)
if (ZLIB_FOUND)
set(LINK_LIBS ${LINK_LIBS} ZLIB::ZLIB)
add_definitions(-D__SYS_ZLIB)
else()
set(SRC_FILES ${SRC_FILES} ${ZLIB_FILES})
endif()
find_package(BZip2)
if (BZIP2_FOUND)
set(LINK_LIBS ${LINK_LIBS} BZip2::BZip2)
add_definitions(-D__SYS_BZLIB)
else()
set(SRC_FILES ${SRC_FILES} ${BZIP2_FILES})
endif()
if(WIN32)
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
set(LINK_LIBS ${LINK_LIBS} wininet)
else()
option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF)
if(WITH_LIBTOMCRYPT)
include(FindPkgConfig)
pkg_check_modules(PC_LIBTOMCRYPT libtomcrypt REQUIRED)
find_path(LIBTOMCRYPT_INCLUDE_DIR NAMES tomcrypt.h HINTS ${PC_LIBTOMCRYPT_INCLUDE_DIRS} REQUIRED)
find_library(LIBTOMCRYPT_LIBRARY NAMES tomcrypt HINTS ${PC_LIBTOMCRYPT_LIBRARY_DIRS} REQUIRED)
set(LINK_LIBS ${LINK_LIBS} ${LIBTOMCRYPT_LIBRARY})
include_directories(${LIBTOMCRYPT_INCLUDE_DIR})
else()
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
endif()
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
message(STATUS "Using FreeBSD port")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DO_LARGEFILE=0 -Dstat64=stat -Dlstat64=lstat -Dlseek64=lseek -Doff64_t=off_t -Dfstat64=fstat -Dftruncate64=ftruncate")
endif()
if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
# Enable POSIX extensions such as `readlink` and `ftruncate`.
add_definitions(-D_POSIX_C_SOURCE=200809L)
endif()
add_library(${LIBRARY_NAME} ${LIB_TYPE} ${SRC_FILES} ${SRC_ADDITIONAL_FILES} ${STORM_DEF_FILES})
if(WIN32)
set_target_properties(${LIBRARY_NAME} PROPERTIES OUTPUT_NAME "StormLib")
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
use_props(${LIBRARY_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}")
endif()
################################################################################
# Compile definitions
################################################################################
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
target_compile_definitions(${LIBRARY_NAME} PRIVATE
"$<$<CONFIG:Debug>:"
"_DEBUG;"
"_CRT_SECURE_NO_WARNINGS;"
">"
"$<$<CONFIG:Release>:"
"NDEBUG"
">"
WIN32
_LIB
"UNICODE;"
"_UNICODE"
)
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
target_compile_definitions(${LIBRARY_NAME} PRIVATE
"$<$<CONFIG:Debug>:"
"_DEBUG;"
"_CRT_SECURE_NO_WARNINGS;"
">"
"$<$<CONFIG:Release>:"
"NDEBUG;"
">"
"WIN32;"
_LIB
"UNICODE;"
"_UNICODE"
)
endif()
endif()
################################################################################
# MSVC runtime library
################################################################################
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${LIBRARY_NAME} PROPERTY MSVC_RUNTIME_LIBRARY)
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
$<$<CONFIG:Debug>:
MultiThreadedDebug
>
$<$<CONFIG:Release>:
MultiThreaded
>
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
)
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
$<$<CONFIG:Debug>:
MultiThreadedDebug
>
$<$<CONFIG:Release>:
MultiThreaded
>
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
)
endif()
set_target_properties(${LIBRARY_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
endif()
target_link_libraries(${LIBRARY_NAME} ${LINK_LIBS})
target_compile_definitions(${LIBRARY_NAME} INTERFACE STORMLIB_NO_AUTO_LINK) #CMake will take care of the linking
target_include_directories(${LIBRARY_NAME} PUBLIC src/)
set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "src/StormLib.h;src/StormPort.h")
if(BUILD_SHARED_LIBS)
message(STATUS "Linking against dependent libraries dynamically")
if(APPLE)
set_target_properties(${LIBRARY_NAME} PROPERTIES FRAMEWORK true)
set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-framework Carbon")
endif()
if(UNIX)
SET(VERSION_MAJOR "9")
SET(VERSION_MINOR "22")
SET(VERSION_PATCH "0")
SET(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set_target_properties(${LIBRARY_NAME} PROPERTIES VERSION "${VERSION_STRING}")
set_target_properties(${LIBRARY_NAME} PROPERTIES SOVERSION "${VERSION_MAJOR}")
endif()
else()
message(STATUS "Linking against dependent libraries statically")
endif()
if (NOT STORM_SKIP_INSTALL)
install(TARGETS ${LIBRARY_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION /Library/Frameworks
PUBLIC_HEADER DESTINATION include
INCLUDES DESTINATION include)
#CPack configurtion
SET(CPACK_GENERATOR "DEB" "RPM")
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPQ manipulation library")
SET(CPACK_PACKAGE_VENDOR "Ladislav Zezula")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
#DEB configuration
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.zezula.net/en/mpq/stormlib.html")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "imbacen@gmail.com")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g,bzip2")
#RPM configuration
SET(CPACK_RPM_PACKAGE_RELEASE 1)
SET(CPACK_RPM_PACKAGE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
SET(CPACK_RPM_PACKAGE_GROUP "${PROJECT_NAME}")
SET(CPACK_RPM_PACKAGE_URL "http://www.zezula.net/en/mpq/stormlib.html")
SET(CPACK_RPM_PACKAGE_REQUIRES "zlib,bzip2")
INCLUDE(CPack)
endif()
if(STORM_BUILD_TESTS)
add_executable(StormLib_test ${TEST_SRC_FILES})
target_link_libraries(StormLib_test ${LIBRARY_NAME})
install(TARGETS StormLib_test RUNTIME DESTINATION bin)
endif()

22
StormLib/Info.plist

@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>net.zezula.${PRODUCT_NAME:rfc1034Identifier}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>8.01</string>
</dict>
</plist>

21
StormLib/LICENSE

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 1999-2013 Ladislav Zezula
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

34
StormLib/PostBuild.bat

@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
@echo off
rem Post-build batch for StormLib project
rem Called as PostBuild.bat $(ProjectName) $(PlatformName) $(ConfigurationName) [vs2008]
rem Example: PostBuild.bat StormLib_dll x64 Debug vs2008
rem Select build type
if "%1" == "StormLib_dll" goto PostBuild_DLL
if "%1" == "StormLib" goto PostBuild_LIB
goto:eof
:PostBuild_DLL
rem Build steps for the DLL. On 32-bit Release version, increment the build number
if not "x%2" == "xWin32" goto:eof
if not "x%3" == "xRelease" goto:eof
PostBuild.exe .\src\DllMain.rc
goto:eof
:PostBuild_LIB
rem Set target folders
if "x%2" == "xWin32" set TARGET_DIR_LEVEL2=lib32
if "x%2" == "xx64" set TARGET_DIR_LEVEL2=lib64
if "x%4" == "xvs2008" set TARGET_DIR_LEVEL3=vs2008
rem Check & create target folder structure
if not exist ..\aaa goto:eof
if not exist ..\aaa\%TARGET_DIR_LEVEL2% md ..\aaa\%TARGET_DIR_LEVEL2%
if not exist ..\aaa\%TARGET_DIR_LEVEL2%\%TARGET_DIR_LEVEL3% md ..\aaa\%TARGET_DIR_LEVEL2%\%TARGET_DIR_LEVEL3%
rem Copy include and LIB files to the target folder
copy /Y .\src\StormLib.h ..\aaa\inc >nul
copy /Y .\src\StormPort.h ..\aaa\inc >nul
copy /Y .\bin\%1\%2\%3\StormLib???.lib ..\aaa\%TARGET_DIR_LEVEL2%\%TARGET_DIR_LEVEL3% >nul

132
StormLib/Premake5.lua

@ -1,132 +0,0 @@ @@ -1,132 +0,0 @@
solution 'StormLib'
location 'build'
language 'C++'
configurations { 'Debug', 'Release', }
platforms { 'x32', 'x64' }
targetdir 'bin'
objdir 'bin'
files {
'src/**.h',
'src/**.c',
'src/**.cpp',
'doc/*.txt',
}
removefiles {
'src/adpcm/*_old.*',
'src/huffman/*_old.*',
'src/huffman/huff_patch.*',
'src/pklib/crc32.c',
'src/zlib/compress.c',
}
filter 'configurations:Debug*'
flags { 'Symbols' }
defines { '_DEBUG' }
optimize 'Debug'
filter 'configurations:Release*'
defines { 'NDEBUG' }
optimize 'Full'
filter 'system:windows'
links { 'wininet', }
defines { 'WINDOWS', '_WINDOWS' }
filter { 'system:windows', 'platforms:x32' }
defines { 'WIN32', '_WIN32' }
filter { 'system:windows', 'platforms:x64' }
defines { 'WIN64', '_WIN64' }
filter 'system:linux'
defines { '_7ZIP_ST', 'BZ_STRICT_ANSI' }
removefiles {
'src/lzma/C/LzFindMt.*',