1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-07 19:27:45 +00:00

fix script builds and logging issues on WSL

This commit is contained in:
Adam 2018-02-09 20:11:30 +11:00
parent 3ef490693b
commit 9d8f3648a0
4 changed files with 13 additions and 10 deletions

View file

@ -739,7 +739,7 @@ void defaultGet( shared_ptr<HttpServer::Response> response, shared_ptr<HttpServe
int main( int argc, char* argv[] )
{
g_log.setLogPath( "log\\SapphireAPI" );
g_log.setLogPath( "log/SapphireAPI" );
g_log.init();
g_log.info( "===========================================================" );

View file

@ -54,7 +54,7 @@ namespace Core {
void ServerLobby::run( int32_t argc, char* argv[] )
{
g_log.setLogPath( "log\\SapphireLobby" );
g_log.setLogPath( "log/SapphireLobby" );
g_log.init();
g_log.info( "===========================================================" );

View file

@ -21,7 +21,8 @@ foreach(_scriptDir ${children})
if(IS_DIRECTORY ${_scriptDir} AND NOT ${_name} MATCHES "CMakeFiles")
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
foreach(_script ${SCRIPT_FILES})
@ -31,7 +32,7 @@ foreach(_scriptDir ${children})
if(ScriptIncludes)
set(ScriptIncludes "${ScriptIncludes}\n#include \"${_script}\"")
else()
set(ScriptIncludes "#include \"${_script}\"")
set(ScriptIncludes "#include \"./${_script}\"")
endif()
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")
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}.lib"
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.ilk"
)
if(MSVC)
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}.lib"
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.ilk"
)
endif()
unset(ScriptIncludes)
unset(ScriptNames)

View file

@ -193,7 +193,7 @@ bool Core::ServerZone::loadSettings( int32_t argc, char* argv[] )
void Core::ServerZone::run( int32_t argc, char* argv[] )
{
// TODO: add more error checks for the entire initialisation
g_log.setLogPath( "log\\SapphireZone_" );
g_log.setLogPath( "log/SapphireZone_" );
g_log.init();
printBanner();