fix build on linux
This commit is contained in:
@@ -108,6 +108,7 @@ FIND_PACKAGE(Json REQUIRED)
|
||||
FIND_PACKAGE(lodepng REQUIRED)
|
||||
FIND_PACKAGE(FastNoise2 REQUIRED)
|
||||
FIND_PACKAGE(StormLib REQUIRED)
|
||||
FIND_PACKAGE(CascLib REQUIRED)
|
||||
FIND_PACKAGE(Sol2 REQUIRED)
|
||||
FIND_PACKAGE(Boost 1.60 COMPONENTS thread filesystem system unit_test_framework REQUIRED)
|
||||
FIND_PACKAGE(Qt5 COMPONENTS Widgets OpenGL OpenGLExtensions Network Xml REQUIRED)
|
||||
@@ -209,7 +210,7 @@ collect_files(imguizmo_sources src/external/imguizmo FALSE "*.c;*.cpp;" "")
|
||||
collect_files(imguipiemenu_sources src/external/imguipiemenu FALSE "*.c;*.cpp;" "")
|
||||
collect_files(gradienteditor_sources src/external/qtgradienteditor FALSE "*.c;*.cpp;" "")
|
||||
collect_files(tracy_sources src/external/tracy FALSE "*.c;*.cpp;" "")
|
||||
collect_files(archive_sources src/external/blizzard-archive-library FALSE "*.c;*.cpp;" "")
|
||||
collect_files(archive_sources src/external/blizzard-archive-library/src FALSE "*.c;*.cpp;" "")
|
||||
|
||||
SET(util_sources src/util/exception_to_string.cpp)
|
||||
|
||||
@@ -231,7 +232,7 @@ collect_files(imguizmo_headers src/external/imguizmo FALSE "*.h;*.hpp" "")
|
||||
collect_files(imguipiemenu_headers src/external/imguipiemenu FALSE "*.h;*.hpp" "")
|
||||
collect_files(gradienteditor_headers src/external/qtgradienteditor FALSE "*.h;*.hpp" "")
|
||||
collect_files(tracy_headers src/external/tracy FALSE "*.h;*.hpp" "")
|
||||
collect_files(archive_headers src/external/blizzard-archive-library FALSE "*.h;*.hpp" "")
|
||||
collect_files(archive_headers src/external/blizzard-archive-library/include FALSE "*.h;*.hpp" "")
|
||||
|
||||
IF(WIN32)
|
||||
SET(os_sources include/win/StackWalker.cpp)
|
||||
@@ -311,7 +312,7 @@ ADD_EXECUTABLE(noggit
|
||||
${imguipiemenu_headers}
|
||||
${gradienteditor_headers}
|
||||
${tracy_headers}
|
||||
${archive_sources}
|
||||
${archive_headers}
|
||||
${compiled_resource_files}
|
||||
${compiled_ui_files}
|
||||
${shaders}
|
||||
@@ -322,6 +323,7 @@ TARGET_LINK_LIBRARIES (noggit
|
||||
${OPENGL_LIBRARIES}
|
||||
BlizzardDatabaseLib
|
||||
StormLib
|
||||
CascLib
|
||||
Boost::thread
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
|
||||
@@ -1,31 +1,19 @@
|
||||
// This file is part of Noggit3, licensed under GNU General Public License (version 3).
|
||||
|
||||
#include <noggit/application.hpp>
|
||||
#include <noggit/AsyncLoader.h>
|
||||
#include <noggit/DBC.h>
|
||||
#include <noggit/Log.h>
|
||||
#include <noggit/MPQ.h>
|
||||
#include <noggit/MapView.h>
|
||||
#include <noggit/Model.h>
|
||||
#include <noggit/ModelManager.h> // ModelManager::report()
|
||||
#include <noggit/TextureManager.h> // TextureManager::report()
|
||||
#include <noggit/WMO.h> // WMOManager::report()
|
||||
#include <noggit/errorHandling.h>
|
||||
#include <noggit/liquid_layer.hpp>
|
||||
#include <noggit/ui/main_window.hpp>
|
||||
#include <opengl/context.hpp>
|
||||
#include <opengl/context.inl>
|
||||
#include <util/exception_to_string.hpp>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
|
||||
#include <external/framelesshelper/framelesswindowsmanager.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <string>
|
||||
@@ -48,23 +36,6 @@
|
||||
#include <type_traits>
|
||||
#include "revision.h"
|
||||
|
||||
class Noggit
|
||||
{
|
||||
public:
|
||||
Noggit (int argc, char *argv[]);
|
||||
|
||||
private:
|
||||
void initPath(char *argv[]);
|
||||
void loadMPQs();
|
||||
|
||||
std::unique_ptr<noggit::ui::main_window> main_window;
|
||||
|
||||
boost::filesystem::path wowpath;
|
||||
|
||||
bool fullscreen;
|
||||
bool doAntiAliasing;
|
||||
};
|
||||
|
||||
void Noggit::initPath(char *argv[])
|
||||
{
|
||||
try
|
||||
@@ -387,7 +358,7 @@ int main(int argc, char *argv[])
|
||||
qapp.setApplicationName ("Noggit");
|
||||
qapp.setOrganizationName ("Noggit");
|
||||
|
||||
Noggit app (argc, argv);
|
||||
Noggit::instance(argc, argv);
|
||||
|
||||
return qapp.exec();
|
||||
}
|
||||
|
||||
39
src/noggit/application.hpp
Normal file
39
src/noggit/application.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
// This file is part of Noggit3, licensed under GNU General Public License (version 3).
|
||||
|
||||
#ifndef NOGGIT_APPLICATION_HPP
|
||||
#define NOGGIT_APPLICATION_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace noggit::ui
|
||||
{
|
||||
struct main_window;
|
||||
}
|
||||
|
||||
class Noggit
|
||||
{
|
||||
public:
|
||||
static Noggit* instance(int argc, char *argv[])
|
||||
{
|
||||
static Noggit inst{argc, argv};
|
||||
return &inst;
|
||||
}
|
||||
|
||||
private:
|
||||
Noggit (int argc, char *argv[]);
|
||||
|
||||
void initPath(char *argv[]);
|
||||
void loadMPQs();
|
||||
|
||||
std::unique_ptr<noggit::ui::main_window> main_window;
|
||||
|
||||
boost::filesystem::path wowpath;
|
||||
|
||||
bool fullscreen;
|
||||
bool doAntiAliasing;
|
||||
};
|
||||
|
||||
#define NOGGIT_APP Noggit::instance(0, nullptr)
|
||||
|
||||
#endif //NOGGIT_APPLICATION_HPP
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <noggit/ContextObject.hpp>
|
||||
#include <noggit/Log.h>
|
||||
#include <noggit/MPQ.h>
|
||||
#include <ClientData.hpp>
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
@@ -35,7 +36,8 @@ namespace noggit
|
||||
template<typename T>
|
||||
struct async_object_multimap_with_normalized_key
|
||||
{
|
||||
async_object_multimap_with_normalized_key (std::function<std::string (std::string)> normalize = &mpq::normalized_filename)
|
||||
async_object_multimap_with_normalized_key (std::function<std::string (std::string)> normalize
|
||||
= &BlizzardArchive::ClientData::normalizeFilenameInternal)
|
||||
: _normalize (std::move (normalize))
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user