Re-commit of VS2017/submodule/library changes

This commit is contained in:
Aruki
2018-07-07 17:17:33 -06:00
parent 15e46dc551
commit 6cbc2a3208
17 changed files with 146 additions and 124 deletions

View File

@@ -12,6 +12,9 @@ TEMPLATE = lib
DESTDIR = $$BUILD_DIR/Core
DEFINES += GLEW_STATIC
win32 {
QMAKE_CXXFLAGS += -std:c++17
}
unix {
target.path = /usr/lib
QMAKE_CXXFLAGS += /WX
@@ -26,11 +29,9 @@ CONFIG (debug, debug|release) {
# Debug Libs
LIBS += -L$$BUILD_DIR/Common/ -lCommond \
-L$$BUILD_DIR/Math/ -lMathd \
-L$$EXTERNALS_DIR/assimp/lib/ -lassimp-vc140-mtd \
-L$$EXTERNALS_DIR/lzo-2.09/lib/ -llzo2d \
-L$$EXTERNALS_DIR/nodtool/build/debug/lib/ -lnod \
-L$$EXTERNALS_DIR/nodtool/build/debug/logvisor/ -llogvisor \
-L$$EXTERNALS_DIR/tinyxml2/lib/ -ltinyxml2d \
-L$$EXTERNALS_DIR/assimp/lib/Debug -lassimp-vc140-mt \
-L$$EXTERNALS_DIR/nod/lib/Debug -lnod \
-L$$EXTERNALS_DIR/nod/logvisor/Debug -llogvisor \
-L$$EXTERNALS_DIR/zlib/lib/ -lzlibd
# Debug Target Dependencies
@@ -48,11 +49,9 @@ CONFIG (release, debug|release) {
# Release Libs
LIBS += -L$$BUILD_DIR/Common/ -lCommon \
-L$$BUILD_DIR/Math/ -lMath \
-L$$EXTERNALS_DIR/assimp/lib/ -lassimp-vc140-mt \
-L$$EXTERNALS_DIR/lzo-2.09/lib/ -llzo2 \
-L$$EXTERNALS_DIR/nodtool/build/release/lib/ -lnod \
-L$$EXTERNALS_DIR/nodtool/build/release/logvisor -llogvisor \
-L$$EXTERNALS_DIR/tinyxml2/lib/ -ltinyxml2 \
-L$$EXTERNALS_DIR/assimp/lib/Release -lassimp-vc140-mt \
-L$$EXTERNALS_DIR/nod/lib/Release -lnod \
-L$$EXTERNALS_DIR/nod/logvisor/Release -llogvisor \
-L$$EXTERNALS_DIR/zlib/lib/ -lzlib
# Release Target Dependencies
@@ -63,18 +62,18 @@ CONFIG (release, debug|release) {
}
# Debug/Release Libs
LIBS += -L$$EXTERNALS_DIR/glew-2.0.0/lib/Release/x64 -lglew32s \
LIBS += -L$$EXTERNALS_DIR/glew-2.1.0/lib/Release/x64 -lglew32s \
-lopengl32
# Include Paths
INCLUDEPATH += $$PWE_MAIN_INCLUDE \
$$EXTERNALS_DIR/assimp/include \
$$EXTERNALS_DIR/glew-2.0.0/include \
$$EXTERNALS_DIR/lzo-2.09/include \
$$EXTERNALS_DIR/nodtool/include \
$$EXTERNALS_DIR/nodtool/logvisor/include \
$$EXTERNALS_DIR/tinyxml2/include \
$$EXTERNALS_DIR/zlib/include
$$EXTERNALS_DIR/glew-2.1.0/include \
$$EXTERNALS_DIR/lzo-2.10/include \
$$EXTERNALS_DIR/nod/include \
$$EXTERNALS_DIR/nod/logvisor/include \
$$EXTERNALS_DIR/tinyxml2 \
$$EXTERNALS_DIR/zlib
# Header Files
HEADERS += \
@@ -368,3 +367,8 @@ SOURCES += \
IProgressNotifier.cpp \
Resource/Script/CPropertyNameGenerator.cpp \
Resource/Script/IPropertyNew.cpp
# Library Sources
SOURCES += $$EXTERNALS_DIR/lzo-2.10/src/lzo_init.c \
$$EXTERNALS_DIR/lzo-2.10/src/lzo1x_9x.c \
$$EXTERNALS_DIR/lzo-2.10/src/lzo1x_d1.c

View File

@@ -10,6 +10,8 @@
#include <Common/FileIO.h>
#include <Common/FileUtil.h>
#include <Common/Serialization/CXMLWriter.h>
#include <nod/nod.hpp>
#include <tinyxml2.h>
#define LOAD_PAKS 1
@@ -178,11 +180,11 @@ bool CGameExporter::ExtractDiscData()
FileUtil::MakeDirectory(AbsDiscDir);
// Extract disc filesystem
nod::Partition *pDataPartition = mpDisc->getDataPartition();
nod::IPartition *pDataPartition = mpDisc->getDataPartition();
nod::ExtractionContext Context;
Context.force = false;
Context.progressCB = [&](const std::string& rkDesc, float ProgressPercent) {
mpProgress->Report((int) (ProgressPercent * 10000), 10000, rkDesc);
Context.progressCB = [&](const std::string_view rkDesc, float ProgressPercent) {
mpProgress->Report((int) (ProgressPercent * 10000), 10000, rkDesc.data());
};
TString FilesDir = AbsDiscDir + "files/";
@@ -225,7 +227,7 @@ bool CGameExporter::ExtractDiscNodeRecursive(const nod::Node *pkNode, const TStr
if (Iter->getKind() == nod::Node::Kind::File)
{
TString FilePath = rkDir + Iter->getName();
TString FilePath = rkDir + Iter->getName().data();
bool Success = Iter->extractToDirectory(*rkDir.ToUTF16(), rkContext);
if (!Success) return false;
@@ -239,7 +241,7 @@ bool CGameExporter::ExtractDiscNodeRecursive(const nod::Node *pkNode, const TStr
else
{
TString Subdir = rkDir + Iter->getName() + "/";
TString Subdir = rkDir + Iter->getName().data() + "/";
bool Success = FileUtil::MakeDirectory(Subdir);
if (!Success) return false;

View File

@@ -82,9 +82,9 @@ bool CGameProject::BuildISO(const TString& rkIsoPath, IProgressNotifier *pProgre
ASSERT( FileUtil::IsValidPath(rkIsoPath, false) );
ASSERT( !IsWiiDeAsobu() && !IsTrilogy() );
auto ProgressCallback = [&](float ProgressPercent, const nod::SystemString& rkInfoString, size_t)
auto ProgressCallback = [&](float ProgressPercent, const nod::SystemStringView& rkInfoString, size_t)
{
pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString).ToUTF8());
pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString.data()).ToUTF8());
};
pProgress->SetTask(0, "Building " + rkIsoPath.GetFileName());
@@ -108,9 +108,9 @@ bool CGameProject::MergeISO(const TString& rkIsoPath, nod::DiscWii *pOriginalIso
ASSERT( IsWiiDeAsobu() || IsTrilogy() );
ASSERT( pOriginalIso != nullptr );
auto ProgressCallback = [&](float ProgressPercent, const nod::SystemString& rkInfoString, size_t)
auto ProgressCallback = [&](float ProgressPercent, const nod::SystemStringView& rkInfoString, size_t)
{
pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString).ToUTF8());
pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString.data()).ToUTF8());
};
pProgress->SetTask(0, "Building " + rkIsoPath.GetFileName());

View File

@@ -1092,10 +1092,8 @@ TString CTemplateLoader::ErrorName(XMLError Error)
case XML_ERROR_FILE_NOT_FOUND: return "File not found";
case XML_ERROR_FILE_COULD_NOT_BE_OPENED: return "File could not be opened";
case XML_ERROR_FILE_READ_ERROR: return "File read error";
case XML_ERROR_ELEMENT_MISMATCH: return "Element mismatch";
case XML_ERROR_PARSING_ELEMENT: return "Parsing element";
case XML_ERROR_PARSING_ATTRIBUTE: return "Parsing attribute";
case XML_ERROR_IDENTIFYING_TAG: return "Identifying tag";
case XML_ERROR_PARSING_TEXT: return "Parsing text";
case XML_ERROR_PARSING_CDATA: return "Parsing CData";
case XML_ERROR_PARSING_COMMENT: return "Parsing comment";
@@ -1106,6 +1104,7 @@ TString CTemplateLoader::ErrorName(XMLError Error)
case XML_ERROR_PARSING: return "Parsing";
case XML_CAN_NOT_CONVERT_TEXT: return "Cannot convert text";
case XML_NO_TEXT_NODE: return "No text node";
case XML_ELEMENT_DEPTH_EXCEEDED: return "Element depth exceeded";
default: return "Unknown error";
}
}