From f1be1d98016af99e4fec6bbd153137a6cbd74378 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Jul 2012 12:36:36 +0200 Subject: [PATCH] Added: CMake projects for ryzom MFC tools (georges edit and world editor plugins) --- code/ryzom/tools/leveldesign/CMakeLists.txt | 3 +++ .../leveldesign/georges_dll/CMakeLists.txt | 19 ++++++++++++++ .../georges_dll/output_console_dlg.h | 2 +- .../leveldesign/georges_exe/CMakeLists.txt | 12 +++++++++ .../georges_plugin_sound/CMakeLists.txt | 26 +++++++++++++++++++ .../georges_plugin_sound/sound_plugin.cpp | 7 +++-- .../georges_plugin_sound/sound_plugin.h | 4 +-- .../leveldesign/world_editor/CMakeLists.txt | 4 +++ .../CMakeLists.txt | 21 +++++++++++++++ .../world_editor_graph_plugin/CMakeLists.txt | 22 ++++++++++++++++ .../CMakeLists.txt | 22 ++++++++++++++++ .../world_editor_sound_plugin/CMakeLists.txt | 21 +++++++++++++++ 12 files changed, 158 insertions(+), 5 deletions(-) create mode 100644 code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt diff --git a/code/ryzom/tools/leveldesign/CMakeLists.txt b/code/ryzom/tools/leveldesign/CMakeLists.txt index c490de731..fd3ddc94a 100644 --- a/code/ryzom/tools/leveldesign/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/CMakeLists.txt @@ -12,6 +12,9 @@ IF(WIN32) ADD_SUBDIRECTORY(world_editor) IF(WITH_MFC) ADD_SUBDIRECTORY(mission_compiler_fe) + ADD_SUBDIRECTORY(georges_dll) + ADD_SUBDIRECTORY(georges_exe) + ADD_SUBDIRECTORY(georges_plugin_sound) ENDIF(WITH_MFC) ENDIF(WIN32) diff --git a/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt new file mode 100644 index 000000000..92263a73c --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt @@ -0,0 +1,19 @@ + +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(georges_dll SHARED ${SRC} georges_edit.rc) + +INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +TARGET_LINK_LIBRARIES(georges_dll nelmisc nelgeorges) +NL_DEFAULT_PROPS(georges_dll "Ryzom, Tools, Georges: Georges Dll") +NL_ADD_RUNTIME_FLAGS(georges_dll) +NL_ADD_LIB_SUFFIX(georges_dll) + +ADD_DEFINITIONS(${MFC_DEFINITIONS} -DGEORGES_EXPORT) + +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(georges_dll ${CMAKE_CURRENT_SOURCE_DIR}/stdafx.h ${CMAKE_CURRENT_SOURCE_DIR}/stdafx.cpp) +ENDIF(WITH_PCH) + +INSTALL(TARGETS georges_dll LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h index f3bc4a799..cdc9a4745 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h +++ b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h @@ -37,7 +37,7 @@ public: // From CDialog void OnOK () {} - void OnCancel () + void OnCancel (); // Dialog Data //{{AFX_DATA(COutputConsoleDlg) diff --git a/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt new file mode 100644 index 000000000..064f1985e --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt @@ -0,0 +1,12 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_DEFINITIONS(${MFC_DEFINITIONS}) +SET(CMAKE_MFC_FLAG 2) +ADD_EXECUTABLE(georges_exe WIN32 ${SRC} georges_exe.rc) + +TARGET_LINK_LIBRARIES(georges_exe nelmisc nelgeorges georges_dll) + +NL_DEFAULT_PROPS(georges_exe "Ryzom, Tools, Georges: Georges Exe") +NL_ADD_RUNTIME_FLAGS(georges_exe) + +INSTALL(TARGETS georges_exe RUNTIME DESTINATION bin COMPONENT tools) diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt new file mode 100644 index 000000000..29f77d650 --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/CMakeLists.txt @@ -0,0 +1,26 @@ + +FILE(GLOB SRC *.cpp *.h) + +# Bugfix... +IF (NOT DXSDK_INCLUDE_DIR) + IF (DXSDK_DIR) + SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include") + ENDIF (DXSDK_DIR) +ENDIF (NOT DXSDK_INCLUDE_DIR) + +IF (NOT DXSDK_INCLUDE_DIR) + message(FATAL_ERROR "Configuration bad, cannot find DirectX include.") +ENDIF (NOT DXSDK_INCLUDE_DIR) + +ADD_LIBRARY(georges_plugin_sound SHARED ${SRC}) + +INCLUDE_DIRECTORIES(georges_plugin_sound ${NEL_INCLUDE_DIR} ${DXSDK_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(georges_plugin_sound nelmisc nelgeorges nelsound nelligo nelsnd_lowlevel georges_dll ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY}) +NL_DEFAULT_PROPS(georges_plugin_sound "Ryzom, Tools, Georges: Georges Plugin Sound") +NL_ADD_RUNTIME_FLAGS(georges_plugin_sound) +NL_ADD_LIB_SUFFIX(georges_plugin_sound) + +ADD_DEFINITIONS(${MFC_DEFINITIONS}) + +INSTALL(TARGETS georges_plugin_sound LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp index d20c0347f..9a938eb7c 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp @@ -68,6 +68,9 @@ CSoundPlugin::CSoundPlugin(IEdit *globalInterface) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); + // Initialize without sheet id bin + NLMISC::CSheetId::initWithoutSheet(); + CVector dir; _GlobalInterface = globalInterface; @@ -337,7 +340,7 @@ void CSoundPlugin::setActiveDocument(IEditDocument *pdoc) _Dialog.setName(_Filename); // 1st, try to found the sound in the preloaded sound bank. - _Sound = _Mixer->getSoundId(CStringMapper::map(_Filename)); + _Sound = _Mixer->getSoundId(CSheetId(_Filename, "sound")); if (_Sound == NULL) { // not found, create a new one. @@ -537,7 +540,7 @@ void CSoundPlugin::play(std::string &filename) // point.Name = string("simulation-")+_Sound->getName()+"-000"; region.VPoints.push_back(point); - string name = string("simulation-")+CStringMapper::unmap(_Sound->getName())+"-000"; + string name = string("simulation-")+NLMISC::CFile::getFilenameWithoutExtension(_Sound->getName().toString())+"-000"; if (region.VPoints.back().checkProperty("name")) region.VPoints.back().removePropertyByName("name"); diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h index c95077d68..021749d15 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h @@ -40,7 +40,7 @@ #include "nel/sound/driver/sound_driver.h" #include "nel/sound/driver/source.h" #include "nel/sound/driver/listener.h" -#include "sound/driver/dsound/source_dsound.h" +// #include "sound/driver/dsound/source_dsound.h" #include "nel/sound/u_audio_mixer.h" #include "nel/sound/u_listener.h" @@ -49,7 +49,7 @@ class NLSOUND::IBuffer; class NLSOUND::IListener; class NLSOUND::USource; -class NLSOUND::CSourceDSound; +// class NLSOUND::CSourceDSound; class NLSOUND::CSound; diff --git a/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt index f9d7908eb..4d23d04ec 100644 --- a/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/world_editor/CMakeLists.txt @@ -3,7 +3,11 @@ ADD_SUBDIRECTORY(land_export_lib) IF(WITH_MFC) ADD_SUBDIRECTORY(world_editor) + ADD_SUBDIRECTORY(world_editor_fauna_graph_plugin) + ADD_SUBDIRECTORY(world_editor_graph_plugin) ADD_SUBDIRECTORY(world_editor_primitive_plugin) + ADD_SUBDIRECTORY(world_editor_shard_monitor_plugin) + ADD_SUBDIRECTORY(world_editor_sound_plugin) ENDIF(WITH_MFC) # This is an old plugin and is deprecated. It doesn't even compile anymore. diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt new file mode 100644 index 000000000..04e11fd50 --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/CMakeLists.txt @@ -0,0 +1,21 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_fauna_graph_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_fauna_graph_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel) + +NL_DEFAULT_PROPS(world_editor_fauna_graph_plugin "Ryzom, Tools, World: World Editor Fauna Graph Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_fauna_graph_plugin) +NL_ADD_LIB_SUFFIX(world_editor_fauna_graph_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_fauna_graph_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt new file mode 100644 index 000000000..4fc58a958 --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/CMakeLists.txt @@ -0,0 +1,22 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_graph_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_graph_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel + ryzom_mission_compiler_lib) + +NL_DEFAULT_PROPS(world_editor_graph_plugin "Ryzom, Tools, World: World Editor Graph Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_graph_plugin) +NL_ADD_LIB_SUFFIX(world_editor_graph_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_graph_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt new file mode 100644 index 000000000..fdfa3e1ca --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/CMakeLists.txt @@ -0,0 +1,22 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_shard_monitor_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_shard_monitor_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel + ryzom_gameshare) + +NL_DEFAULT_PROPS(world_editor_shard_monitor_plugin "Ryzom, Tools, World: World Editor Shard Monitor Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_shard_monitor_plugin) +NL_ADD_LIB_SUFFIX(world_editor_shard_monitor_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_shard_monitor_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) + diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt new file mode 100644 index 000000000..298c0cc0d --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/CMakeLists.txt @@ -0,0 +1,21 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_LIBRARY(world_editor_sound_plugin SHARED ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(world_editor_sound_plugin + nelmisc + nel3d + nelsound + nelsnd_lowlevel) + +NL_DEFAULT_PROPS(world_editor_sound_plugin "Ryzom, Tools, World: World Editor Sound Plugin") +NL_ADD_RUNTIME_FLAGS(world_editor_sound_plugin) +NL_ADD_LIB_SUFFIX(world_editor_sound_plugin) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${MFC_DEFINITIONS} -DWIN32_DLL_EXPORTS) + + +INSTALL(TARGETS world_editor_sound_plugin LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) +