Enable prebinding (and automatic prebind updating at runtime) for static builds. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@123865 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2f09b1be65
commit
a5fa9e3d05
@ -197,6 +197,7 @@
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA,
|
||||
F56F241F02AC6D0401A967F3,
|
||||
F5D1421902BC88F801A967F3,
|
||||
);
|
||||
isa = PBXGroup;
|
||||
name = "Other Sources";
|
||||
@ -4224,7 +4225,6 @@
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
OTHER_CFLAGS = "-fno-rtti -DOSTYPE=\\\"Darwin1.4\\\" -DOSARCH=\\\"Darwin\\\" -D_BUILD_STATIC_BIN";
|
||||
OTHER_LDFLAGS = "-lxpcom -lplds4 -lplc4 -lnspr4 -lsmime3 -lssl3 -lnss3 -lsoftokn3 -lmozjs -lmozjpeg -ljsj -lmozpng -lmozmng -lpthread -lz -lm";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = Navigator;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wno-four-char-constants -Wno-unknown-pragmas -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-long-long";
|
||||
@ -6121,6 +6121,7 @@
|
||||
F5BAAC3F02AC6AA201A967F3,
|
||||
F5BAAC4002AC6AA201A967F3,
|
||||
F585F52902B2C66C01A967F3,
|
||||
F5D1421A02BC88F901A967F3,
|
||||
);
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
name = "Copy Files";
|
||||
@ -6211,6 +6212,17 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D1421902BC88F801A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
path = "redo-prebinding.sh";
|
||||
refType = 2;
|
||||
};
|
||||
F5D1421A02BC88F901A967F3 = {
|
||||
fileRef = F5D1421902BC88F801A967F3;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D3F1CE0209235A014E447F = {
|
||||
isa = PBXFileReference;
|
||||
name = libmork.dylib;
|
||||
|
||||
@ -122,4 +122,7 @@ class BookmarksService;
|
||||
|
||||
+ (NSImage*)createImageForDragging:(NSImage*)aIcon title:(NSString*)aTitle;
|
||||
|
||||
- (void)updatePrebinding;
|
||||
- (void)prebindFinished:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include "nsIChromeRegistry.h"
|
||||
#import "CHAboutBox.h"
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <mach-o/dyld.h>
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
@ -104,6 +105,10 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
[self updatePrebinding];
|
||||
#endif
|
||||
|
||||
mPreferenceManager = [[CHPreferenceManager sharedInstance] retain];
|
||||
|
||||
[self newWindow: self];
|
||||
@ -553,6 +558,34 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) updatePrebinding
|
||||
{
|
||||
// Check our prebinding status. If we didn't launch prebound,
|
||||
// fork the update script.
|
||||
|
||||
if (!_dyld_launched_prebound()) {
|
||||
NSLog(@"Not prebound, launching update script\n");
|
||||
NSTask* aTask = [[NSTask alloc] init];
|
||||
NSArray* args = [NSArray arrayWithObject: @"redo-prebinding.sh"];
|
||||
|
||||
[aTask setCurrentDirectoryPath:[[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent]];
|
||||
[aTask setLaunchPath:@"/bin/sh"];
|
||||
[aTask setArguments:args];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector:@selector(prebindFinished:)
|
||||
name:NSTaskDidTerminateNotification
|
||||
object: nil];
|
||||
|
||||
[aTask launch];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prebindFinished:(NSNotification *)aNotification
|
||||
{
|
||||
[[aNotification object] release];
|
||||
}
|
||||
|
||||
// services
|
||||
|
||||
- (void)openURL:(NSPasteboard *) pboard userData:(NSString *) userData error:(NSString **) error
|
||||
|
||||
@ -197,6 +197,7 @@
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA,
|
||||
F56F241F02AC6D0401A967F3,
|
||||
F5D1421902BC88F801A967F3,
|
||||
);
|
||||
isa = PBXGroup;
|
||||
name = "Other Sources";
|
||||
@ -4224,7 +4225,6 @@
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
OTHER_CFLAGS = "-fno-rtti -DOSTYPE=\\\"Darwin1.4\\\" -DOSARCH=\\\"Darwin\\\" -D_BUILD_STATIC_BIN";
|
||||
OTHER_LDFLAGS = "-lxpcom -lplds4 -lplc4 -lnspr4 -lsmime3 -lssl3 -lnss3 -lsoftokn3 -lmozjs -lmozjpeg -ljsj -lmozpng -lmozmng -lpthread -lz -lm";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = Navigator;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wno-four-char-constants -Wno-unknown-pragmas -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-long-long";
|
||||
@ -6121,6 +6121,7 @@
|
||||
F5BAAC3F02AC6AA201A967F3,
|
||||
F5BAAC4002AC6AA201A967F3,
|
||||
F585F52902B2C66C01A967F3,
|
||||
F5D1421A02BC88F901A967F3,
|
||||
);
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
name = "Copy Files";
|
||||
@ -6211,6 +6212,17 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D1421902BC88F801A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
path = "redo-prebinding.sh";
|
||||
refType = 2;
|
||||
};
|
||||
F5D1421A02BC88F901A967F3 = {
|
||||
fileRef = F5D1421902BC88F801A967F3;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D3F1CE0209235A014E447F = {
|
||||
isa = PBXFileReference;
|
||||
name = libmork.dylib;
|
||||
|
||||
2
mozilla/camino/projects/redo-prebinding.sh
Normal file
2
mozilla/camino/projects/redo-prebinding.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
update_prebinding -files `pwd`/*
|
||||
2
mozilla/camino/redo-prebinding.sh
Normal file
2
mozilla/camino/redo-prebinding.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
update_prebinding -files `pwd`/*
|
||||
@ -122,4 +122,7 @@ class BookmarksService;
|
||||
|
||||
+ (NSImage*)createImageForDragging:(NSImage*)aIcon title:(NSString*)aTitle;
|
||||
|
||||
- (void)updatePrebinding;
|
||||
- (void)prebindFinished:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include "nsIChromeRegistry.h"
|
||||
#import "CHAboutBox.h"
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <mach-o/dyld.h>
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
@ -104,6 +105,10 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
[self updatePrebinding];
|
||||
#endif
|
||||
|
||||
mPreferenceManager = [[CHPreferenceManager sharedInstance] retain];
|
||||
|
||||
[self newWindow: self];
|
||||
@ -553,6 +558,34 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) updatePrebinding
|
||||
{
|
||||
// Check our prebinding status. If we didn't launch prebound,
|
||||
// fork the update script.
|
||||
|
||||
if (!_dyld_launched_prebound()) {
|
||||
NSLog(@"Not prebound, launching update script\n");
|
||||
NSTask* aTask = [[NSTask alloc] init];
|
||||
NSArray* args = [NSArray arrayWithObject: @"redo-prebinding.sh"];
|
||||
|
||||
[aTask setCurrentDirectoryPath:[[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent]];
|
||||
[aTask setLaunchPath:@"/bin/sh"];
|
||||
[aTask setArguments:args];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector:@selector(prebindFinished:)
|
||||
name:NSTaskDidTerminateNotification
|
||||
object: nil];
|
||||
|
||||
[aTask launch];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prebindFinished:(NSNotification *)aNotification
|
||||
{
|
||||
[[aNotification object] release];
|
||||
}
|
||||
|
||||
// services
|
||||
|
||||
- (void)openURL:(NSPasteboard *) pboard userData:(NSString *) userData error:(NSString **) error
|
||||
|
||||
2
mozilla/camino/src/scripts/redo-prebinding.sh
Normal file
2
mozilla/camino/src/scripts/redo-prebinding.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
update_prebinding -files `pwd`/*
|
||||
@ -197,6 +197,7 @@
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA,
|
||||
F56F241F02AC6D0401A967F3,
|
||||
F5D1421902BC88F801A967F3,
|
||||
);
|
||||
isa = PBXGroup;
|
||||
name = "Other Sources";
|
||||
@ -4224,7 +4225,6 @@
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
OTHER_CFLAGS = "-fno-rtti -DOSTYPE=\\\"Darwin1.4\\\" -DOSARCH=\\\"Darwin\\\" -D_BUILD_STATIC_BIN";
|
||||
OTHER_LDFLAGS = "-lxpcom -lplds4 -lplc4 -lnspr4 -lsmime3 -lssl3 -lnss3 -lsoftokn3 -lmozjs -lmozjpeg -ljsj -lmozpng -lmozmng -lpthread -lz -lm";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = Navigator;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wno-four-char-constants -Wno-unknown-pragmas -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-long-long";
|
||||
@ -6121,6 +6121,7 @@
|
||||
F5BAAC3F02AC6AA201A967F3,
|
||||
F5BAAC4002AC6AA201A967F3,
|
||||
F585F52902B2C66C01A967F3,
|
||||
F5D1421A02BC88F901A967F3,
|
||||
);
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
name = "Copy Files";
|
||||
@ -6211,6 +6212,17 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D1421902BC88F801A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
path = "redo-prebinding.sh";
|
||||
refType = 2;
|
||||
};
|
||||
F5D1421A02BC88F901A967F3 = {
|
||||
fileRef = F5D1421902BC88F801A967F3;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D3F1CE0209235A014E447F = {
|
||||
isa = PBXFileReference;
|
||||
name = libmork.dylib;
|
||||
|
||||
@ -122,4 +122,7 @@ class BookmarksService;
|
||||
|
||||
+ (NSImage*)createImageForDragging:(NSImage*)aIcon title:(NSString*)aTitle;
|
||||
|
||||
- (void)updatePrebinding;
|
||||
- (void)prebindFinished:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include "nsIChromeRegistry.h"
|
||||
#import "CHAboutBox.h"
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <mach-o/dyld.h>
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
@ -104,6 +105,10 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
[self updatePrebinding];
|
||||
#endif
|
||||
|
||||
mPreferenceManager = [[CHPreferenceManager sharedInstance] retain];
|
||||
|
||||
[self newWindow: self];
|
||||
@ -553,6 +558,34 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) updatePrebinding
|
||||
{
|
||||
// Check our prebinding status. If we didn't launch prebound,
|
||||
// fork the update script.
|
||||
|
||||
if (!_dyld_launched_prebound()) {
|
||||
NSLog(@"Not prebound, launching update script\n");
|
||||
NSTask* aTask = [[NSTask alloc] init];
|
||||
NSArray* args = [NSArray arrayWithObject: @"redo-prebinding.sh"];
|
||||
|
||||
[aTask setCurrentDirectoryPath:[[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent]];
|
||||
[aTask setLaunchPath:@"/bin/sh"];
|
||||
[aTask setArguments:args];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector:@selector(prebindFinished:)
|
||||
name:NSTaskDidTerminateNotification
|
||||
object: nil];
|
||||
|
||||
[aTask launch];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prebindFinished:(NSNotification *)aNotification
|
||||
{
|
||||
[[aNotification object] release];
|
||||
}
|
||||
|
||||
// services
|
||||
|
||||
- (void)openURL:(NSPasteboard *) pboard userData:(NSString *) userData error:(NSString **) error
|
||||
|
||||
@ -197,6 +197,7 @@
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA,
|
||||
F56F241F02AC6D0401A967F3,
|
||||
F5D1421902BC88F801A967F3,
|
||||
);
|
||||
isa = PBXGroup;
|
||||
name = "Other Sources";
|
||||
@ -4224,7 +4225,6 @@
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
OTHER_CFLAGS = "-fno-rtti -DOSTYPE=\\\"Darwin1.4\\\" -DOSARCH=\\\"Darwin\\\" -D_BUILD_STATIC_BIN";
|
||||
OTHER_LDFLAGS = "-lxpcom -lplds4 -lplc4 -lnspr4 -lsmime3 -lssl3 -lnss3 -lsoftokn3 -lmozjs -lmozjpeg -ljsj -lmozpng -lmozmng -lpthread -lz -lm";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = Navigator;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = "-Wno-four-char-constants -Wno-unknown-pragmas -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-long-long";
|
||||
@ -6121,6 +6121,7 @@
|
||||
F5BAAC3F02AC6AA201A967F3,
|
||||
F5BAAC4002AC6AA201A967F3,
|
||||
F585F52902B2C66C01A967F3,
|
||||
F5D1421A02BC88F901A967F3,
|
||||
);
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
name = "Copy Files";
|
||||
@ -6211,6 +6212,17 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D1421902BC88F801A967F3 = {
|
||||
isa = PBXFileReference;
|
||||
path = "redo-prebinding.sh";
|
||||
refType = 2;
|
||||
};
|
||||
F5D1421A02BC88F901A967F3 = {
|
||||
fileRef = F5D1421902BC88F801A967F3;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
F5D3F1CE0209235A014E447F = {
|
||||
isa = PBXFileReference;
|
||||
name = libmork.dylib;
|
||||
|
||||
2
mozilla/chimera/projects/redo-prebinding.sh
Normal file
2
mozilla/chimera/projects/redo-prebinding.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
update_prebinding -files `pwd`/*
|
||||
2
mozilla/chimera/redo-prebinding.sh
Normal file
2
mozilla/chimera/redo-prebinding.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
update_prebinding -files `pwd`/*
|
||||
@ -122,4 +122,7 @@ class BookmarksService;
|
||||
|
||||
+ (NSImage*)createImageForDragging:(NSImage*)aIcon title:(NSString*)aTitle;
|
||||
|
||||
- (void)updatePrebinding;
|
||||
- (void)prebindFinished:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include "nsIChromeRegistry.h"
|
||||
#import "CHAboutBox.h"
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <mach-o/dyld.h>
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
@ -104,6 +105,10 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
[self updatePrebinding];
|
||||
#endif
|
||||
|
||||
mPreferenceManager = [[CHPreferenceManager sharedInstance] retain];
|
||||
|
||||
[self newWindow: self];
|
||||
@ -553,6 +558,34 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) updatePrebinding
|
||||
{
|
||||
// Check our prebinding status. If we didn't launch prebound,
|
||||
// fork the update script.
|
||||
|
||||
if (!_dyld_launched_prebound()) {
|
||||
NSLog(@"Not prebound, launching update script\n");
|
||||
NSTask* aTask = [[NSTask alloc] init];
|
||||
NSArray* args = [NSArray arrayWithObject: @"redo-prebinding.sh"];
|
||||
|
||||
[aTask setCurrentDirectoryPath:[[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent]];
|
||||
[aTask setLaunchPath:@"/bin/sh"];
|
||||
[aTask setArguments:args];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector:@selector(prebindFinished:)
|
||||
name:NSTaskDidTerminateNotification
|
||||
object: nil];
|
||||
|
||||
[aTask launch];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prebindFinished:(NSNotification *)aNotification
|
||||
{
|
||||
[[aNotification object] release];
|
||||
}
|
||||
|
||||
// services
|
||||
|
||||
- (void)openURL:(NSPasteboard *) pboard userData:(NSString *) userData error:(NSString **) error
|
||||
|
||||
2
mozilla/chimera/src/scripts/redo-prebinding.sh
Normal file
2
mozilla/chimera/src/scripts/redo-prebinding.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
update_prebinding -files `pwd`/*
|
||||
Loading…
x
Reference in New Issue
Block a user