Initial round of CMake refactoring
This commit is contained in:
parent
b1fdc7e025
commit
b6191dc330
|
@ -1,5 +1,4 @@
|
||||||
# C++ objects and libs
|
# C++ objects and libs
|
||||||
|
|
||||||
*.slo
|
*.slo
|
||||||
*.lo
|
*.lo
|
||||||
*.o
|
*.o
|
||||||
|
@ -13,7 +12,6 @@
|
||||||
*.ilk
|
*.ilk
|
||||||
|
|
||||||
# Qt-es
|
# Qt-es
|
||||||
|
|
||||||
/.qmake.cache
|
/.qmake.cache
|
||||||
/.qmake.stash
|
/.qmake.stash
|
||||||
*.pro.user
|
*.pro.user
|
||||||
|
@ -28,13 +26,15 @@ Makefile*
|
||||||
*-build-*
|
*-build-*
|
||||||
|
|
||||||
# QtCreator
|
# QtCreator
|
||||||
|
|
||||||
*.autosave
|
*.autosave
|
||||||
|
|
||||||
#QtCtreator Qml
|
#QtCtreator Qml
|
||||||
*.qmlproject.user
|
*.qmlproject.user
|
||||||
*.qmlproject.user.*
|
*.qmlproject.user.*
|
||||||
|
|
||||||
|
#Dew
|
||||||
|
.dew/*
|
||||||
|
|
||||||
# PrimeWorldEditor files
|
# PrimeWorldEditor files
|
||||||
bin/*.log
|
bin/*.log
|
||||||
bin/dump/*
|
bin/dump/*
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
[submodule "externals/tinyxml2"]
|
|
||||||
path = externals/tinyxml2
|
|
||||||
url = https://github.com/leethomason/tinyxml2
|
|
||||||
[submodule "externals/zlib"]
|
|
||||||
path = externals/zlib
|
|
||||||
url = https://github.com/madler/zlib
|
|
||||||
[submodule "externals/assimp"]
|
|
||||||
path = externals/assimp
|
|
||||||
url = https://github.com/assimp/assimp
|
|
||||||
[submodule "externals/nod"]
|
|
||||||
path = externals/nod
|
|
||||||
url=https://gitlab.axiodl.com/AxioDL/nod
|
|
||||||
[submodule "externals/CodeGen"]
|
|
||||||
path = externals/CodeGen
|
|
||||||
url = https://github.com/arukibree/CodeGen
|
|
||||||
[submodule "externals/LibCommon"]
|
|
||||||
path = externals/LibCommon
|
|
||||||
url = https://github.com/arukibree/LibCommon
|
|
||||||
[submodule "externals/lzo"]
|
|
||||||
path = externals/lzo
|
|
||||||
url = https://github.com/nemequ/lzo
|
|
||||||
[submodule "externals/lzokay"]
|
|
||||||
path = externals/lzokay
|
|
||||||
url = https://github.com/jackoalan/lzokay
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
|
project(PrimeWorldEditor CXX)
|
||||||
|
|
||||||
|
include(./dew.cmake)
|
||||||
|
integrate_dew()
|
||||||
|
|
||||||
|
# Set where the binary files will be built. The program will not execute from
|
||||||
|
# here. You must run "make install" to install these to the proper location
|
||||||
|
# as defined above.
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(src/Core)
|
||||||
|
add_subdirectory(src/Editor)
|
|
@ -0,0 +1,75 @@
|
||||||
|
#
|
||||||
|
# Dew Cmake Bootstrap + functionality module
|
||||||
|
# https://github.com/sfuller/dew
|
||||||
|
#
|
||||||
|
# It is not recommended to modify this file, as it may need to be updated to ensure future dew version compatibility.
|
||||||
|
#
|
||||||
|
# It is encouraged to check this file into your project's VCS. Doing so will allow your cmake project to easily
|
||||||
|
# integrate with Dew.
|
||||||
|
#
|
||||||
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
function(integrate_dew)
|
||||||
|
#
|
||||||
|
# Skip everything if we are building from dew
|
||||||
|
#
|
||||||
|
if ($ENV{INVOKED_BY_DEW})
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
|
||||||
|
set(dew_cmake_prefix_suffix debug)
|
||||||
|
else()
|
||||||
|
set(dew_cmake_prefix_suffix release)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(dew_output_path "${CMAKE_CURRENT_SOURCE_DIR}/.dew")
|
||||||
|
set(dew_cmake_prefix_path "${dew_output_path}/prefix-${dew_cmake_prefix_suffix}")
|
||||||
|
set(dew_cmake_module_path "${dew_cmake_prefix_path}/share/cmake/Modules")
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create a warning and return early if dew directory does not exist.
|
||||||
|
#
|
||||||
|
if (NOT EXISTS "${dew_output_path}")
|
||||||
|
message(WARNING "Could not find .dew directory. Please follow the project's instructions for installing and running dew.")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if we have already added the dew directory to CMAKE_PREFIX_PATH
|
||||||
|
#
|
||||||
|
set(needs_new_prefix TRUE)
|
||||||
|
foreach (path ${CMAKE_PREFIX_PATH})
|
||||||
|
if (path STREQUAL "${dew_cmake_prefix_path}")
|
||||||
|
set(needs_new_prefix FALSE)
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if we have already added the dew cmake module directory to CMAKE_MODULE_PATH
|
||||||
|
#
|
||||||
|
set(needs_new_module_path TRUE)
|
||||||
|
foreach (path ${CMAKE_MODULE_PATH})
|
||||||
|
if (path STREQUAL "${dew_cmake_module_path}")
|
||||||
|
set(needs_new_module_path FALSE)
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add dew directory to CMAKE_PREFIX_PATH if necesary
|
||||||
|
#
|
||||||
|
if ("${needs_new_prefix}")
|
||||||
|
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${dew_cmake_prefix_path}" CACHE PATH "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add dew cmake module directory to CMAKE_MODULE_PATH if necesary
|
||||||
|
#
|
||||||
|
if ("${needs_new_module_path}")
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${dew_cmake_module_path}" CACHE PATH "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(DEW_CMAKE_PREFIX_PATH ${dew_cmake_prefix_path} PARENT_SCOPE)
|
||||||
|
endfunction()
|
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "zlib",
|
||||||
|
"url": "https://github.com/madler/zlib",
|
||||||
|
"type": "git",
|
||||||
|
"head": "master",
|
||||||
|
"ref": "cacf7f1d4e3d44d871b605da3b647f07d718623f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "assimp",
|
||||||
|
"url": "https://github.com/jackoalan/assimp",
|
||||||
|
"type": "git",
|
||||||
|
"head": "static-lib-export",
|
||||||
|
"ref": "2c16b2f6c517006367a558c06075584bbd230367",
|
||||||
|
"dependson": [
|
||||||
|
"zlib"
|
||||||
|
],
|
||||||
|
"cmake_defines": {
|
||||||
|
"ASSIMP_BUILD_ZLIB": "OFF",
|
||||||
|
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nod",
|
||||||
|
"url": "https://github.com/AxioDL/nod",
|
||||||
|
"type": "git",
|
||||||
|
"head": "master",
|
||||||
|
"ref": "01237372e17e4470e002efbe100c81ed804eeea3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CodeGen",
|
||||||
|
"url": "https://github.com/jackoalan/CodeGen",
|
||||||
|
"type": "git",
|
||||||
|
"head": "cmake",
|
||||||
|
"ref": "94dc9ac32986f14a734c3523dd85d50ae50f7128"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LibCommon",
|
||||||
|
"url": "https://github.com/jackoalan/LibCommon",
|
||||||
|
"type": "git",
|
||||||
|
"head": "dew",
|
||||||
|
"ref": "4c780619259a31168e6a8ce6e7018b2ea640b3af"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lzo",
|
||||||
|
"url": "https://github.com/nemequ/lzo",
|
||||||
|
"type": "git",
|
||||||
|
"head": "master",
|
||||||
|
"ref": "0083878c235a89ef96a009d1ff0b500f3a364e4b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lzokay",
|
||||||
|
"url": "https://github.com/sfuller/lzokay",
|
||||||
|
"type": "git",
|
||||||
|
"head": "cmake",
|
||||||
|
"ref": "87467048df10e72540a5abcac9dd5c0c4df3a712"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tinyxml2",
|
||||||
|
"url": "https://github.com/leethomason/tinyxml2",
|
||||||
|
"type": "git",
|
||||||
|
"head": "master",
|
||||||
|
"ref": "c483646db00a6a9ac3a8e93f7c490aecb589979d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 8847ab12160ef22174e79b64f1620c7a1abdb2a6
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b16f7e26a1120bffb8e474625cceefc3c48cef99
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit bca41ceba5a76936807ea4d23d14a98444ed89b0
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 0083878c235a89ef96a009d1ff0b500f3a364e4b
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f7da328248f3fea1a5e05d3f39598850383b1867
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit be8409681fd5e921be72a04f460e87f2de5f6280
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit c483646db00a6a9ac3a8e93f7c490aecb589979d
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
|
|
|
@ -1,28 +0,0 @@
|
||||||
# CONFIG += PUBLIC_RELEASE
|
|
||||||
DEFINES += USE_LZOKAY
|
|
||||||
|
|
||||||
win32: {
|
|
||||||
QMAKE_CXXFLAGS += /WX \ # Treat warnings as errors
|
|
||||||
/wd4267 \ # Disable C4267: conversion from 'size_t' to 'type', possible loss of data
|
|
||||||
/wd4100 \ # Disable C4100: unreferenced formal parameter
|
|
||||||
/wd4101 \ # Disable C4101: unreferenced local variable
|
|
||||||
/wd4189 # Disable C4189: local variable is initialized but not referenced
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON -= -w34100 -w34189 # Override C4100 and C4189 being set to w3 in Qt's default .qmake.conf file
|
|
||||||
}
|
|
||||||
|
|
||||||
BUILD_DIR = $$PWD/../build
|
|
||||||
EXTERNALS_DIR = $$PWD/../externals
|
|
||||||
PWE_MAIN_INCLUDE = $$PWD
|
|
||||||
|
|
||||||
DEFINES += 'APP_NAME=\"\\\"Prime World Editor\\\"\"' \
|
|
||||||
'APP_VERSION=\"\\\"1.2.3\\\"\"'
|
|
||||||
|
|
||||||
PUBLIC_RELEASE {
|
|
||||||
DEFINES += 'PUBLIC_RELEASE=1' \
|
|
||||||
'APP_FULL_NAME=\"APP_NAME \\\" v\\\" APP_VERSION\"'
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
DEFINES += 'PUBLIC_RELEASE=0' \
|
|
||||||
'APP_FULL_NAME=\"APP_NAME \\\" v\\\" APP_VERSION \\\" (DEV)\\\"\"'
|
|
||||||
}
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
|
project(pwe_core CXX C)
|
||||||
|
|
||||||
|
find_package(libcommon CONFIG REQUIRED)
|
||||||
|
find_package(codegen CONFIG REQUIRED)
|
||||||
|
find_package(tinyxml2 CONFIG REQUIRED)
|
||||||
|
find_package(nod CONFIG REQUIRED)
|
||||||
|
find_package(logvisor CONFIG REQUIRED)
|
||||||
|
find_package(lzokay CONFIG REQUIRED)
|
||||||
|
find_package(OpenGL REQUIRED)
|
||||||
|
find_package(assimp CONFIG REQUIRED)
|
||||||
|
find_package(zlib REQUIRED)
|
||||||
|
|
||||||
|
include(codegen)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE source_files
|
||||||
|
"*.c"
|
||||||
|
"*.cpp"
|
||||||
|
"*.h"
|
||||||
|
"*.hpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(pwe_core ${source_files})
|
||||||
|
|
||||||
|
target_compile_features(pwe_core PRIVATE cxx_std_17)
|
||||||
|
|
||||||
|
target_include_directories(pwe_core
|
||||||
|
PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OpenGL
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_directories(
|
||||||
|
pwe_core
|
||||||
|
PRIVATE
|
||||||
|
${ASSIMP_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
pwe_core
|
||||||
|
libcommon::libcommon
|
||||||
|
nod::nod
|
||||||
|
logvisor::logvisor
|
||||||
|
lzokay::lzokay
|
||||||
|
OpenGL::GL
|
||||||
|
codegen::codegen
|
||||||
|
"${ZLIB_LIBRARY}"
|
||||||
|
${ASSIMP_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(
|
||||||
|
pwe_core
|
||||||
|
PRIVATE
|
||||||
|
USE_LZOKAY
|
||||||
|
PUBLIC
|
||||||
|
UNICODE
|
||||||
|
GLEW_STATIC
|
||||||
|
)
|
||||||
|
|
||||||
|
get_target_property(pwecore_include_directories pwe_core INCLUDE_DIRECTORIES)
|
||||||
|
|
||||||
|
add_codegen_targets(
|
||||||
|
"${source_files}"
|
||||||
|
codegen_generated_files
|
||||||
|
"${PROJECT_SOURCE_DIR}"
|
||||||
|
"${PROJECT_BINARY_DIR}"
|
||||||
|
"${pwecore_include_directories}"
|
||||||
|
)
|
||||||
|
add_custom_target(pwe_core_codegen DEPENDS ${codegen_generated_files} SOURCES ${source_files})
|
||||||
|
|
||||||
|
# Add the generated sources to the library target
|
||||||
|
target_sources(pwe_core PRIVATE ${codegen_generated_files})
|
|
@ -1,402 +0,0 @@
|
||||||
#-------------------------------------------------
|
|
||||||
#
|
|
||||||
# Project created by QtCreator 2015-12-13T15:31:43
|
|
||||||
#
|
|
||||||
#-------------------------------------------------
|
|
||||||
|
|
||||||
QT -= core gui
|
|
||||||
DEFINES += PWE_CORE
|
|
||||||
|
|
||||||
CONFIG += staticlib
|
|
||||||
TEMPLATE = lib
|
|
||||||
DESTDIR = $$BUILD_DIR/Core
|
|
||||||
DEFINES += GLEW_STATIC
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
QMAKE_CXXFLAGS += -std:c++17
|
|
||||||
}
|
|
||||||
unix {
|
|
||||||
target.path = /usr/lib
|
|
||||||
QMAKE_CXXFLAGS += /WX
|
|
||||||
INSTALLS += target
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG (debug, debug|release) {
|
|
||||||
# Debug Config
|
|
||||||
OBJECTS_DIR = $$BUILD_DIR/Core/debug
|
|
||||||
TARGET = Cored
|
|
||||||
|
|
||||||
# Debug Libs
|
|
||||||
LIBS += -L$$EXTERNALS_DIR/assimp/lib/Debug -lassimp-vc140-mt \
|
|
||||||
-L$$EXTERNALS_DIR/LibCommon/Build -lLibCommond \
|
|
||||||
-L$$EXTERNALS_DIR/nod/lib/Debug -lnod \
|
|
||||||
-L$$EXTERNALS_DIR/nod/logvisor/Debug -llogvisor \
|
|
||||||
-L$$EXTERNALS_DIR/zlib/lib/ -lzlibd
|
|
||||||
|
|
||||||
# Debug Target Dependencies
|
|
||||||
win32 {
|
|
||||||
PRE_TARGETDEPS += $$EXTERNALS_DIR/LibCommon/Build/LibCommond.lib
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG (release, debug|release) {
|
|
||||||
# Release Config
|
|
||||||
OBJECTS_DIR = $$BUILD_DIR/Core/release
|
|
||||||
TARGET = Core
|
|
||||||
|
|
||||||
# Release Libs
|
|
||||||
LIBS += -L$$EXTERNALS_DIR/assimp/lib/Release -lassimp-vc140-mt \
|
|
||||||
-L$$EXTERNALS_DIR/LibCommon/Build -lLibCommon \
|
|
||||||
-L$$EXTERNALS_DIR/nod/lib/Release -lnod \
|
|
||||||
-L$$EXTERNALS_DIR/nod/logvisor/Release -llogvisor \
|
|
||||||
-L$$EXTERNALS_DIR/zlib/lib/ -lzlib
|
|
||||||
|
|
||||||
# Release Target Dependencies
|
|
||||||
win32 {
|
|
||||||
PRE_TARGETDEPS += $$EXTERNALS_DIR/LibCommon/Build/LibCommon.lib
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Debug/Release Libs
|
|
||||||
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/CodeGen/include \
|
|
||||||
$$EXTERNALS_DIR/glew-2.1.0/include \
|
|
||||||
$$EXTERNALS_DIR/LibCommon/Source \
|
|
||||||
$$EXTERNALS_DIR/nod/include \
|
|
||||||
$$EXTERNALS_DIR/nod/logvisor/include \
|
|
||||||
$$EXTERNALS_DIR/tinyxml2 \
|
|
||||||
$$EXTERNALS_DIR/zlib
|
|
||||||
|
|
||||||
# Header Files
|
|
||||||
HEADERS += \
|
|
||||||
Render/CCamera.h \
|
|
||||||
Render/CDrawUtil.h \
|
|
||||||
Render/CGraphics.h \
|
|
||||||
Render/CRenderBucket.h \
|
|
||||||
Render/CRenderer.h \
|
|
||||||
Render/ERenderCommand.h \
|
|
||||||
Render/IRenderable.h \
|
|
||||||
Render/SRenderablePtr.h \
|
|
||||||
Render/SViewInfo.h \
|
|
||||||
Resource/Area/CGameArea.h \
|
|
||||||
Resource/Cooker/CMaterialCooker.h \
|
|
||||||
Resource/Cooker/CModelCooker.h \
|
|
||||||
Resource/Cooker/CSectionMgrOut.h \
|
|
||||||
Resource/Cooker/CTextureEncoder.h \
|
|
||||||
Resource/Cooker/CWorldCooker.h \
|
|
||||||
Resource/Factory/CAnimSetLoader.h \
|
|
||||||
Resource/Factory/CAreaLoader.h \
|
|
||||||
Resource/Factory/CCollisionLoader.h \
|
|
||||||
Resource/Factory/CFontLoader.h \
|
|
||||||
Resource/Factory/CMaterialLoader.h \
|
|
||||||
Resource/Factory/CModelLoader.h \
|
|
||||||
Resource/Factory/CScanLoader.h \
|
|
||||||
Resource/Factory/CScriptLoader.h \
|
|
||||||
Resource/Factory/CStringLoader.h \
|
|
||||||
Resource/Factory/CTextureDecoder.h \
|
|
||||||
Resource/Factory/CWorldLoader.h \
|
|
||||||
Resource/Model/CBasicModel.h \
|
|
||||||
Resource/Model/CModel.h \
|
|
||||||
Resource/Model/CStaticModel.h \
|
|
||||||
Resource/Model/CVertex.h \
|
|
||||||
Resource/Model/SSurface.h \
|
|
||||||
Resource/Script/CScriptLayer.h \
|
|
||||||
Resource/Script/CScriptObject.h \
|
|
||||||
Resource/Script/CScriptTemplate.h \
|
|
||||||
Resource/Script/EVolumeShape.h \
|
|
||||||
Resource/StringTable/CStringTable.h \
|
|
||||||
Resource/Collision/CCollisionMesh.h \
|
|
||||||
Resource/Collision/CCollisionMeshGroup.h \
|
|
||||||
Resource/CFont.h \
|
|
||||||
Resource/CLight.h \
|
|
||||||
Resource/CMaterial.h \
|
|
||||||
Resource/CMaterialPass.h \
|
|
||||||
Resource/CMaterialSet.h \
|
|
||||||
Resource/CResource.h \
|
|
||||||
Resource/CTexture.h \
|
|
||||||
Resource/CWorld.h \
|
|
||||||
Resource/EResType.h \
|
|
||||||
Resource/ETevEnums.h \
|
|
||||||
Resource/ETexelFormat.h \
|
|
||||||
Resource/TResPtr.h \
|
|
||||||
Scene/CCollisionNode.h \
|
|
||||||
Scene/CLightNode.h \
|
|
||||||
Scene/CModelNode.h \
|
|
||||||
Scene/CRootNode.h \
|
|
||||||
Scene/CSceneNode.h \
|
|
||||||
Scene/CScriptNode.h \
|
|
||||||
Scene/CStaticNode.h \
|
|
||||||
Scene/ENodeType.h \
|
|
||||||
ScriptExtra/CDamageableTriggerExtra.h \
|
|
||||||
ScriptExtra/CDoorExtra.h \
|
|
||||||
ScriptExtra/CPointOfInterestExtra.h \
|
|
||||||
ScriptExtra/CScriptExtra.h \
|
|
||||||
ScriptExtra/CSpacePirateExtra.h \
|
|
||||||
ScriptExtra/CWaypointExtra.h \
|
|
||||||
CAreaAttributes.h \
|
|
||||||
CLightParameters.h \
|
|
||||||
CRayCollisionTester.h \
|
|
||||||
SRayIntersection.h \
|
|
||||||
OpenGL/CDynamicVertexBuffer.h \
|
|
||||||
OpenGL/CFramebuffer.h \
|
|
||||||
OpenGL/CIndexBuffer.h \
|
|
||||||
OpenGL/CRenderbuffer.h \
|
|
||||||
OpenGL/CShader.h \
|
|
||||||
OpenGL/CShaderGenerator.h \
|
|
||||||
OpenGL/CUniformBuffer.h \
|
|
||||||
OpenGL/CVertexArrayManager.h \
|
|
||||||
OpenGL/CVertexBuffer.h \
|
|
||||||
OpenGL/GLCommon.h \
|
|
||||||
ScriptExtra/CRadiusSphereExtra.h \
|
|
||||||
Resource/Cooker/CAreaCooker.h \
|
|
||||||
Resource/Model/EVertexAttribute.h \
|
|
||||||
Render/FRenderOptions.h \
|
|
||||||
Scene/FShowFlags.h \
|
|
||||||
Scene/CScene.h \
|
|
||||||
Scene/CSceneIterator.h \
|
|
||||||
Resource/CPoiToWorld.h \
|
|
||||||
Resource/Factory/CPoiToWorldLoader.h \
|
|
||||||
Resource/Cooker/CPoiToWorldCooker.h \
|
|
||||||
Resource/Factory/CSectionMgrIn.h \
|
|
||||||
Resource/Cooker/CScriptCooker.h \
|
|
||||||
ScriptExtra/CSplinePathExtra.h \
|
|
||||||
Resource/Script/CLink.h \
|
|
||||||
Resource/Factory/CSkeletonLoader.h \
|
|
||||||
Scene/CCharacterNode.h \
|
|
||||||
Resource/Factory/CAnimationLoader.h \
|
|
||||||
Render/CBoneTransformData.h \
|
|
||||||
Resource/Factory/CSkinLoader.h \
|
|
||||||
Render/EDepthGroup.h \
|
|
||||||
Scene/CScriptAttachNode.h \
|
|
||||||
ScriptExtra/CSandwormExtra.h \
|
|
||||||
Resource/Collision/CCollisionMaterial.h \
|
|
||||||
GameProject/CGameProject.h \
|
|
||||||
GameProject/CPackage.h \
|
|
||||||
GameProject/CGameExporter.h \
|
|
||||||
GameProject/CResourceStore.h \
|
|
||||||
GameProject/CVirtualDirectory.h \
|
|
||||||
GameProject/CResourceEntry.h \
|
|
||||||
GameProject/CResourceIterator.h \
|
|
||||||
Resource/CDependencyGroup.h \
|
|
||||||
Resource/Factory/CDependencyGroupLoader.h \
|
|
||||||
GameProject/CDependencyTree.h \
|
|
||||||
Resource/Factory/CUnsupportedFormatLoader.h \
|
|
||||||
Resource/Factory/CUnsupportedParticleLoader.h \
|
|
||||||
Resource/Resources.h \
|
|
||||||
Resource/Factory/CResourceFactory.h \
|
|
||||||
GameProject/DependencyListBuilders.h \
|
|
||||||
Resource/CAudioGroup.h \
|
|
||||||
Resource/Factory/CAudioGroupLoader.h \
|
|
||||||
Resource/CAudioLookupTable.h \
|
|
||||||
Resource/CStringList.h \
|
|
||||||
CAudioManager.h \
|
|
||||||
Resource/Factory/CAnimEventLoader.h \
|
|
||||||
Resource/AnimationClasses.h \
|
|
||||||
Resource/Animation/CAnimation.h \
|
|
||||||
Resource/Animation/CAnimationParameters.h \
|
|
||||||
Resource/Animation/CAnimEventData.h \
|
|
||||||
Resource/Animation/CAnimSet.h \
|
|
||||||
Resource/Animation/CSkeleton.h \
|
|
||||||
Resource/Animation/CSkin.h \
|
|
||||||
Resource/Animation/IMetaTransition.h \
|
|
||||||
Resource/Animation/IMetaAnimation.h \
|
|
||||||
GameProject/CAssetNameMap.h \
|
|
||||||
GameProject/AssetNameGeneration.h \
|
|
||||||
GameProject/CGameInfo.h \
|
|
||||||
Resource/CResTypeInfo.h \
|
|
||||||
Resource/Cooker/CResourceCooker.h \
|
|
||||||
Resource/CAudioMacro.h \
|
|
||||||
CompressionUtil.h \
|
|
||||||
Resource/Animation/CSourceAnimData.h \
|
|
||||||
Resource/CMapArea.h \
|
|
||||||
Resource/CSavedStateID.h \
|
|
||||||
IProgressNotifier.h \
|
|
||||||
IUIRelay.h \
|
|
||||||
Resource/CResTypeFilter.h \
|
|
||||||
GameProject/COpeningBanner.h \
|
|
||||||
Resource/Script/Property/CPropertyNameGenerator.h \
|
|
||||||
Resource/Script/Property/IProperty.h \
|
|
||||||
Resource/Script/Property/CEnumProperty.h \
|
|
||||||
Resource/Script/Property/CFlagsProperty.h \
|
|
||||||
Resource/Script/Property/CAssetProperty.h \
|
|
||||||
Resource/Script/Property/CPointerProperty.h \
|
|
||||||
Resource/Script/Property/CArrayProperty.h \
|
|
||||||
Resource/Script/Property/Properties.h \
|
|
||||||
Resource/Script/Property/TPropertyRef.h \
|
|
||||||
Resource/Script/Property/CBoolProperty.h \
|
|
||||||
Resource/Script/Property/CByteProperty.h \
|
|
||||||
Resource/Script/Property/CShortProperty.h \
|
|
||||||
Resource/Script/Property/CIntProperty.h \
|
|
||||||
Resource/Script/Property/CFloatProperty.h \
|
|
||||||
Resource/Script/Property/CStringProperty.h \
|
|
||||||
Resource/Script/Property/CSoundProperty.h \
|
|
||||||
Resource/Script/Property/CAnimationProperty.h \
|
|
||||||
Resource/Script/Property/CSequenceProperty.h \
|
|
||||||
Resource/Script/Property/CSplineProperty.h \
|
|
||||||
Resource/Script/Property/CAnimationSetProperty.h \
|
|
||||||
Resource/Script/Property/CVectorProperty.h \
|
|
||||||
Resource/Script/Property/CColorProperty.h \
|
|
||||||
Resource/Script/Property/CStructProperty.h \
|
|
||||||
Resource/Script/Property/CGuidProperty.h \
|
|
||||||
Resource/Script/CGameTemplate.h \
|
|
||||||
Resource/Script/NPropertyMap.h \
|
|
||||||
Resource/Script/NGameList.h \
|
|
||||||
Resource/StringTable/ELanguage.h \
|
|
||||||
Tweaks/CTweakManager.h \
|
|
||||||
Tweaks/CTweakData.h \
|
|
||||||
Tweaks/CTweakLoader.h \
|
|
||||||
Tweaks/CTweakCooker.h \
|
|
||||||
Resource/Cooker/CStringCooker.h \
|
|
||||||
Resource/Scan/CScan.h \
|
|
||||||
Resource/Scan/SScanParametersMP1.h \
|
|
||||||
Resource/Scan/ELogbookCategory.h \
|
|
||||||
Resource/Cooker/CScanCooker.h \
|
|
||||||
NCoreTests.h \
|
|
||||||
Resource/Collision/SCollisionIndexData.h \
|
|
||||||
Resource/Collision/CCollisionRenderData.h \
|
|
||||||
Resource/Collision/SOBBTreeNode.h \
|
|
||||||
Resource/Collision/CCollidableOBBTree.h
|
|
||||||
|
|
||||||
# Source Files
|
|
||||||
SOURCES += \
|
|
||||||
Render/CCamera.cpp \
|
|
||||||
Render/CDrawUtil.cpp \
|
|
||||||
Render/CGraphics.cpp \
|
|
||||||
Render/CRenderer.cpp \
|
|
||||||
Render/CRenderBucket.cpp \
|
|
||||||
Resource/Area/CGameArea.cpp \
|
|
||||||
Resource/Cooker/CMaterialCooker.cpp \
|
|
||||||
Resource/Cooker/CModelCooker.cpp \
|
|
||||||
Resource/Cooker/CTextureEncoder.cpp \
|
|
||||||
Resource/Cooker/CWorldCooker.cpp \
|
|
||||||
Resource/Factory/CAnimSetLoader.cpp \
|
|
||||||
Resource/Factory/CAreaLoader.cpp \
|
|
||||||
Resource/Factory/CCollisionLoader.cpp \
|
|
||||||
Resource/Factory/CFontLoader.cpp \
|
|
||||||
Resource/Factory/CMaterialLoader.cpp \
|
|
||||||
Resource/Factory/CModelLoader.cpp \
|
|
||||||
Resource/Factory/CScanLoader.cpp \
|
|
||||||
Resource/Factory/CScriptLoader.cpp \
|
|
||||||
Resource/Factory/CStringLoader.cpp \
|
|
||||||
Resource/Factory/CTextureDecoder.cpp \
|
|
||||||
Resource/Factory/CWorldLoader.cpp \
|
|
||||||
Resource/Model/CBasicModel.cpp \
|
|
||||||
Resource/Model/CModel.cpp \
|
|
||||||
Resource/Model/CStaticModel.cpp \
|
|
||||||
Resource/Model/SSurface.cpp \
|
|
||||||
Resource/Script/CScriptObject.cpp \
|
|
||||||
Resource/Script/CScriptTemplate.cpp \
|
|
||||||
Resource/Collision/CCollisionMesh.cpp \
|
|
||||||
Resource/CFont.cpp \
|
|
||||||
Resource/CLight.cpp \
|
|
||||||
Resource/CMaterial.cpp \
|
|
||||||
Resource/CMaterialPass.cpp \
|
|
||||||
Resource/CTexture.cpp \
|
|
||||||
Resource/CWorld.cpp \
|
|
||||||
Scene/CCollisionNode.cpp \
|
|
||||||
Scene/CLightNode.cpp \
|
|
||||||
Scene/CModelNode.cpp \
|
|
||||||
Scene/CSceneNode.cpp \
|
|
||||||
Scene/CScriptNode.cpp \
|
|
||||||
Scene/CStaticNode.cpp \
|
|
||||||
ScriptExtra/CDamageableTriggerExtra.cpp \
|
|
||||||
ScriptExtra/CDoorExtra.cpp \
|
|
||||||
ScriptExtra/CPointOfInterestExtra.cpp \
|
|
||||||
ScriptExtra/CScriptExtra.cpp \
|
|
||||||
ScriptExtra/CSpacePirateExtra.cpp \
|
|
||||||
ScriptExtra/CWaypointExtra.cpp \
|
|
||||||
CAreaAttributes.cpp \
|
|
||||||
CRayCollisionTester.cpp \
|
|
||||||
OpenGL/CDynamicVertexBuffer.cpp \
|
|
||||||
OpenGL/CFramebuffer.cpp \
|
|
||||||
OpenGL/CIndexBuffer.cpp \
|
|
||||||
OpenGL/CShader.cpp \
|
|
||||||
OpenGL/CShaderGenerator.cpp \
|
|
||||||
OpenGL/CVertexArrayManager.cpp \
|
|
||||||
OpenGL/CVertexBuffer.cpp \
|
|
||||||
OpenGL/GLCommon.cpp \
|
|
||||||
ScriptExtra/CRadiusSphereExtra.cpp \
|
|
||||||
Resource/Cooker/CAreaCooker.cpp \
|
|
||||||
Scene/FShowFlags.cpp \
|
|
||||||
Scene/CScene.cpp \
|
|
||||||
Scene/CSceneIterator.cpp \
|
|
||||||
Resource/CPoiToWorld.cpp \
|
|
||||||
Resource/Factory/CPoiToWorldLoader.cpp \
|
|
||||||
Resource/Cooker/CPoiToWorldCooker.cpp \
|
|
||||||
Resource/Cooker/CScriptCooker.cpp \
|
|
||||||
ScriptExtra/CSplinePathExtra.cpp \
|
|
||||||
Resource/Factory/CSkeletonLoader.cpp \
|
|
||||||
Scene/CCharacterNode.cpp \
|
|
||||||
Resource/Factory/CAnimationLoader.cpp \
|
|
||||||
Resource/Factory/CSkinLoader.cpp \
|
|
||||||
Resource/Model/EVertexAttribute.cpp \
|
|
||||||
Scene/CScriptAttachNode.cpp \
|
|
||||||
ScriptExtra/CSandwormExtra.cpp \
|
|
||||||
Resource/Collision/CCollisionMaterial.cpp \
|
|
||||||
GameProject/CGameProject.cpp \
|
|
||||||
GameProject/CGameExporter.cpp \
|
|
||||||
GameProject/CResourceStore.cpp \
|
|
||||||
GameProject/CVirtualDirectory.cpp \
|
|
||||||
GameProject/CResourceEntry.cpp \
|
|
||||||
GameProject/CPackage.cpp \
|
|
||||||
Resource/Factory/CDependencyGroupLoader.cpp \
|
|
||||||
GameProject/CDependencyTree.cpp \
|
|
||||||
Resource/Factory/CUnsupportedFormatLoader.cpp \
|
|
||||||
Resource/Factory/CUnsupportedParticleLoader.cpp \
|
|
||||||
GameProject/DependencyListBuilders.cpp \
|
|
||||||
Resource/Factory/CAudioGroupLoader.cpp \
|
|
||||||
CAudioManager.cpp \
|
|
||||||
Resource/Factory/CAnimEventLoader.cpp \
|
|
||||||
Resource/Animation/CAnimation.cpp \
|
|
||||||
Resource/Animation/CAnimationParameters.cpp \
|
|
||||||
Resource/Animation/CSkeleton.cpp \
|
|
||||||
Resource/Animation/IMetaAnimation.cpp \
|
|
||||||
Resource/Animation/IMetaTransition.cpp \
|
|
||||||
GameProject/AssetNameGeneration.cpp \
|
|
||||||
GameProject/CAssetNameMap.cpp \
|
|
||||||
GameProject/CGameInfo.cpp \
|
|
||||||
Resource/CResTypeInfo.cpp \
|
|
||||||
CompressionUtil.cpp \
|
|
||||||
IUIRelay.cpp \
|
|
||||||
GameProject\COpeningBanner.cpp \
|
|
||||||
IProgressNotifier.cpp \
|
|
||||||
Resource/Script/Property/CPropertyNameGenerator.cpp \
|
|
||||||
Resource/Script/Property/IProperty.cpp \
|
|
||||||
Resource/Script/Property/CStructProperty.cpp \
|
|
||||||
Resource/Script/Property/CFlagsProperty.cpp \
|
|
||||||
Resource/Script/CGameTemplate.cpp \
|
|
||||||
Resource/Script/NPropertyMap.cpp \
|
|
||||||
Resource/Script/NGameList.cpp \
|
|
||||||
Resource/StringTable/CStringTable.cpp \
|
|
||||||
Tweaks/CTweakManager.cpp \
|
|
||||||
Tweaks/CTweakLoader.cpp \
|
|
||||||
Tweaks/CTweakCooker.cpp \
|
|
||||||
Resource/Cooker/CStringCooker.cpp \
|
|
||||||
Resource/Scan/CScan.cpp \
|
|
||||||
Resource/Cooker/CScanCooker.cpp \
|
|
||||||
NCoreTests.cpp \
|
|
||||||
Resource/Collision/CCollisionRenderData.cpp \
|
|
||||||
Resource/Collision/CCollidableOBBTree.cpp
|
|
||||||
|
|
||||||
# Codegen
|
|
||||||
CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen
|
|
||||||
CODEGEN_OUT_PATH = $$BUILD_DIR/Core/codegen_build/auto_codegen.cpp
|
|
||||||
CODEGEN_SRC_PATH = $$PWD
|
|
||||||
include($$EXTERNALS_DIR/CodeGen/codegen.pri)
|
|
||||||
|
|
||||||
# LZO
|
|
||||||
contains(DEFINES, USE_LZOKAY) {
|
|
||||||
INCLUDEPATH += $$EXTERNALS_DIR/lzokay
|
|
||||||
SOURCES += $$EXTERNALS_DIR/lzokay/lzokay.cpp
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += $$EXTERNALS_DIR/lzo/include
|
|
||||||
|
|
||||||
SOURCES += $$EXTERNALS_DIR/lzo/src/lzo_init.c \
|
|
||||||
$$EXTERNALS_DIR/lzo/src/lzo1x_9x.c \
|
|
||||||
$$EXTERNALS_DIR/lzo/src/lzo1x_d1.c
|
|
||||||
}
|
|
|
@ -23,7 +23,8 @@ CResourceStore::CResourceStore(const TString& rkDatabasePath)
|
||||||
{
|
{
|
||||||
mpDatabaseRoot = new CVirtualDirectory(this);
|
mpDatabaseRoot = new CVirtualDirectory(this);
|
||||||
mDatabasePath = FileUtil::MakeAbsolute(rkDatabasePath.GetFileDirectory());
|
mDatabasePath = FileUtil::MakeAbsolute(rkDatabasePath.GetFileDirectory());
|
||||||
LoadDatabaseCache();
|
if ((mDatabasePathExists = FileUtil::IsDirectory(mDatabasePath)))
|
||||||
|
LoadDatabaseCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main constructor for game projects and game exporter
|
// Main constructor for game projects and game exporter
|
||||||
|
|
|
@ -36,6 +36,7 @@ class CResourceStore
|
||||||
|
|
||||||
// Directory paths
|
// Directory paths
|
||||||
TString mDatabasePath;
|
TString mDatabasePath;
|
||||||
|
bool mDatabasePathExists;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CResourceStore(const TString& rkDatabasePath);
|
CResourceStore(const TString& rkDatabasePath);
|
||||||
|
@ -80,6 +81,7 @@ public:
|
||||||
inline CGameProject* Project() const { return mpProj; }
|
inline CGameProject* Project() const { return mpProj; }
|
||||||
inline EGame Game() const { return mGame; }
|
inline EGame Game() const { return mGame; }
|
||||||
inline TString DatabaseRootPath() const { return mDatabasePath; }
|
inline TString DatabaseRootPath() const { return mDatabasePath; }
|
||||||
|
inline bool DatabasePathExists() const { return mDatabasePathExists; }
|
||||||
inline TString ResourcesDir() const { return IsEditorStore() ? DatabaseRootPath() : DatabaseRootPath() + "Resources/"; }
|
inline TString ResourcesDir() const { return IsEditorStore() ? DatabaseRootPath() : DatabaseRootPath() + "Resources/"; }
|
||||||
inline TString DatabasePath() const { return DatabaseRootPath() + "ResourceDatabaseCache.bin"; }
|
inline TString DatabasePath() const { return DatabaseRootPath() + "ResourceDatabaseCache.bin"; }
|
||||||
inline CVirtualDirectory* RootDirectory() const { return mpDatabaseRoot; }
|
inline CVirtualDirectory* RootDirectory() const { return mpDatabaseRoot; }
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,6 @@
|
||||||
#include <Common/Math/CMatrix4f.h>
|
#include <Common/Math/CMatrix4f.h>
|
||||||
#include <Common/Math/CVector3f.h>
|
#include <Common/Math/CVector3f.h>
|
||||||
#include <Common/Math/CVector4f.h>
|
#include <Common/Math/CVector4f.h>
|
||||||
#include <GL/glew.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* todo: this entire thing needs to be further abstracted, other classes shouldn't
|
* todo: this entire thing needs to be further abstracted, other classes shouldn't
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include <Common/Math/CAABox.h>
|
#include <Common/Math/CAABox.h>
|
||||||
#include <Common/Math/CMatrix4f.h>
|
#include <Common/Math/CMatrix4f.h>
|
||||||
|
|
||||||
#include <GL/glew.h>
|
|
||||||
|
|
||||||
enum class EBloomMode
|
enum class EBloomMode
|
||||||
{
|
{
|
||||||
NoBloom,
|
NoBloom,
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
|
|
||||||
#include <GL/glew.h>
|
|
||||||
|
|
||||||
CBasicViewport::CBasicViewport(QWidget *pParent)
|
CBasicViewport::CBasicViewport(QWidget *pParent)
|
||||||
: QOpenGLWidget(pParent)
|
: QOpenGLWidget(pParent)
|
||||||
, mLastDrawTime(CTimer::GlobalTime())
|
, mLastDrawTime(CTimer::GlobalTime())
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <GL/glew.h>
|
|
||||||
|
|
||||||
class CBasicViewport : public QOpenGLWidget
|
class CBasicViewport : public QOpenGLWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
|
# obtain revision info from git
|
||||||
|
find_package(Git)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
# make sure version information gets re-run when the current Git HEAD changes
|
||||||
|
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --git-path HEAD
|
||||||
|
OUTPUT_VARIABLE pwe_git_head_filename
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${pwe_git_head_filename}")
|
||||||
|
|
||||||
|
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --symbolic-full-name HEAD
|
||||||
|
OUTPUT_VARIABLE pwe_git_head_symbolic
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
COMMAND ${GIT_EXECUTABLE} rev-parse --git-path ${pwe_git_head_symbolic}
|
||||||
|
OUTPUT_VARIABLE pwe_git_head_symbolic_filename
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${pwe_git_head_symbolic_filename}")
|
||||||
|
|
||||||
|
# defines PWE_WC_REVISION
|
||||||
|
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
||||||
|
OUTPUT_VARIABLE PWE_WC_REVISION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# defines PWE_WC_DESCRIBE
|
||||||
|
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
|
||||||
|
OUTPUT_VARIABLE PWE_WC_DESCRIBE
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
# remove hash (and trailing "-0" if needed) from description
|
||||||
|
string(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" PWE_WC_DESCRIBE "${PWE_WC_DESCRIBE}")
|
||||||
|
|
||||||
|
# defines PWE_WC_BRANCH
|
||||||
|
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||||
|
OUTPUT_VARIABLE PWE_WC_BRANCH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (PWE_WC_DESCRIBE)
|
||||||
|
string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+)\-([0-9]+).*" "\\1.\\2.\\3.\\4" PWE_VERSION_STRING "${PWE_WC_DESCRIBE}")
|
||||||
|
string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+).*" "\\1.\\2.\\3" PWE_VERSION_STRING "${PWE_VERSION_STRING}")
|
||||||
|
else()
|
||||||
|
set(PWE_WC_DESCRIBE "UNKNOWN-VERSION")
|
||||||
|
set(PWE_VERSION_STRING "0.0.0")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(pwe_editor LANGUAGES CXX VERSION ${PWE_VERSION_STRING})
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(QT_PLATFORM_COMPONENTS WinExtras)
|
||||||
|
set(QT_PLATFORM_COMPONENTS_LIBS Qt5::WinExtras)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Qt5 COMPONENTS Core Widgets ${QT_PLATFORM_COMPONENTS} REQUIRED)
|
||||||
|
find_package(assimp CONFIG REQUIRED)
|
||||||
|
|
||||||
|
# AssImp's cmake config is pretty awful. It doesn't include necesary libraries. Hopefully this can be fixed later.
|
||||||
|
find_library(IIRXML_LIBRARY IrrXMLd IrrXML)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE source_files
|
||||||
|
"*.cpp"
|
||||||
|
"*.h"
|
||||||
|
"*.hpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(pwe_editor ${source_files})
|
||||||
|
|
||||||
|
target_compile_features(pwe_editor PRIVATE cxx_std_17)
|
||||||
|
|
||||||
|
target_link_directories(
|
||||||
|
pwe_editor
|
||||||
|
PRIVATE
|
||||||
|
${ASSIMP_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
pwe_editor
|
||||||
|
pwe_core
|
||||||
|
Qt5::Widgets
|
||||||
|
${QT_PLATFORM_COMPONENTS_LIBS}
|
||||||
|
${ASSIMP_LIBRARIES}
|
||||||
|
"${IIRXML_LIBRARY}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO: These should be drive by CI if CI ever becomes a thing for PWE.
|
||||||
|
set(PWE_APP_NAME "Prime World Editor")
|
||||||
|
|
||||||
|
target_compile_definitions(
|
||||||
|
pwe_editor
|
||||||
|
PRIVATE
|
||||||
|
"APP_NAME=\"${PWE_APP_NAME}\""
|
||||||
|
"APP_VERSION=\"${PROJECT_VERSION}\""
|
||||||
|
"PUBLIC_RELEASE=1"
|
||||||
|
"APP_FULL_NAME=\"${PWE_APP_NAME} ${PWE_WC_DESCRIBE}\""
|
||||||
|
UNICODE
|
||||||
|
)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
find_program(WINDEPLOYQT_PROGRAM windeployqt PATHS $ENV{QTDIR}/bin/)
|
||||||
|
if(WINDEPLOYQT_PROGRAM)
|
||||||
|
message(STATUS "Found ${WINDEPLOYQT_PROGRAM}")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unable to find windeployqt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# run windeployqt to gather necessary .dlls
|
||||||
|
add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${WINDEPLOYQT_PROGRAM} ARGS $<TARGET_FILE:pwe_editor>)
|
||||||
|
|
||||||
|
# copy bin directory of dew prefix
|
||||||
|
add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory
|
||||||
|
"${DEW_CMAKE_PREFIX_PATH}/bin" $<TARGET_FILE_DIR:pwe_editor>)
|
||||||
|
endif()
|
|
@ -1,334 +0,0 @@
|
||||||
#-------------------------------------------------
|
|
||||||
#
|
|
||||||
# Project created by QtCreator 2015-12-13T15:34:33
|
|
||||||
#
|
|
||||||
#-------------------------------------------------
|
|
||||||
|
|
||||||
QT += core gui opengl widgets
|
|
||||||
DEFINES += PWE_EDITOR
|
|
||||||
RESOURCES += Icons.qrc
|
|
||||||
|
|
||||||
win32: {
|
|
||||||
QMAKE_CXXFLAGS += /WX \
|
|
||||||
-std:c++17
|
|
||||||
|
|
||||||
RC_ICONS += icons/AppIcon.ico
|
|
||||||
QT += winextras
|
|
||||||
}
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
DESTDIR = $$PWD/../../bin
|
|
||||||
UI_DIR = $$BUILD_DIR/Editor
|
|
||||||
DEFINES += GLEW_STATIC
|
|
||||||
|
|
||||||
!PUBLIC_RELEASE {
|
|
||||||
CONFIG += console
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
# Debug Config
|
|
||||||
OBJECTS_DIR = $$BUILD_DIR/Editor/debug
|
|
||||||
MOC_DIR = $$BUILD_DIR/Editor/debug
|
|
||||||
RCC_DIR = $$BUILD_DIR/Editor/debug
|
|
||||||
TARGET = PrimeWorldEditor-debug
|
|
||||||
|
|
||||||
# Debug Libs
|
|
||||||
LIBS += -L$$BUILD_DIR/Core/ -lCored \
|
|
||||||
-L$$EXTERNALS_DIR/assimp/lib/Debug -lassimp-vc140-mt \
|
|
||||||
-L$$EXTERNALS_DIR/LibCommon/Build -lLibCommond \
|
|
||||||
-L$$EXTERNALS_DIR/nod/lib/Debug -lnod \
|
|
||||||
-L$$EXTERNALS_DIR/nod/logvisor/Debug -llogvisor \
|
|
||||||
-L$$EXTERNALS_DIR/zlib/lib/ -lzlibd
|
|
||||||
|
|
||||||
# Debug Target Dependencies
|
|
||||||
win32 {
|
|
||||||
PRE_TARGETDEPS += $$EXTERNALS_DIR/LibCommon/Build/LibCommond.lib \
|
|
||||||
$$BUILD_DIR/Core/Cored.lib
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG(release, debug|release) {
|
|
||||||
# Release Config
|
|
||||||
OBJECTS_DIR = $$BUILD_DIR/Editor/release
|
|
||||||
MOC_DIR = $$BUILD_DIR/Editor/release
|
|
||||||
RCC_DIR = $$BUILD_DIR/Editor/release
|
|
||||||
TARGET = PrimeWorldEditor
|
|
||||||
|
|
||||||
# Release Libs
|
|
||||||
LIBS += -L$$BUILD_DIR/Core/ -lCore \
|
|
||||||
-L$$EXTERNALS_DIR/assimp/lib/Release -lassimp-vc140-mt \
|
|
||||||
-L$$EXTERNALS_DIR/LibCommon/Build -lLibCommon \
|
|
||||||
-L$$EXTERNALS_DIR/nod/lib/Release -lnod \
|
|
||||||
-L$$EXTERNALS_DIR/nod/logvisor/Release -llogvisor \
|
|
||||||
-L$$EXTERNALS_DIR/zlib/lib/ -lzlib
|
|
||||||
|
|
||||||
# Release Target Dependencies
|
|
||||||
win32 {
|
|
||||||
PRE_TARGETDEPS += $$EXTERNALS_DIR/LibCommon/Build/LibCommon.lib \
|
|
||||||
$$BUILD_DIR/Core/Core.lib
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Debug/Release Libs
|
|
||||||
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/CodeGen/include \
|
|
||||||
$$EXTERNALS_DIR/glew-2.1.0/include \
|
|
||||||
$$EXTERNALS_DIR/LibCommon/Source \
|
|
||||||
$$EXTERNALS_DIR/nod/include \
|
|
||||||
$$EXTERNALS_DIR/nod/logvisor/include \
|
|
||||||
$$EXTERNALS_DIR/tinyxml2 \
|
|
||||||
$$EXTERNALS_DIR/zlib
|
|
||||||
|
|
||||||
# Header Files
|
|
||||||
HEADERS += \
|
|
||||||
ModelEditor/CModelEditorViewport.h \
|
|
||||||
ModelEditor/CModelEditorWindow.h \
|
|
||||||
Undo/CClearSelectionCommand.h \
|
|
||||||
Undo/CDeselectNodeCommand.h \
|
|
||||||
Undo/CRotateNodeCommand.h \
|
|
||||||
Undo/CScaleNodeCommand.h \
|
|
||||||
Undo/CSelectNodeCommand.h \
|
|
||||||
Undo/CTranslateNodeCommand.h \
|
|
||||||
Undo/EUndoCommand.h \
|
|
||||||
Undo/UndoCommands.h \
|
|
||||||
Widgets/WColorPicker.h \
|
|
||||||
Widgets/WDraggableSpinBox.h \
|
|
||||||
Widgets/WIntegralSpinBox.h \
|
|
||||||
Widgets/WVectorEditor.h \
|
|
||||||
WorldEditor/CLayerEditor.h \
|
|
||||||
WorldEditor/CLayerModel.h \
|
|
||||||
WorldEditor/CLinkModel.h \
|
|
||||||
WorldEditor/CWorldEditor.h \
|
|
||||||
WorldEditor/WCreateTab.h \
|
|
||||||
WorldEditor/WInstancesTab.h \
|
|
||||||
WorldEditor/WModifyTab.h \
|
|
||||||
CBasicViewport.h \
|
|
||||||
CGizmo.h \
|
|
||||||
CNodeSelection.h \
|
|
||||||
CSceneViewport.h \
|
|
||||||
INodeEditor.h \
|
|
||||||
TestDialog.h \
|
|
||||||
UICommon.h \
|
|
||||||
CErrorLogDialog.h \
|
|
||||||
Undo/CSelectAllCommand.h \
|
|
||||||
Undo/CInvertSelectionCommand.h \
|
|
||||||
WorldEditor/CPoiMapModel.h \
|
|
||||||
WorldEditor/CPoiListDialog.h \
|
|
||||||
PropertyEdit/CPropertyModel.h \
|
|
||||||
PropertyEdit/CPropertyDelegate.h \
|
|
||||||
PropertyEdit/CPropertyView.h \
|
|
||||||
PropertyEdit/CPropertyRelay.h \
|
|
||||||
WorldEditor/CInstancesProxyModel.h \
|
|
||||||
WorldEditor/CInstancesModel.h \
|
|
||||||
Undo/CEditScriptPropertyCommand.h \
|
|
||||||
Undo/CResizeScriptArrayCommand.h \
|
|
||||||
Undo/IUndoCommand.h \
|
|
||||||
WorldEditor/WEditorProperties.h \
|
|
||||||
Undo/CChangeLayerCommand.h \
|
|
||||||
WorldEditor/CTemplateEditDialog.h \
|
|
||||||
WorldEditor/CLinkDialog.h \
|
|
||||||
WorldEditor/CStateMessageModel.h \
|
|
||||||
WorldEditor/CSelectInstanceDialog.h \
|
|
||||||
Undo/CAddLinkCommand.h \
|
|
||||||
Undo/CDeleteLinksCommand.h \
|
|
||||||
Undo/CEditLinkCommand.h \
|
|
||||||
WorldEditor/CConfirmUnlinkDialog.h \
|
|
||||||
Undo/CDeleteSelectionCommand.h \
|
|
||||||
Undo/CCreateInstanceCommand.h \
|
|
||||||
WorldEditor/CTemplateMimeData.h \
|
|
||||||
WorldEditor/CTemplateListView.h \
|
|
||||||
CSelectionIterator.h \
|
|
||||||
Undo/ObjReferences.h \
|
|
||||||
Undo/CCloneSelectionCommand.h \
|
|
||||||
CNodeCopyMimeData.h \
|
|
||||||
Undo/CPasteNodesCommand.h \
|
|
||||||
CAboutDialog.h \
|
|
||||||
CharacterEditor/CCharacterEditor.h \
|
|
||||||
CharacterEditor/CCharacterEditorViewport.h \
|
|
||||||
CGridRenderable.h \
|
|
||||||
CharacterEditor/CSkeletonHierarchyModel.h \
|
|
||||||
CLineRenderable.h \
|
|
||||||
WorldEditor/CCollisionRenderSettingsDialog.h \
|
|
||||||
ResourceBrowser/CResourceBrowser.h \
|
|
||||||
ResourceBrowser/CResourceTableModel.h \
|
|
||||||
ResourceBrowser/CResourceProxyModel.h \
|
|
||||||
ResourceBrowser/CVirtualDirectoryModel.h \
|
|
||||||
CEditorApplication.h \
|
|
||||||
IEditor.h \
|
|
||||||
Widgets/CResourceSelector.h \
|
|
||||||
CExportGameDialog.h \
|
|
||||||
WorldEditor/CScriptEditSidebar.h \
|
|
||||||
WorldEditor/CWorldInfoSidebar.h \
|
|
||||||
WorldEditor/CWorldTreeModel.h \
|
|
||||||
Widgets/CTimedLineEdit.h \
|
|
||||||
CProjectSettingsDialog.h \
|
|
||||||
WorldEditor/CPoiMapSidebar.h \
|
|
||||||
WorldEditor/CWorldEditorSidebar.h \
|
|
||||||
CProgressDialog.h \
|
|
||||||
IProgressNotifierUI.h \
|
|
||||||
CUIRelay.h \
|
|
||||||
Widgets/CSelectResourcePanel.h \
|
|
||||||
Widgets/CFilteredResourceModel.h \
|
|
||||||
ResourceBrowser/CResourceDelegate.h \
|
|
||||||
ResourceBrowser/CResourceTableContextMenu.h \
|
|
||||||
ResourceBrowser/CResourceMimeData.h \
|
|
||||||
ResourceBrowser/CResourceTableView.h \
|
|
||||||
Undo/CMoveResourceCommand.h \
|
|
||||||
Undo/CMoveDirectoryCommand.h \
|
|
||||||
Undo/CRenameResourceCommand.h \
|
|
||||||
Undo/CRenameDirectoryCommand.h \
|
|
||||||
CFileNameValidator.h \
|
|
||||||
Undo/ICreateDeleteDirectoryCommand.h \
|
|
||||||
ResourceBrowser/CVirtualDirectoryTreeView.h \
|
|
||||||
CPropertyNameValidator.h \
|
|
||||||
Widgets/CSoftValidatorLineEdit.h \
|
|
||||||
Widgets/CValidityLabel.h \
|
|
||||||
CGeneratePropertyNamesDialog.h \
|
|
||||||
CProgressBarNotifier.h \
|
|
||||||
Widgets/CCheckableTreeWidgetItem.h \
|
|
||||||
Widgets/CCheckableTreeWidget.h \
|
|
||||||
Undo/IEditPropertyCommand.h \
|
|
||||||
Widgets/TEnumComboBox.h \
|
|
||||||
StringEditor/CStringEditor.h \
|
|
||||||
StringEditor/CStringListModel.h \
|
|
||||||
StringEditor/CStringDelegate.h \
|
|
||||||
CCustomDelegate.h \
|
|
||||||
CTweakEditor.h \
|
|
||||||
Undo/CEditIntrinsicPropertyCommand.h \
|
|
||||||
Undo/TSerializeUndoCommand.h \
|
|
||||||
StringEditor/CStringMimeData.h \
|
|
||||||
ScanEditor/CScanEditor.h \
|
|
||||||
Undo/ICreateDeleteResourceCommand.h \
|
|
||||||
Undo/CSaveStoreCommand.h \
|
|
||||||
CollisionEditor/CCollisionEditor.h \
|
|
||||||
CollisionEditor/CCollisionEditorViewport.h \
|
|
||||||
NDolphinIntegration.h \
|
|
||||||
CQuickplayPropertyEditor.h
|
|
||||||
|
|
||||||
# Source Files
|
|
||||||
SOURCES += \
|
|
||||||
ModelEditor/CModelEditorViewport.cpp \
|
|
||||||
ModelEditor/CModelEditorWindow.cpp \
|
|
||||||
Undo/CRotateNodeCommand.cpp \
|
|
||||||
Undo/CScaleNodeCommand.cpp \
|
|
||||||
Undo/CTranslateNodeCommand.cpp \
|
|
||||||
Widgets/WColorPicker.cpp \
|
|
||||||
Widgets/WDraggableSpinBox.cpp \
|
|
||||||
Widgets/WIntegralSpinBox.cpp \
|
|
||||||
Widgets/WVectorEditor.cpp \
|
|
||||||
WorldEditor/CLayerEditor.cpp \
|
|
||||||
WorldEditor/CLayerModel.cpp \
|
|
||||||
WorldEditor/CLinkModel.cpp \
|
|
||||||
WorldEditor/CWorldEditor.cpp \
|
|
||||||
WorldEditor/WCreateTab.cpp \
|
|
||||||
WorldEditor/WInstancesTab.cpp \
|
|
||||||
WorldEditor/WModifyTab.cpp \
|
|
||||||
CBasicViewport.cpp \
|
|
||||||
CGizmo.cpp \
|
|
||||||
CSceneViewport.cpp \
|
|
||||||
INodeEditor.cpp \
|
|
||||||
main.cpp \
|
|
||||||
TestDialog.cpp \
|
|
||||||
UICommon.cpp \
|
|
||||||
CErrorLogDialog.cpp \
|
|
||||||
WorldEditor/CPoiMapModel.cpp \
|
|
||||||
PropertyEdit/CPropertyModel.cpp \
|
|
||||||
PropertyEdit/CPropertyDelegate.cpp \
|
|
||||||
PropertyEdit/CPropertyView.cpp \
|
|
||||||
WorldEditor/CInstancesModel.cpp \
|
|
||||||
WorldEditor/WEditorProperties.cpp \
|
|
||||||
Undo/CChangeLayerCommand.cpp \
|
|
||||||
WorldEditor/CTemplateEditDialog.cpp \
|
|
||||||
WorldEditor/CLinkDialog.cpp \
|
|
||||||
WorldEditor/CSelectInstanceDialog.cpp \
|
|
||||||
Undo/CAddLinkCommand.cpp \
|
|
||||||
Undo/CDeleteLinksCommand.cpp \
|
|
||||||
Undo/CEditLinkCommand.cpp \
|
|
||||||
Undo/CDeleteSelectionCommand.cpp \
|
|
||||||
Undo/CCreateInstanceCommand.cpp \
|
|
||||||
Undo/CCloneSelectionCommand.cpp \
|
|
||||||
Undo/CPasteNodesCommand.cpp \
|
|
||||||
CAboutDialog.cpp \
|
|
||||||
CharacterEditor/CCharacterEditor.cpp \
|
|
||||||
CharacterEditor/CCharacterEditorViewport.cpp \
|
|
||||||
CharacterEditor/CSkeletonHierarchyModel.cpp \
|
|
||||||
WorldEditor/CCollisionRenderSettingsDialog.cpp \
|
|
||||||
ResourceBrowser/CResourceBrowser.cpp \
|
|
||||||
CEditorApplication.cpp \
|
|
||||||
Widgets/CResourceSelector.cpp \
|
|
||||||
CExportGameDialog.cpp \
|
|
||||||
WorldEditor/CScriptEditSidebar.cpp \
|
|
||||||
WorldEditor/CWorldInfoSidebar.cpp \
|
|
||||||
WorldEditor/CWorldTreeModel.cpp \
|
|
||||||
CProjectSettingsDialog.cpp \
|
|
||||||
WorldEditor/CPoiMapSidebar.cpp \
|
|
||||||
WorldEditor/CWorldEditorSidebar.cpp \
|
|
||||||
CProgressDialog.cpp \
|
|
||||||
Widgets/CSelectResourcePanel.cpp \
|
|
||||||
ResourceBrowser/CResourceDelegate.cpp \
|
|
||||||
ResourceBrowser/CResourceTableContextMenu.cpp \
|
|
||||||
ResourceBrowser/CResourceTableModel.cpp \
|
|
||||||
ResourceBrowser/CResourceTableView.cpp \
|
|
||||||
ResourceBrowser/CVirtualDirectoryModel.cpp \
|
|
||||||
ResourceBrowser/CVirtualDirectoryTreeView.cpp \
|
|
||||||
CPropertyNameValidator.cpp \
|
|
||||||
CGeneratePropertyNamesDialog.cpp \
|
|
||||||
Undo/IEditPropertyCommand.cpp \
|
|
||||||
StringEditor/CStringEditor.cpp \
|
|
||||||
StringEditor/CStringListModel.cpp \
|
|
||||||
IEditor.cpp \
|
|
||||||
StringEditor/CStringDelegate.cpp \
|
|
||||||
CTweakEditor.cpp \
|
|
||||||
ScanEditor/CScanEditor.cpp \
|
|
||||||
CollisionEditor/CCollisionEditor.cpp \
|
|
||||||
CollisionEditor/CCollisionEditorViewport.cpp \
|
|
||||||
NDolphinIntegration.cpp \
|
|
||||||
CQuickplayPropertyEditor.cpp
|
|
||||||
|
|
||||||
# UI Files
|
|
||||||
FORMS += \
|
|
||||||
TestDialog.ui \
|
|
||||||
ModelEditor/CModelEditorWindow.ui \
|
|
||||||
WorldEditor/CLayerEditor.ui \
|
|
||||||
WorldEditor/CWorldEditor.ui \
|
|
||||||
WorldEditor/WCreateTab.ui \
|
|
||||||
WorldEditor/WInstancesTab.ui \
|
|
||||||
WorldEditor/WModifyTab.ui \
|
|
||||||
CErrorLogDialog.ui \
|
|
||||||
WorldEditor/CTemplateEditDialog.ui \
|
|
||||||
WorldEditor/CLinkDialog.ui \
|
|
||||||
WorldEditor/CSelectInstanceDialog.ui \
|
|
||||||
CAboutDialog.ui \
|
|
||||||
CharacterEditor/CCharacterEditor.ui \
|
|
||||||
WorldEditor/CCollisionRenderSettingsDialog.ui \
|
|
||||||
ResourceBrowser/CResourceBrowser.ui \
|
|
||||||
CExportGameDialog.ui \
|
|
||||||
WorldEditor/CWorldInfoSidebar.ui \
|
|
||||||
CProjectSettingsDialog.ui \
|
|
||||||
WorldEditor/CPoiMapSidebar.ui \
|
|
||||||
CProgressDialog.ui \
|
|
||||||
Widgets/CSelectResourcePanel.ui \
|
|
||||||
CGeneratePropertyNamesDialog.ui \
|
|
||||||
StringEditor/CStringEditor.ui \
|
|
||||||
CTweakEditor.ui \
|
|
||||||
ScanEditor/CScanEditor.ui \
|
|
||||||
CollisionEditor/CCollisionEditor.ui \
|
|
||||||
CQuickplayPropertyEditor.ui
|
|
||||||
|
|
||||||
# Codegen
|
|
||||||
CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen
|
|
||||||
CODEGEN_OUT_PATH = $$BUILD_DIR/Editor/codegen_build/auto_codegen.cpp
|
|
||||||
CODEGEN_SRC_PATH = $$PWD
|
|
||||||
include($$EXTERNALS_DIR/CodeGen/codegen.pri)
|
|
||||||
|
|
||||||
# LZO
|
|
||||||
contains(DEFINES, USE_LZOKAY) {
|
|
||||||
INCLUDEPATH += $$EXTERNALS_DIR/lzokay
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += $$EXTERNALS_DIR/lzo/include
|
|
||||||
}
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QButtonGroup>
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrent/QtConcurrentRun>
|
||||||
|
|
||||||
CResourceBrowser::CResourceBrowser(QWidget *pParent)
|
CResourceBrowser::CResourceBrowser(QWidget *pParent)
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
|
||||||
CWorldEditor::CWorldEditor(QWidget *parent)
|
CWorldEditor::CWorldEditor(QWidget *parent)
|
||||||
: INodeEditor(parent)
|
: INodeEditor(parent)
|
||||||
|
|
|
@ -54,6 +54,14 @@ public:
|
||||||
// Create editor resource store
|
// Create editor resource store
|
||||||
gpEditorStore = new CResourceStore("../resources/");
|
gpEditorStore = new CResourceStore("../resources/");
|
||||||
|
|
||||||
|
if (!gpEditorStore->DatabasePathExists())
|
||||||
|
{
|
||||||
|
QMessageBox::critical(0, "Error", "Unable to locate PWE resources directory; "
|
||||||
|
"PWE's executable must remain as deployed.",
|
||||||
|
QMessageBox::Close);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gpEditorStore->AreAllEntriesValid())
|
if (!gpEditorStore->AreAllEntriesValid())
|
||||||
{
|
{
|
||||||
debugf("Editor store has invalid entries. Rebuilding database...");
|
debugf("Editor store has invalid entries. Rebuilding database...");
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#-------------------------------------------------
|
|
||||||
#
|
|
||||||
# Project created by QtCreator 2014-08-09T16:15:10
|
|
||||||
#
|
|
||||||
#-------------------------------------------------
|
|
||||||
|
|
||||||
TEMPLATE = subdirs
|
|
||||||
CONFIG += ordered
|
|
||||||
|
|
||||||
# Add library subdirs
|
|
||||||
SUBDIRS += ..\externals\LibCommon\Source\LibCommon.pro
|
|
||||||
|
|
||||||
# Add PWE subdirs
|
|
||||||
SUBDIRS += Core Editor
|
|
Loading…
Reference in New Issue