mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
Merge pull request #249 from GokuWeedLord/feature/wsl
fix script builds and logging issues on WSL
This commit is contained in:
commit
8573bfa7db
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[] )
|
||||
{
|
||||
g_log.setLogPath( "log\\SapphireAPI" );
|
||||
g_log.setLogPath( "log/SapphireAPI" );
|
||||
g_log.init();
|
||||
|
||||
g_log.info( "===========================================================" );
|
||||
|
|
|
@ -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( "===========================================================" );
|
||||
|
|
|
@ -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})
|
||||
|
@ -38,7 +39,7 @@ foreach(_scriptDir ${children})
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
add_library("script_${_name}" MODULE "${SCRIPT_FILES}" "${SCRIPT_INCLUDE_FILES}" "${_scriptDir}/ScriptLoader.cpp")
|
||||
add_library("script_${_name}" MODULE "${SCRIPT_BUILD_FILES}" "${SCRIPT_INCLUDE_FILES}" "${_scriptDir}/ScriptLoader.cpp")
|
||||
target_link_libraries("script_${_name}" sapphire_zone)
|
||||
|
||||
if(MSVC)
|
||||
|
@ -55,11 +56,13 @@ foreach(_scriptDir ${children})
|
|||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ScriptLoader.cpp.in" "${_scriptDir}/ScriptLoader.cpp")
|
||||
|
||||
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)
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue