2005-02-10 Helge Hess <helge.hess@opengroupware.org>
+ * v0.9.21
+
+ * SOGoProductLoader.m: perform properly versioned plugin lookups (load
+ bundles from Library/SOGo-0.9 instead of Library/SOGo)
+
+ * sogod is now a tool, not a .woa anymore
+
* SOGo.m: minor cleanup in locale code, removed some dead code
(v0.9.20)
# GNUstep makefile
include $(GNUSTEP_MAKEFILES)/common.make
+include ../Version
+include ./Version
-WOAPP_NAME = sogod
-TOOL_NAME = sogod
+SOGOD = sogod-$(MAJOR_VERSION).$(MINOR_VERSION)
+TOOL_NAME = $(SOGOD)
BUNDLE_NAME = MainUI
BUNDLE_EXTENSION = .SOGo
-BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo
+BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo-$(MAJOR_VERSION).$(MINOR_VERSION)
# daemon tool
-sogod_OBJC_FILES += \
+$(SOGOD)_OBJC_FILES += \
sogod.m \
SOGo.m \
SOGoProductLoader.m \
MainUI_LOCALIZED_RESOURCE_FILES += \
Locale default.strings
-# woapp support
-
-ifneq ($(tool),yes)
-sogod_OBJC_FILES += $(MainUI_OBJC_FILES)
-sogod_RESOURCE_FILES += $(MainUI_RESOURCE_FILES)
-sogod_LOCALIZED_RESOURCE_FILES += $(MainUI_LOCALIZED_RESOURCE_FILES)
-endif
-
-
-include GNUmakefile.preamble
-ifeq ($(tool),yes)
include $(GNUSTEP_MAKEFILES)/bundle.make
include $(GNUSTEP_MAKEFILES)/tool.make
-else
-include $(GNUSTEP_MAKEFILES)/woapp.make
-endif
-include GNUmakefile.postamble
-# $Id$
+# compile settings
+
+ADDITIONAL_CPPFLAGS += \
+ -DSOGO_MAJOR_VERSION=$(MAJOR_VERSION) \
+ -DSOGO_MINOR_VERSION=$(MINOR_VERSION) \
+ -DSOGO_SUBMINOR_VERSION=$(SUBMINOR_VERSION)
ADDITIONAL_INCLUDE_DIRS += \
-I../SoObjects/ \
-L../SoObjects/SOGo/$(GNUSTEP_OBJ_DIR)/ \
-L../../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ \
-L../../SOGoLogic/$(GNUSTEP_OBJ_DIR)/ \
- -L/usr/local/lib -L/usr/lib
-# todo: use syslibs
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+
+# TODO: check which one we actually need!
ADDITIONAL_TOOL_LIBS += \
-lSOGo \
-lSOGoLogic \
@end
+#import <Foundation/Foundation.h>
+
@implementation MainUIProduct
+
++ (NSString *)pathToLocaleForLanguageNamed:(NSString *)_name {
+ // TODO: this is kind of a hack, we reuse the class registry to find
+ // resources ...
+ NSBundle *bundle;
+ NSString *ldir, *path;
+
+ bundle = [NSBundle bundleForClass:self];
+ ldir = [_name stringByAppendingPathExtension:@"lproj"];
+ path = [bundle pathForResource:@"Locale" ofType:nil inDirectory:ldir];
+
+ return path;
+}
+
@end /* MainUIProduct */
- provides the root object (the application object with user lookup)
- sets the authenticator
- does some process limits and restart support
+
+Apache Setup
+============
+
+ AliasMatch /SOGoHH/so/ControlPanel/Products/(.*)/Resources/(.*) \
+ /home/helge/GNUstep/Library/SOGo-0.9/$1.SOGo/Resources/$2
+
+ <LocationMatch "^/SOGoHH*">
+ AuthName "Agenor LDAP"
+ AuthType Basic
+ AuthLDAPEnabled on
+ AuthLDAPUrl ldap://agenor-ldap:389/ou=organisation,dc=equipement,dc=gouv,dc=fr??sub?(&(objectClass=person)(uid=*))
+ require valid-user
+
+ SetHandler ngobjweb-adaptor
+ SetAppPort 9000
+ </LocationMatch>
+
+ <LocationMatch "^/SOGoHH/so/ControlPanel/Products/.*UI/Resources/.*(\.png$|\.gif$|\.css$|\.js$)">
+ SetHandler default-handler
+ </LocationMatch>
return [self localeForLanguageNamed:@"English"];
}
+- (NSString *)pathToLocaleForLanguageNamed:(NSString *)_name {
+ static Class MainProduct = Nil;
+ NSString *lpath;
+
+ lpath = [[self resourceManager] pathForResourceNamed:@"Locale"
+ inFramework:nil
+ languages:[NSArray arrayWithObject:_name]];
+ if ([lpath isNotNull])
+ return lpath;
+
+ if (MainProduct == Nil) {
+ if ((MainProduct = NSClassFromString(@"MainUIProduct")) == Nil)
+ [self logWithFormat:@"ERROR: did not find MainUIProduct class!"];
+ }
+
+ lpath = [MainProduct pathToLocaleForLanguageNamed:_name];
+ if ([lpath isNotNull])
+ return lpath;
+
+ return nil;
+}
+
- (NSDictionary *)localeForLanguageNamed:(NSString *)_name {
NSString *lpath;
id data;
if ((locale = [self->localeLUT objectForKey:_name]) != nil)
return locale;
- lpath = [[self resourceManager]
- pathForResourceNamed:@"Locale"
- inFramework:nil
- languages:[NSArray arrayWithObject:_name]];
- if (![lpath isNotNull]) {
+ if ((lpath = [self pathToLocaleForLanguageNamed:_name]) == nil) {
[self logWithFormat:@"ERROR: did not find Locale for language: %@", _name];
return nil;
}
#import <Foundation/NSObject.h>
+@class NSString, NSArray;
+
@interface SOGoProductLoader : NSObject
{
NSString *productDirectoryName;
+ NSArray *searchPathes;
}
+ (id)productLoader;
@implementation SOGoProductLoader
++ (int)sogoMajorVersion {
+ return SOGO_MAJOR_VERSION;
+}
++ (int)sogoMinorVersion {
+ return SOGO_MINOR_VERSION;
+}
+
+ (id)productLoader {
return [[[self alloc] init] autorelease];
}
- (id)init {
if ((self = [super init])) {
- self->productDirectoryName = @"SOGo";
+ self->productDirectoryName =
+ [[NSString alloc] initWithFormat:@"SOGo-%i.%i",
+ [[self class] sogoMajorVersion],
+ [[self class] sogoMinorVersion]];
}
return self;
}
- (void)dealloc {
[self->productDirectoryName release];
+ [self->searchPathes release];
[super dealloc];
}
/* loading */
- (NSArray *)productSearchPathes {
- static NSArray *searchPathes = nil;
NSMutableArray *ma;
NSDictionary *env;
id tmp;
- if (searchPathes)
- return searchPathes;
+ if (self->searchPathes != nil)
+ return self->searchPathes;
env = [[NSProcessInfo processInfo] environment];
ma = [NSMutableArray arrayWithCapacity:6];
}
#endif
- searchPathes = [ma copy];
+ self->searchPathes = [ma copy];
- if ([searchPathes count] == 0)
- NSLog(@"%s: no search pathes were found !", __PRETTY_FUNCTION__);
+ if ([self->searchPathes count] == 0) {
+ [self logWithFormat:@"%s: no search pathes were found !",
+ __PRETTY_FUNCTION__];
+ }
- return searchPathes;
+ return self->searchPathes;
}
- (void)loadProducts {
NSEnumerator *productNames;
NSString *productName;
+ [self logWithFormat:@"scanning SOGo products in: %@", lpath];
+
productNames = [[fm directoryContentsAtPath:lpath] objectEnumerator];
while ((productName = [productNames nextObject]) != nil) {
NSString *bpath;
bpath = [lpath stringByAppendingPathComponent:productName];
- [self logWithFormat:@"register SOGo product: %@",
+ [self logWithFormat:@" register SOGo product: %@",
[bpath lastPathComponent]];
[registry registerProductAtPath:bpath];
}
# Version file
-SUBMINOR_VERSION:=20
+SUBMINOR_VERSION:=21
# v0.9.16 requires NGExtensions v4.5.136
{
+ requires = ( MAIN );
+
publicResources = (
);
# common make file for Protocol bundles
include $(GNUSTEP_MAKEFILES)/common.make
+include ../../Version
+include ./Version
BUNDLE_EXTENSION = .SOGo
-BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo
+BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo-$(MAJOR_VERSION).$(MINOR_VERSION)
ADDITIONAL_INCLUDE_DIRS += \
-I.. \
# common make file for SoObject bundles
include $(GNUSTEP_MAKEFILES)/common.make
+include ../../Version
+include ./Version
BUNDLE_EXTENSION = .SOGo
-BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo
+BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo-$(MAJOR_VERSION).$(MINOR_VERSION)
ADDITIONAL_INCLUDE_DIRS += \
-I.. \
+2005-02-10 Helge Hess <helge.hess@opengroupware.org>
+
+ * GNUmakefile: include ../common.make (v0.9.35)
+
2005-01-24 Marcus Mueller <znek@mulle-kybernetik.com>
* UIxPageFrame.wox: additional debug output (v0.9.34)
# GNUstep makefile
-include $(GNUSTEP_MAKEFILES)/common.make
+include ../common.make
-BUNDLE_NAME = CommonUI
-BUNDLE_EXTENSION = .SOGo
-BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo
+BUNDLE_NAME = CommonUI
CommonUI_PRINCIPAL_CLASS = CommonUIProduct
# Version file
-SUBMINOR_VERSION:=34
+SUBMINOR_VERSION:=35
# v0.9.28 requires NGExtensions v4.5.136
# common make file for UI bundles
include $(GNUSTEP_MAKEFILES)/common.make
+include ../../Version
+include ./Version
BUNDLE_EXTENSION = .SOGo
-BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo
+BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo-$(MAJOR_VERSION).$(MINOR_VERSION)
ADDITIONAL_INCLUDE_DIRS += \
-I.. \
-# $Id$
#
# This file is included by library makefiles to set the version information
# of the executable.