Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
updated for the latest theos and iphoneheaders
Browse files Browse the repository at this point in the history
  • Loading branch information
k3a committed Mar 19, 2014
1 parent 2c5a6cd commit 4f3d374
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 21 deletions.
5 changes: 2 additions & 3 deletions LibDisplay.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//

//#import <SpringBoard4.0/SBAppSwitcherController.h>
#import <SpringBoard/SBIcon.h>
#import <SpringBoard/SBApplication.h>
#import <SpringBoard/SBUIController.h>
#import <SpringBoard/SBDisplayStack.h>
#import <SpringBoard/SBApplication.h>
Expand Down Expand Up @@ -65,9 +67,6 @@ -(id)initWithProcess:(SBProcess*)process reason:(unsigned int)reason identifier:
@end


@interface SBIcon : NSObject
@end

@interface SBIconView : UIView
@property(readonly) SBIcon *icon;
- (void)setIcon:(SBIcon*)arg1;
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
##

GO_EASY_ON_ME = 1

export PATH := bin:$(PATH)
export TARGET=iphone:latest:5.0
export ARCHS = armv7 arm64

include theos/makefiles/common.mk

SUBPROJECTS = SEPrefs speakevent setoggle speakeventssupport #DV
DEBUG = 1

# use latest SDK (7.0) but use iOS 5.0 as deployment target (5.1 SDK)
export TARGET=iphone:latest:5.0
export ARCHS = armv7 arm64

CLD_SOURCES=cld/encodings/compact_lang_det/cldutil.cc \
cld/encodings/compact_lang_det/cldutil_dbg_empty.cc \
cld/encodings/compact_lang_det/compact_lang_det.cc \
Expand All @@ -38,7 +39,7 @@ TWEAK_NAME = SpeakEvents
SpeakEvents_FILES = main.mm log.mm KStringAdditions.mm SEActivatorSupport.mm K3AStringFormatter.mm $(CLD_SOURCES) LibDisplay.m
SpeakEvents_FRAMEWORKS = Foundation CoreFoundation QuartzCore AddressBook UIKit IOKit CoreTelephony AVFoundation Celestial AudioToolbox
SpeakEvents_PRIVATE_FRAMEWORKS = VoiceServices AppSupport BulletinBoard
SpeakEvents_LDFLAGS = -v -Llib -lactivator -Flib #lcld
SpeakEvents_LDFLAGS = -v -Llib -lactivator -lsubstrate -Flib #lcld
#SpeakEvents_LDFLAGS += -Xlinker -x -Xlinker -exported_symbol -Xlinker _Initialize
SpeakEvents_LDFLAGS += -ObjC++ -fobjc-exceptions -fobjc-call-cxx-cdtors
SpeakEvents_CFLAGS = -g -Os -funroll-loops -gdwarf-2 -DCLD_WINDOWS -fno-exceptions -fobjc-exceptions -fobjc-call-cxx-cdtors -Iinclude -Icld
Expand All @@ -52,3 +53,4 @@ distclean:
rm -rf *.deb | true

test: distclean package install
ssh ufoxy "killall SpringBoard"
5 changes: 4 additions & 1 deletion PrivateAPIs.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ extern id AVSystemController_IsSomeoneRecordingAttribute;




@protocol VolumeControl
@optional
-(BOOL)headphonesPresent;
@end



Expand Down
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,31 @@ iOS tweak for speaking notifications and other events using speech synthesiser.
Official website: http://se.k3a.me/ <br/>
Developer & User Forums: http://forum.k3a.me

General theos info is here http://iphonedevwiki.net/index.php/Theos/Getting_Started but you may need these files (updated theos and include files): <br/>
- https://github.com/rpetrich/iphoneheaders
- https://github.com/rpetrich/theos
You need to have Xcode installed. The project uses theos makefiles (xcode project is there just for convenience and may not work at all).
Read more about theos here: http://iphonedevwiki.net/index.php/Theos/Getting_Started.

In order to complile it, install Xcode and set the correct theos symlink to your theos installation (or put theos to /theos and keep my simlink) and run 'make package' command.
It was tested and compiles fine with these versions:<br/>
- https://github.com/rpetrich/theos put into /theos
- https://github.com/rpetrich/iphoneheaders put into /theos/include

There is also 'make test' makefile rule but it won't work without modifying theos. I used it to automate package creation, installing the packge on the device and respringing the device. This is not needed though as you can install the package standard theos way or via 'dpkg -i path to deb' on the device.
In order to complile it, set the correct theos symlink to your theos installation (or put theos to /theos and keep my simlink) and run:
PATH="bin:$PATH" make package

There is also 'PATH="bin:$PATH" make package' test makefile rule but it won't work without setting your ~/.ssh/config on your mac (see bellow).
I used it to automate package creation, installing the packge on the device and respringing the device.
This is not needed though as you can install the package standard theos way or via 'dpkg -i path to deb' on the device.

For instructions how to copy files through scp over USB into your device, see this:
http://iphonedevwiki.net/index.php/SSH_Over_USB

If you pan to use USB SSH connection, make sure to speed it up by:
- using SSH key for (root and mobile user) authentication (http://www.priyaontech.com/2012/01/ssh-into-your-jailbroken-idevice-without-a-password/)
- using ~/.ssh/config on your mac with a record like this one (last two lines will allow you switching iOS devices without hassle):
Host ufoxy
User mobile
Port 2222
HostName localhost
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null

If you have trouble compiling it, you can contact me and others at http://forum.k3a.me or simply create a github issue. I will try to help you and/or update this readme.
9 changes: 3 additions & 6 deletions SEPrefs/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
GO_EASY_ON_ME = 1

DEBUG = 1
include theos/makefiles/common.mk

# use latest SDK but use iOS 5.0 as deployment target (5.1 SDK)
# a combined binary requires a minimum deployment target of iOS 5.1.1 or later.
export TARGET=iphone:latest:5.1.1
export ARCHS = armv7 armv7s arm64
export ARCHS = armv7 arm64

include theos/makefiles/common.mk

BUNDLE_NAME = SEPrefs
SEPrefs_FILES = SEPrefs.mm SEPrefsAppToggleController.mm SEHourController.mm SELangPrefs.mm
Expand Down
File renamed without changes.
File renamed without changes.
Binary file removed lib/libsubstrate.dylib
Binary file not shown.
2 changes: 1 addition & 1 deletion main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ -(BOOL)bluetoothHandsFree

static BOOL HeadphonesPresent()
{
VolumeControl* volCtrl = [objc_getClass("VolumeControl") sharedVolumeControl];
VolumeControl<VolumeControl>* volCtrl = [objc_getClass("VolumeControl") sharedVolumeControl];
if ([volCtrl respondsToSelector:@selector(_headphonesPresent)])
return [volCtrl _headphonesPresent];
else
Expand Down

0 comments on commit 4f3d374

Please sign in to comment.