Skip to content

Commit

Permalink
v1.0.2
Browse files Browse the repository at this point in the history
- Remove plutil depends
- Add Rootless package
  • Loading branch information
ichitaso committed Apr 8, 2023
1 parent 1de983b commit 23033c7
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ debs/*
*.dylib
**/.theos/*
*/.theos/*
*.sublime-workspace
_/*
*/obj/*
obj/*
*.zip
IconAnus/
IconAnus/
layout/DEBIAN/preinst
24 changes: 19 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
DEBUG = 0
GO_EASY_ON_ME = 1
FINALPACKAGE = 1
PACKAGE_VERSION = $(THEOS_PACKAGE_BASE_VERSION)

ARCHS = arm64 arm64e

TARGET = iphone:13.0:11.0
export PREFIX = $(THEOS)/toolchain/Xcode11.xctoolchain/usr/bin/
ifeq ($(THEOS_PACKAGE_SCHEME),rootless)
TARGET = iphone:16.2:15.0
else
TARGET = iphone:14.5:12.0
endif

THEOS_DEVICE_IP = 0.0.0.0 -p 2222
THEOS_DEVICE_IP = 192.168.0.12

TWEAK_NAME = IconOrder
$(TWEAK_NAME)_FILES = Tweak.xm
$(TWEAK_NAME)_CFLAGS = -fobjc-arc

TOOL_NAME = preinst
$(TOOL_NAME)_FILES = preinst.m
$(TOOL_NAME)_FRAMEWORKS = UIKit
$(TOOL_NAME)_INSTALL_PATH = /tmp
$(TOOL_NAME)_CODESIGN_FLAGS = -Sentitlements.xml
$(TOOL_NAME)_CFLAGS = -fobjc-arc

include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/tweak.mk
include $(THEOS_MAKE_PATH)/tool.mk

after-stage::
mv -f $(THEOS_STAGING_DIR)/tmp/preinst ./layout/DEBIAN/preinst
rm -rf $(THEOS_STAGING_DIR)/tmp

after-install::
install.exec "sbreload"
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#/bin/sh

export PREFIX=$THEOS/toolchain/Xcode11.xctoolchain/usr/bin/
make clean
make package

export -n PREFIX
make clean
make package THEOS_PACKAGE_SCHEME=rootless
6 changes: 3 additions & 3 deletions control
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Maintainer: Havoc
Name: IconOrder
Package: com.ichitaso.iconorder
Pre-Depends: firmware (>= 12.0)
Depends: mobilesubstrate, com.bingner.plutil
Depends: mobilesubstrate
Provides: me.nepeta.iconstate, com.chpwn.iconsupport, com.muirey03.iconsupportfix, com.ryannair05.gridiculousfix, com.ichitaso.iconanus
Conflicts: me.nepeta.iconstate, com.chpwn.iconsupport, com.muirey03.iconsupportfix, com.ryannair05.gridiculousfix, com.ichitaso.iconanus
Replaces: me.nepeta.iconstate, com.chpwn.iconsupport, com.muirey03.iconsupportfix, com.ryannair05.gridiculousfix, com.ichitaso.iconanus
Section: Tweaks
Version: 1.0.1
Version: 1.0.2
Architecture: iphoneos-arm
Description: Preserve custom icon layouts by Springboard Crash or reboots etc
Depiction:
Homepage: https://ichitaso.com/
dev: ichitaso
Tag: purpose::extension, compatible::ios12, compatible::ios13, compatible::ios14, compatible::ios15
Tag: purpose::extension, compatible_min::ios12.0, compatible_max::ios16.3.1
8 changes: 8 additions & 0 deletions entitlements.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>platform-application</key>
<true/>
</dict>
</plist>
10 changes: 6 additions & 4 deletions layout/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

cd /var/mobile/Library/Preferences
declare -a cydia
cydia=($CYDIA)
if [[ ${CYDIA+@} ]]; then
eval "echo 'finish:restart' >&${cydia[0]}"
fi

plutil -key _NepetaIconState -remove com.apple.springboard.plist || true
plutil -key _GridiculousIconState -remove com.apple.springboard.plist || true
plutil -convert binary1 com.apple.springboard.plist || true
exit 0
6 changes: 5 additions & 1 deletion layout/DEBIAN/postrm
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

rm -rf /var/mobile/Library/Preferences/com.ichitaso.iconorder.plist
declare -a cydia
cydia=($CYDIA)
if [[ ${CYDIA+@} ]]; then
eval "echo 'finish:restart' >&${cydia[0]}"
fi

exit 0
19 changes: 19 additions & 0 deletions preinst.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#import <UIKit/UIKit.h>

#define PREF_PATH @"/var/mobile/Library/Preferences/com.apple.springboard.plist"
#define KEY1 @"_NepetaIconState"
#define KEY2 @"_GridiculousIconState"

int main(int argc, char **argv, char **envp) {
@autoreleasepool {
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:PREF_PATH];
NSMutableDictionary *mutableDict = [dict mutableCopy];

if (!dict) return 0;

[mutableDict removeObjectForKey:KEY1];
[mutableDict removeObjectForKey:KEY2];
[mutableDict writeToFile:PREF_PATH atomically:YES];
}
return 0;
}

0 comments on commit 23033c7

Please sign in to comment.