mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 13:52:37 +00:00
Bug 420928, 457331. Fixes main entry point on windows ce. minor windows mobile fixes in XR. r=bsmedberg
This commit is contained in:
parent
2f97fe678d
commit
beda333350
@ -110,8 +110,12 @@ include $(topsrcdir)/config/rules.mk
|
||||
DEFINES += -DNS_NO_XPCOM
|
||||
|
||||
ifdef _MSC_VER
|
||||
ifdef WINCE
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
||||
else
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
libs::
|
||||
|
@ -84,7 +84,7 @@ REQUIRES = \
|
||||
|
||||
CPPSRCS = nsXULRunnerApp.cpp
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
||||
CPPSRCS += nsRegisterGREWin.cpp
|
||||
else
|
||||
ifneq (,$(filter OS2 Darwin,$(OS_ARCH)))
|
||||
@ -145,8 +145,12 @@ include $(topsrcdir)/config/config.mk
|
||||
ifdef _MSC_VER
|
||||
# Always enter a Windows program through wmain, whether or not we're
|
||||
# a console application.
|
||||
ifdef WINCE
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
||||
else
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
|
||||
@ -200,7 +204,7 @@ LDFLAGS += /HEAP:0x40000
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter-out OS2 WINNT Darwin BeOS,$(OS_ARCH)))
|
||||
ifneq (,$(filter-out OS2 WINCE WINNT Darwin BeOS,$(OS_ARCH)))
|
||||
|
||||
xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
|
||||
cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
|
||||
|
@ -75,7 +75,7 @@ static void Output(PRBool isError, const char *fmt, ... )
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
#if defined(XP_WIN) && !MOZ_WINCONSOLE
|
||||
#if (defined(XP_WIN) && !MOZ_WINCONSOLE) || defined(WINCE)
|
||||
char *msg = PR_vsmprintf(fmt, ap);
|
||||
if (msg)
|
||||
{
|
||||
@ -84,7 +84,17 @@ static void Output(PRBool isError, const char *fmt, ... )
|
||||
flags |= MB_ICONERROR;
|
||||
else
|
||||
flags |= MB_ICONINFORMATION;
|
||||
MessageBox(NULL, msg, "XULRunner", flags);
|
||||
|
||||
wchar_t wide_msg[1024];
|
||||
MultiByteToWideChar(CP_ACP,
|
||||
0,
|
||||
msg,
|
||||
-1,
|
||||
wide_msg,
|
||||
sizeof(wide_msg) / sizeof(wchar_t));
|
||||
|
||||
MessageBoxW(NULL, wide_msg, L"XULRunner", flags);
|
||||
|
||||
PR_smprintf_free(msg);
|
||||
}
|
||||
#else
|
||||
|
@ -73,7 +73,7 @@ LIBS += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
||||
RCINCLUDE = xulrunner-stub.rc
|
||||
ifndef GNU_CC
|
||||
RCFLAGS += -DMOZ_XULRUNNER -I$(srcdir)
|
||||
@ -94,8 +94,12 @@ endif
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifdef _MSC_VER
|
||||
ifdef WINCE
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
||||
else
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
|
@ -87,7 +87,7 @@ static void Output(PRBool isError, const char *fmt, ... )
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
#if defined(XP_WIN) && !MOZ_WINCONSOLE
|
||||
#if (defined(XP_WIN) && !MOZ_WINCONSOLE) || defined(WINCE)
|
||||
char msg[2048];
|
||||
|
||||
vsnprintf(msg, sizeof(msg), fmt, ap);
|
||||
@ -97,7 +97,16 @@ static void Output(PRBool isError, const char *fmt, ... )
|
||||
flags |= MB_ICONERROR;
|
||||
else
|
||||
flags |= MB_ICONINFORMATION;
|
||||
MessageBox(NULL, msg, "XULRunner", flags);
|
||||
|
||||
wchar_t wide_msg[1024];
|
||||
MultiByteToWideChar(CP_ACP,
|
||||
0,
|
||||
msg,
|
||||
-1,
|
||||
wide_msg,
|
||||
sizeof(wide_msg) / sizeof(wchar_t));
|
||||
|
||||
MessageBoxW(NULL, wide_msg, L"XULRunner", flags);
|
||||
#else
|
||||
vfprintf(stderr, fmt, ap);
|
||||
#endif
|
||||
@ -176,7 +185,15 @@ main(int argc, char **argv)
|
||||
#else
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (!::GetModuleFileName(NULL, iniPath, sizeof(iniPath)))
|
||||
wchar_t wide_path[MAX_PATH];
|
||||
MultiByteToWideChar(CP_ACP,
|
||||
0,
|
||||
iniPath,
|
||||
-1,
|
||||
wide_path,
|
||||
MAX_PATH);
|
||||
|
||||
if (!::GetModuleFileNameW(NULL, wide_path, MAX_PATH))
|
||||
return 1;
|
||||
|
||||
#elif defined(XP_OS2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user