Skip to content

Commit

Permalink
update SwordRPC (fix issue #3), clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
PKBeam committed Aug 3, 2021
1 parent cb446d1 commit 5ca542b
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 148 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# RPFX
**RPFX** is a Discord **R**ich **P**resence client **f**or **X**code.
**RPFX** is a Discord **R**ich **P**resence client **f**or **X**code that lets you share what you're programming on your Discord status.

<img width="250" alt="rpfx" src="https://user-images.githubusercontent.com/18737124/79639955-388b7400-81d2-11ea-9631-95c9635a95dc.png">

You can show all your friends what you're coding up right now!

RPFX will display the current file you're working on, as well as your workspace.

In addition, it will also show file icons for the following file types:
Expand All @@ -17,14 +15,14 @@ In addition, it will also show file icons for the following file types:
- `.cpp`
- `.c`

RPFX is designed to be fairly modular, so you can tweak its code to use your own Discord application if you want to add more file icons (or any other functionality).
If you wish, you can tweak RPFX to use your own Discord application if you want to add custom functionality, such as more file icons.

## Dependencies
RPFX uses [my fork](https://github.com/PKBeam/SwordRPC) of [Azoy's SwordRPC](https://github.com/Azoy/SwordRPC).

## System Requirements
- macOS (the latest release is built for macOS 11, but you may be able to run this on older versions)
- Xcode installed (otherwise this wouldn't be very useful)
- macOS Big Sur (11.0)
- Xcode and Discord installed (otherwise this program isn't very useful)

## Usage
When you first start up RPFX, it will prompt you for permission to control Xcode. We don't actually need to *control* Xcode,
Expand Down
40 changes: 20 additions & 20 deletions RPFX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

/* Begin PBXBuildFile section */
5028EA45244B181D003A1830 /* HelperFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5028EA44244B181D003A1830 /* HelperFunctions.swift */; };
506555DE26B90E0100A4416F /* SwordRPC in Frameworks */ = {isa = PBXBuildFile; productRef = 506555DD26B90E0100A4416F /* SwordRPC */; };
5068E2DF244AA3C90012CCF7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5068E2DE244AA3C90012CCF7 /* Constants.swift */; };
5068E2E2244AD9170012CCF7 /* SwordRPC in Frameworks */ = {isa = PBXBuildFile; productRef = 5068E2E1244AD9170012CCF7 /* SwordRPC */; };
50C66C1B244B3A5800A4BECD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 50C66C1A244B3A5800A4BECD /* Main.storyboard */; };
50C6CBB3244974A400F10C5D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C6CBB2244974A400F10C5D /* AppDelegate.swift */; };
50C6CBB7244974A700F10C5D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 50C6CBB6244974A700F10C5D /* Assets.xcassets */; };
Expand All @@ -19,6 +19,7 @@

/* Begin PBXFileReference section */
5028EA44244B181D003A1830 /* HelperFunctions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelperFunctions.swift; sourceTree = "<group>"; };
506555DF26B9210700A4416F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
5068E2DE244AA3C90012CCF7 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
5068E2E3244ADAFE0012CCF7 /* SwordRPC */ = {isa = PBXFileReference; lastKnownFileType = folder; name = SwordRPC; path = "../SwordRPC-fork/SwordRPC"; sourceTree = "<group>"; };
50C66C1A244B3A5800A4BECD /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
Expand All @@ -36,7 +37,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5068E2E2244AD9170012CCF7 /* SwordRPC in Frameworks */,
506555DE26B90E0100A4416F /* SwordRPC in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -63,6 +64,7 @@
50C6CBB1244974A400F10C5D /* RPFX */ = {
isa = PBXGroup;
children = (
506555DF26B9210700A4416F /* README.md */,
50C6CBB2244974A400F10C5D /* AppDelegate.swift */,
5028EA44244B181D003A1830 /* HelperFunctions.swift */,
5068E2DE244AA3C90012CCF7 /* Constants.swift */,
Expand Down Expand Up @@ -101,7 +103,7 @@
);
name = RPFX;
packageProductDependencies = (
5068E2E1244AD9170012CCF7 /* SwordRPC */,
506555DD26B90E0100A4416F /* SwordRPC */,
);
productName = RPFX;
productReference = 50C6CBAF244974A400F10C5D /* RPFX.app */;
Expand All @@ -114,7 +116,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1110;
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = "Vincent Liu";
TargetAttributes = {
50C6CBAE244974A400F10C5D = {
Expand All @@ -133,7 +135,7 @@
);
mainGroup = 50C6CBA6244974A400F10C5D;
packageReferences = (
5068E2E0244AD9170012CCF7 /* XCRemoteSwiftPackageReference "SwordRPC" */,
506555DC26B90E0100A4416F /* XCRemoteSwiftPackageReference "SwordRPC" */,
);
productRefGroup = 50C6CBB0244974A400F10C5D /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -212,7 +214,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = s;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
Expand All @@ -223,13 +225,13 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -278,12 +280,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -304,10 +306,9 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.PKBeam.RPFX;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -328,10 +329,9 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.PKBeam.RPFX;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down Expand Up @@ -359,20 +359,20 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
5068E2E0244AD9170012CCF7 /* XCRemoteSwiftPackageReference "SwordRPC" */ = {
506555DC26B90E0100A4416F /* XCRemoteSwiftPackageReference "SwordRPC" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/PKBeam/SwordRPC";
repositoryURL = "https://github.com/PKBeam/SwordRPC.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.2.2;
branch = master;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
5068E2E1244AD9170012CCF7 /* SwordRPC */ = {
506555DD26B90E0100A4416F /* SwordRPC */ = {
isa = XCSwiftPackageProductDependency;
package = 5068E2E0244AD9170012CCF7 /* XCRemoteSwiftPackageReference "SwordRPC" */;
package = 506555DC26B90E0100A4416F /* XCRemoteSwiftPackageReference "SwordRPC" */;
productName = SwordRPC;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@
"pins": [
{
"package": "Socket",
"repositoryURL": "https://github.com/IBM-Swift/BlueSocket.git",
"repositoryURL": "https://github.com/Kitura/BlueSocket.git",
"state": {
"branch": null,
"revision": "26c8f4e4e3000421a0c97aaf0c7b5e9aa5475222",
"version": "0.12.94"
"revision": "68ec325aa8649253a71d637099942f3298a70324",
"version": "2.0.1"
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "83b23d940471b313427da226196661856f6ba3e0",
"version": "0.4.4"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion RPFX.xcodeproj/xcshareddata/xcschemes/RPFX.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 5ca542b

Please sign in to comment.