Giter VIP home page Giter VIP logo

linc_discord-rpc's Introduction

linc/discord-RPC

Haxe/hxcpp @:native bindings for discord-rpc

example rpc


This library only works with the Haxe cpp target.


Install

haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc

Example Usage

See the test/cli folder for a simple command line program using the externs. For all the options you can pass to the initialize and presence functions remember to check the Discord-RPC docs as the haxe functions mirror the functionality.

linc_discord-rpc's People

Contributors

aidan63 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

linc_discord-rpc's Issues

can't open include file

When I put the command lime test windows it works fine and everything, but I get the error "can't open include file lib/discord-rpc/include/discord".

Type not found : DiscordClient

Trying to build mods for Linux for people to play, cuz not everyone knows how to build stuff who use Linux, hell, theres a lot of people on linux who dont even program, currently on Sonic.EXE 2.0 for this error

[NAME@PCNAME FOLDER_NAME]$ lime build linux
source/SoundTestMenu.hx:50: characters 4-17 : Type not found : DiscordClient

anyone know how to fix this issue?

pathspec

it says
You already have discord_rpc version git installed.
Updating discord_rpc version git ...
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
fix it

New Suggestion: Add Modern Discord RPC features

This Repository has been updated 5 months ago. And I think it needs an update.
You should add buttons

It could really help other people you know. For example:

  • Download like for a game
  • Documentation for coding
  • etc...

Discord RPC rapidjson/document.h Error

I've been getting errors with discord rpc, the error is this: C:\HaxeToolkit\haxe\lib\discord_rpc\git\lib\discord-rpc\src\serialization.h(13): fatal error C1083: Cannot open include file: 'rapidjson/document.h': No such file or directory

I have reinstalled discord rpc many times, with git, and without git, restarted my computer, updated haxe, and downgraded haxe, but i still get this error.

Friday Night Funkin

Hi, I did the command and this shows up.
Idk why it says fatal but yeah i need help to compile psych engine.
image

Multiple build problems

I'm building this with Haxe 4.2 & hxcpp 4.1.15 (updating it to 4.2.1 didn't seem to make a difference) on Linux, as a dependency of Friday Night Funkin'.

As observed in issue FunkinCrew/Funkin#625 (comment), #include <hxcpp.h> is failing because the build process generated a precompiled header file instead.

Creating /build/source/export/release/linux/obj/obj/linux64/__pch/haxe/hxcpp.h.gch...

Reintroducing the NO_PRECOMPILED_HEADERS variable from 0643716 fixes this problem.

After this, the compilation fails for me with

Error: ./src/discord_rpc/_DiscordRpc/DiscordRpc_Impl_.cpp: In static member function 'static void discord_rpc::_DiscordRpc::DiscordRpc_Impl__obj::_onRequest(const DiscordJoinRequest*)':
./src/discord_rpc/_DiscordRpc/DiscordRpc_Impl_.cpp:50:64: error: no match for call to '(Dynamic) (DiscordJoinRequest&)'
   50 | HXDLIN( 161)   ::discord_rpc::DiscordRpc_obj::onRequest(_hx_tmp);
      |                                                                ^
In file included from /nix/store/v8ynxhz2n58h96rwya65pi5mr6c2rd8n-hxcpp-4.2.1/lib/haxe/hxcpp/4,2,1/include/hxcpp.h:353:
/nix/store/v8ynxhz2n58h96rwya65pi5mr6c2rd8n-hxcpp-4.2.1/lib/haxe/hxcpp/4,2,1/include/Dynamic.h:304:22: note: candidate: 'Dynamic Dynamic::operator()()'
  304 |    inline  ::Dynamic operator()() { CheckFPtr(); return mPtr->__run(); }
      |                      ^~~~~~~~
/nix/store/v8ynxhz2n58h96rwya65pi5mr6c2rd8n-hxcpp-4.2.1/lib/haxe/hxcpp/4,2,1/include/Dynamic.h:304:22: note:   candidate expects 0 arguments, 1 provided
/nix/store/v8ynxhz2n58h96rwya65pi5mr6c2rd8n-hxcpp-4.2.1/lib/haxe/hxcpp/4,2,1/include/Dynamic.h:305:22: note: candidate: 'Dynamic Dynamic::operator()(const Dynamic&)'
  305 |    inline  ::Dynamic operator()(const Dynamic &inArg0) { CheckFPtr(); return mPtr->__run(inArg0); }
      |                      ^~~~~~~~
/nix/store/v8ynxhz2n58h96rwya65pi5mr6c2rd8n-hxcpp-4.2.1/lib/haxe/hxcpp/4,2,1/include/Dynamic.h:305:48: note:   no known conversion for argument 1 from 'DiscordJoinRequest' to 'const Dynamic&'
  305 |    inline  ::Dynamic operator()(const Dynamic &inArg0) { CheckFPtr(); return mPtr->__run(inArg0); }
      |

I don't program in Haxe but I could get the compilation to succees by changing these method signatures

public static var onRequest : JoinRequest->Void;

@:optional var onRequest : JoinRequest->Void;

to ConstPointer<JoinRequest>->Void and the method call in
if (DiscordRpc.onRequest != null) DiscordRpc.onRequest(ptr.value);

to DiscordRpc.onRequest(ptr);. Since the game doesn't use the onRequest method this works good enough for me, but I would appreciate if someone who actually knows what they're doing either verifies the fix or provides a better one ๐Ÿ˜….

rpc_connection.cpp

I found a bug it does not compile

Compiling group: native-discord-rpc
cl.exe -IC:/HaxeToolkit/haxe/lib/discord_rpc/git/lib/discord-rpc/include/ -IC:/HaxeToolkit/haxe/lib/discord_rpc/git/lib/rapidjson/include/ -nologo /WX- /fp:precise -DHX_WINDOWS -GR -O2(optim-std) -Zi(debug) -FdC:\Users\โ•งัŽั‹โ„–ั‡ัŽั‚ั€ะ„ั…ั‹โ„–\Projects\Ardub\Kade-Engine\export\release\windows\obj\obj/msvc19-arm64-nc/vc.pdb(debug) -Od(debug) -O2(release) -Os(optim-size) -FS -Oy- -c -EHs -GS- -IC:/HaxeToolkit/haxe/lib/hxcpp/4,2,1/include -DHXCPP_ARM64 -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_GC_BIG_BLOCKS(gc) -DHX_SMART_STRINGS(haxe) -DHXCPP_API_LEVEL=400(haxe) -D_CRT_SECURE_NO_DEPRECATE -D_ALLOW_MSC_VER_MISMATCH -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -DHX_WIN_MAIN(main) -wd4996 ... tags=[haxe,static]

  • C:/HaxeToolkit/haxe/lib/discord_rpc/git/lib/discord-rpc/src/serialization.cpp
  • C:/HaxeToolkit/haxe/lib/discord_rpc/git/lib/discord-rpc/src/discord-rpc.cpp
  • C:/HaxeToolkit/haxe/lib/discord_rpc/git/lib/discord-rpc/src/rpc_connection.cpp
    Error: rpc_connection.cpp
    C:\HaxeToolkit\haxe\lib\discord_rpc\git\lib\rapidjson\include\rapidjson\rapidjson.h(244): fatal error C1189: #error: Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.

:(

it doesn't work for building friday night funkin psych engine its says I have it when I don't and when I run lime test windows this pops up : Error: Source path "C:/HaxeToolkit/haxe/lib/discord_rpc/git/ndll/Windows64/extension-webm.ndll" does not exist please tell me how to fix this :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.