From a483f1ab75138d6f373a554c3c65c00ecb543931 Mon Sep 17 00:00:00 2001 From: swiftlyfalling Date: Mon, 30 May 2016 13:59:05 -0400 Subject: [PATCH 1/5] Update README --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e0ec9de0..420df346 100755 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ SQLiteLib ========== + Easily build a custom SQLite static library for use in OSX and iOS frameworks and apps. If you need a specific version of SQLite, or specific SQLite compilation options/features, read on. -========== + **May 29, 2016: SQLiteLib updated for SQLite 3.13.0** ([changelog](CHANGELOG.md)). @@ -15,10 +16,9 @@ If you need a specific version of SQLite, or specific SQLite compilation options ---- +========== ### Installation: - ========== #### Manual Installation (ex. into a Framework) @@ -38,12 +38,11 @@ You probably shouldn't be using the raw SQLite C API in Swift. There are a bunch For example: ([GRDB.swift](https://github.com/groue/GRDB.swift)). ---- +========== ### Customization: By default, SQLiteLib builds SQLite with options that match the built-in system version of SQLite on OSX and iOS (as of OSX 10.11.5, iOS 9.3.2), [with one exception*](#additional-details). - ========== #### Specifying Additional SQLite Compilation Options @@ -91,10 +90,9 @@ The snapshop of the complete (raw) source tree for the *current* version of SQLi You'll want the file named "sqlite-src-*version*.zip". > Do **NOT** use the file beginning with "sqlite-preprocessed" - it will not work properly. ---- +========== ### Additional Details: - ========== #### Default Compilation Options @@ -160,13 +158,13 @@ SQLiteLib generates intermediate files in [${DERIVED_SOURCES_DIR}](https://devel The generated SQLite amalgamation files are copied to: --"${BUILT_PRODUCTS_DIR}/sqlite3.c" +-`${BUILT_PRODUCTS_DIR}/sqlite3.c` --"${PROJECT_DIR}/sqlite3.h" +-`${PROJECT_DIR}/sqlite3.h` ---- +========== -#### Notes: +### Notes: ##### "sqlite3.c" shows as red/missing in Xcode From 8151c650403167505ed3e4238b3ac19530ad8d4e Mon Sep 17 00:00:00 2001 From: swiftlyfalling Date: Mon, 30 May 2016 14:01:14 -0400 Subject: [PATCH 2/5] More README fixes --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 420df346..e302f4ac 100755 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ If you need a specific version of SQLite, or specific SQLite compilation options ========== -### Installation: -========== +## Installation: #### Manual Installation (ex. into a Framework) @@ -40,9 +39,10 @@ For example: ([GRDB.swift](https://github.com/groue/GRDB.swift)). ========== -### Customization: +## Customization: By default, SQLiteLib builds SQLite with options that match the built-in system version of SQLite on OSX and iOS (as of OSX 10.11.5, iOS 9.3.2), [with one exception*](#additional-details). + ========== #### Specifying Additional SQLite Compilation Options @@ -92,8 +92,8 @@ You'll want the file named "sqlite-src-*version*.zip". ========== -### Additional Details: -========== +## Additional Details: + #### Default Compilation Options From 9321aa2de3d4312becfd0600f7672f6910b42d8e Mon Sep 17 00:00:00 2001 From: swiftlyfalling Date: Mon, 30 May 2016 14:03:06 -0400 Subject: [PATCH 3/5] More README fixes --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e302f4ac..dc933076 100755 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ If you need a specific version of SQLite, or specific SQLite compilation options That's it! (You'll probably also want to `#include "sqlite3.h"` somewhere. SQLiteLib copies this generated file to its project directory.) -========== #### Using in Swift @@ -37,13 +36,11 @@ You probably shouldn't be using the raw SQLite C API in Swift. There are a bunch For example: ([GRDB.swift](https://github.com/groue/GRDB.swift)). -========== ## Customization: By default, SQLiteLib builds SQLite with options that match the built-in system version of SQLite on OSX and iOS (as of OSX 10.11.5, iOS 9.3.2), [with one exception*](#additional-details). -========== #### Specifying Additional SQLite Compilation Options @@ -63,7 +60,6 @@ CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_PREUPDATE_HOOK That's it. There is no need to modify any other files. -========== #### Compiling a Specific Version of SQLite @@ -82,15 +78,14 @@ If you'd like to compile a newer (or older) version, the process is simple: > Setting compilation options using the SQLite amalgamation is not guaranteed to work: > > The versions of the SQLite amalgamation that are supplied on the download page are normally adequate for most users. However, some projects may want or need to build their own amalgamations. A common reason for building a custom amalgamation is in order to use certain compile-time options to customize the SQLite library. Recall that the SQLite amalgamation contains a lot of C-code that is generated by auxiliary programs and scripts. Many of the compile-time options effect this generated code and **must be supplied to the code generators before the amalgamation is assembled**. -========== -**Quick Guide to Using the Latest version of SQLite**: +####**Quick Guide to Using the Latest version of SQLite**: The snapshop of the complete (raw) source tree for the *current* version of SQLite is available on the ([SQLite Download Page](https://www.sqlite.org/download.html#old)) under: **Alternative Source Code Formats**. You'll want the file named "sqlite-src-*version*.zip". > Do **NOT** use the file beginning with "sqlite-preprocessed" - it will not work properly. -========== + ## Additional Details: @@ -150,7 +145,7 @@ To prevent this warning, SQLiteLib separately specifies `-Wno-#warnings` when bu All of these base settings are configured in the SQLiteLib.xcconfig file. It is strongly recommended that you do not edit this file. If you'd like to specify additional compilation options, see [the instructions above](#specifying-additional-sqlite-compilation-options) -========== + #### Build Locations @@ -162,9 +157,9 @@ The generated SQLite amalgamation files are copied to: -`${PROJECT_DIR}/sqlite3.h` -========== -### Notes: + +## Notes: ##### "sqlite3.c" shows as red/missing in Xcode From cdbb43b3f739770971d18476cb3dba9f0b8b0359 Mon Sep 17 00:00:00 2001 From: swiftlyfalling Date: Mon, 30 May 2016 14:04:21 -0400 Subject: [PATCH 4/5] More README formatting fixes --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dc933076..583497dc 100755 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ If you need a specific version of SQLite, or specific SQLite compilation options ## Installation: -#### Manual Installation (ex. into a Framework) +#### Manual Installation (ex. into a Framework): 1. Download a copy of SQLiteLib. 2. Embed the `SQLiteLib.xcodeproj` project in your own project. @@ -30,7 +30,7 @@ If you need a specific version of SQLite, or specific SQLite compilation options That's it! (You'll probably also want to `#include "sqlite3.h"` somewhere. SQLiteLib copies this generated file to its project directory.) -#### Using in Swift +#### Using in Swift: You probably shouldn't be using the raw SQLite C API in Swift. There are a bunch of great libraries available that wrap it. @@ -42,7 +42,7 @@ For example: ([GRDB.swift](https://github.com/groue/GRDB.swift)). By default, SQLiteLib builds SQLite with options that match the built-in system version of SQLite on OSX and iOS (as of OSX 10.11.5, iOS 9.3.2), [with one exception*](#additional-details). -#### Specifying Additional SQLite Compilation Options +#### Specifying Additional SQLite Compilation Options: > By default, SQLiteLib compiles SQLite with options that match the built-in OSX/iOS version of SQLite (as of OSX 10.11, iOS 9.3.2), with one exception*. > You only need to follow the steps below if you wish to customize the options. @@ -61,7 +61,7 @@ That's it. There is no need to modify any other files. -#### Compiling a Specific Version of SQLite +#### Compiling a Specific Version of SQLite: SQLiteLib currently ships with the source for SQLite 3.13.0. @@ -90,7 +90,7 @@ You'll want the file named "sqlite-src-*version*.zip". ## Additional Details: -#### Default Compilation Options +#### Default Compilation Options: The built-in OSX/iOS version of SQLite were built with the following compilation options (as of OSX 10.11.5, iOS 9.3.2): @@ -147,7 +147,7 @@ It is strongly recommended that you do not edit this file. If you'd like to spec -#### Build Locations +#### Build Locations: SQLiteLib generates intermediate files in [${DERIVED_SOURCES_DIR}](https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW43). @@ -161,7 +161,7 @@ The generated SQLite amalgamation files are copied to: ## Notes: -##### "sqlite3.c" shows as red/missing in Xcode +##### "sqlite3.c" shows as red/missing in Xcode: Xcode (verified in Version 7.3.1 (7D1014)) will always show "sqlite3.c" as red/missing, even after a build. From cd09b6a00aabc0a7f5cdb39b3fd237719aaf602f Mon Sep 17 00:00:00 2001 From: swiftlyfalling Date: Mon, 30 May 2016 14:06:37 -0400 Subject: [PATCH 5/5] More README formatting fixes --- README.md | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 583497dc..d80f0a65 100755 --- a/README.md +++ b/README.md @@ -97,31 +97,31 @@ The built-in OSX/iOS version of SQLite were built with the following compilation > Fetched using `PRAGMA compile_options;` - MacOSX (10.11.5) - - ENABLE_API_ARMOR - - ENABLE_FTS3 - - ENABLE_FTS3_PARENTHESIS - - ENABLE_LOCKING_STYLE=1 - - ENABLE_RTREE - - ENABLE_UPDATE_DELETE_LIMIT - - OMIT_AUTORESET - - OMIT_BUILTIN_TEST - - OMIT_LOAD_EXTENSION - - SYSTEM_MALLOC - - THREADSAFE=2 + - `ENABLE_API_ARMOR` + - `ENABLE_FTS3` + - `ENABLE_FTS3_PARENTHESIS` + - `ENABLE_LOCKING_STYLE=1` + - `ENABLE_RTREE` + - `ENABLE_UPDATE_DELETE_LIMIT` + - `OMIT_AUTORESET` + - `OMIT_BUILTIN_TEST` + - `OMIT_LOAD_EXTENSION` + - `SYSTEM_MALLOC` + - `THREADSAFE=2` - iPhoneOS (9.3.2) - - ENABLE_API_ARMOR - - ENABLE_FTS3 - - ENABLE_FTS3_PARENTHESIS - - ENABLE_LOCKING_STYLE=1 - - ENABLE_RTREE - - ENABLE_UPDATE_DELETE_LIMIT - - MAX_MMAP_SIZE=0 - - OMIT_AUTORESET - - OMIT_BUILTIN_TEST - - OMIT_LOAD_EXTENSION - - SYSTEM_MALLOC - - THREADSAFE=2 + - `ENABLE_API_ARMOR` + - `ENABLE_FTS3` + - `ENABLE_FTS3_PARENTHESIS` + - `ENABLE_LOCKING_STYLE=1` + - `ENABLE_RTREE` + - `ENABLE_UPDATE_DELETE_LIMIT` + - `MAX_MMAP_SIZE=0` + - `OMIT_AUTORESET` + - `OMIT_BUILTIN_TEST` + - `OMIT_LOAD_EXTENSION` + - `SYSTEM_MALLOC` + - `THREADSAFE=2` SQLiteLib uses these settings with one exception - on iOS: @@ -135,15 +135,15 @@ D. Richard Hipp (SQLite architect), suggests working around this on iOS using `- > > I'm guessing this is not really a factor on iOS." -Thus, SQLiteLib uses SQLITE_ENABLE_LOCKING_STYLE=1 on OSX, -**but on iOS, SQLiteLib compiles with ENABLE_LOCKING_STYLE=0**. +Thus, SQLiteLib uses `SQLITE_ENABLE_LOCKING_STYLE=1` on OSX, +**but on iOS, SQLiteLib compiles with `ENABLE_LOCKING_STYLE=0`**. This removes the code that uses the deprecated function, but doesn't get rid of the warning that "`gethostuuid() is disabled`" (as of 3.13.0). To prevent this warning, SQLiteLib separately specifies `-Wno-#warnings` when building for iOS. All of these base settings are configured in the SQLiteLib.xcconfig file. -It is strongly recommended that you do not edit this file. If you'd like to specify additional compilation options, see [the instructions above](#specifying-additional-sqlite-compilation-options) +It is strongly recommended that you do not edit this file. If you'd like to specify additional compilation options, see [the instructions above](#specifying-additional-sqlite-compilation-options).