Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Version 8 and Version 9 of BuildingWinNSS


Ignore:
Timestamp:
Mar 1, 2010, 12:13:45 AM (14 years ago)
Author:
datallah
Comment:

This is buildable with the same mingw version as Pidgin uses, so use that. Also avoid instructing users to pollute their system PATH

Legend:

Unmodified
Added
Removed
Modified
  • BuildingWinNSS

    v8 v9  
    1313  Download [ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_5_RTM/src/nss-3.12.5-with-nspr-4.8.2.tar.gz NSS with NSPR 3.12.5]. Extract it so somewhere (you'll get an `nss-3.12.5-with-nspr-4.8.2` directory).
    1414
    15  2. Get MozillaBuild
     15 2. Get !MozillaBuild
    1616
    17   Download [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.4.exe MozillaBuild 1.4] and install it. By default it installs to `c:\mozilla-build`. Add `c:\mozilla-build\msys\bin` and `c:\mozilla-build\moztools\bin` to your PATH.
     17  Download [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.4.exe MozillaBuild 1.4] and install it. By default it installs to `c:\mozilla-build`.
    1818
    1919 3. Get MinGW
    20 
    21   Download a recent build of the [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/sezero_20100223/mingw-w32-bin_i686-mingw_20100223_sezero.zip/download MinGW-w64 w32 toolchain]. Extract it to `c:\mozilla-build\msys` so that MSYS and MinGW have the same folder hiearchy (e.g. MinGW binaries go to `c:\mozilla-build\msys\bin` etc.).
     20 * This assumes that you have MinGW working as described in the [wiki:BuildingWinPidgin#Themanualway Pidgin Building Instructions].
     21 * Download [http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe MSYS] and install it (the default install location is `c:\msys\1.0\`).
    2222
    2323== Choose build flavour ==
     
    9898
    9999{{{
     100#!diff
    100101--- config.mk.orig      2009-04-12 00:18:42 +0200
    101102+++ config.mk   2010-02-28 20:19:08 +0100
    102 @@ -85,8 +85,10 @@
     103@@ -85,10 +85,14 @@
    103104 RESNAME = freebl.rc
    104  
     105
    105106 ifndef WINCE
    106107+ifndef NS_USE_GCC
     
    108109 endif
    109110+endif
    110  
     111
    111112 ifdef NS_USE_GCC
     113+OS_LIBS += -lshell32
     114+DEFINES += -D_WIN32_IE=0x0400
    112115 EXTRA_SHARED_LIBS += \
     116        -L$(DIST)/lib \
     117        -L$(NSSUTIL_LIB_DIR) \
    113118}}}
    114119
    115120== Build NSS ==
    116121
    117  1. Set compiler to GCC:
     122The easiest way to do this with consistent results to to make a build script (the following is what the binary included with Pidgin is built with):
     123{{{
     124#!sh
     125#!/bin/bash
    118126
    119 {{{
    120 set NS_USE_GCC=1
     127#The path that we've extracted the nss source tarball into
     128NSS_SRC_DIR=/c/devel/nss-devel
     129
     130#Set our Build Arguments:
     131#Optimized Build
     132export BUILD_OPT=1
     133#Target Windows NT Family
     134export OS_TARGET=WINNT
     135#Use GCC (as opposed to VC)
     136export NS_USE_GCC=1
     137
     138#Set up the build path with MinGW and Moztools
     139PATH=/c/devel/pidgin-devel/win32-dev/mingw/bin:$PATH
     140PATH=/c/devel/mozilla-build/moztools/bin:$PATH
     141export PATH
     142
     143pushd $NSS_SRC_DIR/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss
     144make nss_build_all
     145popd
     146
    121147}}}
    122148
    123  2. Start command prompt and go to `nss-3.12.5-with-nspr-4.8.2\mozilla\security\nss`.
     149The build will likely not complete successfully (it will bail out building `.../cmd/bltest`).  If it gets that far, it has built the various libraries successfully.
    124150
    125  3. Start building:
    126 
    127 {{{
    128 make nss_build_all
    129 }}}
    130 
    131 The resulting binaries will be placed in `nss-3.12.5-with-nspr-4.8.2\mozilla\dist`. The contents of `private` and `public` are the same accross all flavours so they can be distributed separately.
     151The resulting binaries will be placed in `nss-3.12.5-with-nspr-4.8.2\mozilla\dist`. The contents of `private` and `public` are the same across all flavours so they can be distributed separately.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!