mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Update tool to use GUI and NSApplication
This commit is contained in:
parent
bc6e15abb7
commit
e1c1ea54d9
4 changed files with 30 additions and 3 deletions
4
Tools/gormtool/AppDelegate.h
Normal file
4
Tools/gormtool/AppDelegate.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface AppDelegate : NSObject
|
||||
@end
|
4
Tools/gormtool/AppDelegate.m
Normal file
4
Tools/gormtool/AppDelegate.m
Normal file
|
@ -0,0 +1,4 @@
|
|||
#import "AppDelegate.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
@end
|
|
@ -8,9 +8,14 @@ PACKAGE_NAME = gormtool
|
|||
TOOL_NAME = gormtool
|
||||
|
||||
gormtool_HEADER_FILES =
|
||||
gormtool_OBJC_FILES = main.m
|
||||
gormtool_OBJC_FILES = main.m AppDelegate.m
|
||||
|
||||
ADDITIONAL_TOOL_LIBS = \
|
||||
-lGormCore \
|
||||
-IInterfaceBuilder \
|
||||
-lgnustep-base \
|
||||
-lgnustep-gui
|
||||
|
||||
ADDITIONAL_TOOL_LIBS = -lGormCore -IInterfaceBuilder
|
||||
ADDITIONAL_LIB_DIRS = -L../../GormCore/obj -L../../InterfaceBuilder/obj
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../../
|
||||
|
||||
|
|
|
@ -1,12 +1,26 @@
|
|||
// main.m
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import <GormCore/GormCore.h>
|
||||
#import <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
puts("-- gormtool");
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
AppDelegate *delegate = [[AppDelegate alloc] init];
|
||||
extern char **environ;
|
||||
|
||||
[NSProcessInfo initializeWithArguments: (char **)argv
|
||||
count: argc
|
||||
environment: environ];
|
||||
|
||||
[app setDelegate: delegate];
|
||||
[app run];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue