mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
d4582b821c
153 changed files with 172 additions and 4555 deletions
|
|
@ -19,8 +19,4 @@ pref("browser.preferences.instantApply", false);
|
|||
#else
|
||||
pref("browser.preferences.instantApply", true);
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
pref("browser.preferences.animateFadeIn", true);
|
||||
#else
|
||||
pref("browser.preferences.animateFadeIn", false);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@
|
|||
#define strcasecmp _stricmp
|
||||
#define PATH_SEPARATOR_CHAR '\\'
|
||||
#define R_OK 04
|
||||
#elif defined(XP_MACOSX)
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#define PATH_SEPARATOR_CHAR '/'
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
|
@ -160,41 +155,6 @@ main(int argc, char **argv)
|
|||
char greDir[MAXPATHLEN];
|
||||
bool greFound = false;
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
CFBundleRef appBundle = CFBundleGetMainBundle();
|
||||
if (!appBundle)
|
||||
return 1;
|
||||
|
||||
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(appBundle);
|
||||
if (!resourcesURL)
|
||||
return 1;
|
||||
|
||||
CFURLRef absResourcesURL = CFURLCopyAbsoluteURL(resourcesURL);
|
||||
CFRelease(resourcesURL);
|
||||
if (!absResourcesURL)
|
||||
return 1;
|
||||
|
||||
CFURLRef iniFileURL =
|
||||
CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault,
|
||||
absResourcesURL,
|
||||
CFSTR("application.ini"),
|
||||
false);
|
||||
CFRelease(absResourcesURL);
|
||||
if (!iniFileURL)
|
||||
return 1;
|
||||
|
||||
CFStringRef iniPathStr =
|
||||
CFURLCopyFileSystemPath(iniFileURL, kCFURLPOSIXPathStyle);
|
||||
CFRelease(iniFileURL);
|
||||
if (!iniPathStr)
|
||||
return 1;
|
||||
|
||||
CFStringGetCString(iniPathStr, iniPath, sizeof(iniPath),
|
||||
kCFStringEncodingUTF8);
|
||||
CFRelease(iniPathStr);
|
||||
|
||||
#else
|
||||
|
||||
#ifdef XP_WIN
|
||||
wchar_t wide_path[MAX_PATH];
|
||||
if (!::GetModuleFileNameW(nullptr, wide_path, MAX_PATH))
|
||||
|
|
@ -276,8 +236,6 @@ main(int argc, char **argv)
|
|||
|
||||
strncpy(lastSlash, "application.ini", sizeof(iniPath) - (lastSlash - iniPath));
|
||||
|
||||
#endif
|
||||
|
||||
// If -app parameter was passed in, it is now time to take it under
|
||||
// consideration.
|
||||
const char *appDataFile;
|
||||
|
|
@ -334,33 +292,6 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
if (!greFound) {
|
||||
#ifdef XP_MACOSX
|
||||
// The bundle can be found next to the executable, in the MacOS dir.
|
||||
CFURLRef exurl = CFBundleCopyExecutableURL(appBundle);
|
||||
CFURLRef absexurl = nullptr;
|
||||
if (exurl) {
|
||||
absexurl = CFURLCopyAbsoluteURL(exurl);
|
||||
CFRelease(exurl);
|
||||
}
|
||||
|
||||
if (absexurl) {
|
||||
char tbuffer[MAXPATHLEN];
|
||||
|
||||
if (CFURLGetFileSystemRepresentation(absexurl, true,
|
||||
(UInt8*) tbuffer,
|
||||
sizeof(tbuffer)) &&
|
||||
access(tbuffer, R_OK | X_OK) == 0) {
|
||||
if (realpath(tbuffer, greDir)) {
|
||||
greFound = true;
|
||||
}
|
||||
else {
|
||||
greDir[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
CFRelease(absexurl);
|
||||
}
|
||||
#endif
|
||||
if (!greFound) {
|
||||
Output(false, "Could not find the Mozilla runtime.\n");
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue