+2005-08-16 Helge Hess <helge.hess@opengroupware.org>
+
+ * v4.5.187
+
+ * WOApplication.m: minor code cleanups
+
+ * GNUmakefile, GNUmakefile.preamble: fixed installation of framework
+ resources
+
2005-08-11 Helge Hess <helge.hess@opengroupware.org>
* ngobjweb.make: added support for OSX frameworks (v4.5.186)
endif
+ifneq ($(frameworks),yes)
ifeq ($(FHS_INSTALL_ROOT),)
RESOURCES_DIR = $(GNUSTEP_RESOURCES)/NGObjWeb
else
RESOURCES_DIR = $(FHS_INSTALL_ROOT)/share/sope-$(MAJOR_VERSION).$(MINOR_VERSION)/ngobjweb
endif
+endif
libNGObjWeb_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
libNGObjWeb_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
# framework support
NGObjWeb_HEADER_FILES_DIR = NGObjWeb
-NGObjWeb_HEADER_FILES = $(libNGObjWeb_HEADER_FILES)
-NGObjWeb_OBJC_FILES = $(libNGObjWeb_OBJC_FILES)
-NGObjWeb_SUBPROJECTS = $(libNGObjWeb_SUBPROJECTS)
-
+NGObjWeb_HEADER_FILES = $(libNGObjWeb_HEADER_FILES)
+NGObjWeb_OBJC_FILES = $(libNGObjWeb_OBJC_FILES)
+NGObjWeb_SUBPROJECTS = $(libNGObjWeb_SUBPROJECTS)
+NGObjWeb_RESOURCE_FILES = $(libNGObjWeb_RESOURCES)
# ----- SoCore product for SOPE core registrations
# postprocessing
+
+# install library resources
+
+ifneq ($(frameworks),yes)
+
$(RESOURCES_DIR) :
$(MKDIRS) $(RESOURCES_DIR)
fi)
after-install :: ngobjweb-resources
-# $(INSTALL_DATA) woapp.make wobundle.make $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)
+
+endif
+
+
+# install makefiles
after-install ::
$(MKDIRS) $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/Additional/
# compilation settings
ifeq ($(FOUNDATION_LIB),apple)
+ifeq ($(frameworks),yes)
NGObjWeb_INSTALL_DIR = /Library/Frameworks/
+ADDITIONAL_CPPFLAGS += -DCOMPILE_AS_FRAMEWORK=1
+endif
endif
SOPE_ROOT=../..
-DSOPE_MINOR_VERSION=$(MINOR_VERSION) \
-DSOPE_SUBMINOR_VERSION=$(SUBMINOR_VERSION)
-libNGObjWeb_CPPFLAGS += -pipe -DCOMPILING_NGOBJWEB=1
+ADDITIONAL_CPPFLAGS += -pipe -DCOMPILING_NGOBJWEB=1
libNGObjWeb_OBJCFLAGS += -Wall -Wno-import -Wno-protocol
SOPE_ROOT=../..
# version file
-SUBMINOR_VERSION:=186
+SUBMINOR_VERSION:=187
# v4.5.122 requires libNGExtensions v4.5.153
# v4.5.91 requires libNGExtensions v4.5.134
@implementation WOApplication
-#if 1
+#if 1 // TODO: why is that? why isn't that set by a default?
static NSString *defaultCompRqHandlerClassName = @"OWViewRequestHandler";
#else
static NSString *defaultCompRqHandlerClassName = @"WOComponentRequestHandler";
@"could not get loaded (permissions?)"];
}
rh = [[NSClassFromString(defaultCompRqHandlerClassName) alloc] init];
- if ([rk length] > 0 && (rh != nil))
+ if ([rk isNotEmpty] && [rh isNotNull])
[self registerRequestHandler:rh forKey:rk];
[rh release]; rh = nil;
rk = [WOApplication directActionRequestHandlerKey];
rh = [[NSClassFromString(@"WODirectActionRequestHandler") alloc] init];
- if ([rk length] > 0 && rh != nil)
+ if ([rk isNotEmpty] && [rh isNotNull])
[self registerRequestHandler:rh forKey:rk];
[rh release]; rh = nil;
if ((rh = [[NSClassFromString(@"WOResourceRequestHandler") alloc] init])) {
rk = [WOApplication resourceRequestHandlerKey];
- if ([rk length] > 0)
+ if ([rk isNotEmpty])
[self registerRequestHandler:rh forKey:rk];
[self registerRequestHandler:rh forKey:@"WebServerResources"];
#ifdef __APPLE__
#if COMPILE_AS_FRAMEWORK
NSBundle *bundle;
- bundle = [NSBundle bundleForClass:[WOCoreApplication class]];
+ if ((bundle = [NSBundle bundleForClass:[WOCoreApplication class]]) == nil) {
+ NSLog(@"ERROR(%s): did not find NGObjWeb framework bundle!",
+ __PRETTY_FUNCTION__);
+ return nil;
+ }
+
return [bundle pathForResource:_name ofType:_ext];
#else
return [[self ngobjwebResourceLocator] lookupFileWithName:_name
apath = [self findNGObjWebResource:@"Defaults" ofType:@"plist"];
if (apath == nil)
- [self errorWithFormat:@"cannot find Defaults.plist resource of NGObjWeb library!"];
+ NSLog(@"ERROR: Cannot find Defaults.plist resource of NGObjWeb library!");
#if HEAVY_DEBUG
else
[self debugWithFormat:@"Note: loading default defaults: %@", apath];