diff --git a/CMakeLists.txt b/CMakeLists.txt index bdbfa716..86f988c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,15 +2,19 @@ cmake_policy( SET CMP0014 NEW ) cmake_minimum_required( VERSION 3.0.2 ) project( Sapphire ) -set( CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin ) - -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin ) +#set( CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin ) +set( EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) set( LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ) +add_custom_target( copy_runtime_files ALL + COMMAND cmake -E copy_directory ${CMAKE_SOURCE_DIR}/config ${CMAKE_BINARY_DIR}/bin/config + COMMAND cmake -E copy_directory ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/bin/sql + COMMAND cmake -E copy_directory ${CMAKE_SOURCE_DIR}/web ${CMAKE_BINARY_DIR}/bin/web ) + ###################################### # Dependencies and compiler settings # ###################################### diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 8d203ba7..da694d09 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -13,12 +13,12 @@ else() set( CMAKE_CXX_STANDARD_REQUIRED ON ) set( CMAKE_CXX_EXTENSIONS ON ) - set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) - set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) - set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) - set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/bin/" ) - set( VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + set( VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin/" ) if( CMAKE_BUILD_TYPE STREQUAL "Debug" ) # disabling SAFESEH @@ -40,4 +40,4 @@ else() endif() # force standalone asio -add_definitions( -DASIO_STANDALONE ) \ No newline at end of file +add_definitions( -DASIO_STANDALONE ) diff --git a/config/config.ini b/config/config.ini new file mode 100644 index 00000000..66386e1d --- /dev/null +++ b/config/config.ini @@ -0,0 +1,58 @@ +[Database] +Host = 127.0.0.1 +Port = 3306 +Database = sapphire +Username = sapphire +Password = +SyncThreads = 2 +AsyncThreads = 2 + +[GlobalParameters] +ServerSecret = default +DataPath = /home/mordred/sqpack + +[GlobalNetwork] +; Values definining how Users and other servers will access - these have to be set to your public IP when running a public server +ZoneHost = 127.0.0.1 +ZonePort = 54992 + +LobbyHost = 127.0.0.1 +LobbyPort = 54994 + +RestHost = 127.0.0.1 +RestPort = 80 + +[Lobby] +WorldID = 67 +AllowNoSessionConnect = false +WorldName = Sapphire + +[LobbyNetwork] +ListenIp = 0.0.0.0 +ListenPort = 54994 + +[CharacterCreation] +DefaultGMRank = 255 + +[RestNetwork] +ListenIp = 0.0.0.0 +ListenPort = 80 + +[Scripts] +; where compiled script modules are located +Path = ./compiledscripts/ +; relative to Path, where we copy and load modules from +CachePath = ./cache/ +; whether we should detect changes to script modules and reload them +HotSwap = true + +[Network] +DisconnectTimeout = 20 + +[ZoneNetwork] +ListenIp = 0.0.0.0 +ListenPort = 54992 + +[General] +; Sent on login - each line must be shorter than 307 characters, split lines with ';' +MotD = Welcome to Sapphire!;This is a very good server;You can change these messages by editing General.MotD in config/zone.ini diff --git a/bin/config/config.ini.default b/config/config.ini.default similarity index 100% rename from bin/config/config.ini.default rename to config/config.ini.default diff --git a/bin/sql/schema/inserts.sql b/sql/schema/inserts.sql similarity index 100% rename from bin/sql/schema/inserts.sql rename to sql/schema/inserts.sql diff --git a/bin/sql/schema/schema.sql b/sql/schema/schema.sql similarity index 100% rename from bin/sql/schema/schema.sql rename to sql/schema/schema.sql diff --git a/bin/web/PS4transitionally.html b/web/PS4transitionally.html similarity index 100% rename from bin/web/PS4transitionally.html rename to web/PS4transitionally.html diff --git a/bin/web/assets/bootstrap/css/bootstrap.min.css b/web/assets/bootstrap/css/bootstrap.min.css similarity index 100% rename from bin/web/assets/bootstrap/css/bootstrap.min.css rename to web/assets/bootstrap/css/bootstrap.min.css diff --git a/bin/web/assets/bootstrap/js/bootstrap.min.js b/web/assets/bootstrap/js/bootstrap.min.js similarity index 100% rename from bin/web/assets/bootstrap/js/bootstrap.min.js rename to web/assets/bootstrap/js/bootstrap.min.js diff --git a/bin/web/assets/css/global.css b/web/assets/css/global.css similarity index 100% rename from bin/web/assets/css/global.css rename to web/assets/css/global.css diff --git a/bin/web/assets/css/styles.css b/web/assets/css/styles.css similarity index 100% rename from bin/web/assets/css/styles.css rename to web/assets/css/styles.css diff --git a/bin/web/assets/img/background.png b/web/assets/img/background.png similarity index 100% rename from bin/web/assets/img/background.png rename to web/assets/img/background.png diff --git a/bin/web/assets/img/fa-discord-icon.png b/web/assets/img/fa-discord-icon.png similarity index 100% rename from bin/web/assets/img/fa-discord-icon.png rename to web/assets/img/fa-discord-icon.png diff --git a/bin/web/assets/img/github-icon.png b/web/assets/img/github-icon.png similarity index 100% rename from bin/web/assets/img/github-icon.png rename to web/assets/img/github-icon.png diff --git a/bin/web/assets/img/graffletopia-gears.png b/web/assets/img/graffletopia-gears.png similarity index 100% rename from bin/web/assets/img/graffletopia-gears.png rename to web/assets/img/graffletopia-gears.png diff --git a/bin/web/assets/img/sapphire_logo.png b/web/assets/img/sapphire_logo.png similarity index 100% rename from bin/web/assets/img/sapphire_logo.png rename to web/assets/img/sapphire_logo.png diff --git a/bin/web/assets/img/sapphire_logo_resize.png b/web/assets/img/sapphire_logo_resize.png similarity index 100% rename from bin/web/assets/img/sapphire_logo_resize.png rename to web/assets/img/sapphire_logo_resize.png diff --git a/bin/web/assets/js/jquery.min.js b/web/assets/js/jquery.min.js similarity index 100% rename from bin/web/assets/js/jquery.min.js rename to web/assets/js/jquery.min.js diff --git a/bin/web/createUser.html b/web/createUser.html similarity index 100% rename from bin/web/createUser.html rename to web/createUser.html diff --git a/bin/web/css/global.css b/web/css/global.css similarity index 100% rename from bin/web/css/global.css rename to web/css/global.css diff --git a/bin/web/css/reset.css b/web/css/reset.css similarity index 100% rename from bin/web/css/reset.css rename to web/css/reset.css diff --git a/bin/web/headlines.xml b/web/headlines.xml similarity index 100% rename from bin/web/headlines.xml rename to web/headlines.xml diff --git a/bin/web/icon-01.png b/web/icon-01.png similarity index 100% rename from bin/web/icon-01.png rename to web/icon-01.png diff --git a/bin/web/index.html b/web/index.html similarity index 100% rename from bin/web/index.html rename to web/index.html diff --git a/bin/web/login.html b/web/login.html similarity index 100% rename from bin/web/login.html rename to web/login.html diff --git a/bin/web/news.xml b/web/news.xml similarity index 100% rename from bin/web/news.xml rename to web/news.xml