From 5ea186bcc31e7c044a215e517fc99197bc30fe03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Zo=CC=88llner?= Date: Thu, 1 Oct 2015 00:49:45 +0300 Subject: [PATCH 1/2] support skipping of assistants --- TESetupAssistant/SetupAssistantMini.xib | 348 +++++++++++++----------- TESetupAssistant/TESetupAssistant.h | 2 + TESetupAssistant/TESetupAssistant.m | 1 - 3 files changed, 187 insertions(+), 164 deletions(-) diff --git a/TESetupAssistant/SetupAssistantMini.xib b/TESetupAssistant/SetupAssistantMini.xib index 1e908c5..fe8a06f 100644 --- a/TESetupAssistant/SetupAssistantMini.xib +++ b/TESetupAssistant/SetupAssistantMini.xib @@ -2,25 +2,25 @@ 1070 - 11B26 - 1934 - 1138 - 566.00 + 11G63 + 3084 + 1138.51 + 569.00 com.apple.InterfaceBuilder.CocoaPlugin - 1934 + 3084 - NSTextField - NSView - NSWindowTemplate - NSBox - NSTextFieldCell - NSCustomView - NSButtonCell IBNSLayoutConstraint + NSBox NSButton + NSButtonCell NSCustomObject + NSCustomView + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate com.apple.InterfaceBuilder.CocoaPlugin @@ -62,11 +62,13 @@ {{1, 1}, {459, 231}} + {{20, 56}, {461, 233}} + {0, 0} 67239424 @@ -111,6 +113,7 @@ {{17, 297}, {467, 18}} + YES 68288064 @@ -148,6 +151,7 @@ {{380, 12}, {107, 32}} + YES 67239424 @@ -173,6 +177,7 @@ {{273, 12}, {107, 32}} + YES 67239424 @@ -191,17 +196,19 @@ 290 - {{20, 8}, {251, 43}} + {{20, 0}, {251, 51}} + NSView {501, 326} + - {{0, 0}, {1680, 1028}} + {{0, 0}, {1280, 778}} {10000000000000, 10000000000000} YES @@ -332,133 +339,165 @@ - - + + 5 0 - - 5 + + 6 + 1 + + 12 + + 1000 + + 6 + 24 + 3 + + + + 4 + 0 + + 4 1 20 1000 + 8 29 3 - - + 6 0 - + 6 1 20 1000 + 8 29 3 - - + - 5 + 7 0 - - 6 + + 7 1 - - 8 + + 0.0 1000 - 6 - 24 - 3 + 9 + 40 + 5 - + - 6 + 4 0 - - 6 + + 4 1 20 1000 + 8 29 3 - - - + + 5 0 - - 5 + + 6 1 - 20 + 8 1000 - 8 - 29 + + 6 + 24 3 + + + + 3 + 0 + + 3 + 1 + + 275 + + 1000 + 3 + 9 + 3 - - + + 4 0 - + 4 1 - - 20 + + 0.0 1000 + 8 29 3 - - - - 6 + + + 5 0 - - 6 + + 5 1 20 1000 + 8 29 3 - - + 4 0 - + 4 1 - - 20 + + 56 1000 - 8 - 29 - 3 + 3 + 9 + 3 @@ -471,29 +510,29 @@ 8 1000 + 6 24 3 - - - - 5 + + + 6 0 - + 6 1 - 12 + 20 1000 - 6 - 24 - 3 + 8 + 29 + 3 - - + + 5 0 @@ -503,74 +542,58 @@ 20 1000 + 8 29 3 - - - + + 3 0 - - 4 + + 3 1 - 5 + 11 1000 - 9 - 40 - 3 - - - - 4 - 0 - - 4 - 1 - - 8 - - 1000 - 9 - 40 + 3 + 9 3 - - + - 3 + 5 0 - 3 + 5 1 - - 11 + + 20 1000 - 9 - 40 - 3 + 8 + 29 + 3 - - - 7 + + + 6 0 - - 7 + + 6 1 - - 0.0 + + 20 1000 - 9 - 40 - 5 + 8 + 29 + 3 @@ -578,24 +601,7 @@ 5 - - - - 8 - 0 - - 0 - 1 - - 43 - - 1000 - 9 - 40 - 1 - - - + @@ -614,10 +620,10 @@ 95 1000 + 3 9 1 - @@ -720,29 +726,29 @@ - 38 - + 41 + - 39 - + 49 + - 40 - + 50 + - 41 - + 51 + - 42 - - + 52 + + @@ -768,35 +774,33 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin TESetupAssistantBGView - + + + + - - + + + + + - + + - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -813,7 +817,7 @@ - 48 + 52 @@ -825,6 +829,24 @@ ./Classes/NSLayoutConstraint.h + + NSWindow + + stopModalSheet: + id + + + stopModalSheet: + + stopModalSheet: + id + + + + IBProjectSource + ./Classes/NSWindow.h + + TEInstallStepView NSView diff --git a/TESetupAssistant/TESetupAssistant.h b/TESetupAssistant/TESetupAssistant.h index 2aa3a3d..ace5496 100644 --- a/TESetupAssistant/TESetupAssistant.h +++ b/TESetupAssistant/TESetupAssistant.h @@ -98,6 +98,8 @@ - (void)insertNextAssistant:(TEBaseAssistant *)assistant; - (void)setObject:(id)obj forKey:(id)key; // these manipulate the sessionDict - (id)objectForKey:(id)key; +- (void)runAssistant:(TEBaseAssistant*)assistant lastStep:(BOOL)lastStep; + // Accessors - (NSWindow *)window; diff --git a/TESetupAssistant/TESetupAssistant.m b/TESetupAssistant/TESetupAssistant.m index fee3ea0..5f577e8 100644 --- a/TESetupAssistant/TESetupAssistant.m +++ b/TESetupAssistant/TESetupAssistant.m @@ -47,7 +47,6 @@ - (NSView *)view { return view; } @end @interface TESetupAssistant (Private) -- (void)runAssistant:(TEBaseAssistant*)assistant lastStep:(BOOL)lastStep; - (void)insertAssistant:(TEBaseAssistant*)assistant atIndex:(NSUInteger)index; @end @implementation TESetupAssistant From 1d8dc22b03774305769e4968582b4aee9a0684e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Zo=CC=88llner?= Date: Fri, 2 Oct 2015 13:27:04 +0300 Subject: [PATCH 2/2] easier access to session dictionary --- TESetupAssistant/TESetupAssistant.h | 1 + TESetupAssistant/TESetupAssistant.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TESetupAssistant/TESetupAssistant.h b/TESetupAssistant/TESetupAssistant.h index ace5496..b7712f9 100644 --- a/TESetupAssistant/TESetupAssistant.h +++ b/TESetupAssistant/TESetupAssistant.h @@ -108,6 +108,7 @@ - (NSView *)specialView; - (NSBox *)assistantBox; - (NSArray *)assistants; +ACC_RETURN_H(NSMutableDictionary*, sessionDict); - (TEBaseAssistant *)prevAssistant; - (TEBaseAssistant *)nextAssistant; - (TEBaseAssistant *)currAssistant; diff --git a/TESetupAssistant/TESetupAssistant.m b/TESetupAssistant/TESetupAssistant.m index 5f577e8..a94e2d7 100644 --- a/TESetupAssistant/TESetupAssistant.m +++ b/TESetupAssistant/TESetupAssistant.m @@ -145,7 +145,6 @@ - (void)reset [window close]; if ( modal ) [NSApp stopModal]; [assistants removeAllObjects]; - [sessionDict removeAllObjects]; [installStepView clearSteps]; [assistantBox setContentView:nil]; } @@ -268,6 +267,7 @@ - (TEBaseAssistant *)currAssistant ACC_RETURN_M(NSView *, specialView) ACC_RETURN_M(NSBox *, assistantBox) ACC_RETURN_M(NSArray *, assistants) +ACC_RETURN_M(NSMutableDictionary *, sessionDict) @end