From 32b56fabfeac4fea69986ebf183d5e9564bec040 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 8 Sep 2018 01:18:59 +0100 Subject: [PATCH] macOS: ODTHelpBrowser now running --- ...en-GB).fodt => Documentation (en_GB).fodt} | 0 projects/osx/Info_cocoa.plist | 7 +- projects/osx/ODTHelpBrowser/Info.plist | 34 +++ .../ODTHelpBrowser.entitlements | 5 + projects/osx/Xestia Address Book.entitlements | 5 + .../project.pbxproj | 280 +++++++++++++++++- source/Makefile.in | 2 +- source/frmMain.cpp | 9 +- source/frmMain.h | 3 + source/frmMain.mm | 36 ++- source/tools/odthelpbrowser/frmMain.cpp | 1 - 11 files changed, 369 insertions(+), 13 deletions(-) rename docs/{Documentation (en-GB).fodt => Documentation (en_GB).fodt} (100%) create mode 100644 projects/osx/ODTHelpBrowser/Info.plist create mode 100644 projects/osx/ODTHelpBrowser/ODTHelpBrowser.entitlements create mode 100644 projects/osx/Xestia Address Book.entitlements diff --git a/docs/Documentation (en-GB).fodt b/docs/Documentation (en_GB).fodt similarity index 100% rename from docs/Documentation (en-GB).fodt rename to docs/Documentation (en_GB).fodt diff --git a/projects/osx/Info_cocoa.plist b/projects/osx/Info_cocoa.plist index a867900..dc4542e 100644 --- a/projects/osx/Info_cocoa.plist +++ b/projects/osx/Info_cocoa.plist @@ -14,13 +14,10 @@ 6.0 CFBundleLocalizations - de en - fr - it CFBundleLongVersionString - $(PRODUCT_VERSION) (c) 2013 - 2016 Xestia Software Development + $(PRODUCT_VERSION) (c) 2013 - 2018 Xestia Software Development CFBundleName $(PRODUCT_NAME) CFBundlePackageType @@ -34,7 +31,7 @@ LSApplicationCategoryType public.app-category.productivity NSHumanReadableCopyright - Copyright 2013-2017 Xestia Software Development + Copyright 2013-2018 Xestia Software Development NSPrincipalClass wxNSApplication diff --git a/projects/osx/ODTHelpBrowser/Info.plist b/projects/osx/ODTHelpBrowser/Info.plist new file mode 100644 index 0000000..17ba4a4 --- /dev/null +++ b/projects/osx/ODTHelpBrowser/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + $(PRODUCT_VERSION) (c) 2013 - 2018 Xestia Software Development + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XSD + CFBundleShortVersionString + 1.0.0 + CFBundleVersion + 1.0.0 + LSApplicationCategoryType + public.app-category.productivity + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2018 Xestia Software Development. All rights reserved. + NSPrincipalClass + wxNSApplication + + diff --git a/projects/osx/ODTHelpBrowser/ODTHelpBrowser.entitlements b/projects/osx/ODTHelpBrowser/ODTHelpBrowser.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/projects/osx/ODTHelpBrowser/ODTHelpBrowser.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/projects/osx/Xestia Address Book.entitlements b/projects/osx/Xestia Address Book.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/projects/osx/Xestia Address Book.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj b/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj index d985337..c754a75 100644 --- a/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj +++ b/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj @@ -113,6 +113,18 @@ 4ABACC9F1B20E968001368B0 /* Info_cocoa.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4ABACC9A1B20E968001368B0 /* Info_cocoa.plist */; }; 4ADDA7F51B222936007AD131 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ADDA7F41B222936007AD131 /* main.cpp */; }; 4AE7527A1B24F8B90058ECBE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4AE752791B24F8B90058ECBE /* Images.xcassets */; }; + 4B6DE7B1213DB7DF00A426B8 /* libwx_osx_cocoau-3.0.0.3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BF08A3C1EF6F9A0004CDF65 /* libwx_osx_cocoau-3.0.0.3.0.dylib */; }; + 4B6DE7B2213DB7E100A426B8 /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BF08A3F1EF6FB3C004CDF65 /* libxml2.2.dylib */; }; + 4B6DE7B8213DBE0800A426B8 /* frmMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6DE7B4213DBE0800A426B8 /* frmMain.cpp */; }; + 4B6DE7B9213DBE0800A426B8 /* odt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6DE7B5213DBE0800A426B8 /* odt.cpp */; }; + 4B6DE7BA213DBE0800A426B8 /* ODTHelpBrowser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6DE7B6213DBE0800A426B8 /* ODTHelpBrowser.cpp */; }; + 4B6DE7BB213DBE0800A426B8 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6DE7B7213DBE0800A426B8 /* main.cpp */; }; + 4B6DE7C0213DCC1400A426B8 /* wxrelease.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 4ABACC991B20E968001368B0 /* wxrelease.xcconfig */; }; + 4B6DE7C1213DCC1600A426B8 /* wxdebug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 4ABACC981B20E968001368B0 /* wxdebug.xcconfig */; }; + 4B6DE7C2213DCC1900A426B8 /* wxcocoa.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 4ABACC971B20E968001368B0 /* wxcocoa.xcconfig */; }; + 4B6DE7C3213DCCA200A426B8 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E3501B236F21003294C2 /* base64.cpp */; }; + 4B80C58F213F2CEF0093D201 /* ODTHelpBrowser.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B6DE79D213DACFA00A426B8 /* ODTHelpBrowser.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 4B80C593213FAE710093D201 /* Documentation (en_GB).fodt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B80C592213FAE640093D201 /* Documentation (en_GB).fodt */; }; 4BA8B3921F63CE7D00065071 /* XABPriorityCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BA8B38F1F63CA8A00065071 /* XABPriorityCtrl.cpp */; }; 4BF08A2F1EF6D838004CDF65 /* SFML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BF08A291EF6D647004CDF65 /* SFML.framework */; }; 4BF08A301EF6D83A004CDF65 /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BF08A281EF6D647004CDF65 /* sfml-system.framework */; }; @@ -180,6 +192,17 @@ name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; }; + 4B80C58D213F27B90093D201 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + 4B80C58F213F2CEF0093D201 /* ODTHelpBrowser.app in CopyFiles */, + 4B80C593213FAE710093D201 /* Documentation (en_GB).fodt in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -363,6 +386,19 @@ 4ABACCA11B20ECA8001368B0 /* Xestia Address Book.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Xestia Address Book.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 4ADDA7F41B222936007AD131 /* main.cpp */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../source/main.cpp; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4AE752791B24F8B90058ECBE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 4B6DE79D213DACFA00A426B8 /* ODTHelpBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ODTHelpBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4B6DE7A7213DACFB00A426B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4B6DE7AA213DACFB00A426B8 /* ODTHelpBrowser.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ODTHelpBrowser.entitlements; sourceTree = ""; }; + 4B6DE7AE213DAEF200A426B8 /* Xestia Address Book.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Xestia Address Book.entitlements"; sourceTree = ""; }; + 4B6DE7B4213DBE0800A426B8 /* frmMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = frmMain.cpp; path = ../../source/tools/odthelpbrowser/frmMain.cpp; sourceTree = ""; }; + 4B6DE7B5213DBE0800A426B8 /* odt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = odt.cpp; path = ../../source/tools/odthelpbrowser/odt.cpp; sourceTree = ""; }; + 4B6DE7B6213DBE0800A426B8 /* ODTHelpBrowser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ODTHelpBrowser.cpp; path = ../../source/tools/odthelpbrowser/ODTHelpBrowser.cpp; sourceTree = ""; }; + 4B6DE7B7213DBE0800A426B8 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../source/tools/odthelpbrowser/main.cpp; sourceTree = ""; }; + 4B6DE7BC213DBE1B00A426B8 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = version.h; path = ../../source/tools/odthelpbrowser/version.h; sourceTree = ""; }; + 4B6DE7BD213DBE1C00A426B8 /* ODTHelpBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ODTHelpBrowser.h; path = ../../source/tools/odthelpbrowser/ODTHelpBrowser.h; sourceTree = ""; }; + 4B6DE7BE213DBE1C00A426B8 /* frmMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = frmMain.h; path = ../../source/tools/odthelpbrowser/frmMain.h; sourceTree = ""; }; + 4B6DE7BF213DBE1C00A426B8 /* odt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = odt.h; path = ../../source/tools/odthelpbrowser/odt.h; sourceTree = ""; }; + 4B80C592213FAE640093D201 /* Documentation (en_GB).fodt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = "Documentation (en_GB).fodt"; path = "../../docs/Documentation (en_GB).fodt"; sourceTree = ""; }; 4BA8B38F1F63CA8A00065071 /* XABPriorityCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XABPriorityCtrl.cpp; path = ../../source/widgets/XABPriorityCtrl.cpp; sourceTree = ""; }; 4BA8B3901F63CA8A00065071 /* XABPriorityCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XABPriorityCtrl.h; path = ../../source/widgets/XABPriorityCtrl.h; sourceTree = ""; }; 4BF08A271EF6D647004CDF65 /* sfml-audio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "sfml-audio.framework"; path = "../../../../Libraries/sfml-audio.framework"; sourceTree = ""; }; @@ -405,6 +441,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4B6DE79A213DACFA00A426B8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B6DE7B1213DB7DF00A426B8 /* libwx_osx_cocoau-3.0.0.3.0.dylib in Frameworks */, + 4B6DE7B2213DB7E100A426B8 /* libxml2.2.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -471,6 +516,7 @@ 4A83E3201B236D46003294C2 /* src */ = { isa = PBXGroup; children = ( + 4B6DE7B3213DBA8000A426B8 /* odthelpbrowser */, 4A6DA3431CAC047600A15B3D /* actmgr */, 4A83E3CB1B2370CE003294C2 /* search */, 4A83E34B1B236E01003294C2 /* carddav2 */, @@ -708,8 +754,10 @@ 4ABACC601B20E7AE001368B0 = { isa = PBXGroup; children = ( + 4B6DE7AE213DAEF200A426B8 /* Xestia Address Book.entitlements */, 4A6DA3F21CB04F9400A15B3D /* Frameworks & Libraries */, 4AE752791B24F8B90058ECBE /* Images.xcassets */, + 4B80C591213FAE560093D201 /* docs */, 4A83E3201B236D46003294C2 /* src */, 4ABACC971B20E968001368B0 /* wxcocoa.xcconfig */, 4ABACC981B20E968001368B0 /* wxdebug.xcconfig */, @@ -717,7 +765,41 @@ 4ABACC9A1B20E968001368B0 /* Info_cocoa.plist */, 4ABACCA11B20ECA8001368B0 /* Xestia Address Book.app */, 4A6DA3E21CAC0B3E00A15B3D /* bitmaphelper */, + 4B6DE79D213DACFA00A426B8 /* ODTHelpBrowser.app */, + 4B6DE79E213DACFB00A426B8 /* ODTHelpBrowser */, + ); + sourceTree = ""; + }; + 4B6DE79E213DACFB00A426B8 /* ODTHelpBrowser */ = { + isa = PBXGroup; + children = ( + 4B6DE7A7213DACFB00A426B8 /* Info.plist */, + 4B6DE7AA213DACFB00A426B8 /* ODTHelpBrowser.entitlements */, ); + path = ODTHelpBrowser; + sourceTree = ""; + }; + 4B6DE7B3213DBA8000A426B8 /* odthelpbrowser */ = { + isa = PBXGroup; + children = ( + 4B6DE7BE213DBE1C00A426B8 /* frmMain.h */, + 4B6DE7BF213DBE1C00A426B8 /* odt.h */, + 4B6DE7BD213DBE1C00A426B8 /* ODTHelpBrowser.h */, + 4B6DE7BC213DBE1B00A426B8 /* version.h */, + 4B6DE7B4213DBE0800A426B8 /* frmMain.cpp */, + 4B6DE7B7213DBE0800A426B8 /* main.cpp */, + 4B6DE7B5213DBE0800A426B8 /* odt.cpp */, + 4B6DE7B6213DBE0800A426B8 /* ODTHelpBrowser.cpp */, + ); + name = odthelpbrowser; + sourceTree = ""; + }; + 4B80C591213FAE560093D201 /* docs */ = { + isa = PBXGroup; + children = ( + 4B80C592213FAE640093D201 /* Documentation (en_GB).fodt */, + ); + name = docs; sourceTree = ""; }; /* End PBXGroup section */ @@ -748,6 +830,7 @@ 4ABACC661B20E7AE001368B0 /* Frameworks */, 4ABACC671B20E7AE001368B0 /* Resources */, 4ABACCA91B20F672001368B0 /* Copy Files */, + 4B80C58D213F27B90093D201 /* CopyFiles */, ); buildRules = ( ); @@ -759,6 +842,23 @@ productReference = 4ABACCA11B20ECA8001368B0 /* Xestia Address Book.app */; productType = "com.apple.product-type.application"; }; + 4B6DE79C213DACFA00A426B8 /* ODTHelpBrowser */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4B6DE7AB213DACFB00A426B8 /* Build configuration list for PBXNativeTarget "ODTHelpBrowser" */; + buildPhases = ( + 4B6DE799213DACFA00A426B8 /* Sources */, + 4B6DE79A213DACFA00A426B8 /* Frameworks */, + 4B6DE79B213DACFA00A426B8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ODTHelpBrowser; + productName = ODTHelpBrowser; + productReference = 4B6DE79D213DACFA00A426B8 /* ODTHelpBrowser.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -778,6 +878,18 @@ com.apple.ApplicationGroups.Mac = { enabled = 0; }; + com.apple.Sandbox = { + enabled = 0; + }; + }; + }; + 4B6DE79C213DACFA00A426B8 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 0; + }; }; }; }; @@ -797,6 +909,7 @@ targets = ( 4A6DA3E11CAC0B3E00A15B3D /* bitmaphelper */, 4ABACC681B20E7AE001368B0 /* XestiaAddressBook */, + 4B6DE79C213DACFA00A426B8 /* ODTHelpBrowser */, ); }; /* End PBXProject section */ @@ -814,6 +927,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4B6DE79B213DACFA00A426B8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B6DE7C0213DCC1400A426B8 /* wxrelease.xcconfig in Resources */, + 4B6DE7C1213DCC1600A426B8 /* wxdebug.xcconfig in Resources */, + 4B6DE7C2213DCC1900A426B8 /* wxcocoa.xcconfig in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -930,6 +1053,18 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4B6DE799213DACFA00A426B8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B6DE7BB213DBE0800A426B8 /* main.cpp in Sources */, + 4B6DE7B8213DBE0800A426B8 /* frmMain.cpp in Sources */, + 4B6DE7BA213DBE0800A426B8 /* ODTHelpBrowser.cpp in Sources */, + 4B6DE7C3213DCCA200A426B8 /* base64.cpp in Sources */, + 4B6DE7B9213DBE0800A426B8 /* odt.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1117,7 +1252,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; - CODE_SIGN_ENTITLEMENTS = ""; COMBINE_HIDPI_IMAGES = YES; CURL_FRAMEWORKPATH = "/Users/kiri/Build/curl-7.53.1/"; FRAMEWORK_SEARCH_PATHS = ( @@ -1158,7 +1292,7 @@ "$(LIBXML2_PATH)/.libs", ); LIBXML2_PATH = "/Users/kiri/Build/libxml2-2.9.4"; - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.10; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-x", @@ -1199,7 +1333,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; - CODE_SIGN_ENTITLEMENTS = ""; COMBINE_HIDPI_IMAGES = YES; CURL_FRAMEWORKPATH = "/Users/kiri/Build/curl-7.53.1/"; FRAMEWORK_SEARCH_PATHS = ( @@ -1240,7 +1373,7 @@ "$(LIBXML2_PATH)/.libs", ); LIBXML2_PATH = "/Users/kiri/Build/libxml2-2.9.4"; - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.10; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-x", @@ -1272,6 +1405,136 @@ }; name = Release; }; + 4B6DE7AC213DACFB00A426B8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = NO; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = NO; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = NO; + CLANG_WARN_COMMA = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_INFINITE_RECURSION = NO; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = NO; + CLANG_WARN_RANGE_LOOP_ANALYSIS = NO; + CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_SUSPICIOUS_MOVE = NO; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREFIX_HEADER = "$(WXROOT)/include/wx/wxprec.h"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(WX_PREPROCESSOR_DEFINITIONS)", + WXBUILDING, + "$(WXPLATFORM)", + __WX__, + "wxUSE_BASE=1", + "_FILE_OFFSET_BITS=64", + _LARGE_FILES, + MACOS_CLASSIC, + "__WXMAC_XCODE__=1", + SCI_LEXER, + "WX_PRECOMP=1", + "wxUSE_UNICODE_UTF8=0", + "wxUSE_UNICODE_WCHAR=1", + ); + HEADER_SEARCH_PATHS = ( + "$(WXROOT)/include", + "$(WXROOT)/build/osx/setup/cocoa/include", + "$(WXROOT)/samples/minimal", + "$(LIBXML2_PATH)/include/", + "$(inherited)", + ); + INFOPLIST_FILE = ODTHelpBrowser/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(WXROOT)/lib", + "$(LIBXML2_PATH)/.libs", + ); + LIBXML2_PATH = "/Users/kiri/Build/libxml2-2.9.4"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-x", + "objective-c++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "uk.co.xestia.Xestia-Address-Book.ODTHelpBrowser"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WXPLATFORM = __WXOSX_COCOA__; + WXROOT = "/Users/kiri/Build/wxWidgets-3.0.3"; + }; + name = Debug; + }; + 4B6DE7AD213DACFB00A426B8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = NO; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = NO; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = NO; + CLANG_WARN_COMMA = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_INFINITE_RECURSION = NO; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = NO; + CLANG_WARN_RANGE_LOOP_ANALYSIS = NO; + CLANG_WARN_STRICT_PROTOTYPES = NO; + CLANG_WARN_SUSPICIOUS_MOVE = NO; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREFIX_HEADER = "$(WXROOT)/include/wx/wxprec.h"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(WX_PREPROCESSOR_DEFINITIONS)", + WXBUILDING, + "$(WXPLATFORM)", + __WX__, + "wxUSE_BASE=1", + "_FILE_OFFSET_BITS=64", + _LARGE_FILES, + MACOS_CLASSIC, + "__WXMAC_XCODE__=1", + SCI_LEXER, + "WX_PRECOMP=1", + "wxUSE_UNICODE_UTF8=0", + "wxUSE_UNICODE_WCHAR=1", + ); + HEADER_SEARCH_PATHS = ( + "$(WXROOT)/include", + "$(WXROOT)/build/osx/setup/cocoa/include", + "$(WXROOT)/samples/minimal", + "$(LIBXML2_PATH)/include/", + "$(inherited)", + ); + INFOPLIST_FILE = ODTHelpBrowser/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(WXROOT)/lib", + "$(LIBXML2_PATH)/.libs", + ); + LIBXML2_PATH = "/Users/kiri/Build/libxml2-2.9.4"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-x", + "objective-c++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "uk.co.xestia.Xestia-Address-Book.ODTHelpBrowser"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WXPLATFORM = __WXOSX_COCOA__; + WXROOT = "/Users/kiri/Build/wxWidgets-3.0.3"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1302,6 +1565,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 4B6DE7AB213DACFB00A426B8 /* Build configuration list for PBXNativeTarget "ODTHelpBrowser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4B6DE7AC213DACFB00A426B8 /* Debug */, + 4B6DE7AD213DACFB00A426B8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 4ABACC611B20E7AE001368B0 /* Project object */; diff --git a/source/Makefile.in b/source/Makefile.in index 85a7438..2f0063c 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -154,7 +154,7 @@ odthelpbrowser: odthelpbrowserobjs install-docs: #TODO: Add @PREFIX@ for docs, xestiaab and man page $(MKDIR) @DATAROOTDIR@/doc/xestiaab/ - cp "../docs/Documentation (en-GB).fodt" @DATAROOTDIR@/doc/xestiaab/en_GB.fodt + cp "../docs/Documentation (en_GB).fodt" @DATAROOTDIR@/doc/xestiaab/en_GB.fodt install: install-docs cp $(XAB_OUT) @BINDIR@/$(XAB_OUT) diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 77b34bd..f09456c 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -407,6 +407,10 @@ void frmMain::QuitApp() SetFilename.Append(wxT("settings")); +#elif defined(__APPLE__) + + TerminateHelpBrowserProcess(); + #else // *nix OSes @@ -3127,7 +3131,10 @@ void frmMain::ShowHelp( wxCommandEvent& event ){ #if defined(__HAIKU__) #elif defined(__WIN32__) - + +#elif defined(__APPLE__) + DisplayHelpBrowser(); + return; #else // Get the LANG environment variable diff --git a/source/frmMain.h b/source/frmMain.h index 657cfc9..dcc18bb 100644 --- a/source/frmMain.h +++ b/source/frmMain.h @@ -125,6 +125,7 @@ class frmMain : public frmMainADT std::map AccountAccDirList; #if defined(__APPLE__) std::map AccountTrustData; + NSRunningApplication *helpBrowserProcess; #elif defined(__WIN32__) std::map AccountCertificateData; #else @@ -196,6 +197,8 @@ class frmMain : public frmMainADT #if defined(__APPLE__) void DisplayCertificate(SecTrustRef SecurityTrustObject); void DisplayTrustPanel( wxCommandEvent& event ); + void DisplayHelpBrowser(); + void TerminateHelpBrowserProcess(); #endif protected: // Handlers for frmMainADT events. diff --git a/source/frmMain.mm b/source/frmMain.mm index bb8d614..7e6b563 100644 --- a/source/frmMain.mm +++ b/source/frmMain.mm @@ -66,4 +66,38 @@ void frmMain::DisplayTrustPanel( wxCommandEvent &event ){ *SSLITNObj->ResultValue = (int)ResultValue; *SSLITNObj->PausePtr = FALSE; -} \ No newline at end of file +} + +void frmMain::DisplayHelpBrowser() +{ + /* Replace with modern API when deployment target is 10.13+ in the future */ + + /* Replace with NSWorkspace */ + + NSString *language = [[NSLocale currentLocale] localeIdentifier]; + NSString *documentationFilename = [NSString stringWithFormat:@"Documentation (%@)", language]; + NSString *helpBrowserDocumentationPath = [[NSBundle mainBundle] pathForResource:documentationFilename ofType:@"fodt"]; + + if (helpBrowserDocumentationPath == nil) + { + helpBrowserDocumentationPath = [[NSBundle mainBundle] pathForResource:@"Documentation (en_GB)" ofType:@"fodt"]; + } + + NSURL *helpBrowserExecutableURL = [[NSBundle mainBundle] URLForResource:@"ODTHelpBrowser" withExtension:@"app"]; + + NSArray *args = [NSArray arrayWithObjects:@"-d", helpBrowserDocumentationPath, nil]; + NSDictionary *helpBrowserArguments = [NSDictionary dictionaryWithObject:args + forKey:NSWorkspaceLaunchConfigurationArguments]; + + helpBrowserProcess = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:helpBrowserExecutableURL options:NSWorkspaceLaunchAndHide configuration:helpBrowserArguments error: nil]; + + [helpBrowserProcess activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)]; +} + +void frmMain::TerminateHelpBrowserProcess() +{ + if (helpBrowserProcess != nil) + { + [helpBrowserProcess terminate]; + } +} diff --git a/source/tools/odthelpbrowser/frmMain.cpp b/source/tools/odthelpbrowser/frmMain.cpp index f1048e5..d4dfded 100644 --- a/source/tools/odthelpbrowser/frmMain.cpp +++ b/source/tools/odthelpbrowser/frmMain.cpp @@ -18,7 +18,6 @@ frmMainADT( parent ) { wxTreeItemId rootItem = treHelpTopics->AddRoot("Xestia Address Book", -1, -1, nullptr); - wxTreeItemId parentItem = rootItem; wxTreeItemId previousItem; wxTreeItemId lastItemAtLevel[9]; -- 2.39.5