Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2896,6 +2896,64 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>version</key>
<string>1.0.9-5e8947c</string>
</map>
<key>discord_sdk</key>
<map>
<key>platforms</key>
<map>
<key>windows64</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>e11571bf76b27d15c244069988ae372eaa5afae9</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife/3p-discord-sdk/releases/assets/279333720</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
<key>darwin64</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>dc21df8b051c425163acf3eff8f06e32f407c9e0</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife/3p-discord-sdk/releases/assets/279333706</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
</map>
<key>license</key>
<string>discord_sdk</string>
<key>license_file</key>
<string>LICENSES/discord_sdk.txt</string>
<key>copyright</key>
<string>Discord Inc.</string>
<key>version</key>
<string>1.4.9649.16733550144</string>
<key>name</key>
<string>discord_sdk</string>
<key>vcs_branch</key>
<string>main</string>
<key>vcs_revision</key>
<string>ef5c7c4a490ceac2df2b2f046788b1daf1bbb392</string>
<key>vcs_url</key>
<string>https://github.com/secondlife/3p-discord-sdk</string>
<key>canonical_repo</key>
<string>https://github.com/secondlife/3p-discord-sdk</string>
<key>description</key>
<string>Discord Social SDK</string>
</map>
</map>
<key>package_description</key>
<map>
Expand All @@ -2917,6 +2975,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
<string>-DINSTALL_PROPRIETARY=TRUE</string>
<string>-DUSE_DISCORD:BOOL=ON</string>
<string>-DUSE_OPENAL:BOOL=ON</string>
</array>
</map>
Expand Down Expand Up @@ -2959,6 +3018,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
<string>-DINSTALL_PROPRIETARY=TRUE</string>
<string>-DUSE_DISCORD:BOOL=ON</string>
<string>-DUSE_OPENAL:BOOL=ON</string>
</array>
</map>
Expand Down
11 changes: 11 additions & 0 deletions indra/cmake/Copy3rdPartyLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

include(CMakeCopyIfDifferent)
include(Linking)
if (USE_DISCORD)
include(Discord)
endif ()
include(OPENAL)

# When we copy our dependent libraries, we almost always want to copy them to
Expand Down Expand Up @@ -75,6 +78,10 @@ if(WINDOWS)
endif(ADDRESS_SIZE EQUAL 32)
endif (USE_BUGSPLAT)

if (TARGET ll::discord_sdk)
list(APPEND release_files discord_partner_sdk.dll)
endif ()

if (TARGET ll::openal)
list(APPEND release_files openal32.dll alut.dll)
endif ()
Expand Down Expand Up @@ -180,6 +187,10 @@ elseif(DARWIN)
)
endif()

if (TARGET ll::discord_sdk)
list(APPEND release_files libdiscord_partner_sdk.dylib)
endif ()

if (TARGET ll::openal)
list(APPEND release_files libalut.dylib libopenal.dylib)
endif ()
Expand Down
12 changes: 7 additions & 5 deletions indra/cmake/Discord.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
include(Prebuilt)

add_library(ll::discord INTERFACE IMPORTED)
target_compile_definitions(ll::discord INTERFACE LL_DISCORD=1)
include_guard()

use_prebuilt_binary(discord)
add_library(ll::discord_sdk INTERFACE IMPORTED)
target_compile_definitions(ll::discord_sdk INTERFACE LL_DISCORD=1)

target_include_directories(ll::discord SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
target_link_libraries(ll::discord INTERFACE discord_partner_sdk)
use_prebuilt_binary(discord_sdk)

target_include_directories(ll::discord_sdk SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/discord_sdk)
target_link_libraries(ll::discord_sdk INTERFACE discord_partner_sdk)
15 changes: 14 additions & 1 deletion indra/newview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,12 @@ if (WINDOWS)
)
endif (ADDRESS_SIZE EQUAL 64)

if (TARGET ll::discord_sdk)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/discord_partner_sdk.dll
)
endif ()

if (TARGET ll::openal)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/OpenAL32.dll
Expand All @@ -1801,6 +1807,7 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -1839,6 +1846,7 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -1903,6 +1911,7 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -1999,7 +2008,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
)

if (USE_DISCORD)
target_link_libraries(${VIEWER_BINARY_NAME} ll::discord )
target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk )
endif ()

if( TARGET ll::intel_memops )
Expand Down Expand Up @@ -2058,6 +2067,7 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -2086,6 +2096,7 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -2162,6 +2173,7 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -2197,6 +2209,7 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
--build=${CMAKE_CURRENT_BINARY_DIR}
Expand Down
4 changes: 4 additions & 0 deletions indra/newview/llfloaterpreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ bool LLFloaterPreference::postBuild()
getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true);
}

#ifndef LL_DISCORD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be smarter the other way around: Have it disabled by default and only enable if Discord Rich Presence support is available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be, that's a quick fix I made when I saw that checkboxes are active. I might end up erasing the tab entirely.

getChild<LLTabContainer>("privacy_tab_container")->childDisable("privacy_preferences_discord");
#endif

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llpanelpeople.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ void LLPanelPeople::updateNearbyList()
mNearbyList->setDirty();
#ifdef LL_DISCORD
if (gSavedSettings.getBOOL("EnableDiscord"))
LLAppViewer::updateDiscordPartyMaxSize(mNearbyList->getIDs().size());
LLAppViewer::updateDiscordPartyMaxSize((S32)mNearbyList->getIDs().size());
#endif

DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs());
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llspeakers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ void LLLocalSpeakerMgr::updateSpeakerList()
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS);
#ifdef LL_DISCORD
if (gSavedSettings.getBOOL("EnableDiscord"))
LLAppViewer::updateDiscordPartyCurrentSize(avatar_ids.size());
LLAppViewer::updateDiscordPartyCurrentSize((S32)avatar_ids.size());
#endif
for(U32 i=0; i<avatar_ids.size(); i++)
{
Expand Down
1 change: 0 additions & 1 deletion indra/newview/skins/default/textures/textures.xml
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ with the same filename but different name

<texture name="login_sl_logo" file_name="windows/login_sl_logo.png" preload="true" />
<texture name="login_sl_logo_small" file_name="windows/login_sl_logo_small.png" preload="true" />
<texture name="first_login_image" file_name="windows/first_login_image.jpg" preload="true" />

<texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="false" />
<texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="false" />
Expand Down
11 changes: 11 additions & 0 deletions indra/newview/viewer_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ def construct(self):
):
self.path(libfile)

if self.args['discord'] == 'ON':
self.path("discord_partner_sdk.dll")

if self.args['openal'] == 'ON':
# Get openal dll
self.path("OpenAL32.dll")
Expand Down Expand Up @@ -1018,6 +1021,13 @@ def path_optional(src, dst):
):
self.path2basename(relpkgdir, libfile)

# Discord social SDK
if self.args['discord'] == 'ON':
for libfile in (
"libdiscord_partner_sdk.dylib",
):
self.path2basename(relpkgdir, libfile)

# OpenAL dylibs
if self.args['openal'] == 'ON':
for libfile in (
Expand Down Expand Up @@ -1384,6 +1394,7 @@ def construct(self):
extra_arguments = [
dict(name='bugsplat', description="""BugSplat database to which to post crashes,
if BugSplat crash reporting is desired""", default=''),
dict(name='discord', description="""Indication discord social sdk libraries are needed""", default='OFF'),
dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'),
dict(name='tracy', description="""Indication tracy profiler is enabled""", default='OFF'),
]
Expand Down
Loading