diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ca847db
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,21 @@
+.DS_Store
+*.swp
+*.lock
+*~.nib
+DerivedData/
+build/
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+# NB: also, whitelist the default ones, some projects need to use these
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+*.xccheckout
+xcuserdata/
+*.moved-aside
+Open Media Library.app
+Open Media Library.dmg
+miredo*.pkg
diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/English.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib
new file mode 100644
index 0000000..56620d0
--- /dev/null
+++ b/English.lproj/MainMenu.xib
@@ -0,0 +1,465 @@
+
+
+
+ 1060
+ 15C27e
+ 7706
+ 1404.23
+ 807.20
+
+ 7706
+ 7706
+
+
+ NSCustomObject
+ NSMenu
+ NSMenuItem
+ NSView
+ NSWindowTemplate
+ WebView
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.WebKitIBPlugin
+
+
+
+
+
+
+
+
+
+ OMLAppDelegate
+
+
+ NSFontManager
+
+
+
+
+
+
+ terminate:
+
+
+
+ 449
+
+
+
+ delegate
+
+
+
+ 495
+
+
+
+ window
+
+
+
+ 532
+
+
+
+ webView
+
+
+
+ 534
+
+
+
+
+
+ 0
+
+
+
+
+
+ -2
+
+
+ File's Owner
+
+
+ -1
+
+
+ First Responder
+
+
+ -3
+
+
+ Application
+
+
+ 29
+
+
+
+
+
+
+
+
+
+
+
+ 19
+
+
+
+
+
+ 56
+
+
+
+
+
+
+
+ 57
+
+
+
+
+
+
+
+ 136
+
+
+
+
+ 295
+
+
+
+
+
+ 371
+
+
+
+
+
+
+
+ 372
+
+
+
+
+
+
+
+ 375
+
+
+
+
+
+ 420
+
+
+
+
+ 490
+
+
+
+
+
+ 494
+
+
+
+
+ 533
+
+
+
+
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ {528, 398}
+ com.apple.InterfaceBuilder.CocoaPlugin
+ {{386, 241}, {640, 480}}
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.WebKitIBPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+
+
+ 534
+
+
+
+
+ OMLAppDelegate
+ NSObject
+
+ WebView
+ NSWindow
+
+
+
+ webView
+ WebView
+
+
+ window
+ NSWindow
+
+
+
+ IBProjectSource
+ ../OMLAppDelegate.h
+
+
+
+
+
+ WebView
+ NSView
+
+ id
+ id
+ id
+ id
+ id
+ id
+ id
+ id
+ id
+ id
+ id
+
+
+
+ goBack:
+ id
+
+
+ goForward:
+ id
+
+
+ makeTextLarger:
+ id
+
+
+ makeTextSmaller:
+ id
+
+
+ makeTextStandardSize:
+ id
+
+
+ reload:
+ id
+
+
+ reloadFromOrigin:
+ id
+
+
+ stopLoading:
+ id
+
+
+ takeStringURLFrom:
+ id
+
+
+ toggleContinuousSpellChecking:
+ id
+
+
+ toggleSmartInsertDelete:
+ id
+
+
+
+ IBFrameworkSource
+ WebKit.framework/Headers/WebView.h
+
+
+
+
+ 0
+ IBCocoaFramework
+ NO
+
+ com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3
+
+
+ YES
+ 3
+
+ {12, 12}
+ {10, 2}
+
+
+
diff --git a/OML/Images.xcassets/AppIcon.appiconset/Contents.json b/OML/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..9ac4a2f
--- /dev/null
+++ b/OML/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,61 @@
+{
+ "images" : [
+ {
+ "idiom" : "mac",
+ "size" : "16x16",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "16x16",
+ "scale" : "2x"
+ },
+ {
+ "size" : "32x32",
+ "idiom" : "mac",
+ "filename" : "icon_32x32.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "32x32",
+ "scale" : "2x"
+ },
+ {
+ "size" : "128x128",
+ "idiom" : "mac",
+ "filename" : "icon_128x128.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "128x128",
+ "scale" : "2x"
+ },
+ {
+ "size" : "256x256",
+ "idiom" : "mac",
+ "filename" : "icon_256x256.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "256x256",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "512x512",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "512x512",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/OML/Images.xcassets/AppIcon.appiconset/icon_128x128.png b/OML/Images.xcassets/AppIcon.appiconset/icon_128x128.png
new file mode 100644
index 0000000..aaa1b0d
Binary files /dev/null and b/OML/Images.xcassets/AppIcon.appiconset/icon_128x128.png differ
diff --git a/OML/Images.xcassets/AppIcon.appiconset/icon_256x256.png b/OML/Images.xcassets/AppIcon.appiconset/icon_256x256.png
new file mode 100644
index 0000000..f284bcf
Binary files /dev/null and b/OML/Images.xcassets/AppIcon.appiconset/icon_256x256.png differ
diff --git a/OML/Images.xcassets/AppIcon.appiconset/icon_32x32.png b/OML/Images.xcassets/AppIcon.appiconset/icon_32x32.png
new file mode 100644
index 0000000..d6480c4
Binary files /dev/null and b/OML/Images.xcassets/AppIcon.appiconset/icon_32x32.png differ
diff --git a/OMLAppDelegate.h b/OMLAppDelegate.h
new file mode 100644
index 0000000..3e787dd
--- /dev/null
+++ b/OMLAppDelegate.h
@@ -0,0 +1,19 @@
+//
+// OMLAppDelegate.h
+// OML
+//
+
+#import
+#import
+#include "WebStorageManagerPrivate.h"
+#include "WebPreferencesPrivate.h"
+
+@interface OMLAppDelegate : NSObject {
+ NSWindow *window;
+ IBOutlet WebView *webView;
+}
+
+@property (assign) IBOutlet NSWindow *window;
+@property (nonatomic, retain) IBOutlet WebView *webView;
+
+@end
diff --git a/OMLAppDelegate.m b/OMLAppDelegate.m
new file mode 100644
index 0000000..669e6ef
--- /dev/null
+++ b/OMLAppDelegate.m
@@ -0,0 +1,88 @@
+//
+// OMLAppDelegate.m
+// OML
+//
+
+#import "OMLAppDelegate.h"
+
+
+@interface WebPreferences (WebPreferencesPrivate)
+- (void)_setLocalStorageDatabasePath:(NSString *)path;
+- (void) setLocalStorageEnabled: (BOOL) localStorageEnabled;
+@end
+
+@implementation OMLAppDelegate
+
+@synthesize window;
+@synthesize webView;
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+
+ NSFileManager *fileManager = [[NSFileManager alloc] init];
+ NSString *basePath = [@"~/Library/Application Support/Open Media Library" stringByExpandingTildeInPath];
+ BOOL exists;
+
+ if ([fileManager fileExistsAtPath:basePath isDirectory: &exists] && exists) {
+ NSTask *task = [[NSTask alloc] init];
+ task.launchPath = [basePath stringByAppendingString:@"/ctl"];
+ task.arguments = @[@"start"];
+ [task launch];
+
+ NSString* dbPath = [WebStorageManager _storageDirectoryPath];
+
+ WebPreferences* prefs = [webView preferences];
+ //[prefs _setLocalStorageDatabasePath:[basePath stringByAppendingString:@"/localStorage"]];
+
+ NSString* localDBPath = [prefs _localStorageDatabasePath];
+
+ // PATHS MUST MATCH!!!! otherwise localstorage file is erased when starting program
+ if( [localDBPath isEqualToString:dbPath] == NO) {
+ [prefs setAutosaves:YES]; //SET PREFS AUTOSAVE FIRST otherwise settings aren't saved.
+ // Define application cache quota
+ static const unsigned long long defaultTotalQuota = 10 * 1024 * 1024; // 10MB
+ static const unsigned long long defaultOriginQuota = 5 * 1024 * 1024; // 5MB
+ [prefs setApplicationCacheTotalQuota:defaultTotalQuota];
+ [prefs setApplicationCacheDefaultOriginQuota:defaultOriginQuota];
+
+ [prefs setWebGLEnabled:YES];
+ [prefs setFullScreenEnabled:YES];
+ [prefs setOfflineWebApplicationCacheEnabled:YES];
+
+ [prefs setDatabasesEnabled:YES];
+ //[prefs setDeveloperExtrasEnabled:[[NSUserDefaults standardUserDefaults] boolForKey: @"developer"]];
+
+ [prefs _setLocalStorageDatabasePath:dbPath];
+ [prefs setLocalStorageEnabled:YES];
+
+ [webView setPreferences:prefs];
+ }
+
+ NSString *htmlPath = [basePath stringByAppendingString:@"/openmedialibrary/static/html/load.html"];
+
+ [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
+ } else {
+ NSTask *task = [[NSTask alloc] init];
+ NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
+ task.launchPath = @"/usr/bin/python";
+ task.arguments = @[[resourcesPath stringByAppendingString:@"/install.py"]];
+ [task launch];
+ NSString *htmlPath = [resourcesPath stringByAppendingString:@"/install.html"];
+ [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
+ }
+ [window setContentView: webView];
+}
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
+ NSString *basePath = [@"~/Library/Application Support/Open Media Library" stringByExpandingTildeInPath];
+ NSTask *task = [[NSTask alloc] init];
+ task.launchPath = [basePath stringByAppendingString:@"/ctl"];
+ task.arguments = @[@"stop"];
+ [task launch];
+ return YES;
+}
+
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)app {
+ return YES;
+}
+
+@end
diff --git a/Open Media Library-Info.plist b/Open Media Library-Info.plist
new file mode 100644
index 0000000..7bfb5f3
--- /dev/null
+++ b/Open Media Library-Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIdentifier
+ com.openmedialibrary.oml
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ Open Media Library
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSApplicationCategoryType
+ public.app-category.education
+ LSMinimumSystemVersion
+ ${MACOSX_DEPLOYMENT_TARGET}
+ NSMainNibFile
+ MainMenu
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/Open Media Library.app/Contents/Info.plist b/Open Media Library.app/Contents/Info.plist
deleted file mode 100644
index 54bb3a1..0000000
--- a/Open Media Library.app/Contents/Info.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- CFBundleExecutable
- Open Media Library
- CFBundleGetInfoString
- Open Media Library
- CFBundleIconFile
- Open Media Library.icns
- CFBundleIdentifier
- com.openmedialibrary.app
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- Open Media Library
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 0.0.1
- CFBundleSignature
- OML
- CFBundleVersion
- 0.0.20140804
-
-
diff --git a/Open Media Library.app/Contents/MacOS/Open Media Library b/Open Media Library.app/Contents/MacOS/Open Media Library
deleted file mode 100755
index 8944c50..0000000
--- a/Open Media Library.app/Contents/MacOS/Open Media Library
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-cd "`dirname "$0"`"
-BASE="$HOME/Library/Application Support/Open Media Library"
-if [[ ! -e "/usr/sbin/miredo" ]]; then
- open -W ../Resources/miredo-osx-v1.2.6-beta2.pkg
-fi
-if [[ -e "$BASE" ]]; then
- if [[ -e "$HOME/Library/LaunchAgents/com.openmedialibrary.loginscript.plist" ]]; then
- launchctl start com.openmedialibrary.loginscript
- open "$BASE/openmedialibrary/static/html/load.html"
- else
- "$BASE/ctl" open
- fi
-else
- python install.py "$BASE" &
- open ../Resources/static/install.html
-fi
diff --git a/Open Media Library.app/Contents/Resources/Open Media Library.icns b/Open Media Library.app/Contents/Resources/Open Media Library.icns
deleted file mode 100644
index b38e05b..0000000
Binary files a/Open Media Library.app/Contents/Resources/Open Media Library.icns and /dev/null differ
diff --git a/Open Media Library.app/Contents/Resources/miredo-osx-v1.2.6-beta2.pkg b/Open Media Library.app/Contents/Resources/miredo-osx-v1.2.6-beta2.pkg
deleted file mode 100644
index c46122c..0000000
Binary files a/Open Media Library.app/Contents/Resources/miredo-osx-v1.2.6-beta2.pkg and /dev/null differ
diff --git a/Open Media Library.xcodeproj/project.pbxproj b/Open Media Library.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..aef35e8
--- /dev/null
+++ b/Open Media Library.xcodeproj/project.pbxproj
@@ -0,0 +1,327 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 256AC3DA0F4B6AC300CF3369 /* OMLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* OMLAppDelegate.m */; };
+ 791EE74F1BE8227600927063 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
+ 7922C2E71BE7808F00A980DF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7922C2E61BE7808F00A980DF /* Images.xcassets */; };
+ 7922C2E91BE7B05E00A980DF /* install.py in Resources */ = {isa = PBXBuildFile; fileRef = 7922C2E81BE7B05E00A980DF /* install.py */; };
+ 7922C2EC1BE7B98B00A980DF /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 7922C2EA1BE7B98B00A980DF /* index.html */; };
+ 7922C2ED1BE7B98B00A980DF /* js in Resources */ = {isa = PBXBuildFile; fileRef = 7922C2EB1BE7B98B00A980DF /* js */; };
+ 7922C2EF1BE7BA7B00A980DF /* install.html in Resources */ = {isa = PBXBuildFile; fileRef = 7922C2EE1BE7BA7B00A980DF /* install.html */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ A8D6687C132D9AB300C9B726 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8D6687B132D9AB300C9B726 /* WebKit.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; };
+ 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; };
+ 256AC3D80F4B6AC300CF3369 /* OMLAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OMLAppDelegate.h; sourceTree = ""; };
+ 256AC3D90F4B6AC300CF3369 /* OMLAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OMLAppDelegate.m; sourceTree = ""; };
+ 256AC3F00F4B6AF500CF3369 /* Open Media Library_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Open Media Library_Prefix.pch"; sourceTree = ""; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
+ 7922C2E61BE7808F00A980DF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = OML/Images.xcassets; sourceTree = ""; };
+ 7922C2E81BE7B05E00A980DF /* install.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = install.py; sourceTree = ""; };
+ 7922C2EA1BE7B98B00A980DF /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; };
+ 7922C2EB1BE7B98B00A980DF /* js */ = {isa = PBXFileReference; lastKnownFileType = folder; path = js; sourceTree = ""; };
+ 7922C2EE1BE7BA7B00A980DF /* install.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = install.html; sourceTree = ""; };
+ 7976F9141BE815D60026875C /* WebPreferencesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesPrivate.h; sourceTree = ""; };
+ 7976F9151BE815D60026875C /* WebStorageManagerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebStorageManagerPrivate.h; sourceTree = ""; };
+ 8D1107310486CEB800E47090 /* Open Media Library-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Open Media Library-Info.plist"; sourceTree = ""; };
+ 8D1107320486CEB800E47090 /* Open Media Library.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Open Media Library.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ A8D6687B132D9AB300C9B726 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ A8D6687C132D9AB300C9B726 /* WebKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 256AC3D80F4B6AC300CF3369 /* OMLAppDelegate.h */,
+ 256AC3D90F4B6AC300CF3369 /* OMLAppDelegate.m */,
+ );
+ name = Classes;
+ sourceTree = "";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ A8D6687B132D9AB300C9B726 /* WebKit.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* Open Media Library.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 29B97314FDCFA39411CA2CEA /* OML */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = OML;
+ sourceTree = "";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 7976F9151BE815D60026875C /* WebStorageManagerPrivate.h */,
+ 7976F9141BE815D60026875C /* WebPreferencesPrivate.h */,
+ 256AC3F00F4B6AF500CF3369 /* Open Media Library_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 7922C2EE1BE7BA7B00A980DF /* install.html */,
+ 7922C2EA1BE7B98B00A980DF /* index.html */,
+ 7922C2EB1BE7B98B00A980DF /* js */,
+ 7922C2E81BE7B05E00A980DF /* install.py */,
+ 7922C2E61BE7808F00A980DF /* Images.xcassets */,
+ 8D1107310486CEB800E47090 /* Open Media Library-Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
+ );
+ name = Resources;
+ sourceTree = "";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* Open Media Library */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Open Media Library" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "Open Media Library";
+ productInstallPath = "$(HOME)/Applications";
+ productName = OML;
+ productReference = 8D1107320486CEB800E47090 /* Open Media Library.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0640;
+ };
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Open Media Library" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ Base,
+ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* OML */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* Open Media Library */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7922C2EC1BE7B98B00A980DF /* index.html in Resources */,
+ 7922C2ED1BE7B98B00A980DF /* js in Resources */,
+ 7922C2E91BE7B05E00A980DF /* install.py in Resources */,
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ 7922C2EF1BE7BA7B00A980DF /* install.html in Resources */,
+ 7922C2E71BE7808F00A980DF /* Images.xcassets in Resources */,
+ 791EE74F1BE8227600927063 /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ 256AC3DA0F4B6AC300CF3369 /* OMLAppDelegate.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "";
+ };
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1DDD58150DA1D0A300B32029 /* English */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Open Media Library_Prefix.pch";
+ INFOPLIST_FILE = "Open Media Library-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ PRODUCT_NAME = "Open Media Library";
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ COMBINE_HIDPI_IMAGES = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Open Media Library_Prefix.pch";
+ INFOPLIST_FILE = "Open Media Library-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ PRODUCT_NAME = "Open Media Library";
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Open Media Library" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Open Media Library" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/Open Media Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Open Media Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..068cbc7
--- /dev/null
+++ b/Open Media Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Open Media Library_Prefix.pch b/Open Media Library_Prefix.pch
new file mode 100644
index 0000000..4bbc59f
--- /dev/null
+++ b/Open Media Library_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'OML' target in the 'OML' project
+//
+
+#ifdef __OBJC__
+ #import
+#endif
diff --git a/README b/README
index 7a3820c..b755ec0 100644
--- a/README
+++ b/README
@@ -1,6 +1,5 @@
Open Media Library OS X Launcher and Installer
-place "Open Media Library.app" into /Applications
-
-On first launch it will install Open Media Library for each user.
-Later you can use it to start or open Open Media Library.
+- Build in XCode and export "Open Media Library.app" into this folder
+- Get latest miredo package from https://github.com/bit/miredo-osx/releases
+- Create .dmg file running ./build.sh
diff --git a/WebPreferencesPrivate.h b/WebPreferencesPrivate.h
new file mode 100644
index 0000000..4d2c9bc
--- /dev/null
+++ b/WebPreferencesPrivate.h
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2005, 2007 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import
+#import
+
+typedef enum {
+ WebKitEditableLinkDefaultBehavior,
+ WebKitEditableLinkAlwaysLive,
+ WebKitEditableLinkOnlyLiveWithShiftKey,
+ WebKitEditableLinkLiveWhenNotFocused,
+ WebKitEditableLinkNeverLive
+} WebKitEditableLinkBehavior;
+
+typedef enum {
+ WebTextDirectionSubmenuNeverIncluded,
+ WebTextDirectionSubmenuAutomaticallyIncluded,
+ WebTextDirectionSubmenuAlwaysIncluded
+} WebTextDirectionSubmenuInclusionBehavior;
+
+typedef enum {
+ WebKitEditingMacBehavior,
+ WebKitEditingWinBehavior,
+ WebKitEditingUnixBehavior
+} WebKitEditingBehavior;
+
+extern NSString *WebPreferencesChangedNotification;
+extern NSString *WebPreferencesRemovedNotification;
+
+@interface WebPreferences (WebPrivate)
+
+// Preferences that might be public in a future release
+
+- (BOOL)isDNSPrefetchingEnabled;
+- (void)setDNSPrefetchingEnabled:(BOOL)flag;
+
+- (BOOL)developerExtrasEnabled;
+- (void)setDeveloperExtrasEnabled:(BOOL)flag;
+
+- (BOOL)authorAndUserStylesEnabled;
+- (void)setAuthorAndUserStylesEnabled:(BOOL)flag;
+
+- (BOOL)applicationChromeModeEnabled;
+- (void)setApplicationChromeModeEnabled:(BOOL)flag;
+
+- (BOOL)usesEncodingDetector;
+- (void)setUsesEncodingDetector:(BOOL)flag;
+
+- (BOOL)respectStandardStyleKeyEquivalents;
+- (void)setRespectStandardStyleKeyEquivalents:(BOOL)flag;
+
+- (BOOL)showsURLsInToolTips;
+- (void)setShowsURLsInToolTips:(BOOL)flag;
+
+- (BOOL)textAreasAreResizable;
+- (void)setTextAreasAreResizable:(BOOL)flag;
+
+- (PDFDisplayMode)PDFDisplayMode;
+- (void)setPDFDisplayMode:(PDFDisplayMode)mode;
+
+- (BOOL)shrinksStandaloneImagesToFit;
+- (void)setShrinksStandaloneImagesToFit:(BOOL)flag;
+
+- (BOOL)automaticallyDetectsCacheModel;
+- (void)setAutomaticallyDetectsCacheModel:(BOOL)automaticallyDetectsCacheModel;
+
+- (BOOL)webArchiveDebugModeEnabled;
+- (void)setWebArchiveDebugModeEnabled:(BOOL)webArchiveDebugModeEnabled;
+
+- (BOOL)localFileContentSniffingEnabled;
+- (void)setLocalFileContentSniffingEnabled:(BOOL)localFileContentSniffingEnabled;
+
+- (BOOL)offlineWebApplicationCacheEnabled;
+- (void)setOfflineWebApplicationCacheEnabled:(BOOL)offlineWebApplicationCacheEnabled;
+
+- (BOOL)databasesEnabled;
+- (void)setDatabasesEnabled:(BOOL)databasesEnabled;
+
+- (BOOL)localStorageEnabled;
+- (void)setLocalStorageEnabled:(BOOL)localStorageEnabled;
+
+- (BOOL)isWebSecurityEnabled;
+- (void)setWebSecurityEnabled:(BOOL)flag;
+
+- (BOOL)allowUniversalAccessFromFileURLs;
+- (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag;
+
+- (BOOL)allowFileAccessFromFileURLs;
+- (void)setAllowFileAccessFromFileURLs:(BOOL)flag;
+
+- (BOOL)zoomsTextOnly;
+- (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
+
+- (BOOL)javaScriptCanAccessClipboard;
+- (void)setJavaScriptCanAccessClipboard:(BOOL)flag;
+
+- (BOOL)isXSSAuditorEnabled;
+- (void)setXSSAuditorEnabled:(BOOL)flag;
+
+- (BOOL)experimentalNotificationsEnabled;
+- (void)setExperimentalNotificationsEnabled:(BOOL)notificationsEnabled;
+
+- (unsigned)pluginAllowedRunTime;
+- (void)setPluginAllowedRunTime:(unsigned)allowedRunTime;
+
+- (BOOL)isFrameFlatteningEnabled;
+- (void)setFrameFlatteningEnabled:(BOOL)flag;
+
+- (BOOL)isSpatialNavigationEnabled;
+- (void)setSpatialNavigationEnabled:(BOOL)flag;
+
+// zero means do AutoScale
+- (float)PDFScaleFactor;
+- (void)setPDFScaleFactor:(float)scale;
+
+- (int64_t)applicationCacheTotalQuota;
+- (void)setApplicationCacheTotalQuota:(int64_t)quota;
+
+- (int64_t)applicationCacheDefaultOriginQuota;
+- (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota;
+
+- (WebKitEditableLinkBehavior)editableLinkBehavior;
+- (void)setEditableLinkBehavior:(WebKitEditableLinkBehavior)behavior;
+
+- (WebKitEditingBehavior)editingBehavior;
+- (void)setEditingBehavior:(WebKitEditingBehavior)behavior;
+
+- (WebTextDirectionSubmenuInclusionBehavior)textDirectionSubmenuInclusionBehavior;
+- (void)setTextDirectionSubmenuInclusionBehavior:(WebTextDirectionSubmenuInclusionBehavior)behavior;
+
+// Used to set preference specified in the test via LayoutTestController.overridePreference(..).
+// For use with DumpRenderTree only.
+- (void)_setPreferenceForTestWithValue:(NSString *)value forKey:(NSString *)key;
+
+// If site-specific spoofing is enabled, some pages that do inappropriate user-agent string checks will be
+// passed a nonstandard user-agent string to get them to work correctly. This method might be removed in
+// the future when there's no more need for it.
+- (BOOL)_useSiteSpecificSpoofing;
+- (void)_setUseSiteSpecificSpoofing:(BOOL)newValue;
+
+// WARNING: Allowing paste through the DOM API opens a security hole. We only use it for testing purposes.
+- (BOOL)isDOMPasteAllowed;
+- (void)setDOMPasteAllowed:(BOOL)DOMPasteAllowed;
+
+- (NSString *)_ftpDirectoryTemplatePath;
+- (void)_setFTPDirectoryTemplatePath:(NSString *)path;
+
+- (void)_setForceFTPDirectoryListings:(BOOL)force;
+- (BOOL)_forceFTPDirectoryListings;
+
+- (NSString *)_localStorageDatabasePath;
+- (void)_setLocalStorageDatabasePath:(NSString *)path;
+
+- (BOOL)acceleratedDrawingEnabled;
+- (void)setAcceleratedDrawingEnabled:(BOOL)enabled;
+
+- (BOOL)canvasUsesAcceleratedDrawing;
+- (void)setCanvasUsesAcceleratedDrawing:(BOOL)enabled;
+
+- (BOOL)acceleratedCompositingEnabled;
+- (void)setAcceleratedCompositingEnabled:(BOOL)enabled;
+
+- (BOOL)showDebugBorders;
+- (void)setShowDebugBorders:(BOOL)show;
+
+- (BOOL)showRepaintCounter;
+- (void)setShowRepaintCounter:(BOOL)show;
+
+- (BOOL)webAudioEnabled;
+- (void)setWebAudioEnabled:(BOOL)enabled;
+
+- (BOOL)webGLEnabled;
+- (void)setWebGLEnabled:(BOOL)enabled;
+
+- (BOOL)accelerated2dCanvasEnabled;
+- (void)setAccelerated2dCanvasEnabled:(BOOL)enabled;
+
+- (BOOL)paginateDuringLayoutEnabled;
+- (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
+
+- (BOOL)memoryInfoEnabled;
+- (void)setMemoryInfoEnabled:(BOOL)enabled;
+
+- (BOOL)hyperlinkAuditingEnabled;
+- (void)setHyperlinkAuditingEnabled:(BOOL)enabled;
+
+// Other private methods
+- (void)_postPreferencesChangesNotification;
++ (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
++ (void)_setInstance:(WebPreferences *)instance forIdentifier:(NSString *)identifier;
++ (void)_removeReferenceForIdentifier:(NSString *)identifier;
+- (NSTimeInterval)_backForwardCacheExpirationInterval;
++ (CFStringEncoding)_systemCFStringEncoding;
++ (void)_setInitialDefaultTextEncodingToSystemEncoding;
++ (void)_setIBCreatorID:(NSString *)string;
+
++ (void)setWebKitLinkTimeVersion:(int)version;
+
+// For WebView's use only.
+- (void)willAddToWebView;
+- (void)didRemoveFromWebView;
+
+// Full screen support is dependent on WebCore/WebKit being
+// compiled with ENABLE_FULLSCREEN_API.
+- (void)setFullScreenEnabled:(BOOL)flag;
+- (BOOL)fullScreenEnabled;
+
+- (void)setAsynchronousSpellCheckingEnabled:(BOOL)flag;
+- (BOOL)asynchronousSpellCheckingEnabled;
+
+- (void)setUsePreHTML5ParserQuirks:(BOOL)flag;
+- (BOOL)usePreHTML5ParserQuirks;
+
+@end
diff --git a/WebStorageManagerPrivate.h b/WebStorageManagerPrivate.h
new file mode 100644
index 0000000..bb26a8b
--- /dev/null
+++ b/WebStorageManagerPrivate.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2005, 2007 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+extern NSString * const WebStorageDirectoryDefaultsKey;
+extern NSString * const WebStorageDidModifyOriginNotification;
+
+@class WebSecurityOrigin;
+
+@interface WebStorageManager : NSObject
+
++ (WebStorageManager *)sharedWebStorageManager;
+
+// Returns an array of WebSecurityOrigin objects that have LocalStorage.
+- (NSArray *)origins;
+
+- (void)deleteAllOrigins;
+- (void)deleteOrigin:(WebSecurityOrigin *)origin;
+
+- (void)syncLocalStorage;
+- (void)syncFileSystemAndTrackerDatabase;
+
+static NSString* _storageDirectoryPath();
++ (NSString *)_storageDirectoryPath;
+
+@end
diff --git a/build.sh b/build.sh
index 2e4f797..5e6334e 100755
--- a/build.sh
+++ b/build.sh
@@ -1,10 +1,10 @@
#!/bin/sh
-
name="Open Media Library"
tmp="${name}.tmp.dmg"
dmg="${name}.dmg"
tmpdir=`mktemp -d -t oml`
cp -r "${name}.app" "$tmpdir/"
+cp -r miredo*.pkg "$tmpdir/"
ln -s /Applications "$tmpdir/Applications"
rm -rf "$dmg" "$tmp"
hdiutil create -srcfolder "$tmpdir" -volname "$name" -format UDZO "$tmp"
diff --git a/Open Media Library.app/Contents/Resources/static/index.html b/index.html
similarity index 100%
rename from Open Media Library.app/Contents/Resources/static/index.html
rename to index.html
diff --git a/Open Media Library.app/Contents/Resources/static/install.html b/install.html
similarity index 100%
rename from Open Media Library.app/Contents/Resources/static/install.html
rename to install.html
diff --git a/Open Media Library.app/Contents/MacOS/install.py b/install.py
similarity index 92%
rename from Open Media Library.app/Contents/MacOS/install.py
rename to install.py
index 9d3e933..0dc329b 100755
--- a/Open Media Library.app/Contents/MacOS/install.py
+++ b/install.py
@@ -5,6 +5,7 @@ from contextlib import closing
import json
import os
import sys
+import time
import tarfile
import urllib2
import SimpleHTTPServer
@@ -13,7 +14,7 @@ from threading import Thread
PORT = 9841
-static_dir = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'Resources', 'static'))
+static_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@@ -85,9 +86,11 @@ class Install(Thread):
self.status["progress"] = 1
with open('config/release.json', 'w') as fd:
json.dump(release, fd, indent=2)
- os.system("./ctl install_launcher")
- self.status = {"done": True}
+ self.status = {"installation finished. starting...": True}
+ os.system("./ctl start &")
+ time.sleep(1)
self.httpd.shutdown()
+
def download(self, url, filename):
dirname = os.path.dirname(filename)
@@ -111,9 +114,11 @@ class Install(Thread):
data = json.load(u)
return data
+
+
if __name__ == '__main__':
if len(sys.argv) == 1:
- target = os.path.join(os.curdir, 'openmedialibrary')
+ target = os.path.expanduser("~/Library/Application Support/Open Media Library")
elif len(sys.argv) != 2:
print "usage: %s [target]" % sys.argv[0]
sys.exit(1)
diff --git a/Open Media Library.app/Contents/Resources/static/js/install.js b/js/install.js
similarity index 94%
rename from Open Media Library.app/Contents/Resources/static/js/install.js
rename to js/install.js
index 1cf4965..2bc80e2 100644
--- a/Open Media Library.app/Contents/Resources/static/js/install.js
+++ b/js/install.js
@@ -6,6 +6,7 @@ function load() {
};
ws.onerror = function(event) {
ws.close();
+ setTimeout(load, 500);
};
ws.onclose = function(event) {
setTimeout(load, 500);
@@ -25,7 +26,7 @@ function update() {
setTimeout(update, 1000);
} else {
document.getElementById('status').innerHTML = "done";
- load();
+ setTimeout(load, 500);
}
};
xhr.onerror = function() {
diff --git a/main.m b/main.m
new file mode 100644
index 0000000..5878951
--- /dev/null
+++ b/main.m
@@ -0,0 +1,11 @@
+//
+// main.m
+// OML
+//
+
+#import
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **) argv);
+}