mirror of
https://github.com/tihmstar/futurerestore.git
synced 2024-12-22 17:35:29 +00:00
m
This commit is contained in:
parent
2bc7dd6071
commit
818f5a3ea2
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ CXX = g++
|
|||
CC = gcc
|
||||
INCLUDE += -I futurerestore -I /opt/local/include -I external/idevicerestore/src -I external/tsschecker/tsschecker -I external/img4tool/img4tool
|
||||
CFLAGS += $(INCLUDE) -Wall -std=c11 -D HAVE_CONFIG_H=1
|
||||
CXXFLAGS += $(INCLUDE) -Wall -std=c++11 -stdlib=libc++
|
||||
CXXFLAGS += $(INCLUDE) -Wall -std=c++11
|
||||
|
||||
LDFLAGS += -lirecovery -limobiledevice -lcrypto -lcurl -lplist -lc -lc++ -lzip -lpartialzip-1.0 -lz
|
||||
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
#include "restore.h"
|
||||
#include "tsschecker.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#define __mkdir(path, mode) mkdir(path)
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#define __mkdir(path, mode) mkdir(path, mode)
|
||||
#endif
|
||||
|
||||
#define NONCESIZE 20
|
||||
#define USEC_PER_SEC 1000000
|
||||
|
||||
|
@ -44,7 +52,7 @@ futurerestore::futurerestore(){
|
|||
if (_client == NULL) throw std::string("could not create idevicerestore client\n");
|
||||
|
||||
struct stat st{0};
|
||||
if (stat(FUTURERESTORE_TMP_PATH, &st) == -1) mkdir(FUTURERESTORE_TMP_PATH, 0755);
|
||||
if (stat(FUTURERESTORE_TMP_PATH, &st) == -1) __mkdir(FUTURERESTORE_TMP_PATH, 0755);
|
||||
|
||||
//tsschecker nocache
|
||||
nocache = 1;
|
||||
|
@ -658,7 +666,7 @@ char *futurerestore::getPathOfElementInManifest(const char *element, const char
|
|||
char *pathStr = NULL;
|
||||
ptr_smart<plist_t> buildmanifest(NULL,plist_free);
|
||||
|
||||
plist_from_xml(manifeststr, (uint)strlen(manifeststr), &buildmanifest);
|
||||
plist_from_xml(manifeststr, (uint32_t)strlen(manifeststr), &buildmanifest);
|
||||
|
||||
if (plist_t buildidentities = plist_dict_get_item(buildmanifest._p, "BuildIdentities"))
|
||||
if (plist_t firstIdentitie = plist_array_get_item(buildidentities, 0))
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
#include "futurerestore.hpp"
|
||||
#include "all_tsschecker.h"
|
||||
#include "tsschecker.h"
|
||||
|
|
Loading…
Reference in a new issue