using libgeneral as library instad of submodule

This commit is contained in:
tihmstar 2019-11-03 14:41:22 +01:00
parent 2988d63b97
commit 7298131780
7 changed files with 34 additions and 22 deletions

3
.gitmodules vendored
View file

@ -4,6 +4,3 @@
[submodule "external/idevicerestore"]
path = external/idevicerestore
url = https://github.com/tihmstar/idevicerestore.git
[submodule "external/libgeneral"]
path = external/libgeneral
url = https://github.com/tihmstar/libgeneral

View file

@ -43,12 +43,23 @@ AC_CONFIG_SUBDIRS(external/idevicerestore external/tsschecker)
AC_CONFIG_SRCDIR([futurerestore])
PKG_CHECK_MODULES(libplist, libplist >= 1.12)
PKG_CHECK_MODULES(libzip, libzip >= 0.10)
PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.2.1)
PKG_CHECK_MODULES(libfragmentzip, libfragmentzip >= 1.0)
PKG_CHECK_MODULES(libirecovery, libirecovery >= 0.2.0)
PKG_CHECK_MODULES(libimg4tool, libimg4tool >= 158)
LIBIPATCHER_REQUIRES_STR="libipatcher >= 57"
LIBPLIST_REQUIRES_STR="libplist >= 2.0.0"
LIBZIP_REQUIRES_STR="libzip >= 0.10"
LIBIMOBILEDEVICE_REQUIRES_STR="libimobiledevice-1.0 >= 1.2.1"
LIBFRAGMENTZIP_REQUIRES_STR="libfragmentzip >= 47"
LIBIRECOVERY_REQUIRES_STR="libirecovery >= 0.2.0"
IMG4TOOL_REQUIRES_STR="libimg4tool >= 159"
LIBGENERAL_REQUIRES_STR="libgeneral >= 26"
PKG_CHECK_MODULES(libplist, libplist >= 2.0.0)
PKG_CHECK_MODULES(libzip, $LIBZIP_REQUIRES_STR)
PKG_CHECK_MODULES(libimobiledevice, $LIBIMOBILEDEVICE_REQUIRES_STR)
PKG_CHECK_MODULES(libfragmentzip, $LIBFRAGMENTZIP_REQUIRES_STR)
PKG_CHECK_MODULES(libirecovery, $LIBIRECOVERY_REQUIRES_STR)
PKG_CHECK_MODULES(libimg4tool, $IMG4TOOL_REQUIRES_STR)
PKG_CHECK_MODULES(libgeneral, $LIBGENERAL_REQUIRES_STR)
# Optional module libipatcher
@ -65,7 +76,7 @@ if [test -z "$LIBIPATCHER_FLAGS"]; then
else
AC_MSG_CHECKING([for futurerestore libipatcher])
if test "$build_libipatcher" = "true"; then
PKG_CHECK_MODULES(libipatcher, libipatcher >= 47)
PKG_CHECK_MODULES(libipatcher, $LIBIPATCHER_REQUIRES_STR)
AC_DEFINE(HAVE_LIBIPATCHER, 1, [Define if you have libipatcher])
do_libipatcher=yes
else

1
external/libgeneral vendored

@ -1 +0,0 @@
Subproject commit e423f64d9b535c9a963f2ed3ed0fbf300c1ec24c

View file

@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
8754A6AE236F104300C0D285 /* libgeneral.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8754A6AD236F104200C0D285 /* libgeneral.0.dylib */; };
8754A6AF236F104300C0D285 /* libgeneral.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 8754A6AD236F104200C0D285 /* libgeneral.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8762F344236DF4D900F42FDB /* libimg4tool.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8762F343236DF4D900F42FDB /* libimg4tool.0.dylib */; };
8762F345236DF4D900F42FDB /* libimg4tool.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 8762F343236DF4D900F42FDB /* libimg4tool.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
878587471D89CFDC008689F0 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 878587461D89CFDC008689F0 /* main.cpp */; };
@ -54,6 +56,7 @@
dstSubfolderSpec = 10;
files = (
8762F345236DF4D900F42FDB /* libimg4tool.0.dylib in Embed Libraries */,
8754A6AF236F104300C0D285 /* libgeneral.0.dylib in Embed Libraries */,
);
name = "Embed Libraries";
runOnlyForDeploymentPostprocessing = 0;
@ -70,6 +73,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
8754A6AD236F104200C0D285 /* libgeneral.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libgeneral.0.dylib; path = ../../../../usr/local/lib/libgeneral.0.dylib; sourceTree = "<group>"; };
8762F343236DF4D900F42FDB /* libimg4tool.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libimg4tool.0.dylib; path = ../../../../usr/local/lib/libimg4tool.0.dylib; sourceTree = "<group>"; };
878587431D89CFDC008689F0 /* futurerestore */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = futurerestore; sourceTree = BUILT_PRODUCTS_DIR; };
878587461D89CFDC008689F0 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
@ -156,6 +160,7 @@
8762F344236DF4D900F42FDB /* libimg4tool.0.dylib in Frameworks */,
87F574D01E151F44008D5C4D /* libcrypto.dylib in Frameworks */,
87F574CB1E151E97008D5C4D /* libfragmentzip.0.dylib in Frameworks */,
8754A6AE236F104300C0D285 /* libgeneral.0.dylib in Frameworks */,
878587B71D89D637008689F0 /* libirecovery.2.dylib in Frameworks */,
878587AF1D89D5A5008689F0 /* libcurl.tbd in Frameworks */,
878587AB1D89D590008689F0 /* libimobiledevice.6.dylib in Frameworks */,
@ -283,6 +288,7 @@
87F574C21E151CDE008D5C4D /* Frameworks */ = {
isa = PBXGroup;
children = (
8754A6AD236F104200C0D285 /* libgeneral.0.dylib */,
8762F343236DF4D900F42FDB /* libimg4tool.0.dylib */,
878E1AC41F73EB3F00B1565B /* libzip.5.dylib */,
8788A6801EE8426A00138E07 /* libipatcher.0.dylib */,

View file

@ -1,5 +1,5 @@
AM_CFLAGS = -I$(top_srcdir)/external/libgeneral/include -I$(top_srcdir)/external/tsschecker/external/jssy/jssy -I$(top_srcdir)/external/tsschecker/tsschecker -I$(top_srcdir)/external/idevicerestore/src $(libplist_CFLAGS) $(libzip_CFLAGS) $(libimobiledevice_CFLAGS) $(libfragmentzip_CFLAGS) $(libirecovery_CFLAGS) $(libimg4tool_CFLAGS)
AM_LDFLAGS = $(libplist_LIBS) $(libzip_LIBS) $(libimobiledevice_LIBS) $(libfragmentzip_LIBS) $(libirecovery_LIBS) $(libimg4tool_LIBS)
AM_CFLAGS = -I$(top_srcdir)/external/libgeneral/include -I$(top_srcdir)/external/tsschecker/external/jssy/jssy -I$(top_srcdir)/external/tsschecker/tsschecker -I$(top_srcdir)/external/idevicerestore/src $(libplist_CFLAGS) $(libzip_CFLAGS) $(libimobiledevice_CFLAGS) $(libfragmentzip_CFLAGS) $(libirecovery_CFLAGS) $(libimg4tool_CFLAGS) $(libgeneral_CFLAGS)
AM_LDFLAGS = $(libplist_LIBS) $(libzip_LIBS) $(libimobiledevice_LIBS) $(libfragmentzip_LIBS) $(libirecovery_LIBS) $(libimg4tool_LIBS) $(libgeneral_LIBS)
if HAVE_LIBIPATCHER
AM_LDFLAGS += $(libipatcher_LIBS)

View file

@ -463,7 +463,7 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, string bootargs){
try {
iBSSKeys = libipatcher::getFirmwareKey(_client->device->product_type, _client->build, "iBSS");
iBECKeys = libipatcher::getFirmwareKey(_client->device->product_type, _client->build, "iBEC");
} catch (tihmstar::exception e) {
} catch (tihmstar::exception &e) {
reterror("getting keys failed with error: %d (%s). Are keys publicly available?",e.code(),e.what());
}

View file

@ -280,15 +280,14 @@ error:
}
int main(int argc, const char * argv[]) {
#ifdef DEBUG
return main_r(argc, argv);
#else
//#ifdef DEBUG
// return main_r(argc, argv);
//#else
try {
return main_r(argc, argv);
} catch (tihmstar::exception &e) {
printf("%s: failed with exception:\n",PACKAGE_NAME);
e.dump();
return e.code();
} catch (std::exception &e) {
printf("%s: failed with exception (%s)\n",PACKAGE_NAME,e.what());
return -1;
}
#endif
//#endif
}