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/1962/head
parent
9eb29ed81c
commit
3914781ebf
|
@ -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:
|
|||
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:
|
|||
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:
|
|||
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:
|
|||
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:
|
|||
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:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "libultraship"]
|
||||
path = libultraship
|
||||
url = https://github.com/kenix3/libultraship.git
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
|||
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)
|
||||
|
|
|
@ -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}
|
|||
)
|
||||
|
||||
# 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}")
|
||||
|
||||
|
|
|
@ -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,7 +2,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "Resource.h"
|
||||
#include "src/resource/Resource.h"
|
||||
|
||||
#define MAJOR_VERSION Ship::Version::Deckard
|
||||
|
||||
|
|
|
@ -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)
|
|||
|
||||
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 .
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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...
|
||||
|
|
|
@ -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
|
|
@ -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()
|
|
@ -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>
|
|
@ -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.
|
|
@ -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
|
|
@ -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.*',
|
||||
'src/lzma/C/Threads.*',
|
||||
}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
project 'StormLib'
|
||||
kind 'StaticLib'
|
||||
|
||||
removefiles 'src/SBaseDumpData.cpp'
|
||||
|
||||
configurations {
|
||||
'DebugAD', -- Debug Ansi Dynamic
|
||||
'DebugAS', -- Debug Ansi Static
|
||||
'DebugUD', -- Debug Unicode Dynamic
|
||||
'DebugUS', -- Debug Unicode Static
|
||||
'ReleaseAD', -- Release Ansi Dynamic
|
||||
'ReleaseAS', -- Release Ansi Static
|
||||
'ReleaseUD', -- Release Unicode Dynamic'
|
||||
'ReleaseUS', -- Release Unicode Static
|
||||
}
|
||||
|
||||
configmap {
|
||||
['Debug'] = 'DebugUS',
|
||||
['Release'] = 'ReleaseUS',
|
||||
}
|
||||
|
||||
filter 'configurations:*S'
|
||||
flags { 'StaticRuntime' }
|
||||
|
||||
filter { 'configurations:*U*', 'action:vs*' }
|
||||
flags { 'Unicode' }
|
||||
|
||||
filter { 'configurations:*U*', 'not action:vs*' }
|
||||
defines { 'UNICODE', '_UNICODE' }
|
||||
|
||||
filter 'DebugAD'
|
||||
targetsuffix 'DAD'
|
||||
filter 'ReleaseAD'
|
||||
targetsuffix 'RAD'
|
||||
filter 'DebugAS'
|
||||
targetsuffix 'DAS'
|
||||
filter 'ReleaseAS'
|
||||
targetsuffix 'RAS'
|
||||
filter 'DebugUD'
|
||||
targetsuffix 'DUD'
|
||||
filter 'ReleaseUD'
|
||||
targetsuffix 'RUD'
|
||||
filter 'DebugUS'
|
||||
targetsuffix 'DUS'
|
||||
filter 'ReleaseUS'
|
||||
targetsuffix 'RUS'
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
project 'StormLib_dll'
|
||||
kind 'SharedLib'
|
||||
|
||||
targetname 'Stormlib'
|
||||
|
||||
files {
|
||||
'stormlib_dll/DllMain.c',
|
||||
'stormlib_dll/StormLib.def',
|
||||
}
|
||||
|
||||
removefiles 'src/SBaseDumpData.cpp'
|
||||
|
||||
filter { 'system:windows', 'action:gmake' }
|
||||
linkoptions {
|
||||
'-Xlinker --enable-stdcall-fixup',
|
||||
'../stormlib_dll/StormLib.def',
|
||||
}
|
||||
|
||||
filter 'Debug'
|
||||
targetsuffix '_d'
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
project 'StormLib_test'
|
||||
kind 'ConsoleApp'
|
||||
|
||||
files {
|
||||
'test/StormTest.cpp',
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
@echo off
|
||||
rem This BAT file updates the ZIP file that is to be uploaded to web
|
||||
rem Only use when both 32-bit and 64-bit are properly compiled
|
||||
|
||||
set STORMLIB_NAME=stormlib-9.00
|
||||
|
||||
echo Creating %STORMLIB_NAME%.zip ...
|
||||
cd \Ladik\Appdir
|
||||
zip.exe -ur9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\doc\*
|
||||
zip.exe -ur9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\src\*
|
||||
zip.exe -ur9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\storm_dll\*
|
||||
zip.exe -ur9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\StormLib.xcodeproj\*
|
||||
zip.exe -ur9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\stormlib_dll\*
|
||||
zip.exe -ur9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\test\*
|
||||
zip.exe -u9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\CMakeLists.txt
|
||||
zip.exe -u9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\makefile.*
|
||||
zip.exe -u9 ..\WWW\web\download\%STORMLIB_NAME%.zip StormLib\Info.plist
|
||||
zip.exe -u9 ..\WWW\web\download\ |