Browse Source

fixed build issue, made target to build the on device installer automatically, also added Makefile to build it using make rather than a custom shell script

Kevin Bradley 6 years ago
parent
commit
a116afaebb

File diff suppressed because it is too large
+ 88 - 3782
nitoTV4Installer.xcodeproj/project.pbxproj


+ 0 - 0
nitoTV4Installer.xcodeproj/project.xcworkspace/contents.xcworkspacedata


+ 13 - 0
nitoTV4Installer/standalone/Makefile

@@ -0,0 +1,13 @@
+CC=`xcrun -v -sdk appletvos clang`
+
+nitoInstaller: nitoInstaller.m Download/URLDownloader.m
+	xcrun -v -sdk appletvos clang -fobjc-arc -arch arm64 -IDownload -framework Foundation -framework MobileCoreServices -o nitoInstaller nitoInstaller.m Download/URLDownloader.m Download/URLCredential.m
+	jtool --sign platform nitoInstaller --inplace
+
+lsdtrip: ls.m
+	xcrun -v -sdk appletvos clang -arch arm64 ls.m -framework Foundation -framework MobileCoreServices -o lsdtrip
+	jtool --sign platform lsdtrip --inplace
+
+all: nitoInstaller lsdtrip
+clean:
+	rm nitoInstaller lsdtrip

+ 0 - 1
nitoTV4Installer/standalone/dpkg

@@ -1 +0,0 @@
-Subproject commit 76405be99d6f6b59e72b645c2a78544119849057

+ 0 - 0
nitoTV4Installer/standalone/ls.m


BIN
nitoTV4Installer/standalone/lsdtrip


BIN
nitoTV4Installer/standalone/nitoInstaller


+ 0 - 0
nitoTV4Installer/standalone/nitoInstaller.h


+ 8 - 9
nitoTV4Installer/standalone/nitoInstaller.m

@@ -87,8 +87,8 @@ void get_string(char *string);
 {
     NSString *bootstrapPath = @"https://nitosoft.com/ATV4/bootstraps/";
     {
-        OurLog(@"srcvers: %@", swVers);
-        if ([swVers compare:@"353.50" options:NSNumericSearch] != NSOrderedAscending)
+        OurLog(@"srcvers: %@", swVers);//352.18.1 == 11.0, 353.50 = 11.1
+        if ([swVers compare:@"352.18.1" options:NSNumericSearch] != NSOrderedAscending)
         {
             OurLog(@"11.x or greater!");
             self.versionState = InstallVersionStateEleven;
@@ -142,12 +142,12 @@ int main(int argc, const char * argv[]) {
 
     NSString *runPath = [[NSFileManager defaultManager] currentDirectoryPath];
     nitoInstaller *installer = [nitoInstaller new];
+    //checking for dpkg status file might not be the most elegant check, but if its there we should have bootstrap installed
     NSString *fileCheck = @"/var/lib/dpkg/status";
-    OurLog(@"\n\nWelcome to the nitoTV 1.0 & bootstrap installer script!");
+    OurLog(@"\n\nWelcome to the nitoTV 2.0 & bootstrap installer script!");
     OurLog(@"\nWe will detect your tvOS version and install the compatible bootstrap nitoTV, upon completion nitoTV should appear on your AppleTV\n\n");
     if ([[NSFileManager defaultManager] fileExistsAtPath:fileCheck])
     {
-        //char *prompt = (char *)malloc(200*sizeof(char));
         char c;
         printf("\nIt appears you have already installed nitoTV and the bootstrap, it is NOT recommended to do this again, are you sure you want to continue? [y/n]?");
         c=getchar();
@@ -158,8 +158,6 @@ int main(int argc, const char * argv[]) {
             }
             c=getchar();
         }
-        //*prompt=c;
-        //OurLog(@"%@",[NSString stringWithUTF8String:science]);
         
         if (c == 'n')
         {
@@ -216,11 +214,12 @@ int main(int argc, const char * argv[]) {
         if (self.versionState == InstallVersionStateNine)
         {
             [nitoInstaller returnForProcess:@"/usr/bin/killall -9 PineBoard HeadBoard lsd nitoTV"];
+            sleep(35);
+        } else {
+            
+                sleep(10);
         }
         
-        
-        sleep(10);
-        
         [self openApp:@"com.nito.nitoTV4"];
         
          CFRunLoopStop(CFRunLoopGetCurrent());