Skip to content

Commit 44fe4b1

Browse files
authored
Merge pull request #2 from lemon4ex/xcode14
增加允许profile时不生成deb文件的逻辑
2 parents 64d7be0 + 88f5e62 commit 44fe4b1

File tree

1 file changed

+26
-31
lines changed

1 file changed

+26
-31
lines changed

bin/ed

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ function xcodeBuildPhase() # no args
950950
fi
951951
952952
#如果是profie或者用户设置了每次build都install或package,生成deb
953-
if [[ "$CONFIGURATION" == "Release" && "$VALIDATE_PRODUCT" == "YES" ]] || [[ "$EasyDevInstallOnAnyBuild" == "YES" ]] || [[ "$EasyDevBuildPackageOnAnyBuild" == "YES" ]]; then
953+
if [[ "$EasyDevInstallOnProfiling" == "YES" ]] || [[ "$EasyDevInstallOnAnyBuild" == "YES" ]] || [[ "$EasyDevBuildPackageOnAnyBuild" == "YES" ]]; then
954954
requireDir "$packageDirectory"
955955
#准备打包
956956
echo "Copying $packageInstallSource to package directory at $packageInstallPath..."
@@ -970,46 +970,41 @@ function xcodeBuildPhase() # no args
970970
fi
971971
972972
#profile或者用户设置了build安装
973-
if [[ "$CONFIGURATION" == "Release" && "$VALIDATE_PRODUCT" == "YES" ]] || [[ "$EasyDevInstallOnAnyBuild" == "YES" ]]; then
973+
if [[ "$EasyDevInstallOnProfiling" == "YES" && "$CONFIGURATION" == "Release" && "$VALIDATE_PRODUCT" == "YES" ]] || [[ "$EasyDevInstallOnAnyBuild" == "YES" ]]; then
974974
975-
if [[ "$DEPLOYMENT_POSTPROCESSING" == "NO" || "$EasyDevInstallOnAnyBuild" == "YES" ]]; then
975+
# if build setting EasyDevInstallOnProfiling is enabled, installation of package is enabled...
976976
977-
# if build setting EasyDevInstallOnProfiling is enabled, installation of package is enabled...
978-
if [[ "$EasyDevInstallOnProfiling" == "YES" || "$EasyDevInstallOnAnyBuild" == "YES" ]]; then
977+
# if EasyDevDeviceIP has a value, install package on device...
978+
if [[ "$EasyDevDeviceIP" != "" ]]; then
979979
980-
# if EasyDevDeviceIP has a value, install package on device...
981-
if [[ "$EasyDevDeviceIP" != "" ]]; then
980+
# get package file name #
981+
packageFileName="`getPackageFileNameUsingControlFile \"$packageDirectory/DEBIAN/control\"`.deb"
982982
983-
# get package file name #
984-
packageFileName="`getPackageFileNameUsingControlFile \"$packageDirectory/DEBIAN/control\"`.deb"
983+
# install package on device #
984+
managePackageOnDevice "install" "$allPackagesDir/$packageFileName" "$EasyDevDeviceIP" "$EasyDevDevicePort"
985985
986-
# install package on device #
987-
managePackageOnDevice "install" "$allPackagesDir/$packageFileName" "$EasyDevDeviceIP" "$EasyDevDevicePort"
986+
if [[ "$EasyDevKillProcessOnInstall" == "YES" && "$EasyDevKillProcessName" != "" ]]; then
988987
989-
if [[ "$EasyDevKillProcessOnInstall" == "YES" && "$EasyDevKillProcessName" != "" ]]; then
990-
991-
if [[ "$EasyDevKillProcessName" == "SpringBoard" ]]; then
992-
echo "respring device..."
993-
runFuncOnDevice "respring" "$EasyDevDeviceIP" "$EasyDevDevicePort"
994-
else
995-
echo "killall -9 $EasyDevKillProcessName"
996-
runFuncOnDevice "killall -9 $EasyDevKillProcessName" "$EasyDevDeviceIP" "$EasyDevDevicePort"
997-
fi
998-
fi
999-
1000-
if [[ "$EasyDevClearUiCacheOnInstall" == "YES" ]]; then
1001-
echo "Clearing uicache device..."
1002-
runFuncOnDevice "uicache" "$EasyDevDeviceIP" "$EasyDevDevicePort"
1003-
fi
988+
if [[ "$EasyDevKillProcessName" == "SpringBoard" ]]; then
989+
echo "respring device..."
990+
runFuncOnDevice "respring" "$EasyDevDeviceIP" "$EasyDevDevicePort"
1004991
else
1005-
# build setting EasyDevDeviceIP is empty #
1006-
panic 1 "Unable to install package on device since build setting EasyDevDeviceIP is not set or is empty and it is not exported in your Bash personal initialization file"
992+
echo "killall -9 $EasyDevKillProcessName"
993+
runFuncOnDevice "killall -9 $EasyDevKillProcessName" "$EasyDevDeviceIP" "$EasyDevDevicePort"
1007994
fi
1008-
else
1009-
# build setting EasyDevInstallOnProfiling is disabled #
1010-
echo "Installation of package on device is disabled. To enable, set build setting EasyDevInstallOnProfiling to YES."
1011995
fi
996+
997+
if [[ "$EasyDevClearUiCacheOnInstall" == "YES" ]]; then
998+
echo "Clearing uicache device..."
999+
runFuncOnDevice "uicache" "$EasyDevDeviceIP" "$EasyDevDevicePort"
1000+
fi
1001+
else
1002+
# build setting EasyDevDeviceIP is empty #
1003+
panic 1 "Unable to install package on device since build setting EasyDevDeviceIP is not set or is empty and it is not exported in your Bash personal initialization file"
10121004
fi
1005+
else
1006+
# build setting EasyDevInstallOnProfiling is disabled #
1007+
echo "Installation of package on device is disabled. To enable, set build setting EasyDevInstallOnProfiling or EasyDevInstallOnAnyBuild to YES."
10131008
fi
10141009
fi
10151010

0 commit comments

Comments
 (0)