Merging for checkin of bug 501746

This commit is contained in:
Nick Kreeger 2009-07-01 11:45:18 -07:00
commit 4eddd594bc
4 changed files with 53 additions and 28 deletions

View File

@ -20,6 +20,7 @@
#
# Contributor(s):
# John Wolfe <wolfe@lobo.us>
# Vladimir Vukicevic <vladimir@pobox.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -39,7 +40,8 @@
# make-wince-cab.py --- Given a directory, walk it and make an
# installer based upon the contents of that directory
#
# Usage: python make-wince-inf.py CABWIZ_PATH SOURCE_DIR PROGRAM_NAME CAB_FINAL_NAME
# Usage:
# python make-wince-inf.py [-s] [CABWIZ_PATH] SOURCE_DIR PROGRAM_NAME CAB_FINAL_NAME
#
# Walk through the relative directory SOURCE_DIR, parsing filenames
# Checks for duplicate filenames and renames where needed
@ -57,15 +59,18 @@
# python make_wince_inf.py /c/Program\ Files/Microsoft\ Visual\ Studio\ 9.0/SmartDevices/SDK/SDKTools/cabwiz.exe dist/fennec Fennec fennec-0.11.en-US.wince-arm.cab
#
# ARGS:
# cabiz_path - Path to CABWIZ.EXE executable inside Visual Studio
# -s - Don't pass /compress to cabwiz (generate CAB compatible with Windows CE)
#
# source_dir - sub-directory which contains the target program
# CABWIZ_PATH - If specified, will use this cabwiz.exe executable. Otherwise, will attempt
# to find one using $VSINSTALLDIR.
#
# SOURCE_DIR - sub-directory which contains the target program
# NOTE: It is assumed that the application name is SOURCE_DIR.exe
# EXAMPLE: source_dir=fennec, there should be a fennec/fennec.exe application
#
# program_name - Name of the program to place inside the INF file
# PROGRAM_NAME - Name of the program to place inside the INF file
#
# cab_final_name - actual final name for the produced CAB file
# CAB_FINAL_NAME - actual final name for the produced CAB file
#
# NOTE: In our example, "fennec" is the directory [source_name]
# "fennec.exe" is the application [$(source_name).exe], and
@ -80,6 +85,7 @@ import fnmatch
import string
import shutil
CompressFlag = "/compress"
class FileEntry:
def __init__(self, dirpath, dircount, filename, filecount, actual_filename):
@ -301,12 +307,12 @@ def output_inf_file(program_name, app_name):
def make_cab_file(cabwiz_path, program_name, cab_final_name):
make_cab_command = "\"%s\" %s.inf /compress" % (cabwiz_path, program_name)
make_cab_command = "\"%s\" %s %s.inf" % (cabwiz_path, CompressFlag, program_name)
print "INFORMATION: Executing command to make %s CAB file (only works on BASH)" % program_name
print " [%s]" % make_cab_command
sys.stdout.flush()
success = call([cabwiz_path, "%s.inf" % program_name, "/compress"],
success = call([cabwiz_path, "%s.inf" % program_name, CompressFlag],
stdout=open("NUL:","w"), stderr=STDOUT)
if not os.path.isfile("%s.CAB" % program_name):
@ -336,21 +342,35 @@ def purge_copied_files():
def main():
if len(sys.argv) != 5:
print >> sys.stderr, "Usage: %s CABWIZ_PATH SOURCE_DIR PROGRAM_NAME CAB_FINAL_NAME" % sys.argv[0]
print >> sys.stderr, "Example: %s /c/Program\ Files/Microsoft\ Visual\ Studio\ 9.0/ fennec Fennec fennec-0.11.en-US.wince-arm.cab" % sys.argv[0]
args = sys.argv
if len(args) < 4 or len(args) > 6:
print >> sys.stderr, "Usage: %s [-s] [CABWIZ_PATH] SOURCE_DIR PROGRAM_NAME CAB_FINAL_NAME" % args[0]
print >> sys.stderr, "Example: %s /c/Program\ Files/Microsoft\ Visual\ Studio\ 9.0/ fennec Fennec fennec-0.11.en-US.wince-arm.cab" % args[0]
sys.exit(1)
cabwiz_path = sys.argv[1]
source_dir = sys.argv[2]
program_name = sys.argv[3]
app_name = "%s.exe" % source_dir
cab_final_name = sys.argv[4]
args = args[1:]
if not os.path.isfile(cabwiz_path):
if args[0] == "-s":
global CompressFlag
CompressFlag = ""
args = args[1:]
cabwiz_path = None
if len(args) == 4:
cabwiz_path = args[0]
args = args[1:]
else:
if "VSINSTALLDIR" in os.environ:
cabwiz_path = os.path.join(os.environ["VSINSTALLDIR"], "SmartDevices", "SDK", "SDKTools", "cabwiz.exe")
source_dir = args[0]
program_name = args[1]
app_name = "%s.exe" % source_dir
cab_final_name = args[2]
if cabwiz_path is None or not os.path.isfile(cabwiz_path):
print """***************************************************************************
ERROR: CABWIZ_PATH is not a valid file!
Perhaps your VSINSTALLDIR is not properly set up?
ERROR: CABWIZ_PATH is not a valid file, or cabwiz couldn't be found!
EXITING...
***************************************************************************"""
sys.exit(2)

View File

@ -224,9 +224,15 @@ gfxFontMissingGlyphs::DrawMissingGlyph(gfxContext *aContext, const gfxRect& aRec
aContext->SetDeviceColor(color);
aContext->NewPath();
aContext->Rectangle(borderStrokeRect);
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
aContext->Fill();
#else
aContext->Stroke();
#endif
}
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
gfxPoint center(aRect.X() + aRect.Width()/2,
aRect.Y() + aRect.Height()/2);
gfxFloat halfGap = HEX_CHAR_GAP/2.0;
@ -268,6 +274,7 @@ gfxFontMissingGlyphs::DrawMissingGlyph(gfxContext *aContext, const gfxRect& aRec
center + gfxPoint(third, halfGap), aChar & 0xF);
}
}
#endif
aContext->Restore();
}

View File

@ -57,16 +57,6 @@
# endif /* XP_WIN */
#endif /* _WINDOWS */
#ifdef __MWERKS__
# define _declspec __declspec
# ifdef __INTEL__
# undef NULL
# ifndef XP_WIN
# define XP_WIN 1
# endif /* XP_WIN */
# endif /* __INTEL__ */
#endif /* __MWERKS__ */
#ifdef XP_MACOSX
#ifdef __LP64__
#define NP_NO_QUICKDRAW

View File

@ -53,6 +53,10 @@
#include "nsIPrefBranch2.h"
#include "nsServiceManagerUtils.h"
#ifdef WINCE
#include <windows.h>
#endif
#if defined(PR_LOGGING)
PRLogModuleInfo *gSocketTransportLog = nsnull;
#endif
@ -555,6 +559,10 @@ nsSocketTransportService::Run()
gSocketThread = PR_GetCurrentThread();
#ifdef WINCE
SetThreadPriority(GetCurrentThread(), 116);
#endif
// add thread event to poll list (mThreadEvent may be NULL)
mPollList[0].fd = mThreadEvent;
mPollList[0].in_flags = PR_POLL_READ;