Skip to content

Commit 61d53a8

Browse files
committed
#4470 Plug in Discord SDK package
1 parent afcc64c commit 61d53a8

File tree

8 files changed

+105
-8
lines changed

8 files changed

+105
-8
lines changed

autobuild.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,6 +2896,64 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
28962896
<key>version</key>
28972897
<string>1.0.9-5e8947c</string>
28982898
</map>
2899+
<key>discord_sdk</key>
2900+
<map>
2901+
<key>platforms</key>
2902+
<map>
2903+
<key>windows64</key>
2904+
<map>
2905+
<key>archive</key>
2906+
<map>
2907+
<key>creds</key>
2908+
<string>github</string>
2909+
<key>hash</key>
2910+
<string>e11571bf76b27d15c244069988ae372eaa5afae9</string>
2911+
<key>hash_algorithm</key>
2912+
<string>sha1</string>
2913+
<key>url</key>
2914+
<string>https://api.github.com/repos/secondlife/3p-discord-sdk/releases/assets/279333720</string>
2915+
</map>
2916+
<key>name</key>
2917+
<string>windows64</string>
2918+
</map>
2919+
<key>darwin64</key>
2920+
<map>
2921+
<key>archive</key>
2922+
<map>
2923+
<key>creds</key>
2924+
<string>github</string>
2925+
<key>hash</key>
2926+
<string>dc21df8b051c425163acf3eff8f06e32f407c9e0</string>
2927+
<key>hash_algorithm</key>
2928+
<string>sha1</string>
2929+
<key>url</key>
2930+
<string>https://api.github.com/repos/secondlife/3p-discord-sdk/releases/assets/279333706</string>
2931+
</map>
2932+
<key>name</key>
2933+
<string>darwin64</string>
2934+
</map>
2935+
</map>
2936+
<key>license</key>
2937+
<string>discord_sdk</string>
2938+
<key>license_file</key>
2939+
<string>LICENSES/discord_sdk.txt</string>
2940+
<key>copyright</key>
2941+
<string>Discord Inc.</string>
2942+
<key>version</key>
2943+
<string>1.4.9649.16733550144</string>
2944+
<key>name</key>
2945+
<string>discord_sdk</string>
2946+
<key>vcs_branch</key>
2947+
<string>main</string>
2948+
<key>vcs_revision</key>
2949+
<string>ef5c7c4a490ceac2df2b2f046788b1daf1bbb392</string>
2950+
<key>vcs_url</key>
2951+
<string>https://github.com/secondlife/3p-discord-sdk</string>
2952+
<key>canonical_repo</key>
2953+
<string>https://github.com/secondlife/3p-discord-sdk</string>
2954+
<key>description</key>
2955+
<string>Discord Social SDK</string>
2956+
</map>
28992957
</map>
29002958
<key>package_description</key>
29012959
<map>
@@ -2917,6 +2975,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
29172975
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
29182976
<string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
29192977
<string>-DINSTALL_PROPRIETARY=TRUE</string>
2978+
<string>-DUSE_DISCORD:BOOL=ON</string>
29202979
<string>-DUSE_OPENAL:BOOL=ON</string>
29212980
</array>
29222981
</map>
@@ -2959,6 +3018,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
29593018
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
29603019
<string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
29613020
<string>-DINSTALL_PROPRIETARY=TRUE</string>
3021+
<string>-DUSE_DISCORD:BOOL=ON</string>
29623022
<string>-DUSE_OPENAL:BOOL=ON</string>
29633023
</array>
29643024
</map>

indra/cmake/Copy3rdPartyLibs.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
include(CMakeCopyIfDifferent)
88
include(Linking)
9+
include(Discord)
910
include(OPENAL)
1011

1112
# When we copy our dependent libraries, we almost always want to copy them to
@@ -75,6 +76,10 @@ if(WINDOWS)
7576
endif(ADDRESS_SIZE EQUAL 32)
7677
endif (USE_BUGSPLAT)
7778

79+
if (TARGET ll::discord_sdk)
80+
list(APPEND release_files discord_partner_sdk.dll)
81+
endif ()
82+
7883
if (TARGET ll::openal)
7984
list(APPEND release_files openal32.dll alut.dll)
8085
endif ()
@@ -180,6 +185,10 @@ elseif(DARWIN)
180185
)
181186
endif()
182187

188+
if (TARGET ll::discord_sdk)
189+
list(APPEND release_files libdiscord_partner_sdk.dylib)
190+
endif ()
191+
183192
if (TARGET ll::openal)
184193
list(APPEND release_files libalut.dylib libopenal.dylib)
185194
endif ()

indra/cmake/Discord.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
include(Prebuilt)
22

3-
add_library(ll::discord INTERFACE IMPORTED)
4-
target_compile_definitions(ll::discord INTERFACE LL_DISCORD=1)
3+
add_library(ll::discord_sdk INTERFACE IMPORTED)
4+
target_compile_definitions(ll::discord_sdk INTERFACE LL_DISCORD=1)
55

6-
use_prebuilt_binary(discord)
6+
use_prebuilt_binary(discord_sdk)
77

8-
target_include_directories(ll::discord SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
9-
target_link_libraries(ll::discord INTERFACE discord_partner_sdk)
8+
target_include_directories(ll::discord_sdk SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/discord_sdk)
9+
target_link_libraries(ll::discord_sdk INTERFACE discord_partner_sdk)

indra/newview/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,12 @@ if (WINDOWS)
17851785
)
17861786
endif (ADDRESS_SIZE EQUAL 64)
17871787

1788+
if (TARGET ll::discord_sdk)
1789+
list(APPEND COPY_INPUT_DEPENDENCIES
1790+
${SHARED_LIB_STAGING_DIR}/discord_partner_sdk.dll
1791+
)
1792+
endif ()
1793+
17881794
if (TARGET ll::openal)
17891795
list(APPEND COPY_INPUT_DEPENDENCIES
17901796
${SHARED_LIB_STAGING_DIR}/OpenAL32.dll
@@ -1801,6 +1807,7 @@ if (WINDOWS)
18011807
--arch=${ARCH}
18021808
--artwork=${ARTWORK_DIR}
18031809
"--bugsplat=${BUGSPLAT_DB}"
1810+
"--discord=${USE_DISCORD}"
18041811
"--openal=${USE_OPENAL}"
18051812
"--tracy=${USE_TRACY}"
18061813
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -1839,6 +1846,7 @@ if (WINDOWS)
18391846
--arch=${ARCH}
18401847
--artwork=${ARTWORK_DIR}
18411848
"--bugsplat=${BUGSPLAT_DB}"
1849+
"--discord=${USE_DISCORD}"
18421850
"--openal=${USE_OPENAL}"
18431851
"--tracy=${USE_TRACY}"
18441852
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -1903,6 +1911,7 @@ if (WINDOWS)
19031911
--arch=${ARCH}
19041912
--artwork=${ARTWORK_DIR}
19051913
"--bugsplat=${BUGSPLAT_DB}"
1914+
"--discord=${USE_DISCORD}"
19061915
"--openal=${USE_OPENAL}"
19071916
"--tracy=${USE_TRACY}"
19081917
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -1999,7 +2008,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
19992008
)
20002009

20012010
if (USE_DISCORD)
2002-
target_link_libraries(${VIEWER_BINARY_NAME} ll::discord )
2011+
target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk )
20032012
endif ()
20042013

20052014
if( TARGET ll::intel_memops )
@@ -2058,6 +2067,7 @@ if (LINUX)
20582067
--arch=${ARCH}
20592068
--artwork=${ARTWORK_DIR}
20602069
"--bugsplat=${BUGSPLAT_DB}"
2070+
"--discord=${USE_DISCORD}"
20612071
"--openal=${USE_OPENAL}"
20622072
"--tracy=${USE_TRACY}"
20632073
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -2086,6 +2096,7 @@ if (LINUX)
20862096
--arch=${ARCH}
20872097
--artwork=${ARTWORK_DIR}
20882098
"--bugsplat=${BUGSPLAT_DB}"
2099+
"--discord=${USE_DISCORD}"
20892100
"--openal=${USE_OPENAL}"
20902101
"--tracy=${USE_TRACY}"
20912102
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -2162,6 +2173,7 @@ if (DARWIN)
21622173
--arch=${ARCH}
21632174
--artwork=${ARTWORK_DIR}
21642175
"--bugsplat=${BUGSPLAT_DB}"
2176+
"--discord=${USE_DISCORD}"
21652177
"--openal=${USE_OPENAL}"
21662178
"--tracy=${USE_TRACY}"
21672179
--build=${CMAKE_CURRENT_BINARY_DIR}
@@ -2197,6 +2209,7 @@ if (DARWIN)
21972209
--arch=${ARCH}
21982210
--artwork=${ARTWORK_DIR}
21992211
"--bugsplat=${BUGSPLAT_DB}"
2212+
"--discord=${USE_DISCORD}"
22002213
"--openal=${USE_OPENAL}"
22012214
"--tracy=${USE_TRACY}"
22022215
--build=${CMAKE_CURRENT_BINARY_DIR}

indra/newview/llfloaterpreference.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ bool LLFloaterPreference::postBuild()
528528
getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true);
529529
}
530530

531+
#ifndef LL_DISCORD
532+
getChild<LLTabContainer>("privacy_tab_container")->childDisable("privacy_preferences_discord");
533+
#endif
534+
531535
return true;
532536
}
533537

indra/newview/llpanelpeople.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ void LLPanelPeople::updateNearbyList()
845845
mNearbyList->setDirty();
846846
#ifdef LL_DISCORD
847847
if (gSavedSettings.getBOOL("EnableDiscord"))
848-
LLAppViewer::updateDiscordPartyMaxSize(mNearbyList->getIDs().size());
848+
LLAppViewer::updateDiscordPartyMaxSize((S32)mNearbyList->getIDs().size());
849849
#endif
850850

851851
DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs());

indra/newview/llspeakers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ void LLLocalSpeakerMgr::updateSpeakerList()
10281028
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS);
10291029
#ifdef LL_DISCORD
10301030
if (gSavedSettings.getBOOL("EnableDiscord"))
1031-
LLAppViewer::updateDiscordPartyCurrentSize(avatar_ids.size());
1031+
LLAppViewer::updateDiscordPartyCurrentSize((S32)avatar_ids.size());
10321032
#endif
10331033
for(U32 i=0; i<avatar_ids.size(); i++)
10341034
{

indra/newview/viewer_manifest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ def construct(self):
556556
):
557557
self.path(libfile)
558558

559+
if self.args['discord'] == 'ON':
560+
self.path("discord_partner_sdk.dll")
561+
559562
if self.args['openal'] == 'ON':
560563
# Get openal dll
561564
self.path("OpenAL32.dll")
@@ -1018,6 +1021,13 @@ def path_optional(src, dst):
10181021
):
10191022
self.path2basename(relpkgdir, libfile)
10201023

1024+
# Discord social SDK
1025+
if self.args['DISCORD'] == 'ON':
1026+
for libfile in (
1027+
"libdiscord_partner_sdk.dylib",
1028+
):
1029+
self.path2basename(relpkgdir, libfile)
1030+
10211031
# OpenAL dylibs
10221032
if self.args['openal'] == 'ON':
10231033
for libfile in (
@@ -1384,6 +1394,7 @@ def construct(self):
13841394
extra_arguments = [
13851395
dict(name='bugsplat', description="""BugSplat database to which to post crashes,
13861396
if BugSplat crash reporting is desired""", default=''),
1397+
dict(name='discord', description="""Indication discord social sdk libraries are needed""", default='OFF'),
13871398
dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'),
13881399
dict(name='tracy', description="""Indication tracy profiler is enabled""", default='OFF'),
13891400
]

0 commit comments

Comments
 (0)