From: helge Date: Tue, 16 Aug 2005 22:54:29 +0000 (+0000) Subject: fixed install of framework resources X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df80ffdd50360c7f24fec898c295d81d8b467b0a;p=sope fixed install of framework resources git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1038 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 96730e22..64c06de6 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,12 @@ +2005-08-16 Helge Hess + + * v4.5.187 + + * WOApplication.m: minor code cleanups + + * GNUmakefile, GNUmakefile.preamble: fixed installation of framework + resources + 2005-08-11 Helge Hess * ngobjweb.make: added support for OSX frameworks (v4.5.186) diff --git a/sope-appserver/NGObjWeb/GNUmakefile b/sope-appserver/NGObjWeb/GNUmakefile index d97ce0e5..169403fb 100644 --- a/sope-appserver/NGObjWeb/GNUmakefile +++ b/sope-appserver/NGObjWeb/GNUmakefile @@ -13,11 +13,13 @@ FRAMEWORK_NAME = NGObjWeb 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) @@ -152,10 +154,10 @@ endif # 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 diff --git a/sope-appserver/NGObjWeb/GNUmakefile.postamble b/sope-appserver/NGObjWeb/GNUmakefile.postamble index e2db45d1..507350de 100644 --- a/sope-appserver/NGObjWeb/GNUmakefile.postamble +++ b/sope-appserver/NGObjWeb/GNUmakefile.postamble @@ -1,5 +1,10 @@ # postprocessing + +# install library resources + +ifneq ($(frameworks),yes) + $(RESOURCES_DIR) : $(MKDIRS) $(RESOURCES_DIR) @@ -12,7 +17,11 @@ ngobjweb-resources : $(RESOURCES_DIR) $(libNGObjWeb_RESOURCES) 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/ diff --git a/sope-appserver/NGObjWeb/GNUmakefile.preamble b/sope-appserver/NGObjWeb/GNUmakefile.preamble index 76ce0045..80f24131 100644 --- a/sope-appserver/NGObjWeb/GNUmakefile.preamble +++ b/sope-appserver/NGObjWeb/GNUmakefile.preamble @@ -1,7 +1,10 @@ # compilation settings ifeq ($(FOUNDATION_LIB),apple) +ifeq ($(frameworks),yes) NGObjWeb_INSTALL_DIR = /Library/Frameworks/ +ADDITIONAL_CPPFLAGS += -DCOMPILE_AS_FRAMEWORK=1 +endif endif SOPE_ROOT=../.. @@ -12,7 +15,7 @@ ADDITIONAL_CPPFLAGS += \ -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=../.. diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 5751d673..a31359c9 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=186 +SUBMINOR_VERSION:=187 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 diff --git a/sope-appserver/NGObjWeb/WOApplication.m b/sope-appserver/NGObjWeb/WOApplication.m index baeac029..28b1ffbc 100644 --- a/sope-appserver/NGObjWeb/WOApplication.m +++ b/sope-appserver/NGObjWeb/WOApplication.m @@ -61,7 +61,7 @@ static NSString *rapidTurnAroundPath = nil; @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"; @@ -282,19 +282,19 @@ 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__ diff --git a/sope-appserver/NGObjWeb/WOCoreApplication.m b/sope-appserver/NGObjWeb/WOCoreApplication.m index 632d34d1..7db7e352 100644 --- a/sope-appserver/NGObjWeb/WOCoreApplication.m +++ b/sope-appserver/NGObjWeb/WOCoreApplication.m @@ -731,7 +731,12 @@ static NSMutableArray *activeApps = nil; // THREAD #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 @@ -749,7 +754,7 @@ static NSMutableArray *activeApps = nil; // THREAD 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];