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.
- Timestamp:
-
Oct 15, 2011, 3:27:40 PM (12 years ago)
- Author:
-
itsnotabigtruck
- Comment:
-
Additional updates - pending testing build process with the (free) Windows SDK 7.1
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v34
|
v35
|
|
9 | 9 | == Prerequisites == |
10 | 10 | |
| 11 | 1. '''Get GNU Patch:'''[[BR]]Download [http://gnuwin32.sourceforge.net/packages/patch.htm Patch] from the !GnuWin32 project. Note that Windows thinks that "patch.exe" is a patch for a program and will prompt you to UAC elevate it whenever you use it (see [http://math.nist.gov/oommf/software-patchsets/patch_on_Windows7.html this page]). |
11 | 12 | 1. '''Get the Windows SDK:'''[[BR]]Download the [https://www.microsoft.com/download/en/details.aspx?id=8279 Windows SDK for Windows 7 SP1] and install it to the default location. |
12 | 13 | 1. '''Get the Windows Driver Kit (WDK):'''[[BR]]Download the [https://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11800 WDK for Windows 7 SP1] and install it to the default location. |
… |
… |
|
14 | 15 | 1. '''Get Network Security Services (NSS):'''[[BR]]Download the latest version of [ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/ NSS] (currently 3.12.11 w/ CKBI 1.87) and extract it to the same location. |
15 | 16 | 1. '''Get MozillaBuild:'''[[BR]]Download the latest version of [ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe MozillaBuild] and install it to `c:\devel\mozilla-build`. |
| 17 | |
| 18 | == Apply patches == |
| 19 | |
| 20 | Download the [http://code.google.com/p/xchat-wdk/source/browse/ext/nss-wdk/nss-wdk.patch?name=wdk WDK build patch] from the [http://code.google.com/p/xchat-wdk/ XChat-WDK project]. Open a command prompt at your NSS/NSPR directory and run `"c:\path\to\patch.exe" -p1 --binary -i nss-wdk.patch`. |
16 | 21 | |
17 | 22 | == Choose build configuration == |
… |
… |
|
23 | 28 | |
24 | 29 | You can toggle them with environmental variables. Here's the matrix: |
| 30 | |
25 | 31 | {{{ |
26 | 32 | #!rst |
27 | | +-----------+----------------+-----------------+ |
28 | | | |USE_DEBUG_RTL= |USE_DEBUG_RTL=1 | |
29 | | +===========+================+=================+ |
30 | | |BUILD_OPT= |WINNT6.1_DBG.OBJ|WINNT6.1_DBG.OBJD| |
31 | | +-----------+----------------+-----------------+ |
32 | | |BUILD_OPT=1|WINNT6.1_OPT.OBJ|N/A | |
33 | | +-----------+----------------+-----------------+ |
| 33 | +---------------+--------------------+---------------------+ |
| 34 | | |``USE_DEBUG_RTL=`` |``USE_DEBUG_RTL=1`` | |
| 35 | +===============+====================+=====================+ |
| 36 | |``BUILD_OPT=`` |``WINNT6.1_DBG.OBJ``|``WINNT6.1_DBG.OBJD``| |
| 37 | +---------------+--------------------+---------------------+ |
| 38 | |``BUILD_OPT=1``|``WINNT6.1_OPT.OBJ``|``N/A`` | |
| 39 | +---------------+--------------------+---------------------+ |
34 | 40 | }}} |
35 | 41 | |
36 | 42 | The version after WINNT is the version of your current OS (you can check it with the `winver` command). WINNT6.1 assumes you're building on Windows 7. The default setting is an unoptimized build with the release RTL (WINNT6.1_DBG.OBJ). |
37 | 43 | |
38 | | '''WARNING''': it seems the builder considers any variable as 1 if it's set. So if you enter |
39 | | {{{ |
40 | | set BUILD_OPT=0 |
41 | | }}} |
42 | | you'll get an optimized build although you wanted a debug one. The answer lies in `mozilla\security\coreconf\WIN32.mk`. They check variables with ifdefs, which is just plain wrong (or they should mention it this way in the documentation). |
43 | | |
44 | | '''Solution''': set a variable only if you want the related build. Here's the table for seeing what you actually have to enter and what you'll get: |
45 | | || || ||USE_DEBUG_RTL=1||BUILD_OPT=1|| |
46 | | ||OS_TARGET=WIN95||WIN954.0_DBG.OBJ||WIN954.0_DBG.OBJD||WIN954.0_OPT.OBJ|| |
47 | | ||OS_TARGET=WINNT||WINNT6.1_DBG.OBJ||WINNT6.1_DBG.OBJD||WINNT6.1_OPT.OBJ|| |
48 | | OS_TARGET is an exception and isn't affected by this error because it's not numerical, so the script checks for its value instead of its existence. As a sidenote, BUILD_OPT seems to have a higher priority than USE_DEBUG_RTL, so if you enter |
49 | | {{{ |
50 | | set BUILD_OPT=1 |
51 | | set USE_DEBUG_RTL=1 |
52 | | }}} |
53 | | you'll get an optimized build without linking with the debug RTL. In case you want, for example, a debug build after an optimized, you can unset the variable by setting it without a value, such as: |
54 | | |
55 | | {{{ |
56 | | set BUILD_OPT= |
57 | | }}} |
| 44 | '''WARNING''': it seems the builder considers an option to be enabled if it's set, so if you enter `set BUILD_OPT=0` you'll get an optimized build, not a debug one. The answer lies in `mozilla\security\coreconf\WIN32.mk`. They check variables with ifdefs, which is just plain wrong (or they should mention it this way in the documentation). |
58 | 45 | |
59 | 46 | More info about the build variables can be found on the [https://developer.mozilla.org/en/NSS_reference/Building_and_installing_NSS/Build_instructions Build instructions] page of the Mozilla Developer Central. |
60 | 47 | |
61 | 48 | == Build NSS == |
| 49 | |
| 50 | ''To be updated with DDK build instructions'' |
62 | 51 | |
63 | 52 | The easiest way to do this with consistent results is to make a build script (the following is what the binary included with Pidgin is built with): |
… |
… |
|
97 | 86 | The build will likely not complete successfully due to hardcoded library paths and other problems in the build system (it will bail out building `.../cmd/bltest`). If it gets that far, it has already built the various libraries successfully. |
98 | 87 | |
99 | | The resulting binaries will be placed in `c:\devel\pidgin-devel\win32-dev\nss-3.12.8\mozilla\dist`. The contents of `private` and `public` are the same across all configurations so they can be distributed separately. |
| 88 | The resulting binaries will be placed in `c:\devel\pidgin-devel\win32-dev\nss-3.12.8\mozilla\dist`. The contents of `private` and `public` are the same across all configurations so they can be distributed separately. The following files need to be distributed with Pidgin: |
| 89 | |
| 90 | * `libnspr4.dll` |
| 91 | * `libplds4.dll` |
| 92 | * `libplc4.dll` |
| 93 | * `nssutil3.dll` |
| 94 | * `freebl3.dll` |
| 95 | * `sqlite3.dll` |
| 96 | * `softokn3.dll` |
| 97 | * `nss3.dll` |
| 98 | * `ssl3.dll` |
| 99 | * `nssckbi.dll` |
| 100 | * `softokn3.chk` |
| 101 | * `freebl3.chk` |
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!