Permalink
Browse files

static libraries for both iOS and MacOS X

  • Loading branch information...
1 parent e14ba97 commit 1bce27ada14cd7c25bffebe3be86a747ef59db48 @groue committed Jun 9, 2011
View
@@ -3,16 +3,16 @@ DSTROOT=.
CONFIGURATION=Release
default:
- xcodebuild -project GRMustache1-ios.xcodeproj -target GRMustache1 -configuration ${CONFIGURATION} -arch "armv6 armv7" build SYMROOT=${SYMROOTROOT}/iphoneos
- xcodebuild -project GRMustache1-ios.xcodeproj -target GRMustache1 -configuration ${CONFIGURATION} -sdk iphonesimulator4.3 -arch "i386" build SYMROOT=${SYMROOTROOT}/iphonesimulator
- xcodebuild -project GRMustache1-macos.xcodeproj -target GRMustache1 -configuration ${CONFIGURATION} -sdk macosx -arch "i386 x86_64" build SYMROOT=${SYMROOTROOT}/macosx
+ xcodebuild -project GRMustache1-ios.xcodeproj -target GRMustache1 -configuration ${CONFIGURATION} -arch "armv6 armv7" build SYMROOT=${SYMROOTROOT}/iphoneos
+ xcodebuild -project GRMustache1-ios.xcodeproj -target GRMustache1 -configuration ${CONFIGURATION} -sdk iphonesimulator4.3 -arch "i386" build SYMROOT=${SYMROOTROOT}/iphonesimulator
+ xcodebuild -project GRMustache1-macosx.xcodeproj -target GRMustache1 -configuration ${CONFIGURATION} -sdk macosx -arch "i386 x86_64" build SYMROOT=${SYMROOTROOT}/macosx
lipo -create \
"${SYMROOTROOT}/iphonesimulator/${CONFIGURATION}-iphonesimulator/libGRMustache1.a" \
"${SYMROOTROOT}/iphoneos/${CONFIGURATION}-iphoneos/libGRMustache1.a" \
-output "${SYMROOTROOT}/iphoneos/${CONFIGURATION}-iphoneos/libGRMustache1-ios.a"
mkdir -p ${DSTROOT}/lib
mv ${SYMROOTROOT}/iphoneos/${CONFIGURATION}-iphoneos/libGRMustache1-ios.a ${DSTROOT}/lib
- mv ${SYMROOTROOT}/iphoneos/${CONFIGURATION}-macosx/libGRMustache1-macosx.a ${DSTROOT}/lib
+ mv ${SYMROOTROOT}/macosx/${CONFIGURATION}/libGRMustache1.a ${DSTROOT}/lib/libGRMustache1-macosx.a
rm -rf ${DSTROOT}/include
mkdir -p ${DSTROOT}/include
mv ${SYMROOTROOT}/iphoneos/${CONFIGURATION}-iphoneos/include/* ${DSTROOT}/include
View
@@ -0,0 +1,79 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+/**
+ The GRYes class provides with a singleton which you can use as a true value
+ when controlling Mustache boolean sections.
+
+ This singleton object is safer and less ambiguous than [NSNumber numberWithBool:YES],
+ which GRMustache essentially considers as the integer 1.
+
+ @see GRYes#yes
+ @see GRMustache#strictBooleanMode
+ @see GRNo
+ @since v1.0.0
+ */
+@interface GRYes : NSObject <NSCopying>
+/**
+ @deprecated Use `[NSNumber numberWithBool:YES]` instead.
+ @returns the GRYes singleton.
+ @since v1.0.0
+ */
++ (GRYes *)yes __attribute__((deprecated));
+
+/**
+ @returns YES
+ @since v1.1.0
+ */
+- (BOOL)boolValue;
+@end
+
+
+/**
+ The GRNo class provides with a singleton which you can use as a false value
+ when controlling Mustache boolean sections.
+
+ This singleton object is safer and less ambiguous than [NSNumber numberWithBool:NO],
+ which GRMustache essentially considers as the integer 0, and not as a false
+ value.
+
+ @see GRNo#no
+ @see GRMustache#strictBooleanMode
+ @see GRYes
+ @since v1.0.0
+ */
+@interface GRNo : NSObject <NSCopying>
+/**
+ @deprecated Use `[NSNumber numberWithBool:NO]` instead.
+ @returns the GRNo singleton.
+ @since v1.0.0
+ */
++ (GRNo *)no __attribute__((deprecated));
+
+/**
+ @returns NO
+ @since v1.1.0
+ */
+- (BOOL)boolValue;
+@end
View
@@ -0,0 +1,41 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+/**
+ The GRMustache class provides with global-level information and configuration
+ of the GRMustache library.
+ @since v1.0.0
+ */
+@interface GRMustache: NSObject
+@end
+
+#import "GRMustacheVersion.h"
+#import "GRMustacheConfiguration.h"
+#import "GRBoolean.h"
+#import "GRMustacheError.h"
+#import "GRMustacheRendering.h"
+#import "GRMustacheContext.h"
+#import "GRMustacheLambda.h"
+#import "GRMustacheTemplateLoader.h"
+#import "GRMustacheTemplate.h"
@@ -0,0 +1,69 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+/**
+ The GRMustache class provides with global-level information and configuration
+ of the GRMustache library.
+ @since v1.0.0
+ */
+@interface GRMustache(Configuration)
+
+//////////////////////////////////////////////////////////////////////////////////////////
+/// @name Handling of boolean properties
+//////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ A Boolean value that determines whether GRMustache renders templates in strict
+ boolean mode.
+
+ @returns YES if GRMustache renders templates in strict boolean mode,
+ NO otherwise. The default value is NO.
+
+ In strict boolean mode, properties of context objects that are declared as BOOL
+ are interpreted as numbers, and can not be used for controlling Mustache
+ boolean sections.
+
+ In non-strict boolean mode, all properties declared as signed char (including
+ those declared as BOOL), are interpreted as booleans, and can be used for
+ controlling Mustache boolean sections.
+
+ @see GRMustache#setStrictBooleanMode:
+ @see GRYes
+ @see GRNo
+ @since v1.0.0
+ */
++ (BOOL)strictBooleanMode;
+
+/**
+ Sets the strict boolean mode of GMustache.
+
+ @param aBool YES if GRMustache should render templates in strict boolean mode,
+ NO otherwise.
+
+ @see GRMustache#strictBooleanMode
+ @since v1.0.0
+ */
++ (void)setStrictBooleanMode:(BOOL)aBool;
+
++ (void)preventNSUndefinedKeyExceptionAttack;
+
+@end
@@ -0,0 +1,33 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+
+@interface GRMustacheContext: NSObject {
+@private
+ id object;
+ GRMustacheContext *parent;
+}
++ (id)contextWithObject:(id)object __attribute__((deprecated));
++ (id)contextWithObjects:(id)object, ... __attribute__((deprecated));
+- (GRMustacheContext *)contextByAddingObject:(id)object __attribute__((deprecated));
+- (id)valueForKey:(NSString *)key;
+@end
View
@@ -0,0 +1,63 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+
+/**
+ The domain of a GRMustache-generated NSError
+
+ @since v1.0.0
+ */
+extern NSString* const GRMustacheErrorDomain;
+
+/**
+ When a GRMustache-generated NSError has the code GRMustacheErrorCodeParseError,
+ its userInfo dictionary contains the line where the parse error occurred, at
+ the key GRMustacheErrorLine.
+
+ @since v1.0.0
+ */
+extern NSString* const GRMustacheErrorLine;
+
+/**
+ The codes of a GRMustache-generated NSError
+
+ @since v1.0.0
+ */
+typedef enum {
+ /**
+ The error code for parse errors.
+
+ @since v1.0.0
+ */
+ GRMustacheErrorCodeParseError,
+
+ /**
+ The error code for not found templates and partials.
+
+ @since v1.0.0
+ */
+ GRMustacheErrorCodeTemplateNotFound,
+} GRMustacheErrorCode;
+
+
View
@@ -0,0 +1,43 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "GRMustacheSection.h"
+
+@class GRMustacheContext;
+
+#if NS_BLOCKS_AVAILABLE
+@interface GRMustacheBlockHelper: NSObject {
+@private
+ NSString *(^block)(GRMustacheSection* section, id context);
+}
++ (id)helperWithBlock:(NSString *(^)(GRMustacheSection* section, id context))block;
+@end
+
+// =================== DEPRECATED STUFF BELOW ===================
+
+typedef NSString *(^GRMustacheRenderingBlock)(GRMustacheSection*, GRMustacheContext*);
+id GRMustacheLambdaBlockMake(GRMustacheRenderingBlock block) __attribute__((deprecated));
+
+typedef NSString *(^GRMustacheRenderer)(id object);
+typedef id GRMustacheLambda __attribute__((deprecated));
+GRMustacheLambda GRMustacheLambdaMake(NSString *(^block)(NSString *(^)(id object), id, NSString *)) __attribute__((deprecated));
+#endif
Oops, something went wrong.

0 comments on commit 1bce27a

Please sign in to comment.