Search This Blog

How to build Google Web Toolkit DevMode plugin for Firefox 17.0 on Mac OS X

  1. Install XCode if you do not have it. (XCode 3.2.6 is recommended for building this plugin, because the source code is configured to used Mac OS 10.5 sdk, which is included in XCode 3.2.6, but it is dropped by later version XCodes. However, the later version e.g. xcode 4.3, can also be used with a few modifications on the configuration.)
  2. Check out the source code:
        svn checkout http://google-web-toolkit.googlecode.com/svn/trunk/plugins gwt/plugins
        svn checkout http://google-web-toolkit.googlecode.com/svn/plugin-sdks/gecko-sdks/gecko-17.0.0 plugin-sdks/gecko-sdks/gecko-17.0.0
      
  3. If you have xcode 3.2.6 installed, you can try to build it:
    cd gwt/plugins/xpcom && make BROWSER=ff170
  4. If you have later xcode version, e.g. xcode 4.3, installed, the command above will fail with errors finding cstdio.h. To make it work, you need to
    1. modify plugins/config.mk,
      vi ../config.mk
      change
      BASECFLAGS= $(DEBUGCFLAGS) -O2 -fPIC $(INC) -D__mac -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -std=c++11
      to
      BASECFLAGS= $(DEBUGCFLAGS) -O2 -fPIC $(INC) -D__mac -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -std=c++11
    2. modify gwt/plugins/xpcom/Makefile,
      vi Makefile
      change
      DLLFLAGS += -bundle $(ALLARCHCFLAGS) -mmacosx-version-min=10.5  -isysroot /Developer/SDKs/MacOSX10.5.sdk
      to
      DLLFLAGS += -bundle $(ALLARCHCFLAGS) -mmacosx-version-min=10.7  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
  5. run
    make BROWSER=ff170
    (in gwt/plugins/xpcom directory.) to build.
  6. the result plugin file will be gwt/plugins/xpcom/prebuilt/wt-dev-plugin.xpi

No comments:

Post a Comment