[Pidgin] BuildingWinNSS modified
Pidgin
trac at pidgin.im
Sat Oct 15 11:27:42 EDT 2011
Changed page "BuildingWinNSS" by itsnotabigtruck from 24.15.221.85*
Page URL: <http://developer.pidgin.im/wiki/BuildingWinNSS>
Diff URL: <http://developer.pidgin.im/wiki/BuildingWinNSS?action=diff&version=35>
Revision 35
Comment: Additional updates - pending testing build process with the (free) Windows SDK 7.1
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: BuildingWinNSS
=========================================================================
--- BuildingWinNSS (version: 34)
+++ BuildingWinNSS (version: 35)
@@ -8,11 +8,16 @@
== Prerequisites ==
+ 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]).
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.
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.
1. '''Get the Netscape Portable Runtime (NSPR):'''[[BR]]Download the latest version of [ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ NSPR] (currently 4.8.9) and extract it to `c:\devel\pidgin-devel\win32-dev`.
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.
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`.
+
+== Apply patches ==
+
+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`.
== Choose build configuration ==
@@ -22,43 +27,27 @@
* debug RTL
You can toggle them with environmental variables. Here's the matrix:
+
{{{
#!rst
-+-----------+----------------+-----------------+
-| |USE_DEBUG_RTL= |USE_DEBUG_RTL=1 |
-+===========+================+=================+
-|BUILD_OPT= |WINNT6.1_DBG.OBJ|WINNT6.1_DBG.OBJD|
-+-----------+----------------+-----------------+
-|BUILD_OPT=1|WINNT6.1_OPT.OBJ|N/A |
-+-----------+----------------+-----------------+
++---------------+--------------------+---------------------+
+| |``USE_DEBUG_RTL=`` |``USE_DEBUG_RTL=1`` |
++===============+====================+=====================+
+|``BUILD_OPT=`` |``WINNT6.1_DBG.OBJ``|``WINNT6.1_DBG.OBJD``|
++---------------+--------------------+---------------------+
+|``BUILD_OPT=1``|``WINNT6.1_OPT.OBJ``|``N/A`` |
++---------------+--------------------+---------------------+
}}}
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).
-'''WARNING''': it seems the builder considers any variable as 1 if it's set. So if you enter
- {{{
-set BUILD_OPT=0
- }}}
-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).
-
-'''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:
- || || ||USE_DEBUG_RTL=1||BUILD_OPT=1||
- ||OS_TARGET=WIN95||WIN954.0_DBG.OBJ||WIN954.0_DBG.OBJD||WIN954.0_OPT.OBJ||
- ||OS_TARGET=WINNT||WINNT6.1_DBG.OBJ||WINNT6.1_DBG.OBJD||WINNT6.1_OPT.OBJ||
-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
- {{{
-set BUILD_OPT=1
-set USE_DEBUG_RTL=1
- }}}
-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:
-
- {{{
-set BUILD_OPT=
- }}}
+'''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).
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.
== Build NSS ==
+
+ ''To be updated with DDK build instructions''
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):
{{{
@@ -96,4 +85,17 @@
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.
-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 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:
+
+ * `libnspr4.dll`
+ * `libplds4.dll`
+ * `libplc4.dll`
+ * `nssutil3.dll`
+ * `freebl3.dll`
+ * `sqlite3.dll`
+ * `softokn3.dll`
+ * `nss3.dll`
+ * `ssl3.dll`
+ * `nssckbi.dll`
+ * `softokn3.chk`
+ * `freebl3.chk`
-------8<------8<------8<------8<------8<------8<------8<------8<--------
* The IP shown here might not mean anything if the user or the server is
behind a proxy.
--
Pidgin <http://pidgin.im>
Pidgin
This is an automated message. Someone at http://pidgin.im added your email
address to be notified of changes on BuildingWinNSS. If it was not you, please
report to .
More information about the Wikiedit
mailing list