-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
3,751 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# common cache files | ||
/__pycache__ | ||
/.vscode | ||
# pyinstaller | ||
/build | ||
/dist | ||
*.spec | ||
# virtualenv | ||
/venv | ||
# the configuration file | ||
config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<p align="center"> | ||
<img aligh="left"width="256px" height="256px" src="https://i.living-me.me/i/fckk.png"> | ||
</p> | ||
|
||
<h1 align="center">RPCGecko</h1> | ||
<h4 align="center">A configurable Discord Rich Presence app for the Wii U</h4> | ||
|
||
## Usage | ||
|
||
Download the [latest release](https://github.com/dmgrstuff/rpcgecko/releases/latest) and run the executable, or see the [build instructions](https://github.com/dmgrstuff/rpcgecko/blob/main/docs/building.md) to build or run it from source. | ||
|
||
The first time you run RPCGecko, it will ask for your Wii U's local IP address as well as your Nintendo Network ID if you want to display it. A `config.yml` file will be created in the same directory so you'll want to put the executable somewhere convenient. You can change any of these settings from within the application or by editing the file manually. | ||
|
||
Once TCPGecko is running on your Wii U, you can connect to it (and Discord) in RPCGecko's terminal-based menu. | ||
|
||
## Known issues | ||
|
||
#### RPCGecko limitations | ||
|
||
- Not all Wii U games will display icons in your status - this is because Discord requires Rich Presence assets to be manually uploaded to their developer portal. If a game you play doesn't have an icon (which is likely the case), it is possible to [add your own](https://github.com/dmgrstuff/rpcgecko/blob/main/docs/custom-assets.md). | ||
|
||
#### TCPGecko limitations | ||
|
||
- TCPGecko can cause some applications, like **YouTube**, to freeze your console. Also, apps accessible through the in-game HOME Menu (like the **Friends List** and **Internet Browser**) can cause TCPGecko to hang until you exit them. | ||
- Exiting **System Settings** will unload TCPGecko (and other homebrew) from memory. This will cause the connection to timeout and you'll need to re-run the TCPGecko Installer to continue using RPCGecko. | ||
- vWii will likely never be supported because of the way backwards compatibility works on the Wii U. | ||
|
||
If you find something else that doesn't work or just need help, feel free to file an issue and I'll try to help you out as best I can. | ||
|
||
## Credits | ||
|
||
**Rambo6Glaz** and **twosecslater** for the idea behind this project and [some implementations](https://github.com/NexoDevelopment/WiiU-DiscordRichPresence) that helped me | ||
|
||
**Chadderz**, **Marionumber1**, **NWPlayer123**, **wj44**, and all who contributed to the development of TCPGecko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# /assets | ||
|
||
This directory contains all the rich presence art assets RPCGecko uses. To add your own game icons or other assets, you'll need to create a new application in your [Discord Developer Portal](https://discord.com/developers), upload your assets there, and change the application ID in RPCGecko's settings accordingly. | ||
|
||
This might sound complex, but it's actually pretty simple. Check out [custom-assets.md](https://github.com/dmgrstuff/rpcgecko/blob/main/docs/custom-assets.md) for some more detailed instructions. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import struct | ||
|
||
class switch(object): #Taken from http://code.activestate.com/recipes/410692/ | ||
def __init__(self, value): | ||
self.value = value | ||
self.fall = False | ||
|
||
def __iter__(self): | ||
"""Return the match method once, then stop""" | ||
yield self.match | ||
raise StopIteration | ||
|
||
def match(self, *args): | ||
"""Indicate whether or not to enter a case suite""" | ||
if self.fall or not args: | ||
return True | ||
elif self.value in args: | ||
self.fall = True | ||
return True | ||
else: | ||
return False | ||
'''Example Use Case for switch: | ||
for case in switch(variable): | ||
if case(0): | ||
#dostuff | ||
elif case(1): | ||
#dostuff | ||
else: #default | ||
#dodefaultstuff''' | ||
|
||
def hexstr(data, length): #Pad hex to value for prettyprint | ||
return hex(data).lstrip("0x").rstrip("L").zfill(length).upper() | ||
def hexstr0(data): #Uppercase hex to string | ||
return "0x" + hex(data).lstrip("0x").rstrip("L").upper() | ||
def binr(byte): #Get bits as a string | ||
return bin(byte).lstrip("0b").zfill(8) | ||
def uint8(data, pos): | ||
return struct.unpack(">B", data[pos:pos + 1])[0] | ||
def uint16(data, pos): | ||
return struct.unpack(">H", data[pos:pos + 2])[0] | ||
def uint24(data, pos): | ||
return struct.unpack(">I", "\00" + data[pos:pos + 3])[0] #HAX | ||
def uint32(data, pos): | ||
return struct.unpack(">I", data[pos:pos + 4])[0] | ||
|
||
def getstr(data, pos): #Keep incrementing till you hit a stop | ||
string = "" | ||
while data[pos] != 0: | ||
if pos != len(data): | ||
string += chr(data[pos]) | ||
pos += 1 | ||
else: break | ||
return string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Building from source | ||
|
||
While you can run RPCGecko from a pre-built executable or directly from source with `python rpcgecko.py`, you might want to build an executable yourself. Here are some steps to do just that. | ||
|
||
## Requirements | ||
|
||
A **non-Microsoft Store** install of the latest [**Python 3.8***](https://python.org/downloads) release | ||
|
||
[**Git**](http://git-scm.com/downloads) is helpful, but isn't strictly required | ||
|
||
A computer running the OS you're compiling for (Windows, macOS, or Linux) | ||
|
||
**Python 3.9 will most likely work, but I haven't tested it extensively. You'll also need to use 3.8 if you need support for Windows 7.* | ||
|
||
--- | ||
|
||
**1.** First things first, clone the repo by running `git clone https://github.com/dmgrstuff/rpcgecko.git && cd rpcgecko`. | ||
|
||
If you don't have **Git** or can't in stall it, you can just download the .zip and extract it somewhere convenient. | ||
|
||
*I'd recommended making a* ***virtual environment*** *before you start to avoid polluting your main Python install with packages you likely won't use in the future. Run `pip install virtualenv` and then `virtualenv venv` to set one up.* | ||
|
||
*Switch to the new environment by running `source venv` (for Mac or Linux) or `.\venv\Scripts\activate.bat (?)` on Windows.* | ||
|
||
**2.** Run `pip install pyinstaller`, followed by `pip install requirements.txt`. This installs all the required modules. | ||
|
||
**3.** To build the executable as a single file, run `pyinstaller -F rpcgecko.py`. This creates a single `rpcgecko` executable in `\dist\rpcgecko`. It's slower, as necessary files are extracted to a temporary folder before running it, but more portable. | ||
|
||
(If you find it too slow and don't care about portability, a faster option would be to build it as a directory with `pyinstaller rpcgecko.py`.) | ||
|
||
*Make sure to include `titles.csv` in the same directory as the executable. This will probably be somewhat automated in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Adding your own assets to RPCGecko | ||
|
||
A lot of Wii U games don't have icons in RPCGecko, and **this is not a bug!** Because of the way Rich Presence works, I have to pre-upload all the assets I want to use (with a max of 150 images) to Discord's developer portal, so some games will only show the default "Wii U" logo. | ||
|
||
While I'm working on adding support for more titles, it's actually really simple to add your own by making your own Discord application with your desired assets, and there are only a couple steps to make it stick in RPCGecko. Here's how you can do it. | ||
|
||
**1.** Go to the [Discord Developer Portal](https://discord.com/developers) and log in with your Discord account if you're prompted to. Create a new application and give it a name. This name shows under your "Playing" status, so you might want to call it `Wii U` or something similar. | ||
|
||
**2.** Under `Rich Presence`, upload your assets and give them a name without spaces. Discord requires these images to be at least 512x512, but upscaling smaller images with something like [waifu2x](https://waifu2x.udp.jp) or just resizing them in an image editor usually gives decent results since Discord doesn't display them very large anyways. | ||
|
||
(The icons I've included under `/assets` are just 128x icons, dumped from the title contents and run through waifu2x twice, if you're wondering.) | ||
|
||
**3.** Go back to `General Information` and copy the client ID - you'll need it later to point RPCGecko to the application with your custom assets. | ||
|
||
**4.** Open `titles.csv` in Excel, LibreOffice Calc, or just a basic text editor. Search for your game's name and insert the name you chose in the developer portal for its icon under the `title_icon` column (or after the fourth `,`). Save the file and close your editor. | ||
|
||
**5.** Open RPCGecko, choose `Settings`, then `Discord client ID`. Paste the client ID you copied from the developer portal here. | ||
|
||
Assuming you did everything here (and gave Discord a bit of time to cache the assets), you should now see custom icons in your Discord status when RPCGecko is connected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
certifi==2020.12.5 | ||
chardet==4.0.0 | ||
colorama==0.4.4 | ||
idna==2.10 | ||
pypresence==4.2.0 | ||
PyYAML==5.4.1 | ||
requests==2.25.1 | ||
urllib3==1.26.3 |
Oops, something went wrong.