Massive change of SVN properties to deal with EOL style problem
This commit is contained in:
parent
b747b611b3
commit
3b6566577c
108 changed files with 12417 additions and 12417 deletions
36
natives/osx/desktop_launcher/AppDelegate.h
Executable file → Normal file
36
natives/osx/desktop_launcher/AppDelegate.h
Executable file → Normal file
|
@ -1,18 +1,18 @@
|
|||
/* AppDelegate */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject
|
||||
{
|
||||
IBOutlet NSMenu* statusMenu;
|
||||
NSTask* serverCommand;
|
||||
int processID;
|
||||
BOOL shouldOpenUntitled;
|
||||
|
||||
NSNetService* service;
|
||||
}
|
||||
- (IBAction)about:(id)sender;
|
||||
- (IBAction)goToHomepage:(id)sender;
|
||||
- (IBAction)goToInstikiOrg:(id)sender;
|
||||
- (IBAction)quit:(id)sender;
|
||||
@end
|
||||
/* AppDelegate */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject
|
||||
{
|
||||
IBOutlet NSMenu* statusMenu;
|
||||
NSTask* serverCommand;
|
||||
int processID;
|
||||
BOOL shouldOpenUntitled;
|
||||
|
||||
NSNetService* service;
|
||||
}
|
||||
- (IBAction)about:(id)sender;
|
||||
- (IBAction)goToHomepage:(id)sender;
|
||||
- (IBAction)goToInstikiOrg:(id)sender;
|
||||
- (IBAction)quit:(id)sender;
|
||||
@end
|
||||
|
|
218
natives/osx/desktop_launcher/AppDelegate.mm
Executable file → Normal file
218
natives/osx/desktop_launcher/AppDelegate.mm
Executable file → Normal file
|
@ -1,109 +1,109 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int launch_ruby (char const* cmd)
|
||||
{
|
||||
int pId, parentID = getpid();
|
||||
if((pId = fork()) == 0) // child
|
||||
{
|
||||
NSLog(@"set child (%d) to pgrp %d", getpid(), parentID);
|
||||
setpgrp(0, parentID);
|
||||
system(cmd);
|
||||
return 0;
|
||||
}
|
||||
else // parent
|
||||
{
|
||||
NSLog(@"started child process: %d", pId);
|
||||
return pId;
|
||||
}
|
||||
}
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (NSString*)storageDirectory
|
||||
{
|
||||
NSString* dir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/Instiki"];
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:dir attributes:nil];
|
||||
return dir;
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
setpgrp(0, getpid());
|
||||
|
||||
if([[[[NSBundle mainBundle] infoDictionary] objectForKey:@"LSUIElement"] isEqualToString:@"1"])
|
||||
{
|
||||
NSStatusBar* bar = [NSStatusBar systemStatusBar];
|
||||
NSStatusItem* item = [[bar statusItemWithLength:NSVariableStatusItemLength] retain];
|
||||
[item setTitle:@"Wiki"];
|
||||
[item setHighlightMode:YES];
|
||||
[item setMenu:statusMenu];
|
||||
}
|
||||
|
||||
NSBundle* bundle = [NSBundle bundleForClass:[self class]];
|
||||
NSString* ruby = [bundle pathForResource:@"ruby" ofType:nil];
|
||||
NSString* script = [[bundle resourcePath] stringByAppendingPathComponent:@"rb_src/instiki.rb"];
|
||||
if(ruby && script)
|
||||
{
|
||||
NSString* cmd = [NSString stringWithFormat:
|
||||
@"%@ -I '%@' -I '%@' '%@' -s --storage='%@'",
|
||||
ruby,
|
||||
[[bundle resourcePath] stringByAppendingPathComponent:@"lib/ruby/1.8"],
|
||||
[[bundle resourcePath] stringByAppendingPathComponent:@"lib/ruby/1.8/powerpc-darwin"],
|
||||
script,
|
||||
[self storageDirectory]
|
||||
];
|
||||
NSLog(@"starting %@", cmd);
|
||||
processID = launch_ruby([cmd UTF8String]);
|
||||
}
|
||||
|
||||
/* public the service using rendezvous */
|
||||
service = [[NSNetService alloc]
|
||||
initWithDomain:@"" // default domain
|
||||
type:@"_http._tcp."
|
||||
name:[NSString stringWithFormat:@"%@'s Instiki", NSFullUserName()]
|
||||
port:2500];
|
||||
[service publish];
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
||||
{
|
||||
[service stop];
|
||||
[service release];
|
||||
|
||||
kill(0, SIGTERM);
|
||||
}
|
||||
|
||||
- (IBAction)about:(id)sender
|
||||
{
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
[NSApp orderFrontStandardAboutPanel:self];
|
||||
}
|
||||
|
||||
- (IBAction)goToHomepage:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://localhost:2500/"]];
|
||||
}
|
||||
|
||||
- (IBAction)goToInstikiOrg:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.instiki.org/"]];
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication*)sender
|
||||
{
|
||||
return shouldOpenUntitled ?: (shouldOpenUntitled = YES, NO);
|
||||
}
|
||||
|
||||
- (BOOL)applicationOpenUntitledFile:(NSApplication*)theApplication
|
||||
{
|
||||
return [self goToHomepage:self], YES;
|
||||
}
|
||||
|
||||
- (IBAction)quit:(id)sender
|
||||
{
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
|
||||
@end
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int launch_ruby (char const* cmd)
|
||||
{
|
||||
int pId, parentID = getpid();
|
||||
if((pId = fork()) == 0) // child
|
||||
{
|
||||
NSLog(@"set child (%d) to pgrp %d", getpid(), parentID);
|
||||
setpgrp(0, parentID);
|
||||
system(cmd);
|
||||
return 0;
|
||||
}
|
||||
else // parent
|
||||
{
|
||||
NSLog(@"started child process: %d", pId);
|
||||
return pId;
|
||||
}
|
||||
}
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (NSString*)storageDirectory
|
||||
{
|
||||
NSString* dir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/Instiki"];
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:dir attributes:nil];
|
||||
return dir;
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
setpgrp(0, getpid());
|
||||
|
||||
if([[[[NSBundle mainBundle] infoDictionary] objectForKey:@"LSUIElement"] isEqualToString:@"1"])
|
||||
{
|
||||
NSStatusBar* bar = [NSStatusBar systemStatusBar];
|
||||
NSStatusItem* item = [[bar statusItemWithLength:NSVariableStatusItemLength] retain];
|
||||
[item setTitle:@"Wiki"];
|
||||
[item setHighlightMode:YES];
|
||||
[item setMenu:statusMenu];
|
||||
}
|
||||
|
||||
NSBundle* bundle = [NSBundle bundleForClass:[self class]];
|
||||
NSString* ruby = [bundle pathForResource:@"ruby" ofType:nil];
|
||||
NSString* script = [[bundle resourcePath] stringByAppendingPathComponent:@"rb_src/instiki.rb"];
|
||||
if(ruby && script)
|
||||
{
|
||||
NSString* cmd = [NSString stringWithFormat:
|
||||
@"%@ -I '%@' -I '%@' '%@' -s --storage='%@'",
|
||||
ruby,
|
||||
[[bundle resourcePath] stringByAppendingPathComponent:@"lib/ruby/1.8"],
|
||||
[[bundle resourcePath] stringByAppendingPathComponent:@"lib/ruby/1.8/powerpc-darwin"],
|
||||
script,
|
||||
[self storageDirectory]
|
||||
];
|
||||
NSLog(@"starting %@", cmd);
|
||||
processID = launch_ruby([cmd UTF8String]);
|
||||
}
|
||||
|
||||
/* public the service using rendezvous */
|
||||
service = [[NSNetService alloc]
|
||||
initWithDomain:@"" // default domain
|
||||
type:@"_http._tcp."
|
||||
name:[NSString stringWithFormat:@"%@'s Instiki", NSFullUserName()]
|
||||
port:2500];
|
||||
[service publish];
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
||||
{
|
||||
[service stop];
|
||||
[service release];
|
||||
|
||||
kill(0, SIGTERM);
|
||||
}
|
||||
|
||||
- (IBAction)about:(id)sender
|
||||
{
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
[NSApp orderFrontStandardAboutPanel:self];
|
||||
}
|
||||
|
||||
- (IBAction)goToHomepage:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://localhost:2500/"]];
|
||||
}
|
||||
|
||||
- (IBAction)goToInstikiOrg:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.instiki.org/"]];
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication*)sender
|
||||
{
|
||||
return shouldOpenUntitled ?: (shouldOpenUntitled = YES, NO);
|
||||
}
|
||||
|
||||
- (BOOL)applicationOpenUntitledFile:(NSApplication*)theApplication
|
||||
{
|
||||
return [self goToHomepage:self], YES;
|
||||
}
|
||||
|
||||
- (IBAction)quit:(id)sender
|
||||
{
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
30
natives/osx/desktop_launcher/Credits.html
Executable file → Normal file
30
natives/osx/desktop_launcher/Credits.html
Executable file → Normal file
|
@ -1,16 +1,16 @@
|
|||
<dl>
|
||||
<dt>Engineering:</dt>
|
||||
<dd>Some people</dd>
|
||||
|
||||
<dt>Human Interface Design:</dt>
|
||||
<dd>Some other people</dd>
|
||||
|
||||
<dt>Testing:</dt>
|
||||
<dd>Hopefully not nobody</dd>
|
||||
|
||||
<dt>Documentation:</dt>
|
||||
<dd>Whoever</dd>
|
||||
|
||||
<dt>With special thanks to:</dt>
|
||||
<dd>Mom</dd>
|
||||
<dl>
|
||||
<dt>Engineering:</dt>
|
||||
<dd>Some people</dd>
|
||||
|
||||
<dt>Human Interface Design:</dt>
|
||||
<dd>Some other people</dd>
|
||||
|
||||
<dt>Testing:</dt>
|
||||
<dd>Hopefully not nobody</dd>
|
||||
|
||||
<dt>Documentation:</dt>
|
||||
<dd>Whoever</dd>
|
||||
|
||||
<dt>With special thanks to:</dt>
|
||||
<dd>Mom</dd>
|
||||
</dl>
|
0
natives/osx/desktop_launcher/English.lproj/InfoPlist.strings
Executable file → Normal file
0
natives/osx/desktop_launcher/English.lproj/InfoPlist.strings
Executable file → Normal file
24
natives/osx/desktop_launcher/English.lproj/MainMenu.nib/classes.nib
generated
Executable file → Normal file
24
natives/osx/desktop_launcher/English.lproj/MainMenu.nib/classes.nib
generated
Executable file → Normal file
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {about = id; goToHomepage = id; goToInstikiOrg = id; quit = id; };
|
||||
CLASS = AppDelegate;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {statusMenu = NSMenu; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {about = id; goToHomepage = id; goToInstikiOrg = id; quit = id; };
|
||||
CLASS = AppDelegate;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {statusMenu = NSMenu; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
48
natives/osx/desktop_launcher/English.lproj/MainMenu.nib/info.nib
generated
Executable file → Normal file
48
natives/osx/desktop_launcher/English.lproj/MainMenu.nib/info.nib
generated
Executable file → Normal file
|
@ -1,24 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>109 6 356 240 0 0 1440 878 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>206</key>
|
||||
<string>112 300 116 87 0 0 1440 878 </string>
|
||||
<key>29</key>
|
||||
<string>241 316 70 44 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>349.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>206</integer>
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7H63</string>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>109 6 356 240 0 0 1440 878 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>206</key>
|
||||
<string>112 300 116 87 0 0 1440 878 </string>
|
||||
<key>29</key>
|
||||
<string>241 316 70 44 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>349.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>206</integer>
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7H63</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
0
natives/osx/desktop_launcher/English.lproj/MainMenu.nib/objects.nib
generated
Executable file → Normal file
0
natives/osx/desktop_launcher/English.lproj/MainMenu.nib/objects.nib
generated
Executable file → Normal file
24
natives/osx/desktop_launcher/Info.plist
Executable file → Normal file
24
natives/osx/desktop_launcher/Info.plist
Executable file → Normal file
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
CFBundleDevelopmentRegion = English;
|
||||
CFBundleExecutable = Instiki;
|
||||
CFBundleIconFile = "";
|
||||
CFBundleIdentifier = "com.nextangle.instiki";
|
||||
CFBundleInfoDictionaryVersion = "6.0";
|
||||
CFBundlePackageType = APPL;
|
||||
CFBundleSignature = WIKI;
|
||||
CFBundleVersion = "0.9.0";
|
||||
LSUIElement = 1;
|
||||
NSMainNibFile = MainMenu;
|
||||
NSPrincipalClass = NSApplication;
|
||||
{
|
||||
CFBundleDevelopmentRegion = English;
|
||||
CFBundleExecutable = Instiki;
|
||||
CFBundleIconFile = "";
|
||||
CFBundleIdentifier = "com.nextangle.instiki";
|
||||
CFBundleInfoDictionaryVersion = "6.0";
|
||||
CFBundlePackageType = APPL;
|
||||
CFBundleSignature = WIKI;
|
||||
CFBundleVersion = "0.9.0";
|
||||
LSUIElement = 1;
|
||||
NSMainNibFile = MainMenu;
|
||||
NSPrincipalClass = NSApplication;
|
||||
}
|
1184
natives/osx/desktop_launcher/Instiki.xcode/project.pbxproj
Executable file → Normal file
1184
natives/osx/desktop_launcher/Instiki.xcode/project.pbxproj
Executable file → Normal file
File diff suppressed because it is too large
Load diff
14
natives/osx/desktop_launcher/Instiki_Prefix.pch
Executable file → Normal file
14
natives/osx/desktop_launcher/Instiki_Prefix.pch
Executable file → Normal file
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'Instiki' target in the 'Instiki' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
//
|
||||
// Prefix header for all source files of the 'Instiki' target in the 'Instiki' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
|
|
18
natives/osx/desktop_launcher/MakeDMG.sh
Executable file → Normal file
18
natives/osx/desktop_launcher/MakeDMG.sh
Executable file → Normal file
|
@ -1,9 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
hdiutil create -size 12m -fs HFS+ -volname Instiki -ov /tmp/Instiki_12MB.dmg
|
||||
hdiutil mount /tmp/Instiki_12MB.dmg
|
||||
# strip ~/ruby/instiki/natives/osx/build/Instiki.app/Contents/MacOS/Instiki
|
||||
ditto ~/ruby/instiki/natives/osx/desktop_launcher/build/Instiki.app /Volumes/Instiki/Instiki.app
|
||||
hdiutil unmount /Volumes/Instiki
|
||||
hdiutil convert -format UDZO -o /tmp/Instiki.dmg /tmp/Instiki_12MB.dmg
|
||||
hdiutil internet-enable -yes /tmp/Instiki.dmg
|
||||
#!/bin/sh
|
||||
|
||||
hdiutil create -size 12m -fs HFS+ -volname Instiki -ov /tmp/Instiki_12MB.dmg
|
||||
hdiutil mount /tmp/Instiki_12MB.dmg
|
||||
# strip ~/ruby/instiki/natives/osx/build/Instiki.app/Contents/MacOS/Instiki
|
||||
ditto ~/ruby/instiki/natives/osx/desktop_launcher/build/Instiki.app /Volumes/Instiki/Instiki.app
|
||||
hdiutil unmount /Volumes/Instiki
|
||||
hdiutil convert -format UDZO -o /tmp/Instiki.dmg /tmp/Instiki_12MB.dmg
|
||||
hdiutil internet-enable -yes /tmp/Instiki.dmg
|
||||
|
|
28
natives/osx/desktop_launcher/main.mm
Executable file → Normal file
28
natives/osx/desktop_launcher/main.mm
Executable file → Normal file
|
@ -1,14 +1,14 @@
|
|||
//
|
||||
// main.mm
|
||||
// Instiki
|
||||
//
|
||||
// Created by Allan Odgaard on Thu May 20 2004.
|
||||
// Copyright (c) 2004 MacroMates. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main (int argc, char const* argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
//
|
||||
// main.mm
|
||||
// Instiki
|
||||
//
|
||||
// Created by Allan Odgaard on Thu May 20 2004.
|
||||
// Copyright (c) 2004 MacroMates. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main (int argc, char const* argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
|
|
32
natives/osx/desktop_launcher/version.plist
Executable file → Normal file
32
natives/osx/desktop_launcher/version.plist
Executable file → Normal file
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>17</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
<key>ProjectName</key>
|
||||
<string>NibPBTemplates</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>1150000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>17</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
<key>ProjectName</key>
|
||||
<string>NibPBTemplates</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>1150000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue