|
|
|
@ -23,9 +23,11 @@
|
|
|
|
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
|
|
|
|
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <process.h>
|
|
|
|
#include <process.h>
|
|
|
|
|
|
|
|
#define EXEXT ".exe"
|
|
|
|
#define EXECL _execl
|
|
|
|
#define EXECL _execl
|
|
|
|
#define PUTENV _putenv
|
|
|
|
#define PUTENV _putenv
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define EXEXT ""
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#define EXECL execl
|
|
|
|
#define EXECL execl
|
|
|
|
@ -100,18 +102,9 @@ int main(int argc, char *argv[]) {
|
|
|
|
directoriesIt = xulrunnerPossibleDirectories.begin();
|
|
|
|
directoriesIt = xulrunnerPossibleDirectories.begin();
|
|
|
|
while (xulrunnerPath.empty() && directoriesIt != xulrunnerPossibleDirectories.end()) {
|
|
|
|
while (xulrunnerPath.empty() && directoriesIt != xulrunnerPossibleDirectories.end()) {
|
|
|
|
if (fileExists(*directoriesIt)) {
|
|
|
|
if (fileExists(*directoriesIt)) {
|
|
|
|
#ifdef _WIN32
|
|
|
|
xulrunnerPath = computeAbsolutePath(*directoriesIt, std::string("xulrunner-bin") + std::string(EXEXT));
|
|
|
|
xulrunnerPath = computeAbsolutePath(*directoriesIt, "xulrunner-bin.exe");
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
xulrunnerPath = computeAbsolutePath(*directoriesIt, "xulrunner-bin");
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!fileExists(xulrunnerPath)) {
|
|
|
|
if (!fileExists(xulrunnerPath)) {
|
|
|
|
#ifdef _WIN32
|
|
|
|
xulrunnerPath = computeAbsolutePath(*directoriesIt, std::string("xulrunner") + std::string(EXEXT));
|
|
|
|
xulrunnerPath = computeAbsolutePath(*directoriesIt, "xulrunner.exe");
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
xulrunnerPath = computeAbsolutePath(*directoriesIt, "xulrunner");
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (!fileExists(xulrunnerPath)) {
|
|
|
|
if (!fileExists(xulrunnerPath)) {
|
|
|
|
xulrunnerPath.clear();
|
|
|
|
xulrunnerPath.clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|