diff --git a/.gitignore b/.gitignore index 718308dc9..01cad3637 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ indra/newview/res-sdl/viewer_icon.* *.orig *.rej *.bak -*~ *.DS_Store /LICENSES/ /edited-files.txt diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c938df16e..517462941 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -141,7 +141,10 @@ if (LINUX) -pthread ) - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") + + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") # Don't catch SIGCHLD in our base application class for the viewer # some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! @@ -196,16 +199,14 @@ if (LINUX) # End of hacks. - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") - if (NOT STANDALONE) # this stops us requiring a really recent glibc at runtime add_definitions(-fno-stack-protector) endif (NOT STANDALONE) if (${ARCH} STREQUAL "x86_64") - add_definitions(-DLINUX64=1 -pipe) - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -ffast-math -funroll-loops") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -ffast-math -funroll-loops") + add_definitions(-pipe) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -ffast-math") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ffast-math") else (${ARCH} STREQUAL "x86_64") @@ -220,11 +221,6 @@ if (LINUX) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}") endif (${ARCH} STREQUAL "x86_64") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - if (NOT STANDALONE) - # this stops us requiring a really recent glibc at runtime - add_definitions(-fno-stack-protector) - endif (NOT STANDALONE) - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${MARCH_FLAG} -msse2") @@ -232,12 +228,6 @@ if (LINUX) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - - if (NOT STANDALONE) - # this stops us requiring a really recent glibc at runtime - add_definitions(-fno-stack-protector) - endif (NOT STANDALONE) - if (NOT STANDALONE) set(MARCH_FLAG " -axsse4.1 -msse2") endif (NOT STANDALONE) @@ -319,9 +309,9 @@ else (STANDALONE) set(${ARCH}_linux_INCLUDES atk-1.0 glib-2.0 + gdk-pixbuf-2.0 gstreamer-0.10 gtk-2.0 - freetype2 pango-1.0 ) endif (STANDALONE) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 3ec8b7847..9b66e0724 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -135,21 +135,18 @@ elseif(LINUX) libapr-1.so.0 libaprutil-1.so.0 libatk-1.0.so - libdb-5.1.so libexpat.so libexpat.so.1 - libfreetype.so.6.6.2 + libfreetype.so.6.12.0 libfreetype.so.6 + libfreetype.so libGLOD.so libgmodule-2.0.so libgobject-2.0.so - libhunspell-1.3.so.0.0.0 libopenal.so - libopenjpeg.so - libuuid.so.16 - libuuid.so.16.0.22 libfontconfig.so.1.8.0 libfontconfig.so.1 + libfontconfig.so ) if (USE_TCMALLOC) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index e7ce595ef..8d8e796c1 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -1,66 +1,8 @@ # -*- cmake -*- -include(Linking) - -unset(FMOD_LIBRARY_RELEASE CACHE) -unset(FMOD_LIBRARY_DEBUG CACHE) -unset(FMOD_INCLUDE_DIR CACHE) - -set(FMOD_EXTERNAL_LIB OFF) - -if(STANDALONE OR WINDOWS) - if (NOT FMODSTUDIO_SDK_DIR AND WINDOWS) - #GET_FILENAME_COMPONENT(REG_DIR [HKEY_CURRENT_USER\\Software\\FMOD\ Studio\ API\ Windows] ABSOLUTE) - #set(FMODSTUDIO_SDK_DIR ${REG_DIR} CACHE PATH "Path to the FMOD Studio SDK." FORCE) - endif (NOT FMODSTUDIO_SDK_DIR AND WINDOWS) - if(NOT FMODSTUDIO_SDK_DIR AND STANDALONE) - message(FATAL_ERROR "FMODSTUDIO_SDK_DIR not set!") - endif(NOT FMODSTUDIO_SDK_DIR AND STANDALONE) -endif(STANDALONE OR WINDOWS) - -if(FMODSTUDIO_SDK_DIR) - if(LINUX AND WORD_SIZE EQUAL 32) - set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib/x86" ) - elseif(LINUX) - set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib/x86_64") - else(LINUX AND WORD_SIZE EQUAL 32) - set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib") - endif(LINUX AND WORD_SIZE EQUAL 32) - set(fmod_inc_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/inc") - - if(WINDOWS) - set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES}) - set(CMAKE_FIND_LIBRARY_SUFFIXES .dll) - endif(WINDOWS) - if(WORD_SIZE EQUAL 64 AND WINDOWS) - find_library(FMOD_LIBRARY_RELEASE fmod64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH) - find_library(FMOD_LIBRARY_DEBUG fmodL64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH) - else(WORD_SIZE EQUAL 64 AND WINDOWS)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin. - find_library(FMOD_LIBRARY_RELEASE fmod PATHS ${fmod_lib_paths} NO_DEFAULT_PATH) - find_library(FMOD_LIBRARY_DEBUG fmodL PATHS ${fmod_lib_paths} NO_DEFAULT_PATH) - endif(WORD_SIZE EQUAL 64 AND WINDOWS) - if(WINDOWS) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD}) - string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE}) - string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG}) - else(WINDOWS) - set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE}) - set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG}) - endif(WINDOWS) - find_path(FMOD_INCLUDE_DIR fmod.hpp ${fmod_inc_paths}) - if(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR) - if(STANDALONE) - message(FATAL_ERROR "Provided FMODSTUDIO_SDK_DIR path not found '{$FMODSTUDIO_SDK_DIR}'") - else(STANDALONE) - message(STATUS "Provided FMODSTUDIO_SDK_DIR path not found '${FMODSTUDIO_SDK_DIR}'. Falling back to prebuilts") - endif(STANDALONE) - else(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR) - message(STATUS "Using system-provided FMOD Studio Libraries") - set(FMOD_EXTERNAL_LIB ON) - endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR) -endif (FMODSTUDIO_SDK_DIR) - -if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR) +include(Variables) +if (FMODSTUDIO) + use_prebuilt_binary(fmodstudio) if(WINDOWS) set(lib_suffix .dll) elseif(DARWIN) @@ -92,11 +34,9 @@ if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR) debug ${FMOD_LINK_LIBRARY_DEBUG} optimized ${FMOD_LINK_LIBRARY_RELEASE} ) - - use_prebuilt_binary(fmodstudio) - set(FMOD_INCLUDE_DIR - ${LIBS_PREBUILT_DIR}/include/fmodstudio) -endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR) + + set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio) +endif(FMODSTUDIO) if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR) set(FMOD ON) @@ -113,3 +53,4 @@ if (FMOD) message(STATUS "Building with FMOD Studio audio support") set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO=1") endif (FMOD) + diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 09260582e..73881e17a 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -9,6 +9,6 @@ if (STANDALONE) else (STANDALONE) use_prebuilt_binary(glod) - set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) + set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/glod) set(GLOD_LIBRARIES GLOD) endif (STANDALONE) diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake index 11028f6fb..c9b071d1e 100644 --- a/indra/cmake/GStreamer010Plugin.cmake +++ b/indra/cmake/GStreamer010Plugin.cmake @@ -1,30 +1,9 @@ # -*- cmake -*- include(Prebuilt) - -if (STANDALONE) include(FindPkgConfig) - pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10) pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10) -else (STANDALONE) - - # Possibly libxml and glib should have their own .cmake file instead... - use_prebuilt_binary(glib) # gstreamer needs glib - use_prebuilt_binary(libxml) - use_prebuilt_binary(gstreamer) - set(GSTREAMER010_FOUND ON FORCE BOOL) - set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL) - set(GSTREAMER010_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include/gstreamer-0.10 - ${LIBS_PREBUILT_DIR}/include/glib-2.0 - ${LIBS_PREBUILT_DIR}/include/libxml2 - ${LIBS_PREBUILT_LEGACY_DIR}/include/gstreamer-0.10 - ${LIBS_PREBUILT_LEGACY_DIR}/include/glib-2.0 - ${LIBS_PREBUILT_LEGACY_DIR}/include/libxml2 - ) - -endif (STANDALONE) if (WINDOWS) # We don't need to explicitly link against gstreamer itself, because diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 3519ce4b9..4bde364ce 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -18,5 +18,5 @@ else (STANDALONE) elseif (LINUX) set(JSONCPP_LIBRARIES jsoncpp) endif (WINDOWS) - set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/jsoncpp) + set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/) endif (STANDALONE) diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 6cc325495..ad96be61b 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -12,7 +12,6 @@ endif (DARWIN) set(LLCOMMON_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/cwdebug ${LIBS_OPEN_DIR}/llcommon ${APRUTIL_INCLUDE_DIR} ${APR_INCLUDE_DIR} diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index f508d7e9a..ee465dc8b 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -21,9 +21,12 @@ if (WINDOWS) ${BOOST_SYSTEM_LIBRARIES} ) else (WINDOWS) - set(LLPRIMITIVE_LIBRARIES - llprimitive - ${COLLADADOM_LIBRARIES} - ) + set(LLPRIMITIVE_LIBRARIES + llprimitive + ${COLLADADOM_LIBRARIES} + ${BOOST_SYSTEM_LIBRARIES} + minizip + xml2 + ) endif (WINDOWS) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index c5de9d269..fee7f288c 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -14,18 +14,10 @@ if (STANDALONE) ) else (STANDALONE) if (LINUX) - use_prebuilt_binary(mesa) use_prebuilt_binary(SDL) set (SDL_FOUND TRUE) - set (SDL_INCLUDE_DIR - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_LEGACY_DIR}/include - ) - if(WORD_SIZE EQUAL 64) - set (SDL_LIBRARY SDL) - else(WORD_SIZE EQUAL 64) - set (SDL_LIBRARY SDL directfb fusion direct) - endif(WORD_SIZE EQUAL 64) + set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) + set (SDL_LIBRARY SDL) endif (LINUX) endif (STANDALONE) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 065e74da9..f58915934 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -1,5 +1,6 @@ # -*- cmake -*- include(Prebuilt) +include(FreeType) if (STANDALONE) include(FindPkgConfig) @@ -32,11 +33,10 @@ if (STANDALONE) endforeach(pkg) else (STANDALONE) if (LINUX) - use_prebuilt_binary(glib) # gtk-etc needs glib use_prebuilt_binary(gtk-atk-pango-glib) set(UI_LIBRARIES atk-1.0 - X11 + cairo gdk-x11-2.0 gdk_pixbuf-2.0 Xinerama @@ -48,19 +48,18 @@ else (STANDALONE) gtk-x11-2.0 pango-1.0 pangoft2-1.0 - pangox-1.0 pangoxft-1.0 pangocairo-1.0 + pixman-1 + X11 + ${FREETYPE_LIBRARIES} ) endif (LINUX) include_directories ( - ${LIBS_PREBUILT_DIR}/packages/include - ${LIBS_PREBUILT_DIR}/packages/include/cairo - ${LIBS_PREBUILT_DIR}/packages/include/pixman-1 - ${LIBS_PREBUILT_LEGACY_DIR}/include - ${LIBS_PREBUILT_LEGACY_DIR}/include/cairo - ${LIBS_PREBUILT_LEGACY_DIR}/include/pixman-1 + ${LIBS_PREBUILT_DIR}/include + ${LIBS_PREBUILT_DIR}/include/cairo + ${LIBS_PREBUILT_DIR}/include/pixman-1 ) foreach(include ${${LL_ARCH}_INCLUDES}) include_directories(${LIBS_PREBUILT_DIR}/include/${include}) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 016fdd10f..ed2f43e01 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -87,17 +87,26 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. if (WORD_SIZE EQUAL 32) + #message(STATUS "WORD_SIZE is 32") set(ARCH i686) + set(AUTOBUILD_PLATFORM_NAME "linux") elseif (WORD_SIZE EQUAL 64) + #message(STATUS "WORD_SIZE is 64") set(ARCH x86_64) + set(AUTOBUILD_PLATFORM_NAME "linux64") else (WORD_SIZE EQUAL 32) - if(CMAKE_SIZEOF_VOID_P MATCHES 4) - set(ARCH i686) - set(WORD_SIZE 32) - else(CMAKE_SIZEOF_VOID_P MATCHES 4) - set(ARCH x86_64) + #message(STATUS "WORD_SIZE is UNDEFINED") + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + message(STATUS "Size of void pointer is detected as 8; ARCH is 64-bit") set(WORD_SIZE 64) - endif(CMAKE_SIZEOF_VOID_P MATCHES 4) + set(AUTOBUILD_PLATFORM_NAME "linux64") + elseif (CMAKE_SIZEOF_VOID_P EQUAL 4) + message(STATUS "Size of void pointer is detected as 4; ARCH is 32-bit") + set(WORD_SIZE 32) + set(AUTOBUILD_PLATFORM_NAME "linux") + else() + message(FATAL_ERROR "Unkown Architecture!") + endif (CMAKE_SIZEOF_VOID_P EQUAL 8) endif (WORD_SIZE EQUAL 32) if (NOT STANDALONE AND MULTIARCH_HACK) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index c0a20e183..71bf0bd0b 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -4,10 +4,6 @@ include(Prebuilt) if (NOT STANDALONE) use_prebuilt_binary(slvoice) if(LINUX) - use_prebuilt_binary(libuuid) - if (${ARCH} STREQUAL "x86_64") - use_prebuilt_binary(32bitcompatibilitylibs) - endif (${ARCH} STREQUAL "x86_64") use_prebuilt_binary(fontconfig) endif(LINUX) else (NOT STANDALONE) diff --git a/indra/cmake/ZLIB.cmake b/indra/cmake/ZLIB.cmake index 48e5130ad..5b38fc1af 100644 --- a/indra/cmake/ZLIB.cmake +++ b/indra/cmake/ZLIB.cmake @@ -13,6 +13,21 @@ else (STANDALONE) set(ZLIB_LIBRARIES debug zlibd optimized zlib) + elseif (LINUX) + # + # When we have updated static libraries in competition with older + # shared libraries and we want the former to win, we need to do some + # extra work. The *_PRELOAD_ARCHIVES settings are invoked early + # and will pull in the entire archive to the binary giving it + # priority in symbol resolution. Beware of cmake moving the + # achive load itself to another place on the link command line. If + # that happens, you can try something like -Wl,-lz here to hide + # the archive. Also be aware that the linker will not tolerate a + # second whole-archive load of the archive. See viewer's + # CMakeLists.txt for more information. + # + set(ZLIB_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive) + set(ZLIB_LIBRARIES z) else (WINDOWS) set(ZLIB_LIBRARIES z) endif (WINDOWS) diff --git a/indra/libpathing/llpathinglib.cpp b/indra/libpathing/llpathinglib.cpp index 19c0bff0f..041311de9 100644 --- a/indra/libpathing/llpathinglib.cpp +++ b/indra/libpathing/llpathinglib.cpp @@ -1,4 +1,3 @@ -#include "sys.h" #include "llpathinglib.h" void LLPathingLib::initSystem() diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index c6a187840..78f50e6e3 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -2,7 +2,6 @@ project(llcommon) -include(Cwdebug) include(00-Common) include(LLCommon) include(APR) @@ -251,16 +250,16 @@ set(llcommon_HEADER_FILES set_source_files_properties(${llcommon_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES}) list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) +if(NOT WORD_SIZE EQUAL 32) + if(NOT WINDOWS) + add_definitions(-fPIC) + endif(NOT WINDOWS) +endif(NOT WORD_SIZE EQUAL 32) + if(LLCOMMON_LINK_SHARED) add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) - if(NOT WORD_SIZE EQUAL 32) - if(NOT WINDOWS) - add_definitions(-fPIC) - endif(NOT WINDOWS) - endif(NOT WORD_SIZE EQUAL 32) if(WINDOWS) # always generate llcommon.pdb, even for "Release" builds set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG") diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 33b6e9809..255f115c9 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -201,7 +201,7 @@ protected: #include typedef boost::recursive_mutex LLMutexImpl; typedef boost::condition_variable_any LLConditionVariableImpl; -#elif defined(USE_STD_MUTEX) && LL_CPP11 +#elif defined(USE_STD_MUTEX) && defined(LL_CPP11) #include typedef std::recursive_mutex LLMutexImpl; typedef std::condition_variable_any LLConditionVariableImpl; diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 36bcd266b..7ab4b0cbc 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -423,7 +423,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B // Set the application icon. SDL_Surface *bmpsurface; - bmpsurface = Load_BMP_Resource("singularity_icon.BMP"); + bmpsurface = Load_BMP_Resource("viewer_icon.BMP"); if (bmpsurface) { // This attempts to give a black-keyed mask to the icon. diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0b7ce2453..e34bb1097 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -40,28 +40,22 @@ include(TemplateCheck) include(UI) include(ViewerMiscLibs) include(WinManifest) - - -if (WINDOWS) - set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) - include(InstallRequiredSystemLibraries) -endif (WINDOWS) +include(ZLIB) include_directories( - ${CMAKE_SOURCE_DIR}/newview ${STATEMACHINE_INCLUDE_DIRS} ${DBUSGLIB_INCLUDE_DIRS} - ${HUNSPELL_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} - ${GLOD_INCLUDE_DIRS} + ${GLOD_INCLUDE_DIR} ${LLAUDIO_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} + ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} ${LLIMAGE_INCLUDE_DIRS} ${LLINVENTORY_INCLUDE_DIRS} ${LLMATH_INCLUDE_DIRS} ${LLMESSAGE_INCLUDE_DIRS} - ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} ${LLPLUGIN_INCLUDE_DIRS} ${LLPRIMITIVE_INCLUDE_DIRS} ${LLRENDER_INCLUDE_DIRS} @@ -69,6 +63,8 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} + ${HUNSPELL_INCLUDE_DIR} + ${LLAPPEARANCE_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -1613,6 +1609,8 @@ endif (WINDOWS) # To work around this, higher level modules should be listed before the modules # that they depend upon. -brad target_link_libraries(${VIEWER_BINARY_NAME} + ${PNG_PRELOAD_ARCHIVES} + ${ZLIB_PRELOAD_ARCHIVES} ${GOOGLE_PERFTOOLS_LIBRARIES} ${LLAUDIO_LIBRARIES} ${LLAUDIO_VORBIS_LIBRARIES} @@ -1665,8 +1663,7 @@ if (LINUX) # These are the generated targets that are copied to package/ set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} - linux-crash-logger - AlchemyPlugin + SLPlugin media_plugin_gstreamer010 llcommon ) @@ -1691,7 +1688,6 @@ if (LINUX) --standalone=${STANDALONE} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched DEPENDS - secondlife-stripped ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} ) diff --git a/indra/newview/linux_tools/wrapper.sh.in b/indra/newview/linux_tools/wrapper.sh similarity index 96% rename from indra/newview/linux_tools/wrapper.sh.in rename to indra/newview/linux_tools/wrapper.sh index 60c92485d..43b135a15 100755 --- a/indra/newview/linux_tools/wrapper.sh.in +++ b/indra/newview/linux_tools/wrapper.sh @@ -142,7 +142,7 @@ if [ -n "$LL_TCMALLOC" ]; then fi fi -export VIEWER_BINARY='@VIEWER_BRANDING_ID@-do-not-run-directly' +export VIEWER_BINARY='do-not-directly-run-singularity-bin' BINARY_TYPE=$(expr match "$(file -b bin/$VIEWER_BINARY)" '\(.*executable\)' | sed -e 's/ / /g') if [ "${BINARY_TYPE}" == "ELF 32-bit LSB executable" ]; then SL_ENV+='LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"' @@ -151,15 +151,9 @@ else fi export SL_CMD='$LL_WRAPPER bin/$VIEWER_BINARY' -if [ -n "$AITESTPLUGIN" ]; then - SL_CMD="$LL_WRAPPER bin/SLPlugin" - SL_OPT="TESTPLUGIN" -else - SL_OPT="`cat gridargs.dat` $@" -fi # Run the program. -eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || LL_RUN_ERR=runerr +eval ${SL_ENV} ${SL_CMD} || LL_RUN_ERR=runerr # Handle any resulting errors if [ "$LL_RUN_ERR" = "runerr" ]; then diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 14823bf31..9d006d2e0 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -70,7 +70,9 @@ #include "lldxhardware.h" #endif +#if !LL_LINUX #include "cef/llceflib.h" +#endif extern LLMemoryInfo gSysMemory; extern U32 gPacketsIn; @@ -286,10 +288,12 @@ LLFloaterAbout::LLFloaterAbout() support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" ); support.append("\n"); +#if !LL_LINUX // TODO: Implement media plugin version query support.append("LLCEFLib/CEF Version: "); support.append(LLCEFLIB_VERSION); support.append("\n"); +#endif if (gPacketsIn > 0) { diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 187e71a72..6039d5ec3 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -41,22 +41,6 @@ #include "linden_common.h" -// We may want to take the windows.h include out, but it used to be in -// linden_common.h, and hence in all the libraries. This is better. JC -#if LL_WINDOWS - // Limit Windows API to small and manageable set. - // If you get undefined symbols, find the appropriate - // Windows header file and include that in your .cpp file. - #define WIN32_LEAN_AND_MEAN - #include - #include -#endif - -// Work around stupid Microsoft STL warning -#ifdef LL_WINDOWS -#pragma warning (disable : 4702) // warning C4702: unreachable code -#endif - #include #include #include diff --git a/indra/newview/res-sdl/singularity_icon.BMP b/indra/newview/res-sdl/singularity_icon.BMP deleted file mode 100644 index 7e27d0eca..000000000 Binary files a/indra/newview/res-sdl/singularity_icon.BMP and /dev/null differ diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 19b1046ee..0c63924b2 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -865,17 +865,19 @@ class LinuxManifest(ViewerManifest): def construct(self): import shutil shutil.rmtree("./packaged/app_settings/shaders", ignore_errors=True); - super(LinuxManifest, self).construct() self.path("licenses-linux.txt","licenses.txt") - self.path("res/"+self.icon_name(),self.icon_name()) + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + if self.prefix("linux_tools", dst=""): self.path("client-readme.txt","README-linux.txt") self.path("client-readme-voice.txt","README-linux-voice.txt") self.path("client-readme-joystick.txt","README-linux-joystick.txt") - self.path("wrapper.sh",self.wrapper_name()) + self.path("wrapper.sh","singularity") if self.prefix(src="", dst="etc"): self.path("handle_secondlifeprotocol.sh") self.path("register_secondlifeprotocol.sh") @@ -886,16 +888,10 @@ class LinuxManifest(ViewerManifest): self.end_prefix("linux_tools") # Create an appropriate gridargs.dat for this package, denoting required grid. - self.put_in_file(self.flags_list(), 'gridargs.dat') - - ## Singu note: we'll go strip crazy later on - #if self.buildtype().lower()=='release': - # self.path("secondlife-stripped","bin/"+self.binary_name()) - #else: - # self.path("secondlife-bin","bin/"+self.binary_name()) - self.path("secondlife-bin","bin/"+self.binary_name()) + # self.put_in_file(self.flags_list(), 'gridargs.dat') if self.prefix(src="", dst="bin"): + self.path("secondlife-bin","do-not-directly-run-singularity-bin") self.path2basename("../llplugin/slplugin", "SLPlugin") self.end_prefix("bin") @@ -904,6 +900,16 @@ class LinuxManifest(ViewerManifest): # recurse self.end_prefix("res-sdl") + # Get the icons based on the channel type + icon_path = self.icon_path() + print "DEBUG: icon_path '%s'" % icon_path + if self.prefix(src=icon_path, dst="") : + self.path("viewer_256.png","viewer_icon.png") + if self.prefix(src="",dst="res-sdl") : + self.path("viewer_256.BMP","viewer_icon.BMP") + self.end_prefix("res-sdl") + self.end_prefix(icon_path) + # plugins if self.prefix(src="", dst="bin/llplugin"): self.path2basename("../plugins/filepicker", "libbasic_plugin_filepicker.so") @@ -913,123 +919,92 @@ class LinuxManifest(ViewerManifest): self.path("featuretable_linux.txt") - def wrapper_name(self): - return self.viewer_branding_id() - def binary_name(self): - return self.viewer_branding_id() + '-do-not-run-directly' - - def icon_name(self): - return self.viewer_branding_id() + "_icon.png" def package_finish(self): - if 'installer_name' in self.args: - installer_name = self.args['installer_name'] - else: - installer_name_components = [self.installer_prefix(), self.args.get('arch')] - installer_name_components.extend(self.args['version']) - installer_name = "_".join(installer_name_components) - if self.default_channel(): - if not self.default_grid(): - installer_name += '_' + self.args['grid'].upper() - else: - installer_name += '_' + self.channel_oneword().upper() + installer_name = self.installer_base_name() self.strip_binaries() # Fix access permissions self.run_command(""" - find '%(dst)s' -type d -print0 | xargs -0 --no-run-if-empty chmod 755; - find '%(dst)s' -type f -perm 0700 -print0 | xargs -0 --no-run-if-empty chmod 0755; - find '%(dst)s' -type f -perm 0500 -print0 | xargs -0 --no-run-if-empty chmod 0755; - find '%(dst)s' -type f -perm 0600 -print0 | xargs -0 --no-run-if-empty chmod 0644; - find '%(dst)s' -type f -perm 0400 -print0 | xargs -0 --no-run-if-empty chmod 0644; + find %(dst)s -type d | xargs --no-run-if-empty chmod 755; + find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755; + find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555; + find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644; + find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444; true""" % {'dst':self.get_dst_prefix() }) - self.package_file = installer_name + '.tar.bz2' + self.package_file = installer_name + '.tar.xz' # temporarily move directory tree so that it has the right # name in the tarfile - self.run_command("mv '%(dst)s' '%(inst)s'" % { + self.run_command("mv %(dst)s %(inst)s" % { 'dst': self.get_dst_prefix(), 'inst': self.build_path_of(installer_name)}) try: - # --numeric-owner hides the username of the builder for - # security etc. - self.run_command("tar -C '%(dir)s' --numeric-owner -cjf " - "'%(inst_path)s.tar.bz2' %(inst_name)s" % { - 'dir': self.get_build_prefix(), - 'inst_name': installer_name, - 'inst_path':self.build_path_of(installer_name)}) - print '' + # only create tarball if it's a release build. + if self.args['buildtype'].lower() == 'release': + # --numeric-owner hides the username of the builder for + # security etc. + self.run_command('tar -C %(dir)s --numeric-owner -cJf ' + '%(inst_path)s.tar.xz %(inst_name)s' % { + 'dir': self.get_build_prefix(), + 'inst_name': installer_name, + 'inst_path':self.build_path_of(installer_name)}) + else: + print "Skipping %s.tar.xz for non-Release build (%s)" % \ + (installer_name, self.args['buildtype']) finally: - self.run_command("mv '%(inst)s' '%(dst)s'" % { + self.run_command("mv %(inst)s %(dst)s" % { 'dst': self.get_dst_prefix(), 'inst': self.build_path_of(installer_name)}) def strip_binaries(self): - if self.args['buildtype'].lower() in ['release', 'releasesse2']: + if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - # makes some small assumptions about our packaged dir structure - self.run_command("find %(d)r/bin %(d)r/lib* -type f | xargs -d '\n' --no-run-if-empty strip --strip-unneeded" % {'d': self.get_dst_prefix()} ) - self.run_command("find %(d)r/bin %(d)r/lib* -type f -not -name \\*.so | xargs -d '\n' --no-run-if-empty strip -s" % {'d': self.get_dst_prefix()} ) + self.run_command(r"find %(d)r/bin %(d)r/lib %(d)r/lib32 %(d)r/lib64 -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + class Linux_i686_Manifest(LinuxManifest): def construct(self): super(Linux_i686_Manifest, self).construct() + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + # llcommon if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"): print "Skipping llcommon.so (assuming llcommon was linked statically)" - if (not self.standalone()) and self.prefix(src="../packages/lib/release", alt_build="../packages/libraries/i686-linux/lib/release", dst="lib"): + if (not self.standalone()) and self.prefix(src=relpkgdir, dst="lib"): self.path("libapr-1.so*") self.path("libaprutil-1.so*") - self.path("libdb*.so") self.path("libexpat.so*") - self.path("libglod.so") - self.path("libuuid.so*") + self.path("libGLOD.so") self.path("libSDL-1.2.so*") - self.path("libdirectfb-1.*.so*") - self.path("libfusion-1.*.so*") - self.path("libdirect-1.*.so*") - - self.path("libminizip.so.1.2.3", "libminizip.so"); - self.path("libhunspell-*.so.*") # OpenAL self.path("libalut.so") self.path("libopenal.so.1") - self.path("libcollada14dom.so.2.2", "libcollada14dom.so") - self.path("libcrypto.so*") - self.path("libssl.so*") self.path("libtcmalloc_minimal.so.0") self.path("libtcmalloc_minimal.so.0.2.2") - - # Boost - self.path("libboost_context-mt.so.*") - self.path("libboost_filesystem-mt.so.*") - self.path("libboost_program_options-mt.so.*") - self.path("libboost_regex-mt.so.*") - self.path("libboost_signals-mt.so.*") - self.path("libboost_system-mt.so.*") - self.path("libboost_thread-mt.so.*") - self.end_prefix("lib") - if (not self.standalone()) and self.prefix(src='', alt_build="../packages/lib/release", dst="lib"): - self.add_extra_libraries() - self.end_prefix() - # Vivox runtimes - if self.prefix(src="../packages/lib/release", dst="bin"): + if self.prefix(src=relpkgdir, dst="bin"): self.path("SLVoice") self.end_prefix("bin") - if self.prefix(src="../packages/lib/release", dst="lib"): + if self.prefix(src=relpkgdir, dst="lib"): self.path("libortp.so") + self.path("libsndfile.so.1") + self.path("libvivoxoal.so.1") self.path("libvivoxsdk.so") + self.path("libvivoxplatform.so") self.end_prefix("lib") + class Linux_x86_64_Manifest(LinuxManifest): def construct(self): super(Linux_x86_64_Manifest, self).construct() @@ -1038,64 +1013,49 @@ class Linux_x86_64_Manifest(LinuxManifest): if not self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so"): print "Skipping llcommon.so (assuming llcommon was linked statically)" - if (not self.standalone()) and self.prefix(src="../packages/lib/release", alt_build="../packages/libraries/x86_64-linux/lib/release", dst="lib64"): + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + + if (not self.standalone()) and self.prefix(relpkgdir, dst="lib64"): self.path("libapr-1.so*") self.path("libaprutil-1.so*") - - self.path("libdb-*.so*") - self.path("libexpat.so*") - self.path("libglod.so") - self.path("libssl.so*") - self.path("libuuid.so*") + self.path("libGLOD.so") self.path("libSDL-1.2.so*") - self.path("libminizip.so.1.2.3", "libminizip.so"); self.path("libhunspell-1.3.so*") - # OpenAL self.path("libalut.so*") self.path("libopenal.so*") + self.path("libfreetype.so*") - self.path("libcollada14dom.so.2.2", "libcollada14dom.so") - self.path("libcrypto.so.*") - self.path("libjpeg.so*") - self.path("libpng*.so*") - self.path("libz.so*") - - # Boost - self.path("libboost_context-mt.so.*") - self.path("libboost_filesystem-mt.so.*") - self.path("libboost_program_options-mt.so.*") - self.path("libboost_regex-mt.so.*") - self.path("libboost_signals-mt.so.*") - self.path("libboost_system-mt.so.*") - self.path("libboost_thread-mt.so.*") + try: + self.path("libtcmalloc.so*") #formerly called google perf tools + pass + except: + print "tcmalloc files not found, skipping" + pass + try: + self.path("libfmod.so*") + pass + except: + print "Skipping libfmod.so - not found" + pass self.end_prefix("lib64") - if (not self.standalone()) and self.prefix(src='', alt_build="../packages/lib/release", dst="lib64"): - self.add_extra_libraries() - self.end_prefix() - # Vivox runtimes - if self.prefix(src="../packages/lib/release", dst="bin"): + if self.prefix(src=relpkgdir, dst="bin"): self.path("SLVoice") self.end_prefix("bin") - if self.prefix(src="../packages/lib/release", dst="lib32"): - #self.path("libalut.so") + if self.prefix(src=relpkgdir, dst="lib32"): self.path("libortp.so") + self.path("libsndfile.so.1") + self.path("libvivoxoal.so.1") self.path("libvivoxsdk.so") + self.path("libvivoxplatform.so") self.end_prefix("lib32") - # 32bit libs needed for voice - if self.prefix(src="../packages/lib/release/32bit-compat", alt_build="../packages/libraries/x86_64-linux/lib/release/32bit-compat", dst="lib32"): - # Vivox libs - self.path("libalut.so") - self.path("libidn.so.11") - self.path("libopenal.so.1") - # self.path("libortp.so") - self.path("libuuid.so.1") - self.end_prefix("lib32") ################################################################ @@ -1121,3 +1081,4 @@ def symlinkf(src, dst): if __name__ == "__main__": main() + diff --git a/indra/plugins/CMakeLists.txt b/indra/plugins/CMakeLists.txt index d7da04544..3ff2a5357 100644 --- a/indra/plugins/CMakeLists.txt +++ b/indra/plugins/CMakeLists.txt @@ -3,7 +3,9 @@ add_subdirectory(base_basic) add_subdirectory(base_media) add_subdirectory(filepicker) +if (NOT LINUX) add_subdirectory(cef) +endif (NOT LINUX) if (LINUX) add_subdirectory(gstreamer010)