Skip to content

Commit

Permalink
Merge pull request #15 from PaulBGD/master
Browse files Browse the repository at this point in the history
Update to new SDK, add the currently playing song and program status …
  • Loading branch information
purpl3F0x authored Apr 24, 2020
2 parents 1b924f0 + e767add commit 0559fa4
Show file tree
Hide file tree
Showing 35 changed files with 831 additions and 834 deletions.
26 changes: 9 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set(CMAKE_AUTOMOC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)


# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)

Expand Down Expand Up @@ -72,31 +71,24 @@ if (WIN32)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
# 64 bits
message("\t64-bit")
target_include_directories(tidal-rpc PRIVATE discord-rpc/win64-static/include)
target_link_libraries(tidal-rpc ${CMAKE_SOURCE_DIR}/discord-rpc/win64-dynamic/lib/discord-rpc.lib)

configure_file(${CMAKE_SOURCE_DIR}/discord-rpc/win64-dynamic/bin/discord-rpc.dll ${CMAKE_BINARY_DIR}/discord-rpc.dll COPYONLY)
target_include_directories(tidal-rpc PRIVATE discord-game-sdk/c)
target_link_libraries(tidal-rpc ${CMAKE_SOURCE_DIR}/discord-game-sdk/lib/x86_64/discord_game_sdk.dll.lib)

configure_file(${CMAKE_SOURCE_DIR}/discord-game-sdk/lib/x86_64/discord_game_sdk.dll ${CMAKE_BINARY_DIR}/discord_game_sdk.dll COPYONLY)

elseif (CMAKE_SIZEOF_VOID_P EQUAL 4)
# 32 bits
message("\t32-bit")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
message("\tRunning on debug mode")
target_include_directories(tidal-rpc PRIVATE discord-rpc/win32-dynamic/include)
target_link_libraries(tidal-rpc ${CMAKE_SOURCE_DIR}/discord-rpc/win32-dynamic/lib/discord-rpc.lib)
configure_file(${CMAKE_SOURCE_DIR}/discord-rpc/win32-dynamic/bin/discord-rpc.dll ${CMAKE_BINARY_DIR}/discord-rpc.dll
COPYONLY)
else (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_include_directories(tidal-rpc PRIVATE discord-rpc/win32-static/include)
target_link_libraries(tidal-rpc ${CMAKE_SOURCE_DIR}/discord-rpc/win32-static/lib/discord-rpc.lib)
endif ()
target_include_directories(tidal-rpc PRIVATE discord-game-sdk/c)
target_link_libraries(tidal-rpc ${CMAKE_SOURCE_DIR}/discord-game-sdk/lib/x86/discord_game_sdk.dll.lib)

configure_file(${CMAKE_SOURCE_DIR}/discord-game-sdk/lib/x86/discord_game_sdk.dll ${CMAKE_BINARY_DIR}/discord_game_sdk.dll COPYONLY)
endif ()

elseif (APPLE)
message("Building for MacOS")
include_directories(discord-rpc/osx-static/include)
target_link_libraries(tidal-rpc ${CMAKE_BINARY_DIR}/discord-rpc/osx-static/lib/libdiscord-rpc.a)
include_directories(discord-game-sdk/c)
target_link_libraries(tidal-rpc ${CMAKE_BINARY_DIR}/discord-game-sdk/lib/x86_64/discord_game_sdk.dylib)
set(CMAKE_CXX_FLAGS "-framework carbon -framework foundation -framework CoreFoundation")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fast-math")
set(MACOSX_BUNDLE_BUNDLE_NAME rpc.tidal)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ The program registers an icon on the taskbar, ~~where you can see the song playi

![alt text](./assets/taskbar.jpg) ![alt text](./assets/taskbar_opened.png)

P.S. Remember to make sure you have Game Activity enabled!

![example of Game Activity tab inside of Discord Settings](https://user-images.githubusercontent.com/3516420/80171200-53356280-85af-11ea-8a51-66b3780250be.png)


## Build Instructions

Expand Down
Loading

0 comments on commit 0559fa4

Please sign in to comment.