Skip to content

Commit 0183e5d

Browse files
committed
Gecko changes that allow us to specify the location of xpcom.dll and hence all the xulrunner binaries (currently hardcoded to c:\Program Files (x86)\Gist\Gist Desktop - TODO fix this)
1 parent 88aadb7 commit 0183e5d

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

common/EmbeddingSetup.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ MozEmbedDirectoryProvider::GetFiles(const char *aKey,
150150

151151
nsresult InitEmbedding(const char* aProfilePath,
152152
const nsStaticModuleInfo* aComps,
153-
int aNumComps)
153+
int aNumComps,
154+
const char* aEmbedPath)
154155
{
155156
nsresult rv;
156157

@@ -174,7 +175,8 @@ nsresult InitEmbedding(const char* aProfilePath,
174175

175176
if (NS_FAILED(rv)) {
176177
cerr << "Unable to find GRE, try setting GRE_HOME." << endl;
177-
return 1;
178+
//return 1;
179+
xpcomPath = aEmbedPath;
178180
}
179181

180182
// start the glue, i.e. load and link against xpcom shared lib

common/EmbeddingSetup.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ typedef PRUint32 nsresult;
6161
*/
6262
nsresult InitEmbedding(const char* aProfilePath = 0,
6363
const nsStaticModuleInfo* aComps = 0,
64-
int aNumComps = 0);
64+
int aNumComps = 0,
65+
const char* aEmbedPath = 0);
6566

6667
/**
6768
* Terminates embedding, i.e. does teardown and unloads needed libs.

common/embed.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ using namespace std;
8282
// globals
8383
static nsCOMPtr<WindowCreator> sWindowCreator;
8484

85-
MozApp::MozApp(const char* aProfilePath)
85+
MozApp::MozApp(const char* aProfilePath, const char* aEmbedPath)
8686
{
87-
InitEmbedding(aProfilePath);
87+
InitEmbedding(aProfilePath, 0, 0, aEmbedPath);
8888
}
8989

9090
MozApp::~MozApp()

common/embed.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ class MozApp
6868
* mozembed of the application dir (where the executable
6969
* recides). <b>NOTE:</b> Must be set before any MozView
7070
* is created, otherwise the default is used.
71+
* @param aEmbedPath is an optional path to the xpcom.dll
72+
* and is used when we are embedded.
7173
*/
72-
MozApp(const char* aProfilePath = 0);
74+
MozApp(const char* aProfilePath = 0, const char* aEmbedPath = 0);
7375

7476
/**
7577
* Destructor.

0 commit comments

Comments
 (0)