Permalink
Browse files

Updated README to add info about GNUstep. Reorganized GNUstep-specifi…

…c files.
  • Loading branch information...
1 parent 88c014b commit 0900c72eb6f00940b1769e0925d39457941918e3 @snej snej committed May 9, 2012
@@ -1,18 +1,27 @@
-If you haven't installed GNUstep yet, first follow the steps in SETUP.txt (which is basically a shellscript but you might want to run the lines manually.)
+If you haven't installed GNUstep yet, first follow the steps in SETUP.txt (which is basically a
+shellscript but you might want to run the lines manually.)
+
+Disclaimer: This has only been tested on Ubuntu Linux; YMMV on other platforms. I [Jens] am not a
+Linux or GNUstep expert.
+
+There is one small GNUstep patch needed that hasn't made its way upstream yet; you'll find that in
+`fix_NSFileManager.patch`. You should apply that to `NSFileManager.m` in the `gnustep-base` source
+directory and rebuild.
After that you should be able to cd to the TouchDB directory and enter
make OPTFLAG= debug=yes
to build a debug version of TouchDB including unit tests. The output is "TouchDB.framework".
To run the unit tests, enter
env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:TouchDB.framework/Versions/Current obj/TouchTool Test_All
-which just tells the loader where to find the TouchDB library, then starts the TouchTool binary and tells it to run all the unit tests.
+which just tells the loader where to find the TouchDB library, then starts the TouchTool binary and
+tells it to run all the unit tests.
To build a release version (optimized, no unit tests), enter
make
-
-If you need to debug the GNUstep Base framework, it helps to build and install a non-optimized version of it. To do that:
+If you need to debug the GNUstep Base framework, it helps to build and install a non-optimized
+version of it. To do that:
cd ~/gnustep-src/gnustep-base
make OPTFLAG= debug=yes
- sudo -E make install
+ sudo -E make install
File renamed without changes.
@@ -1,87 +0,0 @@
-Index: Source/NSURL.m
-===================================================================
---- Source/NSURL.m (revision 34870)
-+++ Source/NSURL.m (working copy)
-@@ -1415,7 +1415,7 @@
- return fragment;
- }
-
--- (char*) _path: (char*)buf
-+- (char*) _path: (char*)buf withEscapes: (BOOL)withEscapes
- {
- char *ptr = buf;
- char *tmp = buf;
-@@ -1472,7 +1472,10 @@
- }
- }
-
-- unescape(buf, buf);
-+ if (!withEscapes)
-+ {
-+ unescape(buf, buf);
-+ }
-
- #if defined(__MINGW__)
- /* On windows a file URL path may be of the form C:\xxx (ie we should
-@@ -1602,7 +1605,7 @@
- return password;
- }
-
--- (NSString*) path
-+- (NSString*) _pathWithEscapes: (BOOL)withEscapes
- {
- NSString *path = nil;
- unsigned int len = 3;
-@@ -1632,7 +1635,7 @@
- char *ptr;
- char *tmp;
-
-- ptr = [self _path: buf];
-+ ptr = [self _path: buf withEscapes: withEscapes];
-
- /* Remove any trailing '/' from the path for MacOS-X compatibility.
- */
-@@ -1647,6 +1650,11 @@
- return path;
- }
-
-+- (NSString*) path
-+{
-+ return [self _pathWithEscapes: NO];
-+}
-+
- - (NSArray*) pathComponents
- {
- return [[self path] pathComponents];
-@@ -2036,10 +2044,15 @@
- char buf[len];
- char *ptr;
-
-- ptr = [self _path: buf];
-+ ptr = [self _path: buf withEscapes: NO];
- path = [NSString stringWithUTF8String: ptr];
- }
- return path;
- }
-+
-+- (NSString*) pathWithEscapes
-+{
-+ return [self _pathWithEscapes: YES];
-+}
- @end
-
-Index: Headers/GNUstepBase/NSURL+GNUstepBase.h
-===================================================================
---- Headers/GNUstepBase/NSURL+GNUstepBase.h (revision 34870)
-+++ Headers/GNUstepBase/NSURL+GNUstepBase.h (working copy)
-@@ -56,6 +56,10 @@
- /** Returns the full path for this URL including any trailing slash.
- */
- - (NSString*) fullPath;
-+
-+/** Returns the full path for this URL, without decoding percent-escapes.
-+ This is useful if you need to distinguish between "/" and "%2F" in the path. */
-+- (NSString*) pathWithEscapes;
- @end
-
- #endif /* OS_API_VERSION */
View
@@ -15,17 +15,23 @@ By "_suitable for embedding into mobile apps_", I mean that it meets the followi
* Low memory usage with typical mobile data-sets. The expectation is the number of documents will not be huge, although there may be sizable multimedia attachments.
* "Good enough" performance with these CPUs and data-sets.
-And by "_mobile apps_" I'm focusing on iOS and [Android][11], although there's no reason we couldn't extend this to other platforms like Windows Phone. And it's not limited to mobile OSs -- the Objective-C implementation runs on Mac OS as well.
+And by "_mobile apps_" I'm focusing on iOS and [Android][11], although there's no reason we couldn't extend this to other platforms like Windows Phone. And it's not limited to mobile OSs -- the Objective-C implementation runs on Mac OS as well, and on Linux and other Unix-like OSs via [GNUstep][12].
More documentation is available on the [wiki][2].
+## Platforms ##
+
+ * **Mac OS X** -- 10.7.2 or higher.
+ * **iOS** -- 5.0 or higher.
+ * **Linux, BSD, etc** -- Any platform [supported by][13] current [GNUstep][12] and libobjc2.
+ * **MS Windows** -- As [supported by][13] GNUstep using MingW.
+ * **Android / Java** -- Has its own source base and [repository][11].
+
## Requirements ##
* It's written in Objective-C.
- * Xcode 4.3+ is required to build it.
- * Runtime system requirements are iOS 5+, or Mac OS X 10.7.2+.
-
-Looking for the [Java/Android implementation][11]? It has its own repository.
+ * Xcode 4.3+ is required to build it (Clang 3.0+, with GNUstep).
+ * Runtime system requirements for Apple platforms are iOS 5+, or Mac OS X 10.7.2+.
## License ##
@@ -37,18 +43,25 @@ Looking for the [Java/Android implementation][11]? It has its own repository.
## Development Status ##
-TouchDB recently went alpha (at the end of January 2012; version 0.45.)
+TouchDB went alpha in January 201 with version 0.45.
+
+Current versions (0.75 as of this writing) are close to being beta candidates.
Beta should arrive by summer.
## Building TouchDB ##
+### On a Mac ###
+
For full details see the [wiki page][7]. The gist of it is:
1. Clone the TouchDB repository to your local disk.
2. In that directory run "`git submodule init`" and then "`git submodule update`". This will clone the [FMDB][5], [MYUtilities][6], and [CocoaHTTPServer][9] repos into the vendor/ subdirectory.
3. Open the Xcode project and build the "Mac Framework" and/or "iOS Framework" schemes.
+### With GNUstep ###
+
+Please refer to the files [BUILDING.txt][14] and [SETUP.txt][15] in the `GNUstep` directory.
[1]: http://couchdb.apache.org
[2]: https://github.com/couchbaselabs/TouchDB-iOS/wiki
@@ -61,3 +74,7 @@ For full details see the [wiki page][7]. The gist of it is:
[9]: https://github.com/robbiehanson/CocoaHTTPServer
[10]: http://code.google.com/p/google-toolbox-for-mac/
[11]: https://github.com/couchbaselabs/TouchDB-Android
+[12]: http://www.gnustep.org/
+[13]: http://wiki.gnustep.org/index.php/Platform_compatibility
+[14]: https://github.com/couchbaselabs/TouchDB-iOS/blob/master/GNUstep/BUILDING.txt
+[15]: https://github.com/couchbaselabs/TouchDB-iOS/blob/master/GNUstep/SETUP.txt

0 comments on commit 0900c72

Please sign in to comment.