+2006-12-31 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * v4.5.25
+
+ * OFSResourceManager.m: try to locate component class in runtime,
+ according to the name of the template. If that cannot be found,
+ fall back to WOComponent.
+
+ * sope.m: accept --bundle <path> commandline parameters for loading
+ custom classes, i.e. custom component classes.
+
2006-12-30 Marcus Mueller <znek@mulle-kybernetik.com>
* OFSResourceManager.m: assign self as resourceManager to components
languages:(NSArray *)_languages
{
WOComponentDefinition *cdef;
-
+ NSRange r;
+ NSString *name;
+ Class cClass;
+
cdef = [super definitionForComponent:_name
inFramework:_framework
languages:_languages];
- [cdef setComponentClass:NSClassFromString(@"WOComponent")];
+ r = [_name rangeOfString:@"."];
+ if (r.length > 0)
+ name = [_name substringToIndex:r.location];
+ else
+ name = _name;
+
+ cClass = NSClassFromString(name);
+ if (cClass == Nil)
+ cClass = NSClassFromString(@"WOComponent");
+
+ [cdef setComponentClass:cClass];
return cdef;
}
buildSettings = {
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 4.5.24;
+ DYLIB_CURRENT_VERSION = 4.5.25;
FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
FRAMEWORK_VERSION = A;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
DEPLOYMENT_POSTPROCESSING = YES;
DSTROOT = /;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 4.5.24;
+ DYLIB_CURRENT_VERSION = 4.5.25;
DYLIB_INSTALL_NAME_BASE = "@executable_path/../Frameworks/";
FRAMEWORK_SEARCH_PATHS = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks";
FRAMEWORK_VERSION = A;
isa = XCBuildConfiguration;
buildSettings = {
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 4.5.24;
+ DYLIB_CURRENT_VERSION = 4.5.25;
FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
FRAMEWORK_VERSION = A;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
# version file
-SUBMINOR_VERSION:=24
+SUBMINOR_VERSION:=25
# v4.5.23 requires libNGObjWeb v4.5.263
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
-
+ NSEnumerator *args;
+ NSString *arg;
+ id self;
+
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
-
+
+ self = pool;
+ args = [[[NSProcessInfo processInfo] arguments] objectEnumerator];
+ [args nextObject];
+
+ while ((arg = [args nextObject]) != nil) {
+ if ([arg isEqualToString:@"--bundle"]) {
+ NSString *path = [args nextObject];
+ if (path != nil) {
+ NSBundle *bundle;
+ bundle = [NSBundle bundleWithPath:path];
+ if (!bundle) {
+ [self errorWithFormat:@"No loadable bundle at path: '%@'!", path];
+ exit(1);
+ }
+ [bundle load];
+ }
+ else {
+ [self errorWithFormat:@"Missing path for --bundle argument!"];
+ exit(1);
+ }
+ }
+#if 0
+ else {
+ [self errorWithFormat:@"Unknown argument: '%@', skipping.", arg];
+ }
+#endif
+ }
+
WOWatchDogApplicationMain(@"SOPE", argc, (void*)argv);
[pool release];