Skip to content
Snippets Groups Projects
Commit 9bc9a696 authored by brad kittenbrink's avatar brad kittenbrink
Browse files

Merged in my latest changes including switching LLAPRSockStream to be fully...

Merged in my latest changes including switching LLAPRSockStream to be fully non-blocking (and thus not horribly inefficient) and a bunch of new event listener implementations.
parents 3013aa1c 82eb18fc
No related branches found
No related tags found
No related merge requests found
...@@ -118,9 +118,16 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) ...@@ -118,9 +118,16 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
IF(LL_TEST_VERBOSE) IF(LL_TEST_VERBOSE)
MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}") MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}")
ENDIF(LL_TEST_VERBOSE) ENDIF(LL_TEST_VERBOSE)
IF(WINDOWS)
set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
ELSE(WINDOWS)
set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
ENDIF(WINDOWS)
SET(TEST_SCRIPT_CMD SET(TEST_SCRIPT_CMD
${CMAKE_COMMAND} ${CMAKE_COMMAND}
-DLD_LIBRARY_PATH=${ARCH_PREBUILT_DIRS}:/usr/lib -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
-DTEST_CMD:STRING="${TEST_CMD}" -DTEST_CMD:STRING="${TEST_CMD}"
-P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
) )
......
...@@ -17,7 +17,7 @@ set(LLCOMMON_LIBRARIES llcommon) ...@@ -17,7 +17,7 @@ set(LLCOMMON_LIBRARIES llcommon)
add_definitions(${TCMALLOC_FLAG}) add_definitions(${TCMALLOC_FLAG})
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.") set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
if(LLCOMMON_LINK_SHARED) if(LLCOMMON_LINK_SHARED)
add_definitions(-DLL_COMMON_LINK_SHARED=1) add_definitions(-DLL_COMMON_LINK_SHARED=1)
endif(LLCOMMON_LINK_SHARED) endif(LLCOMMON_LINK_SHARED)
...@@ -5,6 +5,7 @@ if (NOT STANDALONE) ...@@ -5,6 +5,7 @@ if (NOT STANDALONE)
set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib) set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib)
set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release) set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release)
set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug) set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
elseif (LINUX) elseif (LINUX)
if (VIEWER) if (VIEWER)
set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client) set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
......
...@@ -9,6 +9,10 @@ include(Linking) ...@@ -9,6 +9,10 @@ include(Linking)
include(Boost) include(Boost)
include (Pth) include (Pth)
if (WINDOWS)
include(CopyWinLibs)
endif (WINDOWS)
include_directories( include_directories(
${EXPAT_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS}
...@@ -234,6 +238,10 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) ...@@ -234,6 +238,10 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
if(LLCOMMON_LINK_SHARED) if(LLCOMMON_LINK_SHARED)
add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
add_definitions(-DLL_COMMON_BUILD=1) add_definitions(-DLL_COMMON_BUILD=1)
# *FIX:Mani ---
# llcommon.dll get written to the DLL staging directory.
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
else(LLCOMMON_LINK_SHARED) else(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES}) add_library (llcommon ${llcommon_SOURCE_FILES})
endif(LLCOMMON_LINK_SHARED) endif(LLCOMMON_LINK_SHARED)
...@@ -250,6 +258,8 @@ target_link_libraries( ...@@ -250,6 +258,8 @@ target_link_libraries(
${PTH_LIBRARIES} ${PTH_LIBRARIES}
) )
add_dependencies(llcommon stage_third_party_libs)
include(LLAddBuildTest) include(LLAddBuildTest)
SET(llcommon_TEST_SOURCE_FILES SET(llcommon_TEST_SOURCE_FILES
# WARNING: Please don't write tests against LLCommon or LLMath until this issue is resolved: https://jira.lindenlab.com/jira/browse/DEV-29456 # WARNING: Please don't write tests against LLCommon or LLMath until this issue is resolved: https://jira.lindenlab.com/jira/browse/DEV-29456
......
...@@ -226,7 +226,7 @@ IF (NOT LINUX AND VIEWER) ...@@ -226,7 +226,7 @@ IF (NOT LINUX AND VIEWER)
# Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05 # Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
# Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage! # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
# ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py") # ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
# llareslistener.cpp # llareslistener.cpp
) )
LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}") LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
#include "llnotificationslistener.h" #include "llnotificationslistener.h"
#include "llnotifications.h" #include "llnotifications.h"
LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) : LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
LLDispatchListener("LLNotifications", "op"), LLDispatchListener("LLNotifications", "op"),
mNotifications(notifications) mNotifications(notifications)
{ {
add("requestAdd", &LLNotificationsListener::requestAdd); add("requestAdd", &LLNotificationsListener::requestAdd);
} }
void LLNotificationsListener::requestAdd(const LLSD& event_data) const void LLNotificationsListener::requestAdd(const LLSD& event_data) const
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
#define LL_LLNOTIFICATIONSLISTENER_H #define LL_LLNOTIFICATIONSLISTENER_H
#include "lleventdispatcher.h" #include "lleventdispatcher.h"
class LLNotifications; class LLNotifications;
class LLSD; class LLSD;
class LLNotificationsListener : public LLDispatchListener class LLNotificationsListener : public LLDispatchListener
{ {
public: public:
LLNotificationsListener(LLNotifications & notifications); LLNotificationsListener(LLNotifications & notifications);
void requestAdd(LLSD const & event_data) const; void requestAdd(LLSD const & event_data) const;
private: private:
LLNotifications & mNotifications; LLNotifications & mNotifications;
}; };
#endif // LL_LLNOTIFICATIONSLISTENER_H #endif // LL_LLNOTIFICATIONSLISTENER_H
...@@ -38,10 +38,6 @@ include(LLKDU) ...@@ -38,10 +38,6 @@ include(LLKDU)
include(ViewerMiscLibs) include(ViewerMiscLibs)
include(LLLogin) include(LLLogin)
if (WINDOWS)
include(CopyWinLibs)
endif (WINDOWS)
include_directories( include_directories(
${DBUSGLIB_INCLUDE_DIRS} ${DBUSGLIB_INCLUDE_DIRS}
${ELFIO_INCLUDE_DIR} ${ELFIO_INCLUDE_DIR}
...@@ -1256,7 +1252,23 @@ if (WINDOWS) ...@@ -1256,7 +1252,23 @@ if (WINDOWS)
COMMENT "Copying message.xml to the runtime folder." COMMENT "Copying message.xml to the runtime folder."
) )
add_dependencies(${VIEWER_BINARY_NAME} copy_win_libs) if(WINDOWS)
# Copy Win Libs...
# This happens at build time, not config time. We can't glob files in this cmake.
# *FIX:Mani Write a sub script to glob the files...
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
-E
copy_directory
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
COMMENT "Copying staged dlls."
)
endif(WINDOWS)
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts) add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
......
...@@ -168,9 +168,8 @@ def construct(self): ...@@ -168,9 +168,8 @@ def construct(self):
# need to get the llcommon.dll from any of the build directories as well # need to get the llcommon.dll from any of the build directories as well
try: try:
self.path(self.find_existing_file('../llcommon/%s/llcommon.dll' % self.args['configuration']),
dst='llcommon.dll')
if self.prefix(src=self.args['configuration'], dst=""): if self.prefix(src=self.args['configuration'], dst=""):
self.path('llcommon.dll')
self.path('libapr-1.dll') self.path('libapr-1.dll')
self.path('libaprutil-1.dll') self.path('libaprutil-1.dll')
self.path('libapriconv-1.dll') self.path('libapriconv-1.dll')
...@@ -181,8 +180,7 @@ def construct(self): ...@@ -181,8 +180,7 @@ def construct(self):
# need to get the kdu dll from any of the build directories as well # need to get the kdu dll from any of the build directories as well
try: try:
self.path(self.find_existing_file('../llkdu/%s/llkdu.dll' % self.args['configuration'], self.path(self.find_existing_file('%s/llkdu.dll' % self.args['configuration']),
'../../libraries/i686-win32/lib/release/llkdu.dll'),
dst='llkdu.dll') dst='llkdu.dll')
pass pass
except: except:
...@@ -394,7 +392,11 @@ def package_finish(self): ...@@ -394,7 +392,11 @@ def package_finish(self):
# We use the Unicode version of NSIS, available from # We use the Unicode version of NSIS, available from
# http://www.scratchpaper.com/ # http://www.scratchpaper.com/
NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe' # Check two paths, one for Program Files, and one for Program Files (x86).
# Yay 64bit windows.
NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
if not os.path.exists(NSIS_path):
NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile)) self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
# self.remove(self.dst_path_of(tempfile)) # self.remove(self.dst_path_of(tempfile))
# If we're on a build machine, sign the code using our Authenticode certificate. JC # If we're on a build machine, sign the code using our Authenticode certificate. JC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment