Skip to content

Commit a0979ff

Browse files
committed
Force Update » Extended GUI implementation | TODO: Presence preview/advanced settings
0 parents  commit a0979ff

43 files changed

Lines changed: 3746 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Eclipse
2+
bin/
3+
.settings/
4+
.classpath
5+
.project
6+
7+
# IntelliJ
8+
out/
9+
*.iml
10+
.idea/
11+
12+
# project maven
13+
dependency-reduced-pom.xml
14+
target/
15+
16+

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Simple Java Discord Rich Presence GUI
2+
3+
### Author: depascaldc
4+
5+
#### Cross-Platform Java-Tool
6+
7+
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)
8+
9+
10+
### Easily and simply to use manager to manage the RichPresence of Discord
11+
12+
## Download JAR / .exe / AppImage
13+
- [RELEASES Download](https://github.com/depascaldc/Java-DiscordRPC-GUI/releases/)
14+
15+
---
16+
## Build JAR file
17+
- `git clone https://github.com/depascaldc/MinecraftServermanager`
18+
- `cd Java-DiscordRPC-GUI`
19+
- `mvn clean package`
20+
21+
---
22+
23+
## Run the GUI
24+
---
25+
26+
Simply run `java -jar Java-DiscordRPC-GUI.jar`
27+
28+
---
29+
30+
31+
### Configuration File Directory ( presence.properties )
32+
33+
- Windows: `C:\\Users\YourUserName\AppData\Local\de.depascaldc\JavaDRPCTool\v1.0.0\`
34+
35+
- Linux. `/home/YourUserName/.config/JavaDRPCTool/v1.0.0/`
36+
37+
---
38+
39+
## Getting started
40+
-------------
41+
How to create an application for the Rich Presence?
42+
- Visit the [Discord Developer Portal](https://discord.com/developers) and click the button `New Application`
43+
- After that you need to upload some pictures ( if you want ) at the `Rich Presence` tab of the application.
44+
- If you have done just copy the Apllication/Client ID in the `general`tab
45+
46+
Init my new Presence
47+
- In the GUI is the field Client ID. Just paste the copied ID there.
48+
- After that you can change the Details and the State of the presence.
49+
- Here is a small overview above the availeble fields in the presence ( Source [discord.com](https://discord.com/developers/docs/rich-presence/how-to) )
50+
51+
[![Discord RPC Fields](https://discord.com/assets/43bef54c8aee2bc0fd1c717d5f8ae28a.png)](https://discord.com/assets/43bef54c8aee2bc0fd1c717d5f8ae28a.png)
52+
53+
54+
- After you have done these steps Just submit the new cool Rich Presence by using the `Fire RPC!` button in the GUI
55+
56+
-------------
57+
58+
59+
### After all this stuff... MUCH FUN with your new cool and fancy Discord Rich Presence
60+
61+
62+
63+
64+
65+
66+
67+

pom.xml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<!--
7+
/**
8+
* Copyright © 2020 | depascaldc <https://depascaldc.xyz/> | Discord: [depascaldc]#4093
9+
*
10+
* ____ _ _ ____ ____ ____
11+
* | _ \(_)___ ___ ___ _ __ __| | | _ \| _ \ / ___|
12+
* | | | | / __|/ __/ _ \| '__/ _` |_____| |_) | |_) | |
13+
* | |_| | \__ \ (_| (_) | | | (_| |_____| _ <| __/| |___
14+
* |____/|_|___/\___\___/|_| \__,_| |_| \_\_| \____|
15+
*
16+
* This program is free software: you can redistribute it and/or modify
17+
* it under the terms of the GNU General Public License as published by
18+
* the Free Software Foundation, either version 3 of the License, or
19+
* (at your option) any later version.
20+
*
21+
* This program is distributed in the hope that it will be useful,
22+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24+
* GNU General Public License for more details.
25+
*
26+
* You should have received a copy of the GNU General Public License
27+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
28+
*
29+
*/
30+
-->
31+
32+
<groupId>de.depascaldc.discord.rpc</groupId>
33+
<artifactId>Java-DiscordRPC-GUI</artifactId>
34+
<version>1.0.1.0</version>
35+
<name>Java-DiscordRPC-GUI</name>
36+
<description>A simple to use Discord Rich-Presence GUI</description>
37+
38+
<properties>
39+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
40+
</properties>
41+
42+
<build>
43+
<defaultGoal>install</defaultGoal>
44+
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
45+
46+
<plugins>
47+
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-compiler-plugin</artifactId>
51+
<version>3.8.1</version>
52+
<configuration>
53+
<source>1.8</source>
54+
<target>1.8</target>
55+
</configuration>
56+
</plugin>
57+
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-jar-plugin</artifactId>
61+
<version>2.3.1</version>
62+
<configuration>
63+
<finalName>${project.name}</finalName>
64+
<archive>
65+
<manifest>
66+
<addClasspath>true</addClasspath>
67+
<classpathPrefix>lib/</classpathPrefix>
68+
<mainClass>de.depascaldc.discord.rpc.Initializer</mainClass>
69+
</manifest>
70+
</archive>
71+
</configuration>
72+
</plugin>
73+
74+
<plugin>
75+
<groupId>org.apache.maven.plugins</groupId>
76+
<artifactId>maven-shade-plugin</artifactId>
77+
<version>3.2.1</version>
78+
<executions>
79+
<execution>
80+
<phase>package</phase>
81+
<goals>
82+
<goal>shade</goal>
83+
</goals>
84+
</execution>
85+
</executions>
86+
</plugin>
87+
88+
<plugin>
89+
<groupId>com.akathist.maven.plugins.launch4j</groupId>
90+
<artifactId>launch4j-maven-plugin</artifactId>
91+
<executions>
92+
<execution>
93+
<id>l4j-gui</id>
94+
<phase>package</phase>
95+
<goals>
96+
<goal>launch4j</goal>
97+
</goals>
98+
<configuration>
99+
<headerType>gui</headerType>
100+
<outfile>target/${project.name}.exe</outfile>
101+
<jar>target/${project.name}.jar</jar>
102+
<errTitle>${project.name}-Errored</errTitle>
103+
<stayAlive>true</stayAlive>
104+
<restartOnCrash>true</restartOnCrash>
105+
<icon>src/main/resources/appicon.ico</icon>
106+
<classPath>
107+
<mainClass>de.depascaldc.discord.rpc.Initializer</mainClass>
108+
<addDependencies>true</addDependencies>
109+
</classPath>
110+
<jre>
111+
<minVersion>1.8.0</minVersion>
112+
</jre>
113+
<versionInfo>
114+
<fileVersion>${project.version}</fileVersion>
115+
<txtFileVersion>${project.version}</txtFileVersion>
116+
<fileDescription>${project.description}</fileDescription>
117+
<copyright>${project.name} » Copyright (C) 2020 » depascaldc.xyz
118+
| All Rights Reserved.</copyright>
119+
<productVersion>${project.version}</productVersion>
120+
<txtProductVersion>${project.version}</txtProductVersion>
121+
<productName>${project.name}</productName>
122+
<internalName>${project.name}</internalName>
123+
<originalFilename>${project.name}.exe</originalFilename>
124+
</versionInfo>
125+
<messages>
126+
<startupErr>${project.name} could not be initialized...</startupErr>
127+
<bundledJreErr>${project.name} Bundled JRE Error...</bundledJreErr>
128+
<jreVersionErr>${project.name} JRE Error...</jreVersionErr>
129+
<launcherErr>${project.name} Launcher could not be started..</launcherErr>
130+
</messages>
131+
</configuration>
132+
</execution>
133+
</executions>
134+
</plugin>
135+
136+
</plugins>
137+
138+
</build>
139+
140+
<repositories>
141+
<repository>
142+
<id>jcenter</id>
143+
<url>https://jcenter.bintray.com</url>
144+
<name>jcenter-bintray</name>
145+
</repository>
146+
</repositories>
147+
148+
<dependencies>
149+
150+
<dependency>
151+
<groupId>club.minnced</groupId>
152+
<artifactId>java-discord-rpc</artifactId>
153+
<version>2.0.2</version>
154+
<scope>compile</scope>
155+
</dependency>
156+
157+
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna -->
158+
<dependency>
159+
<groupId>net.java.dev.jna</groupId>
160+
<artifactId>jna</artifactId>
161+
<version>5.6.0</version>
162+
</dependency>
163+
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna-platform -->
164+
<dependency>
165+
<groupId>net.java.dev.jna</groupId>
166+
<artifactId>jna-platform</artifactId>
167+
<version>5.6.0</version>
168+
</dependency>
169+
170+
</dependencies>
171+
172+
</project>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Copyright © 2020 | depascaldc <https://depascaldc.xyz/> | Discord: [depascaldc]#4093
3+
*
4+
* ____ _ _ ____ ____ ____
5+
* | _ \(_)___ ___ ___ _ __ __| | | _ \| _ \ / ___|
6+
* | | | | / __|/ __/ _ \| '__/ _` |_____| |_) | |_) | |
7+
* | |_| | \__ \ (_| (_) | | | (_| |_____| _ <| __/| |___
8+
* |____/|_|___/\___\___/|_| \__,_| |_| \_\_| \____|
9+
*
10+
* This program is free software: you can redistribute it and/or modify
11+
* it under the terms of the GNU General Public License as published by
12+
* the Free Software Foundation, either version 3 of the License, or
13+
* (at your option) any later version.
14+
*
15+
* This program is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
* GNU General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU General Public License
21+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22+
*
23+
*/
24+
25+
package de.depascaldc.discord.rpc;
26+
27+
import java.awt.Desktop;
28+
29+
import de.depascaldc.discord.rpc.main.GUIManager;
30+
31+
public class Initializer {
32+
33+
public static final String MAIN_PATH = System.getProperty("user.dir") + "/";
34+
public static boolean initialized;
35+
36+
public static void main(String[] args) {
37+
if(Desktop.isDesktopSupported())
38+
if (!initialized)
39+
GUIManager.initialize(MAIN_PATH);
40+
else
41+
throw new RuntimeException("GUI cannot be initialized twice.");
42+
else {
43+
System.out.println("===================================================");
44+
System.out.println("=== IN THIS VERSION OF THE PRESENCE TOOL ===");
45+
System.out.println("=== YOUR EXECUTION ENVIRONMENT IS NOT SUPPORTED ===");
46+
System.out.println("===================================================");
47+
}
48+
}
49+
50+
}

0 commit comments

Comments
 (0)