ryubing-ryujinx/distribution/macos/create_app_bundle.sh
spl::kirakira e1b66399c9 Touchscreen failsafe, add LibraryAppletMyPage to Actions -> Tools, add a ton of HLE services, LDN monitor service
## Touchscreen Fix
- Added `GetScreenPositionNullable` for touch coordinate validation
- Returns `null` when touch is outside the rendered screen area
- Files: src/Ryujinx.Input/IMouse.cs, src/Ryujinx.Input/HLE/TouchScreenManager.cs

## LibraryAppletMyPage (User Page)
- Added Actions → Tools → User Page menu item
- Launches the MyPage system applet (program ID 0x0100000000001013)
- Files: src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml, MainMenuBarView.axaml.cs

## HLE Services Implementation

### HID System Server
- 850: SetTouchScreenDefaultConfiguration
- 851: GetTouchScreenDefaultConfiguration
- 1200: AcquireConnectionTriggerTimeoutEvent
- 1201: SendConnectionTrigger
- 1202: AcquireDeviceRegisteredEventForControllerSupport
- 1203: GetAllowedBluetoothLinksCount

### acc:aa (IBaasAccessTokenAccessor)
- 0: EnsureCacheAsync
- 1: LoadCache
- 2: GetDeviceAccountId
- 50: RegisterNotificationTokenAsync
- 51: UnregisterNotificationTokenAsync

### nim (IShopServiceAsync)
- Commands 0-5: Cancel, GetSize, Read, GetErrorCode, Request, Prepare

### LDN Monitor Service (NEW)
- IMonitorServiceCreator: Added CreateMonitorService (command 0)
- IMonitorService: GetStateForMonitor, GetNetworkInfoForMonitor, GetIpv4AddressForMonitor,
  GetDisconnectReasonForMonitor, GetSecurityParameterForMonitor, GetNetworkConfigForMonitor,
  AttachStateChangeEvent, InitializeMonitor, FinalizeMonitor

## Applet Infrastructure
- ILibraryAppletSelfAccessor: Rewrite to support MiiEdit, MyPage applets
- AppletStateMgr: Complete rewrite with proper state machine and focus handling
- ICommonStateGetter: Updated ReceiveMessage and RequestToAcquireSleepLock
2026-01-30 19:45:01 +08:00

62 lines
2.1 KiB
Bash
Executable file

#!/bin/bash
set -e
PUBLISH_DIRECTORY=$1
OUTPUT_DIRECTORY=$2
ENTITLEMENTS_FILE_PATH=$3
APP_BUNDLE_DIRECTORY="$OUTPUT_DIRECTORY/Ryujinx.app"
rm -rf "$APP_BUNDLE_DIRECTORY"
mkdir -p "$APP_BUNDLE_DIRECTORY/Contents"
mkdir "$APP_BUNDLE_DIRECTORY/Contents/Frameworks"
mkdir "$APP_BUNDLE_DIRECTORY/Contents/MacOS"
mkdir "$APP_BUNDLE_DIRECTORY/Contents/Resources"
# Copy executable and nsure executable can be executed
cp "$PUBLISH_DIRECTORY/Ryujinx" "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx"
chmod u+x "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx"
# Then all libraries
cp "$PUBLISH_DIRECTORY"/*.dylib "$APP_BUNDLE_DIRECTORY/Contents/Frameworks"
# Then resources
cp Info.plist "$APP_BUNDLE_DIRECTORY/Contents"
cp Ryujinx.icns "$APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns"
cp updater.sh "$APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh"
cp Assets.car "$APP_BUNDLE_DIRECTORY/Contents/Resources/Assets.car"
cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resources"
echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo"
# Fixup libraries and executable
echo "Running bundle fix up python script"
python3 bundle_fix_up.py "$APP_BUNDLE_DIRECTORY" MacOS/Ryujinx
# Now sign it
echo "Starting signing process"
if ! [ -x "$(command -v codesign)" ];
then
if ! [ -x "$(command -v rcodesign)" ];
then
echo "Cannot find rcodesign on your system, please install rcodesign and ensure it is in your search path."
exit 1
fi
echo "Using rcodesign for ad-hoc signing"
echo "Resigning all frameworks dylib files as ad-hoc"
find "$APP_BUNDLE_DIRECTORY/Contents/Frameworks" -type f -name "*.dylib" -exec rcodesign sign {} \;
echo "Signing app bundle as ad-hoc"
rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$APP_BUNDLE_DIRECTORY"
else
echo "Using codesign for ad-hoc signing"
echo "Resigning all frameworks dylib files as ad-hoc"
find "$APP_BUNDLE_DIRECTORY/Contents/Frameworks" -type f -name "*.dylib" -exec codesign --force --sign - {} \;
echo "Signing app bundle as ad-hoc"
codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f -s - "$APP_BUNDLE_DIRECTORY"
fi