Skip to content

Commit

Permalink
update README to latest information, add .dylib & .so libraries
Browse files Browse the repository at this point in the history
- README: adjust the mentioning of license to be more explicit
- README: separate the instruction for Windows into its own section
- README: add instruction for Mac (fixes #1)
- README: add instruction for Linux with note that it's not tested
- README: fix formatting to make it easier to read
- README: add mention of the .dylib and .so in "Binary libraries"
- added the library libdiscord-rpc.dylib to the project directly
- added the library libdiscord-rpc.so to the project directly
  • Loading branch information
mnh48 committed May 28, 2022
1 parent 9ca49db commit a0b033a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
56 changes: 45 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,41 @@
A Lua plugin (macro) for Aegisub to output currently editing
subtitle information to Discord Rich Presence


## Installation
### Windows
- Place the binary file `discord-rpc.dll` in your Aegisub installation folder.
- If you use the discouraged 64-bit Aegisub then please take the
provided `discord-rpc-64.dll` and rename it as `discord-rpc.dll`
before placing it in your Aegisub installation folder.
(I don't guarantee if it would work in 64-bit Aegisub because I
don't use them and I can't test it. Plus, the official website
also discouraged the use of 64-bit release due to lack of support
for most of its video tools and renderer)
- I don't guarantee if it would work in 64-bit Aegisub because I
don't use them and I can't test it. Plus, the official website
also discouraged the use of 64-bit release due to lack of support
for most of its video tools and renderer)
- Place the script `discord-rpc.lua` into the `automation\autoload` folder.

### Example
#### Example
If you installed Aegisub in `C:\Program Files (x86)\Aegisub` then:
- Place `discord-rpc.dll` in `C:\Program Files (x86)\Aegisub`.
- Place `discord-rpc.lua` in `C:\Program Files (x86)\Aegisub\automation\autoload`.
- Place `discord-rpc.lua` in
`C:\Program Files (x86)\Aegisub\automation\autoload`.

### Mac
(Thanks to @NeSubs and @ilovedaehwi for assisting this in issue #1)
- Place the binary file `libdiscord-rpc.dylib` in `/usr/local/lib`.
- If the directory `/usr/local/lib` does not exist, create it.
- Place the script `discord-rpc.lua` into the `automation/autoload` directory
where you had installed Aegisub in.

### Linux (not tested)
(While I use Linux alongside Windows, I don't have Aegisub compiled/installed
natively where this would apply, so I can't test it. When running Aegisub on
Linux using WINE, the instruction for Windows should be used instead of this)
- Place the binary file `libdiscord-rpc.so` in `/usr/local/lib`.
- If the directory `/usr/local/lib` does not exist, create it.
- Place the script `discord-rpc.lua` into the `automation/autoload` directory
where you had installed Aegisub in.


## Usage
When installed correctly, it will first start the rich presense
Expand Down Expand Up @@ -54,6 +74,7 @@ Aegisub is launched, but it seems that the Lua script is loaded
*before* the subtitle metadata itself, which is why I had to
implement the "click on menu to update Discord RPC" method.


## References
### Script
This script uses some code from pfirsich's `lua-discordRPC`.
Expand All @@ -62,17 +83,30 @@ to learn more, especially if you want to use Discord Rich Presence in Lua.

Their script is licensed under MIT.

### Binary
### Binary libraries
The binaries included in this repository came from Discord RPC
official releases. You can also download the binaries directly from
their [official repository](https://github.com/discordapp/discord-rpc/releases/latest "Latest Discord RPC release").

Make sure to take the dynamic version of binary:
- Take `discord-rpc/win32-dynamic/bin/discord-rpc.dll` for 32-bit Aegisub
- Take `discord-rpc/win64-dynamic/bin/discord-rpc.dll` for 64-bit Aegisub
- Take `discord-rpc/win32-dynamic/bin/discord-rpc.dll` from
`discord-rpc-win.zip` for 32-bit Aegisub on Windows
- Take `discord-rpc/win64-dynamic/bin/discord-rpc.dll` from
`discord-rpc-win.zip` for 64-bit Aegisub on Windows
- Take `discord-rpc/linux-dynamic/lib/libdiscord-rpc.so` from
`discord-rpc-linux.zip` for Linux
- Take `discord-rpc/osx-dynamic/lib/libdiscord-rpc.dylib` from
`discord-rpc-osx.zip` for Mac OS X

Their binaries and source code are licensed under MIT.


## License
This script and the included binaries are released under
[The MIT License](./LICENSE "Read full license text").
- This project is released under
[The MIT License](./LICENSE.txt "Read full license text").
- This project incorporated codes from
[lua-discordRPC](https://github.com/pfirsich/lua-discordRPC) which is released
under [The MIT License](./LICENSE.lua-discordRPC.txt "Read full license text").
- This project included the libraries from
[discord-rpc](https://github.com/discordapp/discord-rpc) which is released
under [The MIT License](./LICENSE.discord-rpc.txt "Read full license text").
Binary file added libdiscord-rpc.dylib
Binary file not shown.
Binary file added libdiscord-rpc.so
Binary file not shown.

0 comments on commit a0b033a

Please sign in to comment.