diff --git a/Classes/Binary.h b/Classes/Binary.h index cd394c38..dbebe19e 100644 --- a/Classes/Binary.h +++ b/Classes/Binary.h @@ -13,11 +13,13 @@ @public BOOL overdriveEnabled; BOOL skip_64; + BOOL patchPIE; } - (id)initWithBinary:(NSString *)path; - (BOOL)crackBinaryToFile:(NSString *)path error:(NSError **)error; - (BOOL)dumpOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withArch:(struct fat_arch)arch; -- (BOOL)dump64bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top patchPIE:(BOOL) patchPIE; +- (BOOL)dump64bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top; +- (BOOL)dump32bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top; @end diff --git a/Classes/Binary.m b/Classes/Binary.m index 3c25ccc7..81500d3a 100644 --- a/Classes/Binary.m +++ b/Classes/Binary.m @@ -35,6 +35,10 @@ - (id)init return nil; } +-(void)patchPIE:(BOOL)patch { + self->patchPIE = patch; +} + -(NSString *) genRandStringLength: (int) len { NSString *letters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; @@ -455,7 +459,7 @@ - (BOOL)crackBinaryToFile:(NSString *)finalPath error:(NSError * __autoreleasing return NO; } - if (![self dump64bitOrigFile:oldbinary withLocation:oldbinaryPath toFile:newbinary withTop:0 patchPIE:FALSE]) + if (![self dump64bitOrigFile:oldbinary withLocation:oldbinaryPath toFile:newbinary withTop:0]) { // Dumping failed DEBUG(@"Failed to dump %@",[self readable_cpusubtype:mh64->cpusubtype]); @@ -504,7 +508,7 @@ - (BOOL)crackBinaryToFile:(NSString *)finalPath error:(NSError * __autoreleasing return NO; } - if (![self dump32bitOrigFile:oldbinary withLocation:oldbinaryPath toFile:newbinary withTop:0 patchPIE:false]) + if (![self dump32bitOrigFile:oldbinary withLocation:oldbinaryPath toFile:newbinary withTop:0]) { // Dumping failed DEBUG(@"Failed to dump %@",[self readable_cpusubtype:mh32->cpusubtype]); @@ -702,18 +706,18 @@ - (BOOL)dumpOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:( if (CFSwapInt32(arch.cputype) == CPU_TYPE_ARM64) { DEBUG(@"currently cracking 64bit portion"); - return [self dump64bitOrigFile:origin withLocation:originPath toFile:target withTop:CFSwapInt32(arch.offset) patchPIE:FALSE]; + return [self dump64bitOrigFile:origin withLocation:originPath toFile:target withTop:CFSwapInt32(arch.offset)]; } else { DEBUG(@"currently cracking 32bit portion"); - return [self dump32bitOrigFile:origin withLocation:originPath toFile:target withTop:CFSwapInt32(arch.offset) patchPIE:FALSE]; + return [self dump32bitOrigFile:origin withLocation:originPath toFile:target withTop:CFSwapInt32(arch.offset)]; } return true; } -- (BOOL)dump64bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top patchPIE:(BOOL) patchPIE +- (BOOL)dump64bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top { fseek(target, top, SEEK_SET); // go the top of the target @@ -951,13 +955,14 @@ - (BOOL)dump64bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toF DEBUG(@"dum_error: %u", err); VERBOSE("dumping binary: failed to dump a page (64)"); - if (__text_start == 16384) { + if (__text_start == 0x4000) { printf("\n=================\n"); printf("0x4000 binary detected, attempting to remove MH_PIE flag"); printf("\n=================\n\n"); free(checksum); // free checksum table kill(pid, SIGKILL); // kill fork - return [self dump32bitOrigFile:origin withLocation:originPath toFile:target withTop:top patchPIE:true]; + [self patchPIE:TRUE]; + return [self dump64bitOrigFile:origin withLocation:originPath toFile:target withTop:top]; } free(checksum); // free checksum table @@ -1067,8 +1072,9 @@ - (BOOL)dump64bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toF } -- (BOOL)dump32bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top patchPIE:(BOOL) patchPIE { - DEBUG(@"32bit dumping!!!"); +- (BOOL)dump32bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toFile:(FILE *) target withTop:(uint32_t) top +{ + DEBUG(@"Dumping 32bit segment.."); fseek(target, top, SEEK_SET); // go the top of the target // we're going to be going to this position a lot so let's save it fpos_t topPosition; @@ -1088,7 +1094,7 @@ - (BOOL)dump32bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toF BOOL foundStartText = FALSE; uint64_t __text_start = 0; //uint64_t __text_size = 0; - DEBUG(@"32bit dumping, offset %u", top); + DEBUG(@"32bit dumping: offset %u", top); //VERBOSE("dumping binary: analyzing load commands"); MSG(DUMPING_ANALYZE_LOAD_COMMAND); fread(&mach, sizeof(struct mach_header), 1, target); // read mach header to get number of load commands @@ -1293,13 +1299,6 @@ - (BOOL)dump32bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toF // get a percentage for the progress bar PERCENT((int)ceil((((double)total - togo) / (double)total) * 100)); - // move an entire page into memory (we have to move an entire page regardless of whether it's a resultant or not) - /*if((err = vm_read_overwrite(port, (mach_vm_address_t) __text_start + (pages_d * 0x1000), (vm_size_t) 0x1000, (pointer_t) buf, &local_size)) != KERN_SUCCESS) { - VERBOSE("dumping binary: failed to dump a page"); - free(checksum); // free checksum table - kill(pid, SIGKILL); // kill fork - return FALSE; - }*/ if ((err = mach_vm_read_overwrite(port, (mach_vm_address_t) __text_start + (pages_d * 0x1000), (vm_size_t) 0x1000, (pointer_t) buf, &local_size)) != KERN_SUCCESS) { @@ -1310,7 +1309,8 @@ - (BOOL)dump32bitOrigFile:(FILE *) origin withLocation:(NSString*)originPath toF printf("\n=================\n\n"); free(checksum); // free checksum table kill(pid, SIGKILL); // kill the fork - return [self dump32bitOrigFile:origin withLocation:originPath toFile:target withTop:top patchPIE:true]; + [self patchPIE:TRUE]; + return [self dump32bitOrigFile:origin withLocation:originPath toFile:target withTop:top]; } free(checksum); // free checksum table kill(pid, SIGKILL); // kill the fork diff --git a/Classes/Constants.h b/Classes/Constants.h index 90bcb452..36848165 100644 --- a/Classes/Constants.h +++ b/Classes/Constants.h @@ -2,7 +2,6 @@ // Constants.h // Clutch // -// Created by Zorro on 30.12.13. // // @@ -25,10 +24,10 @@ */ #define CLUTCH_TITLE "Clutch" -#define CLUTCH_VERSION "1.4.4" +#define CLUTCH_VERSION "1.4.5" #define CLUTCH_RELEASE "git-1" -#define CLUTCH_BUILD 14401 -#define CLUTCH_DEV 0 //1 +#define CLUTCH_BUILD 14501 +#define CLUTCH_DEV 1 //0 void sha1(uint8_t *hash, uint8_t *data, size_t size); diff --git a/Classes/Cracker.m b/Classes/Cracker.m index 680f9b03..278473e4 100644 --- a/Classes/Cracker.m +++ b/Classes/Cracker.m @@ -51,75 +51,6 @@ -(void)dealloc [super dealloc]; } -static BOOL forceRemoveDirectory(NSString *dirpath) -{ - BOOL isDir; - NSFileManager *fileManager=[NSFileManager defaultManager]; - - if(![fileManager fileExistsAtPath:dirpath isDirectory:&isDir]) - { - if(![fileManager removeItemAtPath:dirpath error:NULL]) - { - return NO; - } - } - - return YES; -} - -static BOOL forceCreateDirectory(NSString *dirpath) -{ - BOOL isDir; - NSFileManager *fileManager= [NSFileManager defaultManager]; - - if([fileManager fileExistsAtPath:dirpath isDirectory:&isDir]) - { - if(![fileManager removeItemAtPath:dirpath error:NULL]) - { - return NO; - } - } - - if(![fileManager createDirectoryAtPath:dirpath withIntermediateDirectories:YES attributes:nil error:NULL]) - { - return NO; - } - - return YES; -} - -static BOOL copyFile(NSString *infile, NSString *outfile) -{ - NSFileManager *fileManager= [NSFileManager defaultManager]; - - if(![fileManager createDirectoryAtPath:[outfile stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:NULL]) - { - return NO; - } - - if(![fileManager copyItemAtPath:infile toPath:outfile error:NULL]) - { - return NO; - } - - return YES; -} - -static ZipArchive * createZip(NSString *file) { - ZipArchive *archiver = [[ZipArchive alloc] init]; - - if (!file) - { - DEBUG(@"File string is nil"); - - [archiver release]; - return nil; - } - - [archiver CreateZipFile2:file]; - - return archiver; -} static NSString * genRandStringLength(int len) @@ -543,7 +474,7 @@ void generateMetadata(NSString *origPath,NSString *output) [metadataPlist removeObjectForKey:@"com.apple.iTunesStore.downloadInfo"]; - DEBUG(@"metadataplist %@", metadataPlist); + //DEBUG(@"metadataplist %@", metadataPlist); [metadataPlist writeToFile:output atomically:NO]; diff --git a/Classes/Preferences.m b/Classes/Preferences.m index 48500352..726b17a1 100755 --- a/Classes/Preferences.m +++ b/Classes/Preferences.m @@ -72,7 +72,7 @@ - (void)tempSetObject:(id)value forKey:(NSString *)defaultName [_dict setObject:value forKey:defaultName]; } - DEBUG(@"da dict %@", _dict); + //DEBUG(@"Preferences dictionary: %@", _dict); } diff --git a/Classes/main.m b/Classes/main.m index f228a156..411822e5 100644 --- a/Classes/main.m +++ b/Classes/main.m @@ -531,18 +531,17 @@ int main(int argc, char *argv[]) else if ([arg isEqualToString:@"--info"]) { get_info = 1; - DEBUG(@"getting info wow"); + } else { if ([arg isEqualToString:arguments[0]]) { + continue; } - - if ([arg intValue] != 0) - { - if ([[Preferences sharedInstance] numberBasedMenu]) + if ([[Preferences sharedInstance] numberBasedMenu]) { + if ([arg intValue] != 0) { int number = [arg intValue] - 1; Application *app = applist[number]; @@ -550,9 +549,11 @@ int main(int argc, char *argv[]) retVal = cmd_crack_app(app, skip_64); //printf("continuing after int crack"); } + } else { + NSString* _arg = arg; Application* crackApp = NULL; @@ -560,6 +561,7 @@ int main(int argc, char *argv[]) { if ([[[Preferences sharedInstance] objectForKey:@"ListWithDisplayName"] isEqualToString:@"DIRECTORY"]) { + DEBUG(@"holy shiit wow"); if ([app.applicationDirectory caseInsensitiveCompare:_arg] == NSOrderedSame) { crackApp = app; @@ -600,7 +602,7 @@ int main(int argc, char *argv[]) retVal = 0; goto endMain; } - + DEBUG(@"app to crack %@", crackApp->_info); retVal = cmd_crack_app(crackApp, skip_64); goto endMain; } diff --git a/Classes/minizip/ChangeLogUnzip b/Classes/minizip/ChangeLogUnzip deleted file mode 100644 index e62af147..00000000 --- a/Classes/minizip/ChangeLogUnzip +++ /dev/null @@ -1,67 +0,0 @@ -Change in 1.01e (12 feb 05) -- Fix in zipOpen2 for globalcomment (Rolf Kalbermatter) -- Fix possible memory leak in unzip.c (Zoran Stevanovic) - -Change in 1.01b (20 may 04) -- Integrate patch from Debian package (submited by Mark Brown) -- Add tools mztools from Xavier Roche - -Change in 1.01 (8 may 04) -- fix buffer overrun risk in unzip.c (Xavier Roche) -- fix a minor buffer insecurity in minizip.c (Mike Whittaker) - -Change in 1.00: (10 sept 03) -- rename to 1.00 -- cosmetic code change - -Change in 0.22: (19 May 03) -- crypting support (unless you define NOCRYPT) -- append file in existing zipfile - -Change in 0.21: (10 Mar 03) -- bug fixes - -Change in 0.17: (27 Jan 02) -- bug fixes - -Change in 0.16: (19 Jan 02) -- Support of ioapi for virtualize zip file access - -Change in 0.15: (19 Mar 98) -- fix memory leak in minizip.c - -Change in 0.14: (10 Mar 98) -- fix bugs in minizip.c sample for zipping big file -- fix problem in month in date handling -- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for - comment handling - -Change in 0.13: (6 Mar 98) -- fix bugs in zip.c -- add real minizip sample - -Change in 0.12: (4 Mar 98) -- add zip.c and zip.h for creates .zip file -- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly) -- fix miniunz.c for file without specific record for directory - -Change in 0.11: (3 Mar 98) -- fix bug in unzGetCurrentFileInfo for get extra field and comment -- enhance miniunz sample, remove the bad unztst.c sample - -Change in 0.10: (2 Mar 98) -- fix bug in unzReadCurrentFile -- rename unzip* to unz* function and structure -- remove Windows-like hungary notation variable name -- modify some structure in unzip.h -- add somes comment in source -- remove unzipGetcCurrentFile function -- replace ZUNZEXPORT by ZEXPORT -- add unzGetLocalExtrafield for get the local extrafield info -- add a new sample, miniunz.c - -Change in 0.4: (25 Feb 98) -- suppress the type unzipFileInZip. - Only on file in the zipfile can be open at the same time -- fix somes typo in code -- added tm_unz structure in unzip_file_info (date/time in readable format) diff --git a/Classes/minizip/MiniZip64_Changes.txt b/Classes/minizip/MiniZip64_Changes.txt deleted file mode 100644 index 13a1bd91..00000000 --- a/Classes/minizip/MiniZip64_Changes.txt +++ /dev/null @@ -1,6 +0,0 @@ - -MiniZip 1.1 was derrived from MiniZip at version 1.01f - -Change in 1.0 (Okt 2009) - - **TODO - Add history** - diff --git a/Classes/minizip/MiniZip64_info.txt b/Classes/minizip/MiniZip64_info.txt deleted file mode 100644 index 57d71524..00000000 --- a/Classes/minizip/MiniZip64_info.txt +++ /dev/null @@ -1,74 +0,0 @@ -MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson - -Introduction ---------------------- -MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html ) - -When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0. -All possible work was done for compatibility. - - -Background ---------------------- -When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64 -support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ ) - -That was used as a starting point. And after that ZIP64 support was added to zip.c -some refactoring and code cleanup was also done. - - -Changed from MiniZip 1.0 to MiniZip 1.1 ---------------------------------------- -* Added ZIP64 support for unzip ( by Even Rouault ) -* Added ZIP64 support for zip ( by Mathias Svensson ) -* Reverted some changed that Even Rouault did. -* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users. -* Added unzip patch for BZIP Compression method (patch create by Daniel Borca) -* Added BZIP Compress method for zip -* Did some refactoring and code cleanup - - -Credits - - Gilles Vollant - Original MiniZip author - Even Rouault - ZIP64 unzip Support - Daniel Borca - BZip Compression method support in unzip - Mathias Svensson - ZIP64 zip support - Mathias Svensson - BZip Compression method support in zip - - Resources - - ZipLayout http://result42.com/projects/ZipFileLayout - Command line tool for Windows that shows the layout and information of the headers in a zip archive. - Used when debugging and validating the creation of zip files using MiniZip64 - - - ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT - Zip File specification - - -Notes. - * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined. - -License ----------------------------------------------------------- - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - ----------------------------------------------------------- - diff --git a/Classes/minizip/make_vms.com b/Classes/minizip/make_vms.com deleted file mode 100644 index 9ac13a98..00000000 --- a/Classes/minizip/make_vms.com +++ /dev/null @@ -1,25 +0,0 @@ -$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig -$ open/write zdef vmsdefs.h -$ copy sys$input: zdef -$ deck -#define unix -#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from -#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator -#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord -#define Write_EndOfCentralDirectoryRecord Write_EoDRecord -$ eod -$ close zdef -$ copy vmsdefs.h,ioapi.h_orig ioapi.h -$ cc/include=[--]/prefix=all ioapi.c -$ cc/include=[--]/prefix=all miniunz.c -$ cc/include=[--]/prefix=all unzip.c -$ cc/include=[--]/prefix=all minizip.c -$ cc/include=[--]/prefix=all zip.c -$ link miniunz,unzip,ioapi,[--]libz.olb/lib -$ link minizip,zip,ioapi,[--]libz.olb/lib -$ mcr []minizip test minizip_info.txt -$ mcr []miniunz -l test.zip -$ rename minizip_info.txt; minizip_info.txt_old -$ mcr []miniunz test.zip -$ delete test.zip;* -$exit diff --git a/Clutch.xcodeproj/project.pbxproj b/Clutch.xcodeproj/project.pbxproj index 1bfaaeab..f8c13aa3 100755 --- a/Clutch.xcodeproj/project.pbxproj +++ b/Clutch.xcodeproj/project.pbxproj @@ -16,10 +16,6 @@ AD3014691871514D00E06315 /* Cracker.m in Sources */ = {isa = PBXBuildFile; fileRef = AD3014681871514D00E06315 /* Cracker.m */; }; AD61315C187D23FC00B94378 /* Install.m in Sources */ = {isa = PBXBuildFile; fileRef = AD61315B187D23FC00B94378 /* Install.m */; }; ADAA367E1870606D0029AF7D /* Preferences.m in Sources */ = {isa = PBXBuildFile; fileRef = ADAA367D1870606D0029AF7D /* Preferences.m */; }; - ADC68CD417ECA8A7005282CE /* ChangeLogUnzip in Resources */ = {isa = PBXBuildFile; fileRef = ADC68CC017ECA8A7005282CE /* ChangeLogUnzip */; }; - ADC68CD717ECA8A7005282CE /* make_vms.com in Resources */ = {isa = PBXBuildFile; fileRef = ADC68CC617ECA8A7005282CE /* make_vms.com */; }; - ADC68CDB17ECA8A7005282CE /* MiniZip64_Changes.txt in Resources */ = {isa = PBXBuildFile; fileRef = ADC68CCA17ECA8A7005282CE /* MiniZip64_Changes.txt */; }; - ADC68CDC17ECA8A7005282CE /* MiniZip64_info.txt in Resources */ = {isa = PBXBuildFile; fileRef = ADC68CCB17ECA8A7005282CE /* MiniZip64_info.txt */; }; ADC68CE017ECA8A7005282CE /* ZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = ADC68CD317ECA8A7005282CE /* ZipArchive.m */; }; ADC68CE517ECAD3E005282CE /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = ADC68CD017ECA8A7005282CE /* zip.c */; }; ADC68CE617ECAD4C005282CE /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = ADC68CCE17ECA8A7005282CE /* unzip.c */; }; @@ -59,16 +55,12 @@ AD61315B187D23FC00B94378 /* Install.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Install.m; sourceTree = ""; }; ADAA367C1870606D0029AF7D /* Preferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Preferences.h; sourceTree = ""; }; ADAA367D1870606D0029AF7D /* Preferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Preferences.m; sourceTree = ""; }; - ADC68CC017ECA8A7005282CE /* ChangeLogUnzip */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLogUnzip; sourceTree = ""; }; ADC68CC117ECA8A7005282CE /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = ""; }; ADC68CC217ECA8A7005282CE /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = ""; }; ADC68CC317ECA8A7005282CE /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = ""; }; - ADC68CC617ECA8A7005282CE /* make_vms.com */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = make_vms.com; sourceTree = ""; }; ADC68CC717ECA8A7005282CE /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; ADC68CC817ECA8A7005282CE /* miniunz.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = miniunz.c; sourceTree = ""; }; ADC68CC917ECA8A7005282CE /* minizip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = minizip.c; sourceTree = ""; }; - ADC68CCA17ECA8A7005282CE /* MiniZip64_Changes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MiniZip64_Changes.txt; sourceTree = ""; }; - ADC68CCB17ECA8A7005282CE /* MiniZip64_info.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MiniZip64_info.txt; sourceTree = ""; }; ADC68CCC17ECA8A7005282CE /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = ""; }; ADC68CCD17ECA8A7005282CE /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = ""; }; ADC68CCE17ECA8A7005282CE /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = ""; }; @@ -221,16 +213,12 @@ ADC68CBF17ECA8A7005282CE /* minizip */ = { isa = PBXGroup; children = ( - ADC68CC017ECA8A7005282CE /* ChangeLogUnzip */, ADC68CC117ECA8A7005282CE /* crypt.h */, ADC68CC217ECA8A7005282CE /* ioapi.c */, ADC68CC317ECA8A7005282CE /* ioapi.h */, - ADC68CC617ECA8A7005282CE /* make_vms.com */, ADC68CC717ECA8A7005282CE /* Makefile */, ADC68CC817ECA8A7005282CE /* miniunz.c */, ADC68CC917ECA8A7005282CE /* minizip.c */, - ADC68CCA17ECA8A7005282CE /* MiniZip64_Changes.txt */, - ADC68CCB17ECA8A7005282CE /* MiniZip64_info.txt */, ADC68CCC17ECA8A7005282CE /* mztools.c */, ADC68CCD17ECA8A7005282CE /* mztools.h */, ADC68CCE17ECA8A7005282CE /* unzip.c */, @@ -310,10 +298,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - ADC68CD417ECA8A7005282CE /* ChangeLogUnzip in Resources */, - ADC68CD717ECA8A7005282CE /* make_vms.com in Resources */, - ADC68CDB17ECA8A7005282CE /* MiniZip64_Changes.txt in Resources */, - ADC68CDC17ECA8A7005282CE /* MiniZip64_info.txt in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -427,10 +411,14 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_FUNCTION = NO; + GCC_WARN_UNUSED_LABEL = NO; + GCC_WARN_UNUSED_PARAMETER = NO; + GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 6.0; ONLY_ACTIVE_ARCH = NO; @@ -442,10 +430,14 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_FUNCTION = NO; + GCC_WARN_UNUSED_LABEL = NO; + GCC_WARN_UNUSED_PARAMETER = NO; + GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 6.0; ONLY_ACTIVE_ARCH = YES; diff --git a/Clutch.xcodeproj/project.xcworkspace/xcuserdata/ttwj.xcuserdatad/UserInterfaceState.xcuserstate b/Clutch.xcodeproj/project.xcworkspace/xcuserdata/ttwj.xcuserdatad/UserInterfaceState.xcuserstate index e5981e63..6c093ed2 100644 Binary files a/Clutch.xcodeproj/project.xcworkspace/xcuserdata/ttwj.xcuserdatad/UserInterfaceState.xcuserstate and b/Clutch.xcodeproj/project.xcworkspace/xcuserdata/ttwj.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..492d7d80 --- /dev/null +++ b/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Clutch xcodebuild script +# Credits to Tatsh + +xcodebuild clean install + +xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release -alltargets clean + +# Uncomment to enable CLUTCH_DEBUG with release +# xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release CLUTCH_DEBUG=1 + +xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release -alltargets CLUTCH_DEBUG=0 # equivalent to next line where CLUTCH_DEBUG is not set + +strip "build/Release-iphoneos/Clutch.app/Clutch" +codesign -f -s "iPhone Developer" --entitlements Resources/Clutch.entitlements "build/Release-iphoneos/Clutch.app/Clutch" diff --git a/codesign.sh b/codesign.sh deleted file mode 100755 index 54840139..00000000 --- a/codesign.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -strip "$1" -codesign -f -s "iPhone Developer" --entitlements Resources/Clutch.entitlements "$1" -#scp "$1" "$SSH_LOCATION":/usr/bin -cp "$1" ~/Downloads