Skip to content

Commit

Permalink
Merge pull request #51 from leminlimez/big-merge
Browse files Browse the repository at this point in the history
Merge from AsakuraFuuko's repo
  • Loading branch information
leminlimez authored Feb 13, 2024
2 parents 1996b6c + 75ad275 commit 6b6c6dc
Show file tree
Hide file tree
Showing 73 changed files with 3,229 additions and 1,727 deletions.
113 changes: 113 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Build Helium

on:
push:
tags:
- "v*.*.*"
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
THEOS: ''
XCODE_VERSION: '15.1'

jobs:
build:
runs-on: macos-13

steps:
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}

- name: Install Homebrew dependencies
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install dpkg ldid make libplist openssl@3
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
- name: Checkout XXTouchNG/theos
uses: actions/checkout@v4
with:
repository: XXTouchNG/theos
ref: 78ee784d8d3238982c9abdc58cd39919263648b1
path: theos
submodules: recursive

- name: Add THEOS environment variables
run: |
rm -rf $GITHUB_WORKSPACE/theos/sdks
echo "THEOS=$GITHUB_WORKSPACE/theos" >> $GITHUB_ENV
- name: Restore additional SDKs
id: cached-sdks-restore
uses: actions/cache/restore@v4
with:
path: ${{ env.THEOS }}/sdks
key: ${{ runner.os }}-sdks-${{ env.XCODE_VERSION }}

- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Checkout theos/sdks
uses: actions/checkout@v4
with:
repository: theos/sdks
ref: master
path: ${{ env.THEOS }}/sdks

- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Save SDKs
id: cached-sdks-save
uses: actions/cache/save@v4
with:
path: ${{ env.THEOS }}/sdks
key: ${{ steps.cached-sdks-restore.outputs.cache-primary-key }}

- name: Checkout
uses: actions/checkout@v4
with:
repository: AsakuraFuuko/Helium
ref: main
path: Helium
submodules: recursive

- name: Setup build environment
run: |
echo "Available SDKs: $(find $THEOS/sdks -name "*.sdk" -maxdepth 1 -print)"
sT=$(TZ=UTC-8 date +'%S')
echo "msT=$(date -j -f "%Y-%m-%d %H:%M:%S" "$(TZ=UTC-8 date +'%Y-%m-%d %H:%M'):${sT}" +%s)" >> $GITHUB_ENV
echo "logT=$(TZ=UTC-8 date +'%Y-%m-%d %H:%M'):${sT}" >> $GITHUB_ENV
echo $msT
echo $logT
- name: Make IPA
run: |
cd $GITHUB_WORKSPACE/Helium
./ipabuild.sh
- name: Collect symbols
run: |
cd $GITHUB_WORKSPACE/Helium
find .theos/obj -name "*.dSYM" -print | zip -r build/Helium_symbols.zip -@
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Helium.tipa
path: ${{ github.workspace }}/Helium/build/Helium.tipa

- name: Upload symbols
uses: actions/upload-artifact@v4
with:
name: Helium_symbols
path: ${{ github.workspace }}/Helium/build/Helium_symbols.zip

- name: Upload release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: build time ${{ env.logT }}
generate_release_notes: true
files: |
${{ github.workspace }}/Helium/build/Helium.tipa
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARCHS := arm64 arm64e
TARGET := iphone:clang:15.0:14.0
TARGET := iphone:clang:16.5:14.0
INSTALL_TARGET_PROCESSES := Helium
ENT_PLIST := $(PWD)/ent.plist

TARGET_CC := $(shell xcrun --sdk iphoneos --find clang)
TARGET_CXX := $(shell xcrun --sdk iphoneos --find clang++)
Expand Down Expand Up @@ -51,11 +50,6 @@ $(APPLICATION_NAME)_CFLAGS += -fobjc-arc -Iinclude
$(APPLICATION_NAME)_CFLAGS += -include hud-prefix.pch -Wno-deprecated-declarations
$(APPLICATION_NAME)_SWIFTFLAGS += -import-objc-header src/bridging/Helium-Bridging-Header.h

$(APPLICATION_NAME)_CCFLAGS += -DNOTIFY_LAUNCHED_HUD=\"com.leemin.notification.hud.launched\"
$(APPLICATION_NAME)_CCFLAGS += -DNOTIFY_DISMISSAL_HUD=\"com.leemin.notification.hud.dismissal\"
$(APPLICATION_NAME)_CCFLAGS += -DNOTIFY_RELOAD_HUD=\"com.leemin.notification.hud.reload\"
$(APPLICATION_NAME)_CCFLAGS += -DSPAWN_AS_ROOT

$(APPLICATION_NAME)_FRAMEWORKS += CoreGraphics QuartzCore UIKit Foundation
$(APPLICATION_NAME)_PRIVATE_FRAMEWORKS += BackBoardServices GraphicsServices IOKit SpringBoardServices

Expand All @@ -67,9 +61,6 @@ endif

include $(THEOS_MAKE_PATH)/application.mk

before-all::
$(ECHO_NOTHING)[ ! -z $(SPAWN_AS_ROOT) ] && defaults write $(ENT_PLIST) com.apple.private.persona-mgmt -bool true || defaults delete $(ENT_PLIST) com.apple.private.persona-mgmt || true$(ECHO_END)
$(ECHO_NOTHING)plutil -convert xml1 $(ENT_PLIST)$(ECHO_END)
after-stage::
$(ECHO_NOTHING)mkdir -p packages $(THEOS_STAGING_DIR)/Payload$(ECHO_END)
$(ECHO_NOTHING)cp -rp $(THEOS_STAGING_DIR)/Applications/Helium.app $(THEOS_STAGING_DIR)/Payload$(ECHO_END)
Expand Down
149 changes: 3 additions & 146 deletions ent.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,74 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.AXMediaUtilitiesService-access</key>
<true/>
<key>com.apple.DragUI.accessibility</key>
<true/>
<key>com.apple.QuartzCore.displayable-context</key>
<true/>
<key>com.apple.QuartzCore.secure-mode</key>
<true/>
<key>com.apple.accessibility.api</key>
<true/>
<key>com.apple.accessibility.physicalinteraction.client</key>
<true/>
<key>com.apple.accessibility.zoom.client</key>
<true/>
<key>com.apple.assistivetouch.daemon</key>
<true/>
<key>com.apple.backboard.client</key>
<true/>
<key>com.apple.backboardd.global-pointer-event-routing</key>
<true/>
<key>com.apple.backboardd.launchapplications</key>
<true/>
<key>com.apple.bluetooth.system</key>
<true/>
<key>com.apple.carousel.backlightaccess</key>
<true/>
<key>com.apple.coreaudio.allow-opus-codec</key>
<true/>
<key>com.apple.coreaudio.register-internal-aus</key>
<true/>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>com.leemin.helium</string>
<key>com.apple.diagnosticd.diagnostic</key>
<true/>
<key>com.apple.frontboard.debugapplications</key>
<true/>
<key>com.apple.hid.manager.user-access-device</key>
<true/>
<key>com.apple.hid.manager.user-access-keyboard</key>
<true/>
<key>com.apple.idle-timer-services</key>
<true/>
<key>com.apple.managedconfiguration.profiled-access</key>
<true/>
<key>com.apple.pointerui.persistentlyHidePointer</key>
<true/>
<key>com.apple.private.CoreAuthentication.SPI</key>
<true/>
<key>com.apple.private.LocalAuthentication.Storage</key>
<true/>
<key>com.apple.private.acccessibility.motionTrackingClient</key>
<true/>
<key>com.apple.private.appleaccount.app-hidden-from-icloud-settings</key>
<true/>
<key>com.apple.private.applecredentialmanager.allow</key>
<true/>
<key>com.apple.private.assets.accessible-asset-types</key>
<array>
<string>com.apple.MobileAsset.VoiceServices.CustomVoice</string>
<string>com.apple.MobileAsset.VoiceServicesVocalizerVoice</string>
<string>com.apple.MobileAsset.VoiceServices.GryphonVoice</string>
<string>com.apple.MobileAsset.MacinTalkVoiceAssets</string>
<string>com.apple.MobileAsset.VoiceServices.CombinedVocalizerVoices</string>
</array>
<key>com.apple.private.avfoundation.capture.nonstandard-client.allow</key>
<true/>
<key>com.apple.private.coreaudio.viewInterruptorName.allow</key>
<true/>
<key>com.apple.private.hid.client.event-dispatch</key>
<true/>
<key>com.apple.private.hid.client.event-filter</key>
Expand All @@ -80,110 +18,29 @@
<true/>
<key>com.apple.private.hid.manager.client</key>
<true/>
<key>com.apple.private.ids.messaging</key>
<array>
<string>com.apple.private.alloy.accessibility.switchcontrol</string>
</array>
<key>com.apple.private.ids.messaging.urgent-priority</key>
<array>
<string>com.apple.private.alloy.accessibility.switchcontrol</string>
</array>
<key>com.apple.private.kernel.jetsam</key>
<true/>
<key>com.apple.private.memorystatus</key>
<true/>
<key>com.apple.private.security.no-sandbox</key>
<key>com.apple.private.persona-mgmt</key>
<true/>
<key>com.apple.private.sysdiagnose</key>
<true/>
<key>com.apple.private.ubiquity-additional-kvstore-identifiers</key>
<array>
<string>com.apple.AssistiveTouch</string>
<string>com.apple.Accessibility.SwitchControl</string>
<string>com.apple.Accessibility</string>
</array>
<key>com.apple.security.exception.mach-lookup.global-name</key>
<array>
<string>com.apple.accessibility.motiontrackingd</string>
<string>com.apple.accessibility.AXSpringBoardServer</string>
<string>com.apple.accessibility.AXPineBoardServer</string>
<string>com.apple.accessibility.AXCarouselServer</string>
<string>AXPerformanceTestReportingServer</string>
<string>com.apple.telephonyutilities.callservicesdaemon.callstatecontroller</string>
<string>com.apple.AXMediaUtilitiesService</string>
<string>com.apple.audio.hapticd</string>
<string>AccessibilityDebuggerServices</string>
<string>com.apple.sysdiagnose.service.xpc</string>
<string>com.apple.TextInput</string>
<string>com.apple.SBUserNotification</string>
<string>com.apple.siri.activation.service</string>
<string>com.apple.commandandcontrol</string>
<string>com.apple.sharing.accessibility</string>
<string>com.apple.TextInput.accessibility</string>
<string>com.apple.appleneuralengine</string>
<string>com.apple.fontservicesd</string>
<string>com.apple.PointerUI.pointeruid.service</string>
</array>
<key>com.apple.security.exception.mach-lookup.local-name</key>
<array>
<string>com.apple.AXMediaUtilitiesService</string>
</array>
<key>com.apple.security.exception.mach-register.global-name</key>
<array>
<string>com.leemin.helium.gsEvents</string>
</array>
<key>com.apple.security.exception.mach-register.local-name</key>
<array>
<string>com.leemin.helium</string>
</array>
<key>com.apple.security.exception.shared-preference.read-only</key>
<array>
<string>com.apple.purplebuddy</string>
<string>com.apple.uikitservices.userInterfaceStyleMode</string>
</array>
<key>com.apple.security.exception.shared-preference.read-write</key>
<array>
<string>com.apple.assistant.logging</string>
</array>
<key>com.apple.security.iokit-user-client-class</key>
<array>
<string>IOSurfaceRootUserClient</string>
<string>AGXDeviceUserClient</string>
<string>IOPMPowerSourceClient</string>
</array>
<key>com.apple.security.system-groups</key>
<array>
<string>systemgroup.com.apple.powerlog</string>
</array>
<key>com.apple.springboard-ui.client</key>
<key>com.apple.private.security.no-sandbox</key>
<true/>
<key>com.apple.springboard.CFUserNotification</key>
<true/>
<key>com.apple.springboard.accessibility-window-hosting</key>
<true/>
<key>com.apple.springboard.activateassistant</key>
<true/>
<key>com.apple.springboard.appbackgroundstyle</key>
<true/>
<key>com.apple.springboard.launchapplications</key>
<true/>
<key>com.apple.system-task-ports</key>
<true/>
<key>com.apple.system.diagnostics.iokit-properties</key>
<true/>
<key>file-read-data</key>
<true/>
<key>get-task-allow</key>
<true/>
<key>platform-application</key>
<true/>
<key>run-unsigned-code</key>
<true/>
<key>task_for_pid-allow</key>
<true/>
<key>user-preference-read</key>
<true/>
<key>user-preference-write</key>
<true/>
</dict>
</plist>
</plist>
17 changes: 14 additions & 3 deletions hud-prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@
#if __has_include(<TargetConditionals.h>)
#import <TargetConditionals.h>
#endif

#import <Foundation/Foundation.h>
#import <Foundation/NSUserDefaults+Private.h>
#import "src/helpers/private_headers/NSUserDefaults+Private.h"
#import <UIKit/UIKit.h>
#import <os/log.h>
#endif
#endif

#define USER_DEFAULTS_PATH @"/var/mobile/Library/Preferences/com.leemin.helium.plist"

// HUD -> APP: Notify APP that the HUD's view is appeared.
#define NOTIFY_LAUNCHED_HUD "com.leemin.notification.hud.launched"

// APP -> HUD: Notify HUD to dismiss itself.
#define NOTIFY_DISMISSAL_HUD "com.leemin.notification.hud.dismissal"

// APP -> HUD: Notify HUD that the user defaults has been changed by APP.
#define NOTIFY_RELOAD_HUD "com.leemin.notification.hud.reload"
3 changes: 3 additions & 0 deletions ipabuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ if [ -d ".theos/obj/debug/Helium.app" ]; then
cp -r "$APP_BUILD_FILES/icon.png" "$BUILD_LOCATION/icon.png"
cp -r "$APP_BUILD_FILES/Info.plist" "$BUILD_LOCATION/Info.plist"
cp -r "$APP_BUILD_FILES/Assets.car" "$BUILD_LOCATION/Assets.car"
cp -r "$APP_BUILD_FILES/en.lproj" "$BUILD_LOCATION/"
cp -r "$APP_BUILD_FILES/zh-Hans.lproj" "$BUILD_LOCATION/"
cp -r "$APP_BUILD_FILES/fonts" "$BUILD_LOCATION/"

# Create payload
echo "Creating payload"
Expand Down
Loading

0 comments on commit 6b6c6dc

Please sign in to comment.