My favorites | Sign in
Project Home Wiki Issues Source
Search
for
BuildingGearsForWindows  
Building Gears for Windows
Updated Feb 4, 2010 by gears.daemon@gmail.com

Introduction

This document describes how to build Gears for Windows.

Building

Install the following to create the build environment:

Follow the instructions at http://code.google.com/p/gears/source to set up your source tree.

Finally open a command prompt, setup your build environment, and build Gears. (These instructions assume you put Gears in c:\svn-gears and installed Visual Studio and the Platform SDK to their default locations.)

  • Start -> Run -> cmd.exe
    • cd \svn-gears\gears\gears\
    • "c:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
    • "c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.cmd"
    • set PATH=%PATH%;<<python path>>;<<wix path>>;<<unxutils path>>\usr\local\wbin
  • Build Gears
    • make BROWSER=[IE|FF] MODE=[dbg|opt] OS=[win32|wince]

Installing

To install Gears, go to bin-dbg\win32\installers\ from your Gears directory and run the .msi (IE and Firefox) or open the .xpi (Firefox only).

Testing

After installing, you should restart your browser. Go to the Gears API page. At the lower left corner, it should indicate the build of Gears that is active. You should be able to try out the demos or create your own. You can also run the unit tests in the source tree (/gears/test/unit_tests.html).

Comment by mflu...@gmail.com, Jun 17, 2008
Comment by hkad...@gmail.com, Nov 26, 2008

I compile in windows and: LIBCMTD.lib(stdexcpt.obj) : error LNK2005 : ya se definio "public: virtual this call std:exception::~exception(void)" (??exception@std@VAE@XZ) en exception_handler_win32.obj

Why????

Comment by olaju...@gmail.com, Dec 16, 2008

How to build a GoogleGears? which can be silently installed ??

Comment by oliver.z...@gmail.com, Apr 22, 2009

Visual Studio 2005 is no longer available, but this works using the full version of MS Visual Studio 2008, but not with the express version. Start full compilation including installer by simply calling "make" without parameters.

Compiling using Visual Studio 2008 seems to require a small adjustment in the zlib sources. Putting <stdio.h> on top of the includes did the job for me.

Comment by rick.hud...@trout.com, Jun 25, 2009

I got everything compiled but the make dependency to create the windows installer (.msi or .xpi file) seems to be missing. When we did this a year ago things worked so I suspect something has recently changed. Any clues about how to install the windows version (on Firefox 3.1) once it is compiled? - Rick

Comment by mansu...@gmail.com, Jul 7, 2009

To make it work with vs2008(winXP SP3, code page 949): 1) commented out "//line 200# define vsnprintf vsnprintf" "C:\svn-gears\gears\gears\third_party\zlib\zutil.h" 2) save as "C:\svn-gears\gears\gears\gears\base\common\url_utils_test.cc" in code page 949

Comment by peter.ke...@gmail.com, Jul 18, 2009

When I follow the instructions with visual studio 2008 I get this error: 'cl' is not recognized as an internal or external command,operable program or batch file.

Any ideas? :|

Comment by unic...@gmail.com, Aug 7, 2009

The requirements above are a little vague. You specifically need Visual C++ installed (not just some form of Visual Studio, some people never install C++). You can also use VS2005 or VS2008. I also used Python 2.6.2 and the latest build of Wix (3.5.x).

For VS2008 there are two changes to the above instructions:

1) comment out "//line 200# define vsnprintf vsnprintf" in file: "C:\svn-gears\gears\gears\third_party\zlib\zutil.h" (confirmed, thanks mansukim)

2) "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" is located at "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"

Also of note is that the build paths can be confusing, because the path to Unxutils "/wbin" is explicit in the example, but the path to Wix's /bin is also explicitly required. Without the full path here, you will build everything but the .msi installer packages.

Please update above.

Comment by Clayne.R...@gmail.com, Aug 12, 2009

For the PSDK, http://www.microsoft.com/downloads/details.aspx?FamilyId=E15438AC-60BE-41BD-AA14-7F1E0F19CA0D&displaylang=en gives you and img/iso file that you can use with Virtual CD

Comment by peter.ke...@gmail.com, Aug 22, 2009

I've been following the above instructions and been making some fresh headway (thanks unicron) but I've run into this error now:

...\third_party/passthru_app/urlmon_ie7_extras.h(278)

: error C2365: 'QUERY_USES_HISTORYFOLDER' : redefinition; previous definition w
as 'enumerator'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\urlmon.h(5451) : s
ee declaration of 'QUERY_USES_HISTORYFOLDER' make1?: [bin-dbg/win32-i386/ie/http_intercept.obj] Error 2 make: default? Error 2

Anyone have any idea of what I need to do here? Would really appreciate any advice :)

Comment by richardk...@gmail.com, Sep 14, 2009

Temporarily, you can get it past the redefinition by commenting out the enum in urlmon_ie7_extras.h. Ideally, there would be some sort of PSDK version definition, but I'm unaware of one.

Comment by DCart...@gmail.com, Mar 21, 2010

I'm getting the make1?: * ` [bin-opt/win32-i386/ie/genfiles/interfaces.h] Error 5 Anyone have any idea? Appreciate any advices ..thanks ;-)!

Make log:

C:\svn-gears\gears\gears>make -k BROWSER=IE MODE=opt OS=win32 make prereqs BROWSER=IE make1?: Nothing to be done for prereqs'. make genheaders BROWSER=IE midl -I.. -Ibin-opt/win32-i386/ie -Ibin-opt/win32-i386/common -I../third_party/n papi -I../third_party -I../third_party/googleurl -I../third_party/icu38/public/c ommon -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD -I../third _party/zlib -I../third_party/skia/include/core -I../third_party/skia/include/ima ges -I../third_party/skia/include/utils -DNO_GZIP -DNO_GZCOMPRESS -I../third_par ty/breakpad/src /nologo -DSTRICT -D_UNICODE -DUNICODE -D_USRDLL -DWIN32 -D_WINDL L -D_CRT_SECURE_NO_DEPRECATE -DNOMINMAX -D_WINDOWS -DWINVER=0x0500 -D_WIN32_WINN T=0x0500 -D_WIN32_IE=0x0500 -D_RICHEDIT_VER=0x0010 -D_MERGE_PROXYSTUB -DBREAKPAD _AVOID_STREAMS -DXP_WIN -DNDEBUG=1 -DUSING_CCTESTS=1 -I../third_party/gtest/in clude -I../third_party/gtest -env win32 -Oicf -tlb "bin-opt/win32-i386/ie/genfil es/interfaces.tlb" -h "bin-opt/win32-i386/ie/genfiles/interfaces.h" -iid "bin-op t/win32-i386/ie/interfaces_i.c" -proxy "bin-opt/win32-i386/ie/interfaces_p.c" -d lldata "bin-opt/win32-i386/ie/interfaces_d.c" bin-opt/win32-i386/ie/genfiles/int erfaces.idl make[1]: * [bin-opt/win32-i386/ie/genfiles/interfaces.h] Error 5 midl -I.. -Ibin-opt/win32-i386/ie -Ibin-opt/win32-i386/common -I../third_party/n papi -I../third_party -I../third_party/googleurl -I../third_party/icu38/public/c ommon -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD -I../third party/zlib -I../third_party/skia/include/core -I../third_party/skia/include/ima ges -I../third_party/skia/include/utils -DNO_GZIP -DNO_GZCOMPRESS -I../third_par ty/breakpad/src /nologo -DSTRICT -D_UNICODE -DUNICODE -D_USRDLL -DWIN32 -D_WINDL L -D_CRT_SECURE_NO_DEPRECATE -DNOMINMAX -D_WINDOWS -DWINVER=0x0500 -D_WIN32_WINN T=0x0500 -D_WIN32_IE=0x0500 -D_RICHEDIT_VER=0x0010 -D_MERGE_PROXYSTUB -DBREAKPAD AVOID_STREAMS -DXP_WIN -DNDEBUG=1 -DUSING_CCTESTS=1 -I../third_party/gtest/in clude -I../third_party/gtest -env win32 -Oicf -tlb "bin-opt/win32-i386/ie/genfil es/html_dialog_host.tlb" -h "bin-opt/win32-i386/ie/genfiles/html_dialog_host.h" -iid "bin-opt/win32-i386/ie/html_dialog_host_i.c" -proxy "bin-opt/win32-i386/ie/ html_dialog_host_p.c" -dlldata "bin-opt/win32-i386/ie/html_dialog_host_d.c" ui/i e/html_dialog_host.idl make1?: * * [bin-opt/win32-i386/ie/genfiles/html_dialog_host.h] Error 5 make[1]: Target genheaders' not remade because of errors. make: * ` default? Error 2

Comment by d.sin...@gmail.com, Jul 28, 2011

PATH indicated above is incorrect ... It must be set like this :

set PATH=%PATH%;<<python path>>;<<wix path>>;<<unxutils path>>\usr\local\wbin;<<wix path>>\bin

Thanks to the posting of unicron above.

Comment by shawntay...@gmail.com, Nov 23, 2011

I've tried building this on Windows 7 with VS 2008 however I can only seem to build everything but the installer. For some reason it doesn't seem to accept my path variables and so I have move all of the executables (mkdir, cat, python, etc...) to my gears directory. Anyone have any suggestions?


Sign in to add a comment
Powered by Google Project Hosting