Skip to content
This repository

Update SheepShaverLauncher for modern XCode and OS X #25

Open
wants to merge 2 commits into from

3 participants

Dave Vasilevsky asvitkine RonaldPR
Dave Vasilevsky
vasi commented March 28, 2013

Minor fixes to allow SheepShaverLauncher to compile out-of-the--box on the 10.6 SDK and XCode 4.x. I don't anticipate the changes breaking earlier versions, though I have not been able to test.

added some commits March 28, 2013
Dave Vasilevsky SheepShaverLauncher: Use default compiler settings
The previous Mac SDK setting, 10.4, is very old and does not allow compilation
on recent versions of OS X. Same with the compiler, gcc 4.0.

Since SheepShaver doesn't purposefully target a specific SDK or compiler,
it's better to just use XCode's default, which should always be usable.
If a user wants a specific SDK, they can set it themselves.
37bb2b6
Dave Vasilevsky SheepShaverLauncher: Compile on 10.6+ SDK
On Mac OS X 10.6, many informal protocols have become formal, and failure to
declare conformance to them is an error. Declare our delegates and data sources
to be conformant, conditional on an SDK >= 10.6
4a53954
asvitkine
Collaborator

Can you split the source file changes and the project file change?

I'm reluctant to take the proj file change, since I'd like to keep the project able to produce binaries that work on 10.4.

Dave Vasilevsky
vasi commented March 29, 2013

Thanks for the quick reply.

I agree that we shouldn't specify an SDK of 10.6 or something. I just think it's better to specify no SDK at all (and let XCode select its default) instead of specifying an SDK that may not exist.

In any case, if you really just want the source file change, it's already in a separate commit. You should be able to 'git fetch' from my repo and then 'git cherry-pick' the second commit "Compile on 10.6+ SDK", which still leaves 10.4 as the default SDK.

Dave Vasilevsky
vasi commented April 04, 2013

While we're at it, it would be great if SheepShaverLauncher's add disk dialog allowed the selection of sparsebundles. We could just set [open setCanChooseDirectories:YES]. But I'm not sure why we treat bundles as directories in the first place. Is there a reason for the [open setTreatsFilePackagesAsDirectories:YES] call?

RonaldPR
Dave Vasilevsky
vasi commented April 04, 2013

Oh, I never considered that anyone might do that! Ok, in that case I guess the best thing to do is use setCanChooseDirectories:YES. It's a little weird to expose the internals of sparsebundles, but I can't think of anything better.

RonaldPR
Dave Vasilevsky vasi referenced this pull request from a commit in vasi/macemu April 08, 2013
Dave Vasilevsky Mac: Allow selecting bundles in the disk prefs
Users should be able to select sparsebundles in the disk prefs, but should
still be able to navigate inside .sheepvm bundles.

See cebix#25 (comment)
3914fd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Mar 28, 2013
Dave Vasilevsky SheepShaverLauncher: Use default compiler settings
The previous Mac SDK setting, 10.4, is very old and does not allow compilation
on recent versions of OS X. Same with the compiler, gcc 4.0.

Since SheepShaver doesn't purposefully target a specific SDK or compiler,
it's better to just use XCode's default, which should always be usable.
If a user wants a specific SDK, they can set it themselves.
37bb2b6
Dave Vasilevsky SheepShaverLauncher: Compile on 10.6+ SDK
On Mac OS X 10.6, many informal protocols have become formal, and failure to
declare conformance to them is an error. Declare our delegates and data sources
to be conformant, conditional on an SDK >= 10.6
4a53954
This page is out of date. Refresh to see the latest.
3  SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj
@@ -328,7 +328,6 @@
328 328
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
329 329
 				GCC_WARN_UNUSED_VARIABLE = YES;
330 330
 				PREBINDING = NO;
331  
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
332 331
 			};
333 332
 			name = Debug;
334 333
 		};
@@ -336,11 +335,9 @@
336 335
 			isa = XCBuildConfiguration;
337 336
 			buildSettings = {
338 337
 				GCC_PREFIX_HEADER = LauncherPrefix.h;
339  
-				GCC_VERSION = 4.0;
340 338
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
341 339
 				GCC_WARN_UNUSED_VARIABLE = YES;
342 340
 				PREBINDING = NO;
343  
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
344 341
 			};
345 342
 			name = Release;
346 343
 		};
6  SheepShaver/src/MacOSX/Launcher/VMListController.h
@@ -20,7 +20,11 @@
20 20
 
21 21
 #import <Cocoa/Cocoa.h>
22 22
 
23  
-@interface VMListController : NSWindowController {
  23
+@interface VMListController : NSWindowController
  24
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
  25
+    <NSTableViewDataSource, NSTableViewDelegate>
  26
+#endif
  27
+{
24 28
 	IBOutlet NSTableView *vmList;
25 29
 	IBOutlet NSButton *newButton;
26 30
 	IBOutlet NSButton *importButton;
3  SheepShaver/src/MacOSX/Launcher/VMSettingsController.h
@@ -21,6 +21,9 @@
21 21
 #import <Cocoa/Cocoa.h>
22 22
 
23 23
 @interface VMSettingsController : NSWindowController
  24
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
  25
+    <NSTableViewDataSource>
  26
+#endif
24 27
 {
25 28
     BOOL cancelWasClicked;
26 29
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.