webcore := WebCore-514 jscore := JavaScriptCore-521 cycc = cycc -i2.0 -o$@ -- $(filter %.mm,$^) -Xarch_armv6 -marm -g0 -O2 -I. -F/System/Library/PrivateFrameworks all: CydgetLoader.dylib WebCycriptLockScreen CydgetSettings clean:: rm -f CydgetLoader.dylib CydgetSettings WebCycriptLockScreen CydgetLoader.dylib: CydgetLoader.mm makefile $(cycc) -dynamiclib -framework Foundation -framework UIKit -framework CydiaSubstrate CydgetSettings: CydgetSettings.mm makefile $(cycc) -dynamiclib -framework Foundation -framework UIKit -framework Preferences WebCycriptLockScreen: LockScreen.mm yieldToSelector.mm makefile $(cycc) -bundle -isystem sysroot/usr/include \ -I$(jscore) -iquote$(jscore)/{parser,runtime} \ -framework Foundation -framework UIKit \ -framework CydiaSubstrate -framework CFNetwork \ -framework JavaScriptCore -framework WebKit \ -framework TelephonyUI -framework SpringBoardUI \ -Xarch_armv6 -Lsysroot/usr/lib -Xarch_armv6 -lpcre \ -Xarch_arm64 -DUSE_ICU_REGEX -Xarch_arm64 -licucore \ -Wl,-U,__ZN3JSC7UString3Rep7destroyEv \ -Wl,-U,__ZN3JSC7UStringC1EPKc \ -Wl,-U,__ZN3JSC7UStringC1EPKti \ -Wl,-U,__ZNK3JSC7UString6substrEii \ -Wno-mismatched-tags -Wno-tautological-constant-out-of-range-compare install_name_tool -change /System/Library/{,Private}Frameworks/JavaScriptCore.framework/JavaScriptCore $@ ldid -S $@ deb: all sudo rm -rf package mkdir -p package/DEBIAN mkdir -p package/Library/MobileSubstrate/DynamicLibraries sed -e 's/%/$(shell cycc -V)/' control.in >package/DEBIAN/control cp -a preinst package/DEBIAN mkdir -p package/Library/PreferenceLoader/Preferences; cp -a CydgetLoader.{dylib,plist} package/Library/MobileSubstrate/DynamicLibraries mkdir -p package/System/Library/LockCydgets cp -a Welcome.cydget package/System/Library/LockCydgets/Welcome.cydget cp -a AwayView.cydget package/System/Library/LockCydgets/AwayView.cydget cp -a PhotoExample.cydget package/System/Library/LockCydgets/PhotoExample.cydget cp -a PhotoExamplePlus.cydget package/System/Library/LockCydgets/PhotoExamplePlus.cydget mkdir -p package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle cp -a Info.plist package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle cp -a WebCycriptLockScreen package/System/Library/SpringBoardPlugins/WebCycriptLockScreen.bundle mkdir -p package/Library/PreferenceLoader/Preferences mkdir -p package/System/Library/PreferenceBundles cp -a CydgetSettings.plist package/Library/PreferenceLoader/Preferences cp -a CydgetSettings.bundle package/System/Library/PreferenceBundles/CydgetSettings.bundle cp -a Icon-Small.png package/System/Library/PreferenceBundles/CydgetSettings.bundle/icon.png cp -a SearchResultsCheckmarkClear.png CydgetSettings package/System/Library/PreferenceBundles/CydgetSettings.bundle sudo chown -R 0 package sudo chgrp -R 0 package deb=$$(grep ^Package: package/DEBIAN/control | cut -d ' ' -f 2-)_$$(grep ^Version: package/DEBIAN/control | cut -d ' ' -f 2)_iphoneos-arm.deb; dpkg-deb -b package "$$deb"; ln -sfv "$$deb" cydget.deb