19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#import "OFApplication.h"
#import "OFFile.h"
#import "OFFileManager.h"
#import "OFURL.h"
#import "OFXMLElement.h"
#import "LinkLibGenerator.h"
@interface LibraryGenerator: OFObject <OFApplicationDelegate>
@end
OF_APPLICATION_DELEGATE(LibraryGenerator)
@implementation LibraryGenerator
- (void)applicationDidFinishLaunching
{
OFURL *sourcesURL = [[OFFileManager defaultManager].currentDirectoryURL
URLByAppendingPathComponent: @"../../src"];
OFURL *runtimeLibraryPath = [sourcesURL
URLByAppendingPathComponent: @"runtime/library.xml"];
OFURL *runtimeLinkLibPath = [sourcesURL
URLByAppendingPathComponent: @"runtime/linklib/linklib.m"];
OFXMLElement *runtimeLibrary = [OFXMLElement elementWithStream:
[OFFile fileWithURL: runtimeLibraryPath
mode: @"r"]];
OFFile *runtimeLinkLib = [OFFile fileWithURL: runtimeLinkLibPath
mode: @"w"];
LinkLibGenerator *runtimeLinkLibGenerator = [[[LinkLibGenerator alloc]
initWithLibrary: runtimeLibrary
outputStream: runtimeLinkLib] autorelease];
[runtimeLinkLibGenerator generate];
[OFApplication terminate];
}
@end
|
>
|
|
>
>
|
|
>
>
>
>
>
>
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#import "OFApplication.h"
#import "OFFile.h"
#import "OFFileManager.h"
#import "OFURL.h"
#import "OFXMLElement.h"
#import "GlueGenerator.h"
#import "LinkLibGenerator.h"
@interface LibraryGenerator: OFObject <OFApplicationDelegate>
@end
OF_APPLICATION_DELEGATE(LibraryGenerator)
@implementation LibraryGenerator
- (void)applicationDidFinishLaunching
{
OFURL *sourcesURL = [[OFFileManager defaultManager].currentDirectoryURL
URLByAppendingPathComponent: @"../../src"];
OFURL *runtimeLibraryURL = [sourcesURL
URLByAppendingPathComponent: @"runtime/library.xml"];
OFURL *runtimeLinkLibURL = [sourcesURL
URLByAppendingPathComponent: @"runtime/linklib/linklib.m"];
OFURL *runtimeGlueURL = [sourcesURL
URLByAppendingPathComponent: @"runtime/amiga-glue.m"];
OFXMLElement *runtimeLibrary = [OFXMLElement elementWithStream:
[OFFile fileWithURL: runtimeLibraryURL
mode: @"r"]];
OFFile *runtimeLinkLib = [OFFile fileWithURL: runtimeLinkLibURL
mode: @"w"];
OFFile *runtimeGlue = [OFFile fileWithURL: runtimeGlueURL
mode: @"w"];
LinkLibGenerator *runtimeLinkLibGenerator = [[[LinkLibGenerator alloc]
initWithLibrary: runtimeLibrary
outputStream: runtimeLinkLib] autorelease];
GlueGenerator *runtimeGlueGenerator = [[[GlueGenerator alloc]
initWithLibrary: runtimeLibrary
outputStream: runtimeGlue] autorelease];
[runtimeLinkLibGenerator generate];
[runtimeGlueGenerator generate];
[OFApplication terminate];
}
@end
|