Hello andreip,

I'd like you to do a code review.  Please execute
        g4 diff -c 9881868

or point your web browser to
        http://mondrian/9881868

to review the following code:

Change 9881868 by stevebl...@steveblock-gears2 on 2009/01/27 20:56:02 *pending*

        Changes to build system required by Opera. Mailed on behalf of Opera.
        
        R=andreip
        [email protected],[email protected],[email protected]
        DELTA=88  (76 added, 7 deleted, 5 changed)
        OCL=9881868

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#229 edit
... //depot/googleclient/gears/opensource/gears/tools/config.mk#99 edit
... //depot/googleclient/gears/opensource/gears/tools/rules.mk#101 edit
... //depot/googleclient/gears/opensource/gears/tools/sanity.mk#7 edit

88 delta lines: 76 added, 7 deleted, 5 changed

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [email protected].
Change 9881868 by stevebl...@steveblock-gears2 on 2009/01/27 20:56:02 *pending*

        Changes to build system required by Opera. Mailed on behalf of Opera.
        
        OCL=9881868

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#229 edit
... //depot/googleclient/gears/opensource/gears/tools/config.mk#99 edit
... //depot/googleclient/gears/opensource/gears/tools/rules.mk#101 edit
... //depot/googleclient/gears/opensource/gears/tools/sanity.mk#7 edit

==== //depot/googleclient/gears/opensource/gears/Makefile#229 - 
c:\MyDocs\Gears2/googleclient/gears/opensource/gears/Makefile ====
# action=edit type=text
--- googleclient/gears/opensource/gears/Makefile        2009-01-27 
21:36:40.000000000 +0000
+++ googleclient/gears/opensource/gears/Makefile        2009-01-27 
21:49:34.000000000 +0000
@@ -77,6 +77,14 @@
                $(NULL)
 
 IE_CPPSRCS     += \
+               exception_handler_win32.cc \
+               $(NULL)
+
+OPERA_VPATH    += \
+               base/common \
+               $(NULL)
+
+OPERA_CPPSRCS  += \
                exception_handler_win32.cc \
                $(NULL)
 
@@ -913,6 +921,7 @@
 
 CHROME_CPPSRCS += \
                js_runner_cr.cc \
+               message_queue_cr.cc \
                module_cr.cc \
                paths_cr.cc \
                $(NULL)
@@ -938,11 +947,17 @@
 NPAPI_CPPSRCS  += \
                detect_version_collision_win32.cc \
                ie_version.cc \
-               message_queue_cr.cc \
                $(NULL)
 # TODO(mpcomplete): use WIN32_LINK_EXTRAS here.
 NPAPI_LINK_EXTRAS  += \
                $(NPAPI_OUTDIR)/module.res \
+               $(NULL)
+else
+ifeq ($(OS),wince)
+NPAPI_CPPSRCS  += \
+               detect_version_collision_win32.cc \
+               file_wince.cc \
+               time_utils_win32.cc \
                $(NULL)
 else
 ifeq ($(OS),symbian)
@@ -958,7 +973,24 @@
                uid_symbian.cc \
                $(NULL)
 endif # SYMBIAN
+endif # WINCE
 endif # WIN32
+
+OPERA_LINK_EXTRAS  += \
+        $(OPERA_OUTDIR)/module.res \
+               $(OPERA_OUTDIR)/setup.res \
+               $(NULL)
+
+OPERA_VPATH    += \
+               base/opera \
+               $(NULL)
+
+OPERA_CPPSRCS  += \
+               message_queue_win32.cc \
+               opera_utils.cc \
+               paths_op.cc \
+               $(NULL)
+
 
 #-----------------------------------------------------------------------------
 # base/opera
@@ -1853,8 +1885,10 @@
                localserver/opera \
                $(NULL)
 
+# opera_local_server_impl.cc
 OPERA_CPPSRCS  += \
                http_request_op.cc \
+               safe_http_request.cc \
                $(NULL)
 
 #-----------------------------------------------------------------------------
@@ -2217,8 +2251,6 @@
 
 # Opera Mobile specific. Opera Mobile is built with BROWSER=OPERA and OS=wince.
 ifeq ($(BROWSER),OPERA)
-ifeq ($(OS),wince)
-
 # Opera uses the NPAPI base plus some Opera specific things.
 OPERA_CPPSRCS += $(NPAPI_CPPSRCS)
 OPERA_CPPFLAGS += $(NPAPI_CPPFLAGS)
@@ -2230,7 +2262,6 @@
 OPERA_LIBS += $(NPAPI_LIBS)
 # OPERA_LINK_EXTRAS is set independently of NPAPI_LINK_EXTRAS
 endif
-endif
 
 # IE Mobile specific. IE Mobile is built with BROWSER=IEMOBILE and OS=wince.
 ifeq ($(BROWSER),IEMOBILE)
==== //depot/googleclient/gears/opensource/gears/tools/config.mk#99 - 
c:\MyDocs\Gears2/googleclient/gears/opensource/gears/tools/config.mk ====
# action=edit type=text
--- googleclient/gears/opensource/gears/tools/config.mk 2009-01-27 
21:36:40.000000000 +0000
+++ googleclient/gears/opensource/gears/tools/config.mk 2009-01-27 
21:18:07.000000000 +0000
@@ -888,6 +888,7 @@
 IE_DLLFLAGS = /DEF:tools/mscom.def
 
 CHROME_DLLFLAGS = /DEF:base/chrome/module.def
+OPERA_DLLFLAGS = /DEF:base/npapi/module.def
 
 # Set the preferred base address.  This value was chosen because (a) it's near
 # the top of the valid address range, and (b) it doesn't conflict with other
@@ -920,10 +921,11 @@
 endif
 ifeq ($(OS),wince)
 # We don't want to use these NPAPI libraries on WinCE
+OPERA_LIBS = $(WINCE_LIBS)
 else #wince
 NPAPI_LIBS = delayimp.lib /DELAYLOAD:"comdlg32.dll" comdlg32.lib
-endif
-OPERA_LIBS = $(WINCE_LIBS)
+OPERA_LIBS = delayimp.lib /DELAYLOAD:"comdlg32.dll" comdlg32.lib
+endif
 
 # Other tools specific to win32/wince builds.
 RC = rc
@@ -983,6 +985,7 @@
 M4FLAGS  += -DPRODUCT_VERSION_BUILD=$(BUILD)
 M4FLAGS  += -DPRODUCT_VERSION_PATCH=$(PATCH)
 
+M4FLAGS  += -DPRODUCT_BROWSER=$(BROWSER)
 M4FLAGS  += -DPRODUCT_OS=$(OS)
 M4FLAGS  += -DPRODUCT_BROWSER=$(BROWSER)
 ifeq ($(ARCH), i386)
==== //depot/googleclient/gears/opensource/gears/tools/rules.mk#101 - 
c:\MyDocs\Gears2/googleclient/gears/opensource/gears/tools/rules.mk ====
# action=edit type=text
--- googleclient/gears/opensource/gears/tools/rules.mk  2009-01-27 
21:36:40.000000000 +0000
+++ googleclient/gears/opensource/gears/tools/rules.mk  2009-01-27 
21:19:48.000000000 +0000
@@ -257,6 +257,7 @@
 FFMERGED_INSTALLER_XPI = $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME).xpi
 
 NPAPI_INSTALLER_MSI    = $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)-chrome.msi
+OPERA_INSTALLER_MSI    = $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)-opera.msi
 
 WIN32_INSTALLER_MSI    = $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME).msi
 
@@ -319,6 +320,10 @@
        $(MAKE) prereqs    BROWSER=NPAPI
        $(MAKE) genheaders BROWSER=NPAPI
        $(MAKE) modules    BROWSER=NPAPI
+
+       $(MAKE) prereqs    BROWSER=OPERA
+       $(MAKE) genheaders BROWSER=OPERA
+       $(MAKE) modules    BROWSER=OPERA
 
        $(MAKE) installers
 
@@ -425,10 +430,8 @@
 endif
 
 ifeq ($(BROWSER),OPERA)
+modules:: $(OPERA_MODULE_DLL)
 ifeq ($(OS),wince)
-# Add dependency on OPERA_MODULE_DLL for Win32 once we have Gears for Opera on
-# desktop.
-modules:: $(OPERA_MODULE_DLL)
 modules:: $(OPERA_WINCESETUP_DLL)
 endif
 endif
@@ -476,7 +479,7 @@
 installers:: $(SF_INSTALLER_PKG) $(FFMERGED_INSTALLER_XPI)
 else
 ifeq ($(OS),win32)
-installers:: $(FFMERGED_INSTALLER_XPI) $(WIN32_INSTALLER_MSI) 
$(NPAPI_INSTALLER_MSI)
+installers:: $(FFMERGED_INSTALLER_XPI) $(WIN32_INSTALLER_MSI) 
$(NPAPI_INSTALLER_MSI) $(OPERA_INSTALLER_MSI)
 else
 ifeq ($(OS),wince)
 installers:: $(IEMOBILE_WINCE_INSTALLER_CAB) $(OPERA_WINCE_INSTALLER_CAB)
@@ -776,7 +779,8 @@
        $(RC) $(RCFLAGS) /DBROWSER_NPAPI=1 $<
 
 $(OPERA_OUTDIR)/%.res: %.rc $(COMMON_RESOURCES)
-       $(RC) $(RCFLAGS) /DBROWSER_OPERA=1 $<
+       $(RC) $(RCFLAGS) /DBROWSER_OPERA=1 /DBROWSER_NPAPI=1 $<
+
 
 # For Opera, also copy all the image files used in the HTML dialogs to the
 # genfiles directory.
@@ -846,6 +850,13 @@
 OUR_COMPONENT_GUID_NPAPI_REGISTRY = \
   $(shell $(GGUIDGEN) $(NAMESPACE_GUID) 
OUR_COMPONENT_GUID_NPAPI_REGISTRY-$(VERSION))
 
+OUR_OPERA_PRODUCT_ID = \
+  $(shell $(GGUIDGEN) $(NAMESPACE_GUID) OUR_OPERA_ID-$(VERSION))
+OUR_COMPONENT_GUID_OPERA_FILES = \
+  $(shell $(GGUIDGEN) $(NAMESPACE_GUID) 
OUR_COMPONENT_GUID_OPERA_FILES-$(VERSION))
+OUR_COMPONENT_GUID_OPERA_REGISTRY = \
+  $(shell $(GGUIDGEN) $(NAMESPACE_GUID) 
OUR_COMPONENT_GUID_OPERA_REGISTRY-$(VERSION))
+
 WIX_DEFINES_I18N = $(foreach lang,$(subst 
-,_,$(I18N_LANGS)),-dOurComponentGUID_FFLang$(lang)DirFiles=$(shell $(GGUIDGEN) 
$(NAMESPACE_GUID) OUR_COMPONENT_GUID_FF_$(lang)_DIR_FILES-$(VERSION)))
 
 # MSI version numbers must have the form <major>.<minor>.<build>. To meet this,
@@ -877,6 +888,10 @@
          -dOurNpapiPath=$(OUTDIR)/$(OS)-$(ARCH)/npapi \
          -dOurComponentGUID_NpapiFiles=$(OUR_COMPONENT_GUID_NPAPI_FILES) \
          -dOurComponentGUID_NpapiRegistry=$(OUR_COMPONENT_GUID_NPAPI_REGISTRY) 
\
+         -dOurOperaProductId=$(OUR_OPERA_PRODUCT_ID) \
+         -dOurOperaPath=$(OUTDIR)/$(OS)-$(ARCH)/opera \
+         -dOurComponentGUID_OperaFiles=$(OUR_COMPONENT_GUID_OPERA_FILES) \
+         -dOurComponentGUID_OperaRegistry=$(OUR_COMPONENT_GUID_OPERA_REGISTRY) 
\
          -dOurMsiVersion=$(MSI_VERSION) \
          $(WIX_DEFINES_I18N)
 endif
@@ -1272,6 +1287,18 @@
        mv -f $(COMMON_OUTDIR)/genfiles/$(INFSRC_BASE_NAME)_iemobile.cab $@
 
 $(OPERA_WINCE_INSTALLER_CAB): $(OPERA_INFSRC) $(OPERA_MODULE_DLL) 
$(OPERA_WINCESETUP_DLL) $(OPERA_RESOURCES)
+
+SOURCE_HTML_IMG_FILES = \
+       blank.gif \
+       icon_32x32.png \
+       local_data.png \
+       location_data.png \
+       $(NULL)
+       
+$(OPERA_OUTDIR)/genfiles/%: ui/common/%
+       cp $< $(OPERA_OUTDIR)/genfiles
+       
+$(OPERA_WINCE_INSTALLER_CAB): $(OPERA_INFSRC) $(OPERA_MODULE_DLL) 
$(OPERA_WINCESETUP_DLL) $(patsubst 
%,$(OPERA_OUTDIR)/genfiles/%,$(SOURCE_HTML_IMG_FILES))
        cabwiz.exe $(OPERA_INFSRC) /compress /err 
$(COMMON_OUTDIR)/genfiles/$(INFSRC_BASE_NAME).log
        mv -f $(COMMON_OUTDIR)/genfiles/$(INFSRC_BASE_NAME)_op.cab $@
 
@@ -1281,6 +1308,12 @@
 $(NPAPI_INSTALLER_MSI): $(NPAPI_INSTALLER_WIXOBJ) $(NPAPI_MODULE_DLL)
        light.exe -out $@ $(NPAPI_INSTALLER_WIXOBJ) -sice:ICE39 -sice:ICE64 
-sice:ICE91
 
+OPERA_INSTALLER_WIXOBJ = $(COMMON_OUTDIR)/opera_msi.wxiobj
+# We must disable certain WiX integrity check errors ("ICE") to successfully
+# create a per-user installer.
+$(OPERA_INSTALLER_MSI): $(OPERA_INSTALLER_WIXOBJ) $(OPERA_MODULE_DLL)
+       light.exe -out $@ $(OPERA_INSTALLER_WIXOBJ) -sice:ICE39 -sice:ICE64 
-sice:ICE91
+
 # We generate dependency information for each source file as it is compiled.
 # Here, we include the generated dependency information, which silently fails
 # if the files do not exist.
==== //depot/googleclient/gears/opensource/gears/tools/sanity.mk#7 - 
c:\MyDocs\Gears2/googleclient/gears/opensource/gears/tools/sanity.mk ====
# action=edit type=text
--- googleclient/gears/opensource/gears/tools/sanity.mk 2009-01-27 
21:36:40.000000000 +0000
+++ googleclient/gears/opensource/gears/tools/sanity.mk 2009-01-27 
21:21:09.000000000 +0000
@@ -41,8 +41,10 @@
     ifneq ($(BROWSER),FF3)
     ifneq ($(BROWSER),IE)
     ifneq ($(BROWSER),NPAPI)
+    ifneq ($(BROWSER),OPERA)
     ifneq ($(BROWSER),NONE)
-      $(error On Windows, BROWSER can only be one of: FF2 | FF3 | IE | NPAPI | 
NONE)
+      $(error On Windows, BROWSER can only be one of: FF2 | FF3 | IE | NPAPI | 
OPERA | NONE)
+    endif
     endif
     endif
     endif

Reply via email to