Skip to content

Commit 823f77b

Browse files
Merge pull request #2 from swiftlyfalling/swiftlyfalling-readme-fixes
README fixes
2 parents e1d8119 + cd09b6a commit 823f77b

File tree

1 file changed

+46
-53
lines changed

1 file changed

+46
-53
lines changed

README.md

Lines changed: 46 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
SQLiteLib
22
==========
33

4+
45
Easily build a custom SQLite static library for use in OSX and iOS frameworks and apps.
56

67
If you need a specific version of SQLite, or specific SQLite compilation options/features, read on.
78

8-
==========
9+
910

1011
**May 29, 2016: SQLiteLib updated for SQLite 3.13.0** ([changelog](CHANGELOG.md)).
1112

@@ -15,13 +16,11 @@ If you need a specific version of SQLite, or specific SQLite compilation options
1516

1617

1718

18-
---
19-
20-
### Installation:
21-
2219
==========
2320

24-
#### Manual Installation (ex. into a Framework)
21+
## Installation:
22+
23+
#### Manual Installation (ex. into a Framework):
2524

2625
1. Download a copy of SQLiteLib.
2726
2. Embed the `SQLiteLib.xcodeproj` project in your own project.
@@ -30,23 +29,20 @@ If you need a specific version of SQLite, or specific SQLite compilation options
3029

3130
That's it! (You'll probably also want to `#include "sqlite3.h"` somewhere. SQLiteLib copies this generated file to its project directory.)
3231

33-
==========
3432

35-
#### Using in Swift
33+
#### Using in Swift:
3634

3735
You probably shouldn't be using the raw SQLite C API in Swift. There are a bunch of great libraries available that wrap it.
3836

3937
For example: ([GRDB.swift](https://github.com/groue/GRDB.swift)).
4038

41-
---
4239

43-
### Customization:
40+
## Customization:
4441

4542
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).
4643

47-
==========
4844

49-
#### Specifying Additional SQLite Compilation Options
45+
#### Specifying Additional SQLite Compilation Options:
5046

5147
> 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*.
5248
> You only need to follow the steps below if you wish to customize the options.
@@ -64,9 +60,8 @@ CUSTOM_SQLLIBRARY_CFLAGS = -DSQLITE_ENABLE_PREUPDATE_HOOK
6460
That's it.
6561
There is no need to modify any other files.
6662

67-
==========
6863

69-
#### Compiling a Specific Version of SQLite
64+
#### Compiling a Specific Version of SQLite:
7065

7166
SQLiteLib currently ships with the source for SQLite 3.13.0.
7267

@@ -83,52 +78,50 @@ If you'd like to compile a newer (or older) version, the process is simple:
8378
> Setting compilation options using the SQLite amalgamation is not guaranteed to work:
8479
> > 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**.
8580
86-
==========
8781

88-
**Quick Guide to Using the Latest version of SQLite**:
82+
####**Quick Guide to Using the Latest version of SQLite**:
8983

9084
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**.
9185
You'll want the file named "sqlite-src-*version*.zip".
9286
> Do **NOT** use the file beginning with "sqlite-preprocessed" - it will not work properly.
9387
94-
---
9588

96-
### Additional Details:
9789

98-
==========
90+
## Additional Details:
91+
9992

100-
#### Default Compilation Options
93+
#### Default Compilation Options:
10194

10295
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):
10396

10497
> Fetched using `PRAGMA compile_options;`
10598
10699
- MacOSX (10.11.5)
107-
- ENABLE_API_ARMOR
108-
- ENABLE_FTS3
109-
- ENABLE_FTS3_PARENTHESIS
110-
- ENABLE_LOCKING_STYLE=1
111-
- ENABLE_RTREE
112-
- ENABLE_UPDATE_DELETE_LIMIT
113-
- OMIT_AUTORESET
114-
- OMIT_BUILTIN_TEST
115-
- OMIT_LOAD_EXTENSION
116-
- SYSTEM_MALLOC
117-
- THREADSAFE=2
100+
- `ENABLE_API_ARMOR`
101+
- `ENABLE_FTS3`
102+
- `ENABLE_FTS3_PARENTHESIS`
103+
- `ENABLE_LOCKING_STYLE=1`
104+
- `ENABLE_RTREE`
105+
- `ENABLE_UPDATE_DELETE_LIMIT`
106+
- `OMIT_AUTORESET`
107+
- `OMIT_BUILTIN_TEST`
108+
- `OMIT_LOAD_EXTENSION`
109+
- `SYSTEM_MALLOC`
110+
- `THREADSAFE=2`
118111

119112
- iPhoneOS (9.3.2)
120-
- ENABLE_API_ARMOR
121-
- ENABLE_FTS3
122-
- ENABLE_FTS3_PARENTHESIS
123-
- ENABLE_LOCKING_STYLE=1
124-
- ENABLE_RTREE
125-
- ENABLE_UPDATE_DELETE_LIMIT
126-
- MAX_MMAP_SIZE=0
127-
- OMIT_AUTORESET
128-
- OMIT_BUILTIN_TEST
129-
- OMIT_LOAD_EXTENSION
130-
- SYSTEM_MALLOC
131-
- THREADSAFE=2
113+
- `ENABLE_API_ARMOR`
114+
- `ENABLE_FTS3`
115+
- `ENABLE_FTS3_PARENTHESIS`
116+
- `ENABLE_LOCKING_STYLE=1`
117+
- `ENABLE_RTREE`
118+
- `ENABLE_UPDATE_DELETE_LIMIT`
119+
- `MAX_MMAP_SIZE=0`
120+
- `OMIT_AUTORESET`
121+
- `OMIT_BUILTIN_TEST`
122+
- `OMIT_LOAD_EXTENSION`
123+
- `SYSTEM_MALLOC`
124+
- `THREADSAFE=2`
132125

133126
SQLiteLib uses these settings with one exception - on iOS:
134127

@@ -142,33 +135,33 @@ D. Richard Hipp (SQLite architect), suggests working around this on iOS using `-
142135
>
143136
> I'm guessing this is not really a factor on iOS."
144137
145-
Thus, SQLiteLib uses SQLITE_ENABLE_LOCKING_STYLE=1 on OSX,
146-
**but on iOS, SQLiteLib compiles with ENABLE_LOCKING_STYLE=0**.
138+
Thus, SQLiteLib uses `SQLITE_ENABLE_LOCKING_STYLE=1` on OSX,
139+
**but on iOS, SQLiteLib compiles with `ENABLE_LOCKING_STYLE=0`**.
147140

148141
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).
149142

150143
To prevent this warning, SQLiteLib separately specifies `-Wno-#warnings` when building for iOS.
151144

152145
All of these base settings are configured in the SQLiteLib.xcconfig file.
153-
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)
146+
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).
147+
154148

155-
==========
156149

157-
#### Build Locations
150+
#### Build Locations:
158151

159152
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).
160153

161154
The generated SQLite amalgamation files are copied to:
162155

163-
-"${BUILT_PRODUCTS_DIR}/sqlite3.c"
156+
-`${BUILT_PRODUCTS_DIR}/sqlite3.c`
157+
158+
-`${PROJECT_DIR}/sqlite3.h`
164159

165-
-"${PROJECT_DIR}/sqlite3.h"
166160

167-
---
168161

169-
#### Notes:
162+
## Notes:
170163

171-
##### "sqlite3.c" shows as red/missing in Xcode
164+
##### "sqlite3.c" shows as red/missing in Xcode:
172165

173166
Xcode (verified in Version 7.3.1 (7D1014)) will always show "sqlite3.c" as red/missing, even after a build.
174167

0 commit comments

Comments
 (0)