Monotone-Parent: dfb14f2703df6b34884a9fb24c8a1e3346359c45

Monotone-Revision: a7f4ebc5a4a1d9fe0406a1c608757fb14147fa5d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-03-18T22:13:04
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-03-18 22:13:04 +00:00
parent bcff48ba8c
commit 4c832536e9
8 changed files with 41 additions and 40 deletions

View File

@@ -1,5 +1,18 @@
2009-03-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Main/sogod.m (convertOldSOGoDomain): new function that convert
the old "sogod-0.9" NSUserDefaults domain to "sogod".
* Main/SOGoProductLoader.m ([SOGoProductLoader
+sogoMajorVersion]): removed useless method.
([SOGoProductLoader +sogoMinorVersion]): removed useless method.
([SOGoProductLoader -init]): productDirectoryName is no longer an
ivar but a static string.
([SOGoProductLoader -productSearchPathes]): removed FHS paths from
search paths.
* Main/SOGo.m ([SOGo -name]): returns "SOGo".
* SoObjects/SOGo/SOGoParentFolder.m ([SOGoParentFolder
-appendPersonalSources]): returns an NSException.
([SOGoParentFolder -appendSystemSources]): same as above.

View File

@@ -8,7 +8,7 @@ include ./Version
ADDITIONAL_INCLUDE_DIRS += -I../SOPE/ -D_GNU_SOURCE
ADDITIONAL_LIB_DIRS += -L../SOPE/GDLContentStore/obj/
SOGOD = sogod-$(MAJOR_VERSION).$(MINOR_VERSION)
SOGOD = sogod
TOOL_NAME = $(SOGOD)
$(SOGOD)_INSTALL_DIR = $(SOGO_ADMIN_TOOLS)

View File

@@ -602,7 +602,7 @@ static BOOL debugObjectAllocation = NO;
- (NSString *) name
{
return @"SOGo-0.9";
return @"SOGo";
}
@end /* SOGo */

View File

@@ -29,7 +29,6 @@
@interface SOGoProductLoader : NSObject
{
NSString *productDirectoryName;
NSArray *searchPathes;
}

View File

@@ -30,38 +30,17 @@
#import "SOGoProductLoader.h"
static NSString *productDirectoryName = @"SOGo";
@implementation SOGoProductLoader
+ (int) sogoMajorVersion
{
return SOGO_MAJOR_VERSION;
}
+ (int) sogoMinorVersion
{
return SOGO_MINOR_VERSION;
}
+ (id) productLoader
{
return [[self new] autorelease];
}
- (id) init
{
if ((self = [super init]))
{
productDirectoryName =
[[NSString alloc] initWithFormat: @"SOGo-%i.%i",
[[self class] sogoMajorVersion],
[[self class] sogoMinorVersion]];
}
return self;
}
- (void) dealloc
{
[productDirectoryName release];
[searchPathes release];
[super dealloc];
}
@@ -99,15 +78,6 @@
[directory stringByAppendingPathComponent: productDirectoryName]];
}
- (void) _addFHSPathesToArray: (NSMutableArray *) ma
{
NSString *s;
s = @"sogod-0.9";
[ma addObject: [NSString stringWithFormat: @"/usr/local/lib/%@", s]];
[ma addObject: [NSString stringWithFormat: @"/usr/lib/%@", s]];
}
- (NSArray *) productSearchPathes
{
NSMutableArray *ma;
@@ -122,8 +92,6 @@
[self _addCocoaSearchPathesToArray: ma];
#endif
[self _addFHSPathesToArray: ma];
searchPathes = [ma copy];
if ([searchPathes count] == 0)

View File

@@ -55,6 +55,25 @@ BootstrapNSUserDefaults ()
}
}
static void
convertOldSOGoDomain (NSUserDefaults *ud)
{
NSDictionary *domain;
domain = [ud persistentDomainForName: @"sogod"];
if (![domain count])
{
domain = [ud persistentDomainForName: @"sogod-0.9"];
if ([domain count])
{
NSLog (@"migrating user defaults from sogod-0.9");
[ud setPersistentDomain: domain forName: @"sogod"];
[ud removePersistentDomainForName: @"sogod-0.9"];
[ud synchronize];
}
}
}
int
main (int argc, char **argv, char **env)
{
@@ -76,6 +95,8 @@ main (int argc, char **argv, char **env)
count: argc environment: env];
#endif
ud = [NSUserDefaults standardUserDefaults];
convertOldSOGoDomain (ud);
rc = 0;
tzName = [ud stringForKey: @"SOGoServerTimeZone"];
if (!tzName)

View File

@@ -3,7 +3,7 @@
function initLogin() {
var date = new Date();
date.setTime(date.getTime() - 86400000);
document.cookie = ("0xHIGHFLYxSOGo-0.9=discard; path=/"
document.cookie = ("0xHIGHFLYxSOGo=discard; path=/"
+ "; expires=" + date.toGMTString());
var submit = $("submit");
submit.observe("click", onLoginClick);
@@ -56,7 +56,7 @@ function onLoginCallback(http) {
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf("0xHIGHFLYxSOGo-0.9=") == 0) {
if (c.indexOf("0xHIGHFLYxSOGo=") == 0) {
cookieExists = 1;
break;
}

2
configure vendored
View File

@@ -249,7 +249,7 @@ genConfigMake() {
fi
cfgwrite "SOGO_SYSLIBDIR=\${GNUSTEP_LIBRARIES}"
cfgwrite "SOGO_LIBDIR=\${GNUSTEP_LIBRARY}/SOGo-\${SOGO_MAJOR_VERSION}.\${SOGO_MINOR_VERSION}"
cfgwrite "SOGO_LIBDIR=\${GNUSTEP_LIBRARY}/SOGo"
cfgwrite "SOGO_TEMPLATESDIR=\${SOGO_LIBDIR}/Templates"
cfgwrite "SOGO_WEBSERVERRESOURCESDIR=\${SOGO_LIBDIR}/WebServerResources"
cfgwrite "SOGO_TOOLS=\${GNUSTEP_TOOLS}"