]> err.no Git - scalable-opengroupware.org/commitdiff
made sogod a tool, places bundles into Library/SOGo-0.9
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 10 Feb 2005 16:22:38 +0000 (16:22 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 10 Feb 2005 16:22:38 +0000 (16:22 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@540 d1b88da0-ebda-0310-925b-ed51d893ca5b

17 files changed:
SOGo/Main/ChangeLog
SOGo/Main/GNUmakefile
SOGo/Main/GNUmakefile.preamble
SOGo/Main/MainUIProduct.m
SOGo/Main/README
SOGo/Main/SOGo.m
SOGo/Main/SOGoProductLoader.h
SOGo/Main/SOGoProductLoader.m
SOGo/Main/Version
SOGo/Main/product.plist
SOGo/Protocols/common.make
SOGo/SoObjects/common.make
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/GNUmakefile
SOGo/UI/Common/Version
SOGo/UI/common.make
SOGo/Version

index cba9d507baa083f34b9ccfcb8db17b1b13a20445..7b1601adce056bd7680bd284e6909d0a646939e3 100644 (file)
@@ -1,5 +1,12 @@
 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)
 
index f589055e4dd6687f900e6c811158ed327201ae84..f1e14e381bb6c71e4e7fc92f211d4e7cc4792d66 100644 (file)
@@ -1,16 +1,18 @@
 # 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     \
@@ -41,20 +43,7 @@ MainUI_RESOURCE_FILES +=     \
 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
index e70c8e01a811bd455505dcae9fe99ca4d3a8288c..deaf71e52c93203eb63254858e2f8843a3d1b6d2 100644 (file)
@@ -1,4 +1,9 @@
-# $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/ \
@@ -8,9 +13,10 @@ ADDITIONAL_LIB_DIRS += \
        -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             \
index bf13ead430b1326647046dce00ec5c313d4809bf..1018ad738668e673a3df4b10a6d371026f4297c3 100644 (file)
 
 @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 */
index 7e6d556bcd8a16812873afd10be443152c915547..ce89c08f0443aeb30a766a8dd64fd6267dd8c455 100644 (file)
@@ -23,3 +23,24 @@ What it does
 - 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>
index 2fcec7494dfadab01251a640e24b52f8dd74cdc6..2242b25ff965d0894e8035e72adc9c8f8391b864 100644 (file)
@@ -227,6 +227,28 @@ static BOOL doCrashOnSessionCreate = NO;
   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;
@@ -241,11 +263,7 @@ static BOOL doCrashOnSessionCreate = NO;
   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;
   }
index cf565572cd711054451626198f7980a296b83737..f5941672bc305bf3a6c6acec6bbceda14c3dd4bd 100644 (file)
 
 #import <Foundation/NSObject.h>
 
+@class NSString, NSArray;
+
 @interface SOGoProductLoader : NSObject
 {
   NSString *productDirectoryName;
+  NSArray  *searchPathes;
 }
 
 + (id)productLoader;
index 8c4d545c8c48470014e80f2af86ebaa58ba45642..bd115d327562a884e11720eb851099e98452c395 100644 (file)
 
 @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];
     }
index 6cdceca85a4dd7ddae7234aeafbc0596f442986b..053584a7c0532dbab489bdd2b114a35a14726a89 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-SUBMINOR_VERSION:=20
+SUBMINOR_VERSION:=21
 
 # v0.9.16 requires NGExtensions v4.5.136
index b6b8673719d9f8f096e42325f40a5c5f3b53d370..1303d9b15bbfbb3cff77d7e5bcf86f58bbc84102 100644 (file)
@@ -1,4 +1,6 @@
 {
+  requires = ( MAIN );
+
   publicResources = (
   );
 
index cd675a2c46bf03aa7cdb149658a9e0bba87ce45e..35b48ee619e1de283be3f062da10f581ba36a837 100644 (file)
@@ -1,9 +1,11 @@
 # 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..            \
index 384a6aa887930cf9ee228782e7912a47ae70cc85..947d9a0c65a0564fd552ce24a1c240c267257a5c 100644 (file)
@@ -1,9 +1,11 @@
 # 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.. \
index b4b95637cfceeccd72abf78d1c89d7a1c31c540e..c7697360fc5ea0065e60324c5586bd0bd70fece0 100644 (file)
@@ -1,3 +1,7 @@
+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)
index 2ba14261ab420e6d1724ca2679a12019fe52b24f..bee0fdb0e45b5f666405ab96ef644aef150cc1d5 100644 (file)
@@ -1,10 +1,8 @@
 # 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
 
index 7374c9b8995453db277418878622b6c0ad74f8d3..51e753f7d861f501ab499509ea863361fd41f793 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-SUBMINOR_VERSION:=34
+SUBMINOR_VERSION:=35
 
 # v0.9.28 requires NGExtensions v4.5.136
index 1912e2f7190664df5aa11afb8233afcec7e80dc4..04f510a903c97c15fddd1e151c585c80e971bdb8 100644 (file)
@@ -1,9 +1,11 @@
 # 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..            \
index 398c99c9b1613bb152a6b624f7d6ffef391c3f1a..99ae2aadf12460234f09fd52034b3adc62a5d375 100644 (file)
@@ -1,4 +1,3 @@
-# $Id$
 #
 # This file is included by library makefiles to set the version information
 # of the executable.