From 69005233066205a4849f5aa07efedee5c4899e3d Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 20:45:23 +0200 Subject: [PATCH 01/10] Adding base xcode project --- Mac/.gitignore | 19 + Mac/I2Pd.xcodeproj/project.pbxproj | 413 +++++++++++ .../contents.xcworkspacedata | 7 + Mac/I2Pd/AppDelegate.h | 15 + Mac/I2Pd/AppDelegate.m | 49 ++ .../AppIcon.appiconset/Contents.json | 58 ++ Mac/I2Pd/Assets.xcassets/Contents.json | 6 + Mac/I2Pd/Base.lproj/MainMenu.xib | 681 ++++++++++++++++++ Mac/I2Pd/Images.xcassets/Contents.json | 6 + .../menuBarIcon.imageset/Contents.json | 20 + Mac/I2Pd/Info.plist | 36 + Mac/I2Pd/main.m | 13 + Mac/I2PdTests/I2PdTests.m | 39 + Mac/I2PdTests/Info.plist | 24 + 14 files changed, 1386 insertions(+) create mode 100644 Mac/.gitignore create mode 100644 Mac/I2Pd.xcodeproj/project.pbxproj create mode 100644 Mac/I2Pd.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Mac/I2Pd/AppDelegate.h create mode 100644 Mac/I2Pd/AppDelegate.m create mode 100644 Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Mac/I2Pd/Assets.xcassets/Contents.json create mode 100644 Mac/I2Pd/Base.lproj/MainMenu.xib create mode 100644 Mac/I2Pd/Images.xcassets/Contents.json create mode 100644 Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json create mode 100644 Mac/I2Pd/Info.plist create mode 100644 Mac/I2Pd/main.m create mode 100644 Mac/I2PdTests/I2PdTests.m create mode 100644 Mac/I2PdTests/Info.plist diff --git a/Mac/.gitignore b/Mac/.gitignore new file mode 100644 index 00000000..f59ded9e --- /dev/null +++ b/Mac/.gitignore @@ -0,0 +1,19 @@ +# Xcode related +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa diff --git a/Mac/I2Pd.xcodeproj/project.pbxproj b/Mac/I2Pd.xcodeproj/project.pbxproj new file mode 100644 index 00000000..191af8bd --- /dev/null +++ b/Mac/I2Pd.xcodeproj/project.pbxproj @@ -0,0 +1,413 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + BF3D69501CAAF56900A7EED6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */; }; + BF3D69531CAAF56900A7EED6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3D69521CAAF56900A7EED6 /* main.m */; }; + BF3D69551CAAF56900A7EED6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF3D69541CAAF56900A7EED6 /* Assets.xcassets */; }; + BF3D69581CAAF56900A7EED6 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF3D69561CAAF56900A7EED6 /* MainMenu.xib */; }; + BF3D69631CAAF56900A7EED6 /* I2PdTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3D69621CAAF56900A7EED6 /* I2PdTests.m */; }; + BF83EE831CAB032000D3DE82 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF83EE821CAB032000D3DE82 /* Images.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + BF3D695F1CAAF56900A7EED6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BF3D69431CAAF56900A7EED6 /* Project object */; + proxyType = 1; + remoteGlobalIDString = BF3D694A1CAAF56900A7EED6; + remoteInfo = I2Pd; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + BF3D694B1CAAF56900A7EED6 /* I2Pd.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = I2Pd.app; sourceTree = BUILT_PRODUCTS_DIR; }; + BF3D694E1CAAF56900A7EED6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + BF3D69521CAAF56900A7EED6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + BF3D69541CAAF56900A7EED6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + BF3D69571CAAF56900A7EED6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + BF3D69591CAAF56900A7EED6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BF3D695E1CAAF56900A7EED6 /* I2PdTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = I2PdTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + BF3D69621CAAF56900A7EED6 /* I2PdTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = I2PdTests.m; sourceTree = ""; }; + BF3D69641CAAF56900A7EED6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BF83EE821CAB032000D3DE82 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BF3D69481CAAF56900A7EED6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BF3D695B1CAAF56900A7EED6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + BF3D69421CAAF56900A7EED6 = { + isa = PBXGroup; + children = ( + BF3D694D1CAAF56900A7EED6 /* I2Pd */, + BF3D69611CAAF56900A7EED6 /* I2PdTests */, + BF3D694C1CAAF56900A7EED6 /* Products */, + ); + sourceTree = ""; + }; + BF3D694C1CAAF56900A7EED6 /* Products */ = { + isa = PBXGroup; + children = ( + BF3D694B1CAAF56900A7EED6 /* I2Pd.app */, + BF3D695E1CAAF56900A7EED6 /* I2PdTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + BF3D694D1CAAF56900A7EED6 /* I2Pd */ = { + isa = PBXGroup; + children = ( + BF3D694E1CAAF56900A7EED6 /* AppDelegate.h */, + BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */, + BF3D69541CAAF56900A7EED6 /* Assets.xcassets */, + BF83EE821CAB032000D3DE82 /* Images.xcassets */, + BF3D69561CAAF56900A7EED6 /* MainMenu.xib */, + BF3D69591CAAF56900A7EED6 /* Info.plist */, + BF3D69511CAAF56900A7EED6 /* Supporting Files */, + ); + path = I2Pd; + sourceTree = ""; + }; + BF3D69511CAAF56900A7EED6 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + BF3D69521CAAF56900A7EED6 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + BF3D69611CAAF56900A7EED6 /* I2PdTests */ = { + isa = PBXGroup; + children = ( + BF3D69621CAAF56900A7EED6 /* I2PdTests.m */, + BF3D69641CAAF56900A7EED6 /* Info.plist */, + ); + path = I2PdTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + BF3D694A1CAAF56900A7EED6 /* I2Pd */ = { + isa = PBXNativeTarget; + buildConfigurationList = BF3D69671CAAF56900A7EED6 /* Build configuration list for PBXNativeTarget "I2Pd" */; + buildPhases = ( + BF3D69471CAAF56900A7EED6 /* Sources */, + BF3D69481CAAF56900A7EED6 /* Frameworks */, + BF3D69491CAAF56900A7EED6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = I2Pd; + productName = I2Pd; + productReference = BF3D694B1CAAF56900A7EED6 /* I2Pd.app */; + productType = "com.apple.product-type.application"; + }; + BF3D695D1CAAF56900A7EED6 /* I2PdTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = BF3D696A1CAAF56900A7EED6 /* Build configuration list for PBXNativeTarget "I2PdTests" */; + buildPhases = ( + BF3D695A1CAAF56900A7EED6 /* Sources */, + BF3D695B1CAAF56900A7EED6 /* Frameworks */, + BF3D695C1CAAF56900A7EED6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + BF3D69601CAAF56900A7EED6 /* PBXTargetDependency */, + ); + name = I2PdTests; + productName = I2PdTests; + productReference = BF3D695E1CAAF56900A7EED6 /* I2PdTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BF3D69431CAAF56900A7EED6 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Purple I2P (Published by Sigterm AS)"; + TargetAttributes = { + BF3D694A1CAAF56900A7EED6 = { + CreatedOnToolsVersion = 7.2.1; + DevelopmentTeam = W3C42P2LA8; + }; + BF3D695D1CAAF56900A7EED6 = { + CreatedOnToolsVersion = 7.2.1; + TestTargetID = BF3D694A1CAAF56900A7EED6; + }; + }; + }; + buildConfigurationList = BF3D69461CAAF56900A7EED6 /* Build configuration list for PBXProject "I2Pd" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = BF3D69421CAAF56900A7EED6; + productRefGroup = BF3D694C1CAAF56900A7EED6 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BF3D694A1CAAF56900A7EED6 /* I2Pd */, + BF3D695D1CAAF56900A7EED6 /* I2PdTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BF3D69491CAAF56900A7EED6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BF83EE831CAB032000D3DE82 /* Images.xcassets in Resources */, + BF3D69551CAAF56900A7EED6 /* Assets.xcassets in Resources */, + BF3D69581CAAF56900A7EED6 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BF3D695C1CAAF56900A7EED6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + BF3D69471CAAF56900A7EED6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BF3D69531CAAF56900A7EED6 /* main.m in Sources */, + BF3D69501CAAF56900A7EED6 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BF3D695A1CAAF56900A7EED6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BF3D69631CAAF56900A7EED6 /* I2PdTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + BF3D69601CAAF56900A7EED6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BF3D694A1CAAF56900A7EED6 /* I2Pd */; + targetProxy = BF3D695F1CAAF56900A7EED6 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + BF3D69561CAAF56900A7EED6 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + BF3D69571CAAF56900A7EED6 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + BF3D69651CAAF56900A7EED6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + BF3D69661CAAF56900A7EED6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + BF3D69681CAAF56900A7EED6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Mac Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = I2Pd/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2Pd; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + }; + name = Debug; + }; + BF3D69691CAAF56900A7EED6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Mac Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = I2Pd/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2Pd; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + }; + name = Release; + }; + BF3D696B1CAAF56900A7EED6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = I2PdTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2PdTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/I2Pd.app/Contents/MacOS/I2Pd"; + }; + name = Debug; + }; + BF3D696C1CAAF56900A7EED6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = I2PdTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2PdTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/I2Pd.app/Contents/MacOS/I2Pd"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BF3D69461CAAF56900A7EED6 /* Build configuration list for PBXProject "I2Pd" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BF3D69651CAAF56900A7EED6 /* Debug */, + BF3D69661CAAF56900A7EED6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BF3D69671CAAF56900A7EED6 /* Build configuration list for PBXNativeTarget "I2Pd" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BF3D69681CAAF56900A7EED6 /* Debug */, + BF3D69691CAAF56900A7EED6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BF3D696A1CAAF56900A7EED6 /* Build configuration list for PBXNativeTarget "I2PdTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BF3D696B1CAAF56900A7EED6 /* Debug */, + BF3D696C1CAAF56900A7EED6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BF3D69431CAAF56900A7EED6 /* Project object */; +} diff --git a/Mac/I2Pd.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Mac/I2Pd.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..8c6d6fdb --- /dev/null +++ b/Mac/I2Pd.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Mac/I2Pd/AppDelegate.h b/Mac/I2Pd/AppDelegate.h new file mode 100644 index 00000000..8e2bf22c --- /dev/null +++ b/Mac/I2Pd/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// I2Pd +// +// Created by Mikal Villa on 29/03/16. +// Copyright © 2016 Purple I2P. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/Mac/I2Pd/AppDelegate.m b/Mac/I2Pd/AppDelegate.m new file mode 100644 index 00000000..ddcefe55 --- /dev/null +++ b/Mac/I2Pd/AppDelegate.m @@ -0,0 +1,49 @@ +// +// AppDelegate.m +// I2Pd +// +// Created by Mikal Villa on 29/03/16. +// Copyright © 2016 Purple I2P. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@property (strong, nonatomic) NSStatusItem *statusItem; + +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + [self setupStatusItem]; +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + +- (void)setupStatusItem { + self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; + self.statusItem.button.image = [NSImage imageNamed:@"menuBarIcon"]; + + [self updateStatusItemMenu]; +} + +- (void)updateStatusItemMenu { + NSMenu *menu = [[NSMenu alloc] init]; + [menu addItemWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@""]; + self.statusItem.menu = menu; +} + +#pragma mark - Menu actions + +- (void)openWebConsole:(id)sender +{ + NSURL *URL = [NSURL URLWithString:@"http://127.0.0.1:7070"]; + [[NSWorkspace sharedWorkspace] openURL:URL]; +} + + +@end diff --git a/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json b/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..2db2b1c7 --- /dev/null +++ b/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "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/Mac/I2Pd/Assets.xcassets/Contents.json b/Mac/I2Pd/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Mac/I2Pd/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Mac/I2Pd/Base.lproj/MainMenu.xib b/Mac/I2Pd/Base.lproj/MainMenu.xib new file mode 100644 index 00000000..da315e12 --- /dev/null +++ b/Mac/I2Pd/Base.lproj/MainMenu.xib @@ -0,0 +1,681 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Mac/I2Pd/Images.xcassets/Contents.json b/Mac/I2Pd/Images.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Mac/I2Pd/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json b/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json new file mode 100644 index 00000000..f8f827e4 --- /dev/null +++ b/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json @@ -0,0 +1,20 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Mac/I2Pd/Info.plist b/Mac/I2Pd/Info.plist new file mode 100644 index 00000000..19f553eb --- /dev/null +++ b/Mac/I2Pd/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.utilities + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2016 Purple I2P. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Mac/I2Pd/main.m b/Mac/I2Pd/main.m new file mode 100644 index 00000000..0cd12009 --- /dev/null +++ b/Mac/I2Pd/main.m @@ -0,0 +1,13 @@ +// +// main.m +// I2Pd +// +// Created by Mikal Villa on 29/03/16. +// Copyright © 2016 Purple I2P. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Mac/I2PdTests/I2PdTests.m b/Mac/I2PdTests/I2PdTests.m new file mode 100644 index 00000000..8e14b0fa --- /dev/null +++ b/Mac/I2PdTests/I2PdTests.m @@ -0,0 +1,39 @@ +// +// I2PdTests.m +// I2PdTests +// +// Created by Mikal Villa on 29/03/16. +// Copyright © 2016 Purple I2P. All rights reserved. +// + +#import + +@interface I2PdTests : XCTestCase + +@end + +@implementation I2PdTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/Mac/I2PdTests/Info.plist b/Mac/I2PdTests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/Mac/I2PdTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + From 9171ff505591d7378cb3b02f12d429621bf837a6 Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 20:52:47 +0200 Subject: [PATCH 02/10] Removing signing ID from repo --- Mac/I2Pd.xcodeproj/project.pbxproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/Mac/I2Pd.xcodeproj/project.pbxproj b/Mac/I2Pd.xcodeproj/project.pbxproj index 191af8bd..8111745f 100644 --- a/Mac/I2Pd.xcodeproj/project.pbxproj +++ b/Mac/I2Pd.xcodeproj/project.pbxproj @@ -155,7 +155,6 @@ TargetAttributes = { BF3D694A1CAAF56900A7EED6 = { CreatedOnToolsVersion = 7.2.1; - DevelopmentTeam = W3C42P2LA8; }; BF3D695D1CAAF56900A7EED6 = { CreatedOnToolsVersion = 7.2.1; @@ -325,7 +324,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "Mac Developer"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = I2Pd/Info.plist; @@ -340,7 +338,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "Mac Developer"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = I2Pd/Info.plist; From d90868a02d206b008d59e23226a1059d31f9aa9b Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 20:53:25 +0200 Subject: [PATCH 03/10] Update travis to build Obj-C project as well as i2pd --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c791187d..b9c5111c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl miniupnpc ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink boost openssl && brew link boost openssl -f ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR/Mac && xcodebuild -project I2Pd.xcodeproj -target "I2Pd" ; fi env: matrix: - BUILD_TYPE=Release UPNP=ON From 415db6cf1b6de5275c4679d7c313e2dc3af9fa33 Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 20:58:02 +0200 Subject: [PATCH 04/10] Setting build target to OS X SDK 10.7 --- Mac/I2Pd.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mac/I2Pd.xcodeproj/project.pbxproj b/Mac/I2Pd.xcodeproj/project.pbxproj index 8111745f..6e8a50b9 100644 --- a/Mac/I2Pd.xcodeproj/project.pbxproj +++ b/Mac/I2Pd.xcodeproj/project.pbxproj @@ -328,6 +328,7 @@ COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = I2Pd/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2Pd; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -342,6 +343,7 @@ COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = I2Pd/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2Pd; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; From 74cac6ba117c8f665df64d094dbb691166af8cda Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 21:00:45 +0200 Subject: [PATCH 05/10] Remove most of the menubar related to file/edit --- Mac/I2Pd/Base.lproj/MainMenu.xib | 545 ------------------------------- 1 file changed, 545 deletions(-) diff --git a/Mac/I2Pd/Base.lproj/MainMenu.xib b/Mac/I2Pd/Base.lproj/MainMenu.xib index da315e12..7ff13518 100644 --- a/Mac/I2Pd/Base.lproj/MainMenu.xib +++ b/Mac/I2Pd/Base.lproj/MainMenu.xib @@ -64,551 +64,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From eafe5ad00eab75ab55efa6632bea31f408d4b46f Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 21:14:10 +0200 Subject: [PATCH 06/10] Adding 16x16 icon --- Mac/I2Pd.xcodeproj/project.pbxproj | 4 ++-- .../AppIcon.appiconset/Contents.json | 3 ++- .../Assets.xcassets/AppIcon.appiconset/icon.png | Bin 0 -> 956 bytes .../menuBarIcon.imageset/Contents.json | 1 + .../Images.xcassets/menuBarIcon.imageset/icon.png | Bin 0 -> 956 bytes 5 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/icon.png create mode 100644 Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/icon.png diff --git a/Mac/I2Pd.xcodeproj/project.pbxproj b/Mac/I2Pd.xcodeproj/project.pbxproj index 6e8a50b9..faaf86a1 100644 --- a/Mac/I2Pd.xcodeproj/project.pbxproj +++ b/Mac/I2Pd.xcodeproj/project.pbxproj @@ -30,13 +30,13 @@ BF3D694E1CAAF56900A7EED6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; BF3D69521CAAF56900A7EED6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - BF3D69541CAAF56900A7EED6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + BF3D69541CAAF56900A7EED6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = I2Pd/Assets.xcassets; sourceTree = SOURCE_ROOT; }; BF3D69571CAAF56900A7EED6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; BF3D69591CAAF56900A7EED6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BF3D695E1CAAF56900A7EED6 /* I2PdTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = I2PdTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; BF3D69621CAAF56900A7EED6 /* I2PdTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = I2PdTests.m; sourceTree = ""; }; BF3D69641CAAF56900A7EED6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BF83EE821CAB032000D3DE82 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + BF83EE821CAB032000D3DE82 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = I2Pd/Images.xcassets; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ diff --git a/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json b/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json index 2db2b1c7..0dc7865f 100644 --- a/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,8 +1,9 @@ { "images" : [ { - "idiom" : "mac", "size" : "16x16", + "idiom" : "mac", + "filename" : "icon.png", "scale" : "1x" }, { diff --git a/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/icon.png b/Mac/I2Pd/Assets.xcassets/AppIcon.appiconset/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..49b475c1e1562d4da4e8f26e78ade7da42873cf5 GIT binary patch literal 956 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstU$g(vPY0F z14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>hzhc7_%*HoX^+tzF5nGf_v&l-r37JCuggLxT+ZDXXXP#@7eQbfqq_bUQVXk`Vo@;rP3L- z4kcNk!9jNBQ>RS>D){l^M?z{s(Zu2jTPI|+W(H>lPu@Mbc3!QqmGPA;SAPBam5`KB z*jKpZ?2_`S-pmcS?)5S4F;&O5V1EZT-npl`w8Jom|2TvY7d-(Km`$txm))rTnqeoO# z7BU50GTK!1iL1-&Q~;xBsA(y$uWqhv?23kY`x+Nc+}OEtre(;1Lzhn7I(F^cy@P^U z51zbv^y=BWhcBPLWq$Vi*H3m9HrDo*wpRCs9}@#F8g4B7$l2+6Qgda3Xy!}FnUOaw zcUJynO{i0J4lMM{jI4A`4KX+Z!!p+G@g>Jf9^TZZ>lA(5hW>!C8<`)MX5lF!N|bS zOxM6z*T^!&$iT|P$jZb(+rY@mz~JVLJ#$brG=^yS@r^YKsDZ)L L)z4*}Q$iB}mpG5i literal 0 HcmV?d00001 diff --git a/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json b/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json index f8f827e4..d15d7545 100644 --- a/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json +++ b/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/Contents.json @@ -2,6 +2,7 @@ "images" : [ { "idiom" : "universal", + "filename" : "icon.png", "scale" : "1x" }, { diff --git a/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/icon.png b/Mac/I2Pd/Images.xcassets/menuBarIcon.imageset/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..49b475c1e1562d4da4e8f26e78ade7da42873cf5 GIT binary patch literal 956 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstU$g(vPY0F z14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>hzhc7_%*HoX^+tzF5nGf_v&l-r37JCuggLxT+ZDXXXP#@7eQbfqq_bUQVXk`Vo@;rP3L- z4kcNk!9jNBQ>RS>D){l^M?z{s(Zu2jTPI|+W(H>lPu@Mbc3!QqmGPA;SAPBam5`KB z*jKpZ?2_`S-pmcS?)5S4F;&O5V1EZT-npl`w8Jom|2TvY7d-(Km`$txm))rTnqeoO# z7BU50GTK!1iL1-&Q~;xBsA(y$uWqhv?23kY`x+Nc+}OEtre(;1Lzhn7I(F^cy@P^U z51zbv^y=BWhcBPLWq$Vi*H3m9HrDo*wpRCs9}@#F8g4B7$l2+6Qgda3Xy!}FnUOaw zcUJynO{i0J4lMM{jI4A`4KX+Z!!p+G@g>Jf9^TZZ>lA(5hW>!C8<`)MX5lF!N|bS zOxM6z*T^!&$iT|P$jZb(+rY@mz~JVLJ#$brG=^yS@r^YKsDZ)L L)z4*}Q$iB}mpG5i literal 0 HcmV?d00001 From f8baaa0ffafde033dd4056d25887e0736148a753 Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 29 Mar 2016 21:18:46 +0200 Subject: [PATCH 07/10] LSUIElement should be set to true at a later point. --- Mac/I2Pd/Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mac/I2Pd/Info.plist b/Mac/I2Pd/Info.plist index 19f553eb..c7538434 100644 --- a/Mac/I2Pd/Info.plist +++ b/Mac/I2Pd/Info.plist @@ -32,5 +32,7 @@ MainMenu NSPrincipalClass NSApplication + LSUIElement + From 1b6d37d90ace056d6f73940e450d4adba81b2848 Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Wed, 30 Mar 2016 10:10:51 +0200 Subject: [PATCH 08/10] Disable code signing on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b9c5111c..2e2fc70d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl miniupnpc ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink boost openssl && brew link boost openssl -f ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR/Mac && xcodebuild -project I2Pd.xcodeproj -target "I2Pd" ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR/Mac && xcodebuild -project I2Pd.xcodeproj -target "I2Pd" CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" ; fi env: matrix: - BUILD_TYPE=Release UPNP=ON From 28b3e9d65b98a2c4252c560a50c87d9e1809868f Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Wed, 30 Mar 2016 16:14:19 +0200 Subject: [PATCH 09/10] Build xcode project after i2pd --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e2fc70d..11df8317 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,10 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl miniupnpc ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink boost openssl && brew link boost openssl -f ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR/Mac && xcodebuild -project I2Pd.xcodeproj -target "I2Pd" CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" ; fi env: matrix: - BUILD_TYPE=Release UPNP=ON - BUILD_TYPE=Release UPNP=OFF script: - cd build && cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DWITH_UPNP=${UPNP} && make + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR/Mac && xcodebuild -project I2Pd.xcodeproj -target "I2Pd" CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" && cd $TRAVIS_BUILD_DIR ; fi From a9b2ec910ce3fdd03db113e767464385b339402f Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Tue, 10 May 2016 23:10:15 +0200 Subject: [PATCH 10/10] Adding link paths and rename AppDelegate.m -> AppDelegate.mm --- Mac/I2Pd.xcodeproj/project.pbxproj | 18 ++++++++++++------ Mac/I2Pd/{AppDelegate.m => AppDelegate.mm} | 7 ++++++- 2 files changed, 18 insertions(+), 7 deletions(-) rename Mac/I2Pd/{AppDelegate.m => AppDelegate.mm} (85%) diff --git a/Mac/I2Pd.xcodeproj/project.pbxproj b/Mac/I2Pd.xcodeproj/project.pbxproj index faaf86a1..2383d618 100644 --- a/Mac/I2Pd.xcodeproj/project.pbxproj +++ b/Mac/I2Pd.xcodeproj/project.pbxproj @@ -7,12 +7,12 @@ objects = { /* Begin PBXBuildFile section */ - BF3D69501CAAF56900A7EED6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */; }; + BF3D69501CAAF56900A7EED6 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3D694F1CAAF56900A7EED6 /* AppDelegate.mm */; }; BF3D69531CAAF56900A7EED6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3D69521CAAF56900A7EED6 /* main.m */; }; BF3D69551CAAF56900A7EED6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF3D69541CAAF56900A7EED6 /* Assets.xcassets */; }; - BF3D69581CAAF56900A7EED6 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF3D69561CAAF56900A7EED6 /* MainMenu.xib */; }; BF3D69631CAAF56900A7EED6 /* I2PdTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3D69621CAAF56900A7EED6 /* I2PdTests.m */; }; BF83EE831CAB032000D3DE82 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF83EE821CAB032000D3DE82 /* Images.xcassets */; }; + BFE4B1191CE27BE200D75993 /* libi2pd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE4B1181CE27BE200D75993 /* libi2pd.a */; settings = {ATTRIBUTES = (Required, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -28,7 +28,7 @@ /* Begin PBXFileReference section */ BF3D694B1CAAF56900A7EED6 /* I2Pd.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = I2Pd.app; sourceTree = BUILT_PRODUCTS_DIR; }; BF3D694E1CAAF56900A7EED6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + BF3D694F1CAAF56900A7EED6 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; BF3D69521CAAF56900A7EED6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; BF3D69541CAAF56900A7EED6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = I2Pd/Assets.xcassets; sourceTree = SOURCE_ROOT; }; BF3D69571CAAF56900A7EED6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -37,6 +37,7 @@ BF3D69621CAAF56900A7EED6 /* I2PdTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = I2PdTests.m; sourceTree = ""; }; BF3D69641CAAF56900A7EED6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BF83EE821CAB032000D3DE82 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = I2Pd/Images.xcassets; sourceTree = SOURCE_ROOT; }; + BFE4B1181CE27BE200D75993 /* libi2pd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libi2pd.a; path = ../build/libi2pd.a; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -44,6 +45,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BFE4B1191CE27BE200D75993 /* libi2pd.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -60,6 +62,7 @@ BF3D69421CAAF56900A7EED6 = { isa = PBXGroup; children = ( + BFE4B1181CE27BE200D75993 /* libi2pd.a */, BF3D694D1CAAF56900A7EED6 /* I2Pd */, BF3D69611CAAF56900A7EED6 /* I2PdTests */, BF3D694C1CAAF56900A7EED6 /* Products */, @@ -79,7 +82,7 @@ isa = PBXGroup; children = ( BF3D694E1CAAF56900A7EED6 /* AppDelegate.h */, - BF3D694F1CAAF56900A7EED6 /* AppDelegate.m */, + BF3D694F1CAAF56900A7EED6 /* AppDelegate.mm */, BF3D69541CAAF56900A7EED6 /* Assets.xcassets */, BF83EE821CAB032000D3DE82 /* Images.xcassets */, BF3D69561CAAF56900A7EED6 /* MainMenu.xib */, @@ -188,7 +191,6 @@ files = ( BF83EE831CAB032000D3DE82 /* Images.xcassets in Resources */, BF3D69551CAAF56900A7EED6 /* Assets.xcassets in Resources */, - BF3D69581CAAF56900A7EED6 /* MainMenu.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -207,7 +209,7 @@ buildActionMask = 2147483647; files = ( BF3D69531CAAF56900A7EED6 /* main.m in Sources */, - BF3D69501CAAF56900A7EED6 /* AppDelegate.m in Sources */, + BF3D69501CAAF56900A7EED6 /* AppDelegate.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -326,8 +328,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; + HEADER_SEARCH_PATHS = ../; INFOPLIST_FILE = I2Pd/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + LIBRARY_SEARCH_PATHS = ../build/; MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2Pd; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -341,8 +345,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; + HEADER_SEARCH_PATHS = ../; INFOPLIST_FILE = I2Pd/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + LIBRARY_SEARCH_PATHS = ../build/; MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = io.i2p.I2Pd; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Mac/I2Pd/AppDelegate.m b/Mac/I2Pd/AppDelegate.mm similarity index 85% rename from Mac/I2Pd/AppDelegate.m rename to Mac/I2Pd/AppDelegate.mm index ddcefe55..f3dd3618 100644 --- a/Mac/I2Pd/AppDelegate.m +++ b/Mac/I2Pd/AppDelegate.mm @@ -8,6 +8,8 @@ #import "AppDelegate.h" +#include "Daemon.h" + @interface AppDelegate () @property (strong, nonatomic) NSStatusItem *statusItem; @@ -18,6 +20,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { [self setupStatusItem]; + + Daemon.start(); } - (void)applicationWillTerminate:(NSNotification *)aNotification { @@ -25,7 +29,7 @@ } - (void)setupStatusItem { - self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; + self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength]; self.statusItem.button.image = [NSImage imageNamed:@"menuBarIcon"]; [self updateStatusItemMenu]; @@ -33,6 +37,7 @@ - (void)updateStatusItemMenu { NSMenu *menu = [[NSMenu alloc] init]; + [menu addItemWithTitle:@"Open console" action:@selector(openWebConsole:) keyEquivalent:@""]; [menu addItemWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@""]; self.statusItem.menu = menu; }