Skip to content

Commit

Permalink
updated interface, bfgminer, added cpuminer
Browse files Browse the repository at this point in the history
  • Loading branch information
fabulouspanda authored and fabulouspanda committed May 2, 2013
1 parent f788b93 commit 42e3c88
Show file tree
Hide file tree
Showing 12 changed files with 7,158 additions and 2,967 deletions.
24 changes: 20 additions & 4 deletions MacMiner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
84296C2E171F5419006DA9D5 /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 84296C2D171F5419006DA9D5 /* icon.icns */; };
84296C30171F5870006DA9D5 /* macminer.iconset in Resources */ = {isa = PBXBuildFile; fileRef = 84296C2F171F5870006DA9D5 /* macminer.iconset */; };
8454C56C172D81140065C351 /* preferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8454C56B172D81130065C351 /* preferencesViewController.m */; };
8454C5BF1731ABB90065C351 /* cpuminerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8454C5BE1731ABB90065C351 /* cpuminerViewController.m */; };
8454C5C21731AC230065C351 /* bfgminerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8454C5C11731AC230065C351 /* bfgminerViewController.m */; };
8454C5C41731ADFE0065C351 /* minerd in Resources */ = {isa = PBXBuildFile; fileRef = 8454C5C31731ADFE0065C351 /* minerd */; };
8458D7AD17209F57006BDF96 /* poclbm.app in Resources */ = {isa = PBXBuildFile; fileRef = 8458D7AC17209F57006BDF96 /* poclbm.app */; };
8458D7AF1720B108006BDF96 /* poclbm.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 8458D7AE1720B108006BDF96 /* poclbm.entitlements */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -73,6 +76,11 @@
84296C31171F5FAE006DA9D5 /* MacMiner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = MacMiner.entitlements; sourceTree = "<group>"; };
8454C56A172D81130065C351 /* preferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = preferencesViewController.h; sourceTree = "<group>"; };
8454C56B172D81130065C351 /* preferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = preferencesViewController.m; sourceTree = "<group>"; };
8454C5BD1731ABB80065C351 /* cpuminerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpuminerViewController.h; sourceTree = "<group>"; };
8454C5BE1731ABB90065C351 /* cpuminerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = cpuminerViewController.m; sourceTree = "<group>"; };
8454C5C01731AC230065C351 /* bfgminerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bfgminerViewController.h; sourceTree = "<group>"; };
8454C5C11731AC230065C351 /* bfgminerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = bfgminerViewController.m; sourceTree = "<group>"; };
8454C5C31731ADFE0065C351 /* minerd */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = minerd; sourceTree = "<group>"; };
8458D7AC17209F57006BDF96 /* poclbm.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = poclbm.app; sourceTree = "<group>"; };
8458D7AE1720B108006BDF96 /* poclbm.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = poclbm.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -155,6 +163,11 @@
8410F327170AF640001191E3 /* mainViewController.m */,
8410F329170B2152001191E3 /* TaskWrapper.h */,
8410F32A170B2152001191E3 /* TaskWrapper.m */,
8454C5BD1731ABB80065C351 /* cpuminerViewController.h */,
8454C5BE1731ABB90065C351 /* cpuminerViewController.m */,
8454C5C31731ADFE0065C351 /* minerd */,
8454C5C01731AC230065C351 /* bfgminerViewController.h */,
8454C5C11731AC230065C351 /* bfgminerViewController.m */,
8458D7AE1720B108006BDF96 /* poclbm.entitlements */,
8458D7AC17209F57006BDF96 /* poclbm.app */,
8410F307170AF5AD001191E3 /* MacMiner.xcdatamodeld */,
Expand Down Expand Up @@ -273,6 +286,7 @@
84296C30171F5870006DA9D5 /* macminer.iconset in Resources */,
8458D7AD17209F57006BDF96 /* poclbm.app in Resources */,
8458D7AF1720B108006BDF96 /* poclbm.entitlements in Resources */,
8454C5C41731ADFE0065C351 /* minerd in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -314,6 +328,8 @@
8410F32B170B2152001191E3 /* TaskWrapper.m in Sources */,
8410F32E170B2AF9001191E3 /* NSFileManager+DirectoryLocations.m in Sources */,
8454C56C172D81140065C351 /* preferencesViewController.m in Sources */,
8454C5BF1731ABB90065C351 /* cpuminerViewController.m in Sources */,
8454C5C21731AC230065C351 /* bfgminerViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -399,9 +415,9 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SDKROOT = macosx10.7;
};
name = Debug;
};
Expand All @@ -426,8 +442,8 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8;
SDKROOT = macosx;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx10.7;
};
name = Release;
};
Expand Down
1 change: 0 additions & 1 deletion MacMiner/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@

- (IBAction)saveAction:(id)sender;

- (IBAction)preferenceToggle:(id)sender;

@end
5 changes: 2 additions & 3 deletions MacMiner/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ - (NSManagedObjectModel *)managedObjectModel
_managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return _managedObjectModel;
}

/*
// Returns the persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. (The directory for the store is created, if necessary.)
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
Expand Down Expand Up @@ -92,6 +92,7 @@ - (NSPersistentStoreCoordinator *)persistentStoreCoordinator
return _persistentStoreCoordinator;
}
*/

// Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.)
- (NSManagedObjectContext *)managedObjectContext
Expand Down Expand Up @@ -135,9 +136,7 @@ - (IBAction)saveAction:(id)sender
}
}

- (IBAction)preferenceToggle:(id)sender {

}


- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
Expand Down
4 changes: 2 additions & 2 deletions MacMiner/TaskWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ - (void) stopProcess
// We just pass the data along to the controller as an NSString.
- (void) getData: (NSNotification *)aNotification
{
NSLog(@"getdata");
// NSLog(@"getdata");
// AppDelegate *appDelegate = (AppDelegate *)[[NSApplication sharedApplication] delegate];
NSData *data = [[aNotification userInfo] objectForKey:NSFileHandleNotificationDataItem];
// If the length of the data is zero, then the task is basically over - there is nothing
Expand All @@ -118,7 +118,7 @@ - (void) getData: (NSNotification *)aNotification
// Send the data on to the controller; we can't just use +stringWithUTF8String: here
// because -[data bytes] is not necessarily a properly terminated string.
// -initWithData:encoding: on the other hand checks -[data length]
NSLog(@"controlappend");
// NSLog(@"controlappend");
[controller appendOutput: [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]];
// NSLog([[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
} else {
Expand Down
53 changes: 53 additions & 0 deletions MacMiner/bfgminerViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//
// bfgminerViewController.h
// MacMiner
//
// Created by Administrator on 01/05/2013.
// Copyright (c) 2013 fabulouspanda. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "TaskWrapper.h"

@interface bfgminerViewController : NSViewController <NSWindowDelegate, TaskWrapperController, NSTextViewDelegate, NSTextFieldDelegate, NSPopoverDelegate>{
NSWindow *bfgWindow;
NSView *bfgView;
NSTextField *bfgPoolView;
NSTextField *bfgUserView;
NSSecureTextField *bfgPassView;
NSTextField *bfgOptionsView;

NSTextView *bfgOutputView;
NSButton *bfgStartButton;
BOOL findRunning;
TaskWrapper *bfgTask;
NSTextField *bfgStatLabel;

NSButton *bfgPopoverTriggerButton;
NSPopover *bfgPopover;

NSButton *bfgRememberButton;
}

@property (nonatomic, strong) IBOutlet NSWindow *bfgWindow;
@property (nonatomic, strong) IBOutlet NSView *bfgView;
@property (nonatomic, strong) IBOutlet NSTextField *bfgPoolView;
@property (nonatomic, strong) IBOutlet NSTextField *bfgUserView;
@property (nonatomic, strong) IBOutlet NSSecureTextField *bfgPassView;
@property (nonatomic, strong) IBOutlet NSTextField *bfgOptionsView;

@property (nonatomic, strong) IBOutlet NSTextView *bfgOutputView;
@property (nonatomic, strong) IBOutlet NSButton *bfgStartButton;
@property (nonatomic, strong) IBOutlet NSTextField *bfgStatLabel;

@property (nonatomic, strong) IBOutlet NSButton *bfgPopoverTriggerButton;
@property (nonatomic, strong) IBOutlet NSPopover *bfgPopover;

@property (nonatomic, strong) IBOutlet NSButton *bfgRememberButton;


- (IBAction)start:(id)sender;

- (IBAction)bfgMinerToggle:(id)sender;

@end
Loading

0 comments on commit 42e3c88

Please sign in to comment.