-
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
10 changed files
with
85 additions
and
12 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.dylib | ||
.DS_Store | ||
.DS_Store | ||
!out/.keep | ||
out/* |
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
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,4 @@ | ||
#!/bin/bash | ||
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." || exit 1 | ||
|
||
exec clang -dynamiclib -std=gnu99 "$PROJECT_DIR/iohid_wrap.m" -current_version 1.0 -compatibility_version 1.0 -lobjc -framework Foundation -framework AppKit -framework CoreFoundation -o "$PROJECT_DIR/out/iohid_wrap.dylib" |
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,18 @@ | ||
#!/bin/bash | ||
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." || exit 1 | ||
|
||
if [ ! -f "$PROJECT_DIR/out/iohid_wrap.dylib" ]; then | ||
echo "Compiled lib not found" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
APP_NAME="RemotePlayWrapper.app" | ||
APP_PATH="$PROJECT_DIR/out/$APP_NAME" | ||
|
||
rm -rf "$APP_PATH" &> /dev/null | ||
cp -r "$PROJECT_DIR/wrapper_skel" "$APP_PATH" || exit 1 | ||
chmod a+x "$APP_PATH/Contents/MacOS/RemotePlayWrapper" | ||
cp "$PROJECT_DIR/out/iohid_wrap.dylib" "$APP_PATH/Contents/Resources/iohid_wrap.dylib" || exit 1 | ||
|
||
echo "Wrapper created at '$APP_PATH'." | ||
echo "You copy RemotePlay.app into the the Contents/Resources folder inside the wrapper. It will default to use the one installed in /Applications" |
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,4 @@ | ||
#!/bin/bash | ||
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." || exit 1 | ||
|
||
DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES="$PROJECT_DIR/out/iohid_wrap.dylib" /Applications/RemotePlay.app/Contents/MacOS/RemotePlay |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleExecutable</key> | ||
<string>RemotePlayWrapper</string> | ||
<key>CFBundleIconFile</key> | ||
<string>AppIcon.icns</string> | ||
<key>CFBundleName</key> | ||
<string>RemotePlayWrapper</string> | ||
</dict> | ||
</plist> |
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,28 @@ | ||
#!/bin/bash | ||
function die { | ||
osascript -e "tell application (path to frontmost application as text) to display dialog \"$1\" buttons {\"OK\"} with icon stop" | ||
exit 1 | ||
} | ||
|
||
RESOURCES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../Resources" | ||
|
||
IOHID_WRAP_DYLIB_PATH="$RESOURCES_DIR/iohid_wrap.dylib" | ||
|
||
if [ ! -f "$IOHID_WRAP_DYLIB_PATH" ]; then | ||
die "$IOHID_WRAP_DYLIB_PATH could not be found" | ||
fi | ||
|
||
export DYLD_FORCE_FLAT_NAMESPACE=1 | ||
export DYLD_INSERT_LIBRARIES="$IOHID_WRAP_DYLIB_PATH" | ||
|
||
EXE_PATH="./Contents/MacOS/RemotePlay" | ||
|
||
APP_PATH="$RESOURCES_DIR/RemotePlay.app" | ||
if [ ! -x "$APP_PATH/$EXE_PATH" ]; then | ||
APP_PATH="/Applications/RemotePlay.app" | ||
fi | ||
|
||
if [ ! -x "$APP_PATH/$EXE_PATH" ]; then | ||
die "RemotePlay.app was not found in Resources nor in /Applications" | ||
fi | ||
exec "$APP_PATH/$EXE_PATH" |
Binary file not shown.