diff options
23 files changed, 285 insertions, 107 deletions
@@ -31,38 +31,39 @@ Third party maintained forks, which include Linux compatible builds, are indexed ### macOS ``` -# port install git cmake pkgconfig apr-util boost collada-dom freealut hunspell jsoncpp libsdl2 openjpeg uriparser -$ export LL_BUILD="-DLL_DARWIN=1 -DPIC -fPIC -gdwarf-2 -stdlib=libc++ -iwithsysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -std=c++17" +# port install git cmake pkgconfig freealut +universal apr-util +universal boost +universal collada-dom +universal hunspell +universal jsoncpp +universal openjpeg +universal libsdl2 +universal uriparser +universal +$ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -iwithsysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++17 -fPIC -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG -DPIC -DLL_DARWIN=1 -arch arm64" ``` ### Debian/Ubuntu ``` # apt install git cmake pkg-config libalut-dev libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libcurl4-openssl-dev libexpat1-dev libglu1-mesa-dev libgtk2.0-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libsdl2-dev libssl-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ export LL_BUILD="-DLL_LINUX=1 -fPIC" +$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" ``` ### Fedora ``` # dnf install git cmake gcc-c++ SDL2-devel apr-util-devel boost-devel collada-dom-devel expat-devel freealut-devel gtk2-devel hunspell-devel jsoncpp-devel libcurl-devel libnghttp2-devel libvorbis-devel mesa-libGLU-devel nanosvg-devel openjpeg2-devel openssl-devel uriparser-devel vlc-devel xmlrpc-epi-devel xxhash-devel zstd -$ export LL_BUILD="-DLL_LINUX=1 -fPIC" +$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" ``` ### FreeBSD ``` # portmaster devel/git devel/cmake devel/pkgconf devel/apr1 devel/collada-dom devel/sdl20 devel/xxhash audio/freealut audio/libvorbis graphics/nanosvg graphics/openjpeg misc/meshoptimizer multimedia/vlc net/uriparser net/xmlrpc-epi textproc/hunspell x11-toolkits/gtk20 -$ setenv LL_BUILD "-fPIC -std=c++17" +$ setenv LL_BUILD "-O3 -std=c++17 -fPIC" ``` ### Common ``` $ cd viewer -$ git remote add megapahit https://megapahit.org/viewer.git +$ git remote add megapahit git://megapahit.org/viewer.git $ git fetch megapahit $ git checkout megapahit/main +$ git switch -c megapahit $ mkdir -p build $ cd build $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DPACKAGE:BOOL=OFF -DINSTALL:BOOL=ON ../indra diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index a748237c5b..59620b60b4 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -6,32 +6,64 @@ set(INSTALL OFF CACHE BOOL "Generate install target.") if (INSTALL) - set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH - "Top-level installation directory.") - - if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) - set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) - set(_LIB lib64) - else () - set(_LIB lib) - endif () - - set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH - "Installation directory for read-only shared files.") - - set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH - "Installation directory for read-only shared files.") - - set(APP_BINARY_DIR ${INSTALL_PREFIX}/bin - CACHE PATH - "Installation directory for binaries.") - - set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME} - CACHE PATH - "Installation directory for read-only data files.") - - set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME} - CACHE PATH - "Installation directory for non-manual executables.") + + if (DARWIN) + + set(INSTALL_PREFIX + ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents + CACHE PATH + "Top-level installation directory.") + + set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/Resources + CACHE PATH + "Installation directory for read-only shared files.") + + set(INSTALL_SHARE_DIR ${INSTALL_LIBRARY_DIR} CACHE PATH + "Installation directory for read-only shared files.") + + set(APP_BINARY_DIR ${INSTALL_PREFIX}/MacOS + CACHE PATH + "Installation directory for binaries.") + + set(APP_SHARE_DIR ${INSTALL_SHARE_DIR} + CACHE PATH + "Installation directory for read-only data files.") + + set(APP_LIBEXEC_DIR ${INSTALL_LIBRARY_DIR} + CACHE PATH + "Installation directory for non-manual executables.") + + else (DARWIN) + + set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH + "Top-level installation directory.") + + if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) + set(_LIB lib/${ARCH}-linux-gnu) + elseif (EXISTS /lib64) + set(_LIB lib64) + else () + set(_LIB lib) + endif () + + set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH + "Installation directory for read-only shared files.") + + set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH + "Installation directory for read-only shared files.") + + set(APP_BINARY_DIR ${INSTALL_PREFIX}/bin + CACHE PATH + "Installation directory for binaries.") + + set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME} + CACHE PATH + "Installation directory for read-only data files.") + + set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME} + CACHE PATH + "Installation directory for non-manual executables.") + + endif (DARWIN) + endif (INSTALL) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index e86ddd8a32..c3752a4705 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -66,8 +66,13 @@ if (BUILD_SHARED_LIBS) endif () if (INSTALL) - install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) -endif () + if (DARWIN) + install(TARGETS ${PROJECT_NAME} + DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources) + else (DARWIN) + install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) + endif (DARWIN) +endif (INSTALL) if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 10920f1de3..9207e6ad73 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1001,6 +1001,7 @@ LLGLManager::LLGLManager() : mIsAMD(FALSE), mIsNVIDIA(FALSE), mIsIntel(FALSE), + mIsApple(FALSE), #if LL_DARWIN mIsMobileGF(FALSE), #endif @@ -1174,6 +1175,11 @@ bool LLGLManager::initGL() mGLVendorShort = "INTEL"; mIsIntel = TRUE; } + else if(mGLVendor.find("APPLE") != std::string::npos) + { + mGLVendorShort = "APPLE"; + mIsApple = TRUE; + } else { mGLVendorShort = "MISC"; @@ -1373,6 +1379,7 @@ void LLGLManager::asLLSD(LLSD& info) info["is_ati"] = mIsAMD; // note, do not rename is_ati to is_amd without coordinating with DW info["is_nvidia"] = mIsNVIDIA; info["is_intel"] = mIsIntel; + info["is_apple"] = mIsApple; info["gl_renderer"] = mGLRenderer; } diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 5a7ad943df..e4b106c999 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -100,6 +100,7 @@ public: BOOL mIsAMD; BOOL mIsNVIDIA; BOOL mIsIntel; + BOOL mIsApple; #if LL_DARWIN // Needed to distinguish problem cards on older Macs that break with Materials diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 783794512c..52fb58187a 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1155,19 +1155,40 @@ static void flush_vbo(GLenum target, U32 start, U32 end, void* data) LL_PROFILE_ZONE_NUM(end-start); U32 size = end-start+1; + U32 block_size = 65536; - //Note (observeur): glBufferSubData() was causing synchronization stalls, specialy on Apple GPUs, possibly to the fact Apple GPU is a tiled gpu, resulting to heavy stutters, and spacialy when called several times per frame on the same buffer. + //Note (observeur): The following code is executed on non Apple gpus. Using glMapBufferRange() didn't show obvious benefit on the other tested platforms (intel igpu, amd igpu and nVidia dgpus). + if(!gGLManager.mIsApple) + { + for (U32 i = start; i <= end; i += block_size) + { + LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData block"); + LL_PROFILE_GPU_ZONE("glBufferSubData"); + U32 tend = llmin(i + block_size, end); + U32 size = tend - i + 1; + glBufferSubData(target, i, size, (U8*) data + (i-start)); + } + + return; + } + + //Note (observeur): glBufferSubData() was causing synchronization stalls on Apple GPUs resulting to heavy stutters and lower performance in the world and UI rendering. Using glMapBufferRange() benefits Macs with Apple gpus enormously. - //Note (observeur): I maintained the notion of block_size for testing purpose, but i think it's a bad idea. We don't know the overhead of glMapBufferRange() depending on the driver, so it's better avoiding calling it more than necessary.(0 -> loop is disabled, 8192 -> original value, 524288 -> a resonable value). - constexpr U32 block_size = 0; + //Note (observeur): Other bits such as GL_MAP_INVALIDATE_RANGE_BIT or GL_MAP_UNSYNCHRONIZED_BIT didn't seem to make much of a difference on Apple gpus, so we stick to the simple way. + U32 MapBits = GL_MAP_WRITE_BIT; + //Note (observeur): Using a block size of 0 will call the following block and map the buffer all in once. It doesn't bother Apple machines, it might actually benefit them a little bit. A larger value is also fine. The largest buffers I observed where around 2mb or 3mb while most of buffers are smaller than 50000 bytes. + block_size = 524288; + + //Note (observeur): This is called in case block_size is set to 0 (All in one mapping). if(block_size == 0) { U8 * mptr = NULL; LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("glBufferSubData block"); LL_PROFILE_GPU_ZONE("glBufferSubData"); - mptr = (U8*) glMapBufferRange( target, start, size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT); + mptr = (U8*) glMapBufferRange( target, start, size, MapBits); + if(mptr) { std::memcpy(mptr, (U8*) data, size); @@ -1180,11 +1201,13 @@ static void flush_vbo(GLenum target, U32 start, U32 end, void* data) return; } + //Note (observeur): The following code is executed in case of block_size is superior to 0 + //Note (observeur): This is for analysis purpose only - if(size > block_size) - { - LL_INFOS() << "Large data range : " << size << LL_ENDL; - } + //if(size > block_size) + //{ + // LL_INFOS() << "Large data range (MB MODE) : " << size << LL_ENDL; + //} U8 * mptr = NULL; @@ -1195,7 +1218,8 @@ static void flush_vbo(GLenum target, U32 start, U32 end, void* data) U32 tend = llmin(i + block_size, end); size = tend - i + 1; - mptr = (U8*) glMapBufferRange( target, i, size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT); + mptr = (U8*) glMapBufferRange( target, i, size, MapBits ); + if(mptr) { std::memcpy(mptr, (U8*) data + (i-start), size); diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index b3dcac6222..e93ad28fdf 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -195,9 +195,15 @@ void LLKeyboard::resetKeys() } +#if LL_SDL +BOOL LLKeyboard::translateKey(const U32 os_key, KEY *out_key) +{ + std::map<U32, KEY>::iterator iter; +#else BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) { std::map<U16, KEY>::iterator iter; +#endif // Only translate keys in the map, ignore all other keys for now iter = mTranslateKeyMap.find(os_key); @@ -215,9 +221,15 @@ BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) } +#if LL_SDL +U32 LLKeyboard::inverseTranslateKey(const KEY translated_key) +{ + std::map<KEY, U32>::iterator iter; +#else U16 LLKeyboard::inverseTranslateKey(const KEY translated_key) { std::map<KEY, U16>::iterator iter; +#endif iter = mInvTranslateKeyMap.find(translated_key); if (iter == mInvTranslateKeyMap.end()) { diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index e406de347c..89fa840e42 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -67,14 +67,24 @@ public: BOOL getKeyDown(const KEY key) { return mKeyLevel[key]; } BOOL getKeyRepeated(const KEY key) { return mKeyRepeated[key]; } +#if LL_SDL + BOOL translateKey(const U32 os_key, KEY *translated_key); + U32 inverseTranslateKey(const KEY translated_key); +#else BOOL translateKey(const U16 os_key, KEY *translated_key); U16 inverseTranslateKey(const KEY translated_key); +#endif BOOL handleTranslatedKeyUp(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes BOOL handleTranslatedKeyDown(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes +#if LL_SDL + virtual BOOL handleKeyUp(const U32 key, MASK mask) = 0; + virtual BOOL handleKeyDown(const U32 key, MASK mask) = 0; +#else virtual BOOL handleKeyUp(const U16 key, MASK mask) = 0; virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0; +#endif #if defined(LL_DARWIN) && !defined(LL_SDL) // We only actually use this for OS X. @@ -111,8 +121,13 @@ protected: void addKeyName(KEY key, const std::string& name); protected: +#if LL_SDL + std::map<U32, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs + std::map<KEY, U32> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys +#else std::map<U16, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs std::map<KEY, U16> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys +#endif LLWindowCallbacks *mCallbacks; LLTimer mKeyLevelTimer[KEY_COUNT]; // Time since level was set diff --git a/indra/llwindow/llkeyboardheadless.cpp b/indra/llwindow/llkeyboardheadless.cpp index 01ac26261b..a3c86fde2b 100644 --- a/indra/llwindow/llkeyboardheadless.cpp +++ b/indra/llwindow/llkeyboardheadless.cpp @@ -35,11 +35,19 @@ void LLKeyboardHeadless::resetMaskKeys() { } +#if LL_SDL +BOOL LLKeyboardHeadless::handleKeyDown(const U32 key, const U32 mask) +#else BOOL LLKeyboardHeadless::handleKeyDown(const U16 key, const U32 mask) +#endif { return FALSE; } +#if LL_SDL +BOOL LLKeyboardHeadless::handleKeyUp(const U32 key, const U32 mask) +#else BOOL LLKeyboardHeadless::handleKeyUp(const U16 key, const U32 mask) +#endif { return FALSE; } MASK LLKeyboardHeadless::currentMask(BOOL for_mouse_event) diff --git a/indra/llwindow/llkeyboardheadless.h b/indra/llwindow/llkeyboardheadless.h index 8e067e6108..2bb670a53d 100644 --- a/indra/llwindow/llkeyboardheadless.h +++ b/indra/llwindow/llkeyboardheadless.h @@ -35,8 +35,13 @@ public: LLKeyboardHeadless(); /*virtual*/ ~LLKeyboardHeadless() {}; +#if LL_SDL + /*virtual*/ BOOL handleKeyUp(const U32 key, MASK mask); + /*virtual*/ BOOL handleKeyDown(const U32 key, MASK mask); +#else /*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask); /*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask); +#endif /*virtual*/ void resetMaskKeys(); /*virtual*/ MASK currentMask(BOOL for_mouse_event); /*virtual*/ void scanKeyboard(); diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 15b2d71923..5fb0158aa3 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -93,12 +93,14 @@ if (DARWIN) endif (DARWIN) if (INSTALL) - if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) - set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) - set(_LIB lib64) - else () - set(_LIB lib) - endif () - install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) -endif () + if (DARWIN) + set(_LIB ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/llplugin) + elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) + set(_LIB lib/${ARCH}-linux-gnu) + elseif (EXISTS /lib64) + set(_LIB lib64) + else (DARWIN) + set(_LIB lib) + endif (DARWIN) + install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) +endif (INSTALL) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index d5d9a5d147..2c70db1141 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -57,12 +57,14 @@ if (DARWIN) endif (DARWIN) if (INSTALL) - if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) - set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) - set(_LIB lib64) - else () - set(_LIB lib) - endif () - install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) -endif () + if (DARWIN) + set(_LIB ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/llplugin) + elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) + set(_LIB lib/${ARCH}-linux-gnu) + elseif (EXISTS /lib64) + set(_LIB lib64) + else (DARWIN) + set(_LIB lib) + endif (DARWIN) + install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB}) +endif (INSTALL) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4771dbfa1c..26d60bc947 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2173,6 +2173,7 @@ if (DARWIN) "${VIEWER_APP_BUNDLE}/Contents/Info.plist" ) + if (NOT INSTALL) add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD COMMAND ${PYTHON_EXECUTABLE} @@ -2197,6 +2198,7 @@ if (DARWIN) ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) + endif (NOT INSTALL) if (ENABLE_MEDIA_PLUGINS) if (DARWIN OR LINUX) diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in new file mode 100644 index 0000000000..73806642e4 --- /dev/null +++ b/indra/newview/FixBundle.cmake.in @@ -0,0 +1,7 @@ +include(BundleUtilities) + +set(dirs + /opt/local/lib + ) + +fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app "" "${dirs}") diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index e648d8cc47..7d9f160467 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -1,3 +1,59 @@ +if (DARWIN) + + install(DIRECTORY + English.lproj + German.lproj + Japanese.lproj + Korean.lproj + app_settings + character + cursors_mac + da.lproj + es.lproj + fonts + fr.lproj + uk.lproj + hu.lproj + it.lproj + nl.lproj + pl.lproj + pt.lproj + ru.lproj + skins + tr.lproj + zh-Hans.lproj + DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources + ) + + install(FILES + SecondLife.nib + ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt + cube.dae + featuretable_mac.txt + secondlife.icns + DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources + ) + + install(FILES + licenses-mac.txt + RENAME licenses.txt + DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources + ) + + install(FILES + ${SCRIPTS_DIR}/messages/message_template.msg + ${SCRIPTS_DIR}/../etc/message.xml + DESTINATION ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/app_settings + ) + + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake + ) + install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake) + +else (DARWIN) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} DESTINATION bin ) @@ -16,15 +72,19 @@ if (LINUX) endif () install(FILES ${AUTOBUILD_INSTALL_DIR}/lib/release/libcef.so + DESTINATION ${_LIB}) + if (USE_FMODSTUDIO) + install(FILES ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.so ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.so.13 ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.so.13.22 - DESTINATION ${_LIB}) + DESTINATION ${_LIB}) + endif (USE_FMODSTUDIO) install(PROGRAMS ${AUTOBUILD_INSTALL_DIR}/bin/release/chrome-sandbox DESTINATION libexec/${VIEWER_BINARY_NAME} - #PERMISSIONS SETUID OWNER_READ OWNER_WRITE OWNER_EXECUTE - #GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + #PERMISSIONS SETUID OWNER_READ OWNER_WRITE OWNER_EXECUTE + #GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) install(PROGRAMS ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host @@ -65,10 +125,16 @@ else (IS_ARTWORK_PRESENT) message(STATUS "WARNING: Artwork is not present, and will not be installed") endif (IS_ARTWORK_PRESENT) -install(FILES featuretable_linux.txt - #featuretable_solaris.txt - licenses.txt + install(FILES ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt + featuretable_linux.txt + #featuretable_solaris.txt + DESTINATION share/${VIEWER_BINARY_NAME} + ) + + install(FILES + licenses-linux.txt + RENAME licenses.txt DESTINATION share/${VIEWER_BINARY_NAME} ) @@ -77,6 +143,8 @@ install(FILES ${SCRIPTS_DIR}/messages/message_template.msg DESTINATION share/${VIEWER_BINARY_NAME}/app_settings ) -install(FILES linux_tools/${VIEWER_BINARY_NAME}.desktop + install(FILES linux_tools/${VIEWER_BINARY_NAME}.desktop DESTINATION share/applications ) + +endif (DARWIN) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2e305cc18d..c5e0ae7034 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2468,7 +2468,7 @@ <key>Value</key> <integer>0</integer> </map> - <key>DoubleClickTeleport</key> + <key>DoubleClickTeleport</key> <map> <key>Comment</key> <string>Enable double-click to teleport where allowed (afects minimap and people panel)</string> @@ -8898,7 +8898,7 @@ <key>Value</key> <integer>1</integer> </map> - + <key>RenderReflectionDetail</key> <map> <key>Comment</key> @@ -8965,7 +8965,7 @@ <key>Value</key> <real>1</real> </map> - + <key>RenderReflectionProbeDrawDistance</key> <map> <key>Comment</key> @@ -9153,7 +9153,7 @@ <key>Value</key> <real>0.7</real> </map> - + <key>RenderReflectionProbeMaxLocalLightAmbiance</key> <map> <key>Comment</key> @@ -10589,7 +10589,7 @@ <string>Boolean</string> <key>Value</key> <integer>0</integer> - </map> + </map> <key>NearbyListShowMap</key> <map> <key>Comment</key> @@ -13510,13 +13510,13 @@ <key>MaxFPS</key> <map> <key>Comment</key> - <string>OBSOLETE UNUSED setting.</string> + <string>FPS Limiter.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>F32</string> + <string>U32</string> <key>Value</key> - <real>-1.0</real> + <real>0</real> </map> <key>ZoomDirect</key> <map> @@ -15417,7 +15417,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>1</integer> </map> <key>UpdateAppWindowTitleBar</key> <map> diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 1912d9d1d5..8e8d7e6c50 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2663,9 +2663,9 @@ void LLAgentCamera::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, con if (mCameraAnimating) { - const F64 ANIM_METERS_PER_SECOND = 10.0; + const F64 ANIM_METERS_PER_SECOND = 15.0; const F64 MIN_ANIM_SECONDS = 0.5; - const F64 MAX_ANIM_SECONDS = 10.0; + const F64 MAX_ANIM_SECONDS = 3.0; F64 anim_duration = llmax( MIN_ANIM_SECONDS, sqrt(focus_delta_squared) / ANIM_METERS_PER_SECOND ); anim_duration = llmin( anim_duration, MAX_ANIM_SECONDS ); setAnimationDuration( (F32)anim_duration ); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ab87ff6d2c..1b1a47aa0d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -393,7 +393,6 @@ static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; -U64 fpsLimitSleepUntil = 0; // fps limiter : time until to render the frame again //---------------------------------------------------------------------------- @@ -1373,21 +1372,11 @@ bool LLAppViewer::frame() bool LLAppViewer::doFrame() { + static LLCachedControl<U32> fpsLimitMaxFps(gSavedSettings, "MaxFPS", 0); - // FPS Limit - - U64 fpsLimitNow = LLTrace::BlockTimer::getCPUClockCount64(); - U64 fpsLimitFrameStartTime = fpsLimitNow; - if(fpsLimitSleepUntil > 0) - { - if(fpsLimitSleepUntil > fpsLimitNow) return 0; - } - else - { - fpsLimitSleepUntil = 0; - } - - + U64 fpsLimitSleepFor = 0; + U64 fpsLimitFrameStartTime = 0; + if(fpsLimitMaxFps > 0) fpsLimitFrameStartTime = LLTrace::BlockTimer::getCPUClockCount64(); LL_RECORD_BLOCK_TIME(FTM_FRAME); { @@ -1559,24 +1548,17 @@ bool LLAppViewer::doFrame() } } - // fps limiter - - fpsLimitNow = LLTrace::BlockTimer::getCPUClockCount64(); - U64 fpsLimitFrameTime = fpsLimitNow - fpsLimitFrameStartTime; - static LLCachedControl<U32> fpsLimitMaxFps(gSavedSettings, "MaxFPS", 0); - if(fpsLimitMaxFps > 0) { + U64 fpsLimitFrameTime = LLTrace::BlockTimer::getCPUClockCount64() - fpsLimitFrameStartTime; U64 desired_time_ns = (U32)(1000000.f / fpsLimitMaxFps); - if(fpsLimitFrameTime < desired_time_ns) + if((fpsLimitFrameTime+1000) < desired_time_ns) { - U64 fpsLimitSleepUntil_for = desired_time_ns - fpsLimitFrameTime; - fpsLimitSleepUntil = LLTrace::BlockTimer::getCPUClockCount64() + fpsLimitSleepUntil_for; + fpsLimitSleepFor = (desired_time_ns - fpsLimitFrameTime - 1000) * 1.0; } } - { LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df pauseMainloopTimeout" ) pingMainloopTimeout("Main:Sleep"); @@ -1589,6 +1571,11 @@ bool LLAppViewer::doFrame() //LL_RECORD_BLOCK_TIME(SLEEP2); LL_PROFILE_ZONE_WARN( "Sleep2" ) + if(fpsLimitSleepFor) + { + usleep(fpsLimitSleepFor); + } + // yield some time to the os based on command line option static LLCachedControl<S32> yield_time(gSavedSettings, "YieldTime", -1); if(yield_time >= 0) diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 843bdfa42d..4851f65c48 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1096,7 +1096,7 @@ void LLFastTimerView::drawLineGraph() cur_max_calls = llmax(cur_max_calls, calls); } F32 x = mGraphRect.mRight - j * (F32)(mGraphRect.getWidth())/(mRecording.getNumRecordedPeriods()-1); - F32 y; + F32 y = 0.0; switch(mDisplayType) { case DISPLAY_TIME: diff --git a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png Binary files differindex f80b77aab5..6e71ef7b72 100644 --- a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png +++ b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png Binary files differindex 04d1c05e2e..f19fb0300b 100644 --- a/indra/newview/skins/default/textures/windows/Window_Background.png +++ b/indra/newview/skins/default/textures/windows/Window_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png Binary files differindex d74db0de7e..15d2ff72b6 100644 --- a/indra/newview/skins/default/textures/windows/Window_Foreground.png +++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png diff --git a/indra/newview/skins/default/textures/windows/first_login_image.jpg b/indra/newview/skins/default/textures/windows/first_login_image.jpg Binary files differindex 30f31341ed..860fed4ac7 100644 --- a/indra/newview/skins/default/textures/windows/first_login_image.jpg +++ b/indra/newview/skins/default/textures/windows/first_login_image.jpg |