mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-08 11:47:45 +00:00
fix script builds and logging issues on WSL
This commit is contained in:
parent
6594dd1dc4
commit
99eb4c7d17
4 changed files with 13 additions and 10 deletions
|
@ -739,7 +739,7 @@ void defaultGet( shared_ptr<HttpServer::Response> response, shared_ptr<HttpServe
|
||||||
|
|
||||||
int main( int argc, char* argv[] )
|
int main( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
g_log.setLogPath( "log\\SapphireAPI" );
|
g_log.setLogPath( "log/SapphireAPI" );
|
||||||
g_log.init();
|
g_log.init();
|
||||||
|
|
||||||
g_log.info( "===========================================================" );
|
g_log.info( "===========================================================" );
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace Core {
|
||||||
|
|
||||||
void ServerLobby::run( int32_t argc, char* argv[] )
|
void ServerLobby::run( int32_t argc, char* argv[] )
|
||||||
{
|
{
|
||||||
g_log.setLogPath( "log\\SapphireLobby" );
|
g_log.setLogPath( "log/SapphireLobby" );
|
||||||
g_log.init();
|
g_log.init();
|
||||||
|
|
||||||
g_log.info( "===========================================================" );
|
g_log.info( "===========================================================" );
|
||||||
|
|
|
@ -21,7 +21,8 @@ foreach(_scriptDir ${children})
|
||||||
if(IS_DIRECTORY ${_scriptDir} AND NOT ${_name} MATCHES "CMakeFiles")
|
if(IS_DIRECTORY ${_scriptDir} AND NOT ${_name} MATCHES "CMakeFiles")
|
||||||
message("discovered plugin lib: ${_scriptDir} (${_name})")
|
message("discovered plugin lib: ${_scriptDir} (${_name})")
|
||||||
|
|
||||||
file(GLOB_RECURSE SCRIPT_FILES "${_scriptDir}/*.cpp")
|
file(GLOB_RECURSE SCRIPT_BUILD_FILES "${_scriptDir}/*.cpp")
|
||||||
|
file(GLOB_RECURSE SCRIPT_FILES RELATIVE "${_scriptDir}" "${_name}/*.cpp")
|
||||||
|
|
||||||
# build file list
|
# build file list
|
||||||
foreach(_script ${SCRIPT_FILES})
|
foreach(_script ${SCRIPT_FILES})
|
||||||
|
@ -31,7 +32,7 @@ foreach(_scriptDir ${children})
|
||||||
if(ScriptIncludes)
|
if(ScriptIncludes)
|
||||||
set(ScriptIncludes "${ScriptIncludes}\n#include \"${_script}\"")
|
set(ScriptIncludes "${ScriptIncludes}\n#include \"${_script}\"")
|
||||||
else()
|
else()
|
||||||
set(ScriptIncludes "#include \"${_script}\"")
|
set(ScriptIncludes "#include \"./${_script}\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ScriptNames "${ScriptNames} static_cast< ScriptObject* >( new ${_scriptname} ),\n")
|
set(ScriptNames "${ScriptNames} static_cast< ScriptObject* >( new ${_scriptname} ),\n")
|
||||||
|
@ -55,11 +56,13 @@ foreach(_scriptDir ${children})
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ScriptLoader.cpp.in" "${_scriptDir}/ScriptLoader.cpp")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ScriptLoader.cpp.in" "${_scriptDir}/ScriptLoader.cpp")
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
add_custom_command(TARGET "script_${_name}" POST_BUILD
|
add_custom_command(TARGET "script_${_name}" POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.exp"
|
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.exp"
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.lib"
|
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.lib"
|
||||||
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.ilk"
|
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.ilk"
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
unset(ScriptIncludes)
|
unset(ScriptIncludes)
|
||||||
unset(ScriptNames)
|
unset(ScriptNames)
|
||||||
|
|
|
@ -193,7 +193,7 @@ bool Core::ServerZone::loadSettings( int32_t argc, char* argv[] )
|
||||||
void Core::ServerZone::run( int32_t argc, char* argv[] )
|
void Core::ServerZone::run( int32_t argc, char* argv[] )
|
||||||
{
|
{
|
||||||
// TODO: add more error checks for the entire initialisation
|
// TODO: add more error checks for the entire initialisation
|
||||||
g_log.setLogPath( "log\\SapphireZone_" );
|
g_log.setLogPath( "log/SapphireZone_" );
|
||||||
g_log.init();
|
g_log.init();
|
||||||
|
|
||||||
printBanner();
|
printBanner();
|
||||||
|
|
Loading…
Add table
Reference in a new issue