From dbf830e62429c3dcec4c934170d72fa3c95d5965 Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Thu, 30 Aug 2012 10:56:32 +0300 Subject: [PATCH 1/2] Respring device after widget installation and removal through cydia --- notification_center_widget.nic | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/notification_center_widget.nic b/notification_center_widget.nic index b1c8c70..e6cb323 100644 --- a/notification_center_widget.nic +++ b/notification_center_widget.nic @@ -64,7 +64,7 @@ file 20 BBWeeAppController-Protocol.h @end -file 11 Makefile +file 15 Makefile include theos/makefiles/common.mk BUNDLE_NAME = @@PROJECTNAME@@ @@ -74,6 +74,10 @@ BUNDLE_NAME = @@PROJECTNAME@@ include $(THEOS_MAKE_PATH)/bundle.mk +before-package:: + @cp cydia_scripts/* _/DEBIAN/ + @chmod 775 _/DEBIAN/postinst _/DEBIAN/postrm + after-install:: install.exec "killall -9 SpringBoard" @@ -153,3 +157,29 @@ static NSBundle *_@@PROJECTNAME@@WeeAppBundle = nil; @end +dir cydia_scripts +file 11 cydia_scripts/postinst +#!/bin/bash + +declare -a cydia +cydia=($CYDIA) + +if [[ ${CYDIA+@} ]]; then + eval "echo 'finish:restart' >&${cydia[0]}" +else + killall springboard + echo "Please respring your device." +fi + +file 11 cydia_scripts/postrm +#!/bin/bash + +declare -a cydia +cydia=($CYDIA) + +if [[ ${CYDIA+@} ]]; then + eval "echo 'finish:restart' >&${cydia[0]}" +else + killall springboard + echo "Please respring your device." +fi \ No newline at end of file From 8db6bc796b1555e943612cbc35bf198ff726b206 Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Thu, 30 Aug 2012 11:13:13 +0300 Subject: [PATCH 2/2] Respring cydia script on installation and removal --- notification_center_widget.nic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notification_center_widget.nic b/notification_center_widget.nic index e6cb323..a192798 100644 --- a/notification_center_widget.nic +++ b/notification_center_widget.nic @@ -182,4 +182,4 @@ if [[ ${CYDIA+@} ]]; then else killall springboard echo "Please respring your device." -fi \ No newline at end of file +fi