Completly build without Discord if no API Key is given.
parent
197e1ab3c6
commit
fd53956f30
|
|
@ -1,18 +1,17 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
|
||||
|
||||
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(discord-rpc)
|
||||
set(DISCORD_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/discord-rpc)
|
||||
if (ADDRESS_SIZE EQUAL 32 AND WINDOWS)
|
||||
set(DISCORD_LIBRARY discord-rpc)
|
||||
elseif (WINDOWS)
|
||||
set(DISCORD_LIBRARY discord-rpc_x64)
|
||||
elseif (LINUX OR DARWIN)
|
||||
set(DISCORD_LIBRARY libdiscord-rpc)
|
||||
endif (ADDRESS_SIZE EQUAL 32 AND WINDOWS)
|
||||
if (DISCORD_API_KEY)
|
||||
add_definitions( -DDISCORD_API_KEY=\"${DISCORD_API_KEY}\")
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(discord-rpc)
|
||||
set(DISCORD_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/discord-rpc)
|
||||
if (ADDRESS_SIZE EQUAL 32 AND WINDOWS)
|
||||
set(DISCORD_LIBRARY discord-rpc)
|
||||
elseif (WINDOWS)
|
||||
set(DISCORD_LIBRARY discord-rpc_x64)
|
||||
elseif (LINUX OR DARWIN)
|
||||
set(DISCORD_LIBRARY libdiscord-rpc)
|
||||
endif (ADDRESS_SIZE EQUAL 32 AND WINDOWS)
|
||||
add_definitions( -DDISCORD_API_KEY=\"${DISCORD_API_KEY}\")
|
||||
add_definitions( -DHAS_DISCORD )
|
||||
set(USE_DISCORD TRUE)
|
||||
endif (DISCORD_API_KEY)
|
||||
|
|
|
|||
|
|
@ -1794,8 +1794,10 @@ if (WINDOWS)
|
|||
)
|
||||
|
||||
#<FS:LO> Discord rich presence
|
||||
if( USE_DISCORD )
|
||||
LIST(APPEND viewer_HEADER_FILES fsfloaterdiscord.h fsdiscordconnect.h)
|
||||
LIST(APPEND viewer_SOURCE_FILES fsfloaterdiscord.cpp fsdiscordconnect.cpp)
|
||||
endif()
|
||||
#</FS:LO>
|
||||
|
||||
# precompiled header configuration
|
||||
|
|
@ -2438,9 +2440,12 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||
${LLPHYSICSEXTENSIONS_LIBRARIES}
|
||||
${LLAPPEARANCE_LIBRARIES}
|
||||
${GROWL_LIBRARY}
|
||||
${DISCORD_LIBRARY}
|
||||
)
|
||||
|
||||
if( USE_DISCORD )
|
||||
target_link_libraries(${VIEWER_BINARY_NAME} ${DISCORD_LIBRARY} )
|
||||
endif()
|
||||
|
||||
if (BUGSPLAT_DB)
|
||||
target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${BUGSPLAT_LIBRARIES}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,9 @@
|
|||
#include "fsfloateravatarrendersettings.h"
|
||||
#include "fsfloatercontacts.h"
|
||||
#include "fsfloatercontactsetconfiguration.h"
|
||||
#ifdef USE_DISCORD
|
||||
#include "fsfloaterdiscord.h"
|
||||
#endif
|
||||
#include "fsfloaterexport.h"
|
||||
#include "fsfloaterblocklist.h"
|
||||
#include "fsfloatergroup.h"
|
||||
|
|
@ -466,7 +468,9 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("fs_blocklist", "floater_fs_blocklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterBlocklist>);
|
||||
LLFloaterReg::add("fs_add_contact", "floater_fs_contact_add.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterAddToContactSet>);
|
||||
LLFloaterReg::add("fs_contact_set_config", "floater_fs_contact_set_configuration.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterContactSetConfiguration>);
|
||||
#ifdef USE_DISCORD
|
||||
LLFloaterReg::add("fs_discord", "floater_fs_discord.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterDiscord>);
|
||||
#endif
|
||||
LLFloaterReg::add("fs_group", "floater_fs_group.xml",&LLFloaterReg::build<FSFloaterGroup>);
|
||||
LLFloaterReg::add("fs_group_titles", "floater_fs_group_titles.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterGroupTitles>);
|
||||
LLFloaterReg::add("fs_export", "floater_fs_export.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterObjectExport>);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,9 @@
|
|||
#include "llsidepanelappearance.h"
|
||||
#include "fsavatarrenderpersistence.h"
|
||||
|
||||
#ifdef USE_DISCORD
|
||||
#include "fsdiscordconnect.h" // <FS:LO> tapping a place that happens on landing in world to start up discord
|
||||
#endif
|
||||
|
||||
extern F32 SPEED_ADJUST_MAX;
|
||||
extern F32 SPEED_ADJUST_MAX_SEC;
|
||||
|
|
@ -3080,8 +3082,10 @@ void LLVOAvatar::idleUpdateLoadingEffect()
|
|||
|
||||
// <FS:Zi> Animation Overrider
|
||||
AOEngine::instance().onLoginComplete();
|
||||
#ifdef USE_DISCORD
|
||||
// <FS:LO> tapping a place that happens on landing in world to start up discord
|
||||
FSDiscordConnect::instance().checkConnectionToDiscord(gSavedPerAccountSettings.getBOOL("FSEnableDiscordIntegration"));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue