diff --git a/.travis.yml b/.travis.yml index d36ca19811..6216911dde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -194,6 +194,14 @@ jobs: - TID=SPM Package in Xcode Project script: make test_install_SPM_Project + # Custom SQLite Install + - stage: Test Installation Xcode 11 + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode11 + env: + - TID=Custom SQLite + script: make test_install_customSQLite + ########################################### ## Test GRDB Xcode 10.3 @@ -417,3 +425,11 @@ jobs: env: - TID=CocoaPods GRDB (static) script: make test_install_GRDB_CocoaPods_static + + # Custom SQLite Install + - stage: Test Installation Xcode 10 + gemfile: .ci/gemfiles/Gemfile.travis + osx_image: xcode10 + env: + - TID=Custom SQLite + script: make test_install_customSQLite diff --git a/CHANGELOG.md b/CHANGELOG.md index 0da75bbbab..64f7beb82f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one expection: **Fixed** - The `DatabaseMigrator.eraseDatabaseOnSchemaChange` option no longer fails when migrations depend on database configuration. +- [#631](https://github.com/groue/GRDB.swift/pull/631): Fix custom SQLite builds **New** diff --git a/Documentation/CustomSQLiteBuilds.md b/Documentation/CustomSQLiteBuilds.md index 2d79913816..8fdb658f0c 100644 --- a/Documentation/CustomSQLiteBuilds.md +++ b/Documentation/CustomSQLiteBuilds.md @@ -120,6 +120,8 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal ``` The path should be the path to your `GRDBCustomSQLite-INSTALL.sh` file. + + Select your application target in the "Provide build settings from" menu. 9. Check the "Shared" checkbox of your application scheme (this lets you commit the pre-action in your Version Control System). diff --git a/GRDBCustom.xcodeproj/project.pbxproj b/GRDBCustom.xcodeproj/project.pbxproj index cfff7548f2..94d76d6cb3 100755 --- a/GRDBCustom.xcodeproj/project.pbxproj +++ b/GRDBCustom.xcodeproj/project.pbxproj @@ -1978,7 +1978,7 @@ }; F3BA80591CFB2BB2003DC1BA = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1020; + LastSwiftMigration = 1110; }; F3BA809A1CFB2F6F003DC1BA = { CreatedOnToolsVersion = 7.3.1; diff --git a/GRDBCustom.xcodeproj/xcshareddata/xcschemes/GRDBCustomSQLiteOSX.xcscheme b/GRDBCustom.xcodeproj/xcshareddata/xcschemes/GRDBCustomSQLiteOSX.xcscheme index fb8c9c1a03..3a409e2657 100644 --- a/GRDBCustom.xcodeproj/xcshareddata/xcschemes/GRDBCustomSQLiteOSX.xcscheme +++ b/GRDBCustom.xcodeproj/xcshareddata/xcschemes/GRDBCustomSQLiteOSX.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> + + + + @@ -54,17 +63,6 @@ - - - - - - - - + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> + + + + @@ -54,17 +63,6 @@ - - - - - - - - #endif #else - #if defined(GRDBCUSTOMSQLITE) - #include - #else + #if !defined(GRDBCUSTOMSQLITE) #include #endif #endif diff --git a/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.pbxproj b/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..22267b7482 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.pbxproj @@ -0,0 +1,454 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 56F5F6C62349F11E00C4D9F7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56F5F6C52349F11E00C4D9F7 /* AppDelegate.swift */; }; + 56F5F6C82349F11E00C4D9F7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56F5F6C72349F11E00C4D9F7 /* ViewController.swift */; }; + 56F5F6CA2349F11F00C4D9F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56F5F6C92349F11F00C4D9F7 /* Assets.xcassets */; }; + 56F5F6CD2349F11F00C4D9F7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56F5F6CB2349F11F00C4D9F7 /* Main.storyboard */; }; + 56F5F6E82349F26400C4D9F7 /* GRDBCustomSQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56F5F6DE2349F22A00C4D9F7 /* GRDBCustomSQLite.framework */; }; + 56F5F6E92349F26500C4D9F7 /* GRDBCustomSQLite.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 56F5F6DE2349F22A00C4D9F7 /* GRDBCustomSQLite.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 56F5F6DD2349F22A00C4D9F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F3BA805A1CFB2BB2003DC1BA; + remoteInfo = GRDBCustomSQLiteOSX; + }; + 56F5F6DF2349F22A00C4D9F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F3BA809B1CFB2F6F003DC1BA; + remoteInfo = GRDBCustomSQLiteOSXTests; + }; + 56F5F6E12349F22A00C4D9F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F3BA7FFE1CFB25E4003DC1BA; + remoteInfo = GRDBCustomSQLiteiOS; + }; + 56F5F6E32349F22A00C4D9F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F3BA80411CFB2AD7003DC1BA; + remoteInfo = GRDBCustomSQLiteiOSTests; + }; + 56F5F6E52349F24D00C4D9F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = F3BA80591CFB2BB2003DC1BA; + remoteInfo = GRDBCustomSQLiteOSX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 56F5F6EA2349F26500C4D9F7 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 56F5F6E92349F26500C4D9F7 /* GRDBCustomSQLite.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 56F5F6C22349F11E00C4D9F7 /* CustomSQLite.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CustomSQLite.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 56F5F6C52349F11E00C4D9F7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 56F5F6C72349F11E00C4D9F7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 56F5F6C92349F11F00C4D9F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 56F5F6CC2349F11F00C4D9F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 56F5F6CE2349F11F00C4D9F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 56F5F6CF2349F11F00C4D9F7 /* CustomSQLite.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CustomSQLite.entitlements; sourceTree = ""; }; + 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GRDBCustom.xcodeproj; path = ../../GRDBCustom.xcodeproj; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 56F5F6BF2349F11E00C4D9F7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 56F5F6E82349F26400C4D9F7 /* GRDBCustomSQLite.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 56F5F6B92349F11E00C4D9F7 = { + isa = PBXGroup; + children = ( + 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */, + 56F5F6C42349F11E00C4D9F7 /* CustomSQLite */, + 56F5F6C32349F11E00C4D9F7 /* Products */, + 56F5F6E72349F26400C4D9F7 /* Frameworks */, + ); + sourceTree = ""; + }; + 56F5F6C32349F11E00C4D9F7 /* Products */ = { + isa = PBXGroup; + children = ( + 56F5F6C22349F11E00C4D9F7 /* CustomSQLite.app */, + ); + name = Products; + sourceTree = ""; + }; + 56F5F6C42349F11E00C4D9F7 /* CustomSQLite */ = { + isa = PBXGroup; + children = ( + 56F5F6C52349F11E00C4D9F7 /* AppDelegate.swift */, + 56F5F6C72349F11E00C4D9F7 /* ViewController.swift */, + 56F5F6C92349F11F00C4D9F7 /* Assets.xcassets */, + 56F5F6CB2349F11F00C4D9F7 /* Main.storyboard */, + 56F5F6CE2349F11F00C4D9F7 /* Info.plist */, + 56F5F6CF2349F11F00C4D9F7 /* CustomSQLite.entitlements */, + ); + path = CustomSQLite; + sourceTree = ""; + }; + 56F5F6D62349F22A00C4D9F7 /* Products */ = { + isa = PBXGroup; + children = ( + 56F5F6DE2349F22A00C4D9F7 /* GRDBCustomSQLite.framework */, + 56F5F6E02349F22A00C4D9F7 /* GRDBCustomSQLiteOSXTests.xctest */, + 56F5F6E22349F22A00C4D9F7 /* GRDBCustomSQLite.framework */, + 56F5F6E42349F22A00C4D9F7 /* GRDBCustomSQLiteiOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 56F5F6E72349F26400C4D9F7 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 56F5F6C12349F11E00C4D9F7 /* CustomSQLite */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56F5F6D22349F11F00C4D9F7 /* Build configuration list for PBXNativeTarget "CustomSQLite" */; + buildPhases = ( + 56F5F6BE2349F11E00C4D9F7 /* Sources */, + 56F5F6BF2349F11E00C4D9F7 /* Frameworks */, + 56F5F6C02349F11E00C4D9F7 /* Resources */, + 56F5F6EA2349F26500C4D9F7 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 56F5F6E62349F24D00C4D9F7 /* PBXTargetDependency */, + ); + name = CustomSQLite; + productName = CustomSQLite; + productReference = 56F5F6C22349F11E00C4D9F7 /* CustomSQLite.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 56F5F6BA2349F11E00C4D9F7 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1110; + LastUpgradeCheck = 1110; + ORGANIZATIONNAME = "Gwendal Roué"; + TargetAttributes = { + 56F5F6C12349F11E00C4D9F7 = { + CreatedOnToolsVersion = 11.1; + LastSwiftMigration = 1110; + }; + }; + }; + buildConfigurationList = 56F5F6BD2349F11E00C4D9F7 /* Build configuration list for PBXProject "CustomSQLite" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 56F5F6B92349F11E00C4D9F7; + productRefGroup = 56F5F6C32349F11E00C4D9F7 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 56F5F6D62349F22A00C4D9F7 /* Products */; + ProjectRef = 56F5F6D52349F22A00C4D9F7 /* GRDBCustom.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 56F5F6C12349F11E00C4D9F7 /* CustomSQLite */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 56F5F6DE2349F22A00C4D9F7 /* GRDBCustomSQLite.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GRDBCustomSQLite.framework; + remoteRef = 56F5F6DD2349F22A00C4D9F7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 56F5F6E02349F22A00C4D9F7 /* GRDBCustomSQLiteOSXTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GRDBCustomSQLiteOSXTests.xctest; + remoteRef = 56F5F6DF2349F22A00C4D9F7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 56F5F6E22349F22A00C4D9F7 /* GRDBCustomSQLite.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GRDBCustomSQLite.framework; + remoteRef = 56F5F6E12349F22A00C4D9F7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 56F5F6E42349F22A00C4D9F7 /* GRDBCustomSQLiteiOSTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GRDBCustomSQLiteiOSTests.xctest; + remoteRef = 56F5F6E32349F22A00C4D9F7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 56F5F6C02349F11E00C4D9F7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56F5F6CA2349F11F00C4D9F7 /* Assets.xcassets in Resources */, + 56F5F6CD2349F11F00C4D9F7 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 56F5F6BE2349F11E00C4D9F7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56F5F6C82349F11E00C4D9F7 /* ViewController.swift in Sources */, + 56F5F6C62349F11E00C4D9F7 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 56F5F6E62349F24D00C4D9F7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GRDBCustomSQLiteOSX; + targetProxy = 56F5F6E52349F24D00C4D9F7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 56F5F6CB2349F11F00C4D9F7 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 56F5F6CC2349F11F00C4D9F7 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 56F5F6D02349F11F00C4D9F7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 56F5F6D12349F11F00C4D9F7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 56F5F6D32349F11F00C4D9F7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = CustomSQLite/CustomSQLite.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = CustomSQLite/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.CustomSQLite; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + 56F5F6D42349F11F00C4D9F7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = CustomSQLite/CustomSQLite.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = CustomSQLite/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.CustomSQLite; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 56F5F6BD2349F11E00C4D9F7 /* Build configuration list for PBXProject "CustomSQLite" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56F5F6D02349F11F00C4D9F7 /* Debug */, + 56F5F6D12349F11F00C4D9F7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56F5F6D22349F11F00C4D9F7 /* Build configuration list for PBXNativeTarget "CustomSQLite" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56F5F6D32349F11F00C4D9F7 /* Debug */, + 56F5F6D42349F11F00C4D9F7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 56F5F6BA2349F11E00C4D9F7 /* Project object */; +} diff --git a/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..8e5a412b4c --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/CustomSQLite/CustomSQLite.xcodeproj/xcshareddata/xcschemes/CustomSQLite.xcscheme b/Tests/CustomSQLite/CustomSQLite.xcodeproj/xcshareddata/xcschemes/CustomSQLite.xcscheme new file mode 100644 index 0000000000..440df0bfc4 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite.xcodeproj/xcshareddata/xcschemes/CustomSQLite.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/CustomSQLite/CustomSQLite/AppDelegate.swift b/Tests/CustomSQLite/CustomSQLite/AppDelegate.swift new file mode 100644 index 0000000000..cf46e39add --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/AppDelegate.swift @@ -0,0 +1,11 @@ +import Cocoa +import GRDBCustomSQLite + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + func applicationDidFinishLaunching(_ aNotification: Notification) { + _ = DatabaseQueue() + _ = FTS5() + _ = sqlite3_preupdate_new(nil, 0, nil) + } +} diff --git a/Tests/CustomSQLite/CustomSQLite/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/CustomSQLite/CustomSQLite/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..2db2b1c7c6 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/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/Tests/CustomSQLite/CustomSQLite/Assets.xcassets/Contents.json b/Tests/CustomSQLite/CustomSQLite/Assets.xcassets/Contents.json new file mode 100644 index 0000000000..da4a164c91 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Tests/CustomSQLite/CustomSQLite/Base.lproj/Main.storyboard b/Tests/CustomSQLite/CustomSQLite/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..0876e47c14 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/Base.lproj/Main.storyboard @@ -0,0 +1,717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/CustomSQLite/CustomSQLite/CustomSQLite.entitlements b/Tests/CustomSQLite/CustomSQLite/CustomSQLite.entitlements new file mode 100644 index 0000000000..f2ef3ae026 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/CustomSQLite.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/Tests/CustomSQLite/CustomSQLite/Info.plist b/Tests/CustomSQLite/CustomSQLite/Info.plist new file mode 100644 index 0000000000..6f85d07ad7 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2019 Gwendal Roué. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + NSSupportsAutomaticTermination + + NSSupportsSuddenTermination + + + diff --git a/Tests/CustomSQLite/CustomSQLite/ViewController.swift b/Tests/CustomSQLite/CustomSQLite/ViewController.swift new file mode 100644 index 0000000000..d44c61bd12 --- /dev/null +++ b/Tests/CustomSQLite/CustomSQLite/ViewController.swift @@ -0,0 +1,3 @@ +import Cocoa + +class ViewController: NSViewController { } diff --git a/Tests/CustomSQLite/GRDB b/Tests/CustomSQLite/GRDB new file mode 120000 index 0000000000..c25bddb6dd --- /dev/null +++ b/Tests/CustomSQLite/GRDB @@ -0,0 +1 @@ +../.. \ No newline at end of file diff --git a/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-INSTALL.sh b/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-INSTALL.sh new file mode 100644 index 0000000000..eee74614a4 --- /dev/null +++ b/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-INSTALL.sh @@ -0,0 +1,43 @@ +# The path to the folder containing GRDBCustom.xcodeproj: +GRDB_SOURCE_PATH="${PROJECT_DIR}/GRDB" + +# The path to your custom "SQLiteLib-USER.xcconfig": +SQLITELIB_XCCONFIG_USER_PATH="${PROJECT_DIR}/GRDBCustomSQLite/SQLiteLib-USER.xcconfig" + +# The path to your custom "GRDBCustomSQLite-USER.xcconfig": +CUSTOMSQLITE_XCCONFIG_USER_PATH="${PROJECT_DIR}/GRDBCustomSQLite/GRDBCustomSQLite-USER.xcconfig" + +# The path to your custom "GRDBCustomSQLite-USER.h": +CUSTOMSQLITE_H_USER_PATH="${PROJECT_DIR}/GRDBCustomSQLite/GRDBCustomSQLite-USER.h" + +####################################################### +# +####################################################### + + +if [ ! -d "$GRDB_SOURCE_PATH" ]; +then +echo "error: Path to GRDB source (GRDB_SOURCE_PATH) missing/incorrect: $GRDB_SOURCE_PATH" +exit 1 +fi + +SyncFileChanges () { + SOURCE=$1 + DESTINATIONPATH=$2 + DESTINATIONFILENAME=$3 + DESTINATION="${DESTINATIONPATH}/${DESTINATIONFILENAME}" + + if [ ! -f "$SOURCE" ]; + then + echo "error: Source file missing: $SOURCE" + exit 1 + fi + + rsync -a "$SOURCE" "$DESTINATION" +} + +SyncFileChanges $SQLITELIB_XCCONFIG_USER_PATH "${GRDB_SOURCE_PATH}/SQLiteCustom/src" "SQLiteLib-USER.xcconfig" +SyncFileChanges $CUSTOMSQLITE_XCCONFIG_USER_PATH "${GRDB_SOURCE_PATH}/SQLiteCustom" "GRDBCustomSQLite-USER.xcconfig" +SyncFileChanges $CUSTOMSQLITE_H_USER_PATH "${GRDB_SOURCE_PATH}/SQLiteCustom" "GRDBCustomSQLite-USER.h" + +echo "Finished syncing" diff --git a/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-USER.h b/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-USER.h new file mode 100644 index 0000000000..65fbe42c35 --- /dev/null +++ b/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-USER.h @@ -0,0 +1,2 @@ +#define SQLITE_ENABLE_FTS5 +#define SQLITE_ENABLE_PREUPDATE_HOOK diff --git a/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-USER.xcconfig b/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-USER.xcconfig new file mode 100644 index 0000000000..3b5c52ca37 --- /dev/null +++ b/Tests/CustomSQLite/GRDBCustomSQLite/GRDBCustomSQLite-USER.xcconfig @@ -0,0 +1 @@ +CUSTOM_OTHER_SWIFT_FLAGS = -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK diff --git a/Tests/CustomSQLite/GRDBCustomSQLite/SQLiteLib-USER.xcconfig b/Tests/CustomSQLite/GRDBCustomSQLite/SQLiteLib-USER.xcconfig new file mode 100644 index 0000000000..dfcfb0f11f --- /dev/null +++ b/Tests/CustomSQLite/GRDBCustomSQLite/SQLiteLib-USER.xcconfig @@ -0,0 +1 @@ +CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_PREUPDATE_HOOK