Building XULRunner 1.8.0.9 (developer preview release) Source Code on Windows

.mozconfig file

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build
mk_add_options MOZ_CO_PROJECT=xulrunner
ac_add_options –enable-application=xulrunner
ac_add_options –enable-javaxpcom
ac_add_options –disable-static
ac_add_options –enable-shared
ac_add_options –enable-svg
ac_add_options –disable-tests
ac_add_options –enable-libxul

Configure the environment

Microsoft Visual C++ version 6 requires Service Pack 5 (http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspx) and the processor pack (http://msdn.microsoft.com/vstudio/downloads/tools/ppack/).

 Platform SDK

When using Visual C++ 6, you need to get either the october 2002 or the february 2003 version of the platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm).

Download the current MozillaBuild 1.1 package (http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.1.exe).

By default, the package installs to c:\mozilla-build. It is recommended to use the default path.

Getting a command prompt for building

    start-msvc6.bat

    if %VC6DIR% is empty then hardcode the directory path.

Install jdk-1_5_0_03-windows-i586.exe in C:/ not in C:/Program Files/ , because we need to eradicate possibles white spaces in the paths. After install check the environment variable Java_Home.

Apply the patches if you get errors

Patchs for JavaXPCOM

extensions\java\xpcom\interfaces\Makefile.in

    @$(INSTALL) -m 644 $(JAVA_SRCS) \
            _javagen/org/mozilla/xpcom
    @$(INSTALL) -m 644 $(GEN_JAVA_SRCS) _javagen/org/mozilla/xpcom
    @echo Generating Java interface files
 –    $(RUN) $(DIST)/bin/GenerateJavaInterfaces$(BIN_SUFFIX) -d $(OUTPUT_DIR)
+    $(RUN) $(DIST)/bin/GenerateJavaInterfaces$(BIN_SUFFIX) -d C:\mozilla\build\extensions\java\xpcom\interfaces\_javagen\org\mozilla\xpcom
    @touch $@

    # Using the temporary “java.files” avoids an “argument list too long”
    # error on Windows when using *.java
    org/mozilla/xpcom/.class_done: _javagen/org/mozilla/xpcom/.iface_done

extensions\java\xpcom\src\Makefile.in

    # Using the temporary “java.files” avoids an “argument list too long”
    # error on Windows when using *.java
    org/mozilla/xpcom/internal/.class_done: _javagen/org/mozilla/xpcom/internal/.iface_done
    @echo Compiling Java implementation classes
    find _javagen -name “*.java” > java.files
–    $(JAVAC) $(JAVAC_FLAGS) \
+    /c/Java/jdk1.5.0_03/bin/javac -source 1.4 \
      -classpath “.$(SEP)../interfaces/MozillaInterfaces.jar” \
      -d . -sourcepath _javagen @java.files
    @touch $@

    $(JARFILE): org/mozilla/xpcom/internal/.class_done Makefile
    $(JAR) cf $@ org
 

Blogged with Flock

Tags: , , , ,

Advertisements