This commit is contained in:
Dão Gottwald 2008-10-01 01:37:38 +02:00
commit 1f9d4456e8
6 changed files with 48 additions and 9 deletions

View File

@ -258,7 +258,7 @@ EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
endif
endif # WINNT
ifeq ($(OS_ARCH),WINCE)
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell cellcore uuid ole32 oleaut32 )
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell cellcore uuid ole32 oleaut32 Ws2)
endif

View File

@ -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::

View File

@ -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)|" \

View File

@ -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

View File

@ -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)

View File

@ -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)