-
- <p>Again, if the installs goes to <tt class="FILENAME">/usr/local</tt>,
- the <tt class="LITERAL">localstatedir</tt> (ie: <tt class=
- "FILENAME">var/</tt>) will default to <tt class="FILENAME">/var</tt>
- instead of <tt class="LITERAL">$prefix/var</tt> so the logs will go to
- <tt class="FILENAME">/var/log/privoxy/</tt>, and the pid file will be
- created in <tt class="FILENAME">/var/run/privoxy.pid</tt>.</p>
-
- <p><b class="COMMAND">make install</b> will attempt to set the correct
- values in <tt class="FILENAME">config</tt> (main configuration file).
- You should check this to make sure all values are correct. If
- appropriate, an init script will be installed, but it is up to the user
- to determine how and where to start <span class=
- "APPLICATION">Privoxy</span>. The init script should be checked for
- correct paths and values, if anything other than a default install is
- done.</p>
-
- <p>If install finds previous versions of local configuration files,
- most of these will not be overwritten, and the new ones will be
- installed with a <span class="QUOTE">"new"</span> extension.
- default.action and default.filter <span class="emphasis"><i class=
- "EMPHASIS">will be overwritten</i></span>. You will then need to
- manually update the other installed configuration files as needed. The
- default template files <span class="emphasis"><i class=
- "EMPHASIS">will</i></span> be overwritten. If you have customized,
- local templates, these should be stored safely in a separate directory
- and defined in <tt class="FILENAME">config</tt> by the <span class=
- "QUOTE">"templdir"</span> directive. It is of course wise to always
- back-up any important configuration files <span class="QUOTE">"just in
- case"</span>. If a previous version of <span class=
- "APPLICATION">Privoxy</span> is already running, you will have to
- restart it manually.</p>
-
- <p>For more detailed instructions on how to build Redhat RPMs, Windows
- self-extracting installers, building on platforms with special
- requirements etc, please consult the <a href=
- "http://www.privoxy.org/developer-manual/newrelease.html" target=
- "_top">developer manual</a>.</p>
+ <p>Again, if the installs goes to <tt class="FILENAME">/usr/local</tt>, the <tt class=
+ "LITERAL">localstatedir</tt> (ie: <tt class="FILENAME">var/</tt>) will default to <tt class="FILENAME">/var</tt>
+ instead of <tt class="LITERAL">$prefix/var</tt> so the logs will go to <tt class=
+ "FILENAME">/var/log/privoxy/</tt>, and the pid file will be created in <tt class=
+ "FILENAME">/var/run/privoxy.pid</tt>.</p>
+ <p><b class="COMMAND">make install</b> will attempt to set the correct values in <tt class="FILENAME">config</tt>
+ (main configuration file). You should check this to make sure all values are correct. If appropriate, an init
+ script will be installed, but it is up to the user to determine how and where to start <span class=
+ "APPLICATION">Privoxy</span>. The init script should be checked for correct paths and values, if anything other
+ than a default install is done.</p>
+ <p>If install finds previous versions of local configuration files, most of these will not be overwritten, and
+ the new ones will be installed with a <span class="QUOTE">"new"</span> extension. default.action and
+ default.filter <span class="emphasis"><i class="EMPHASIS">will be overwritten</i></span>. You will then need to
+ manually update the other installed configuration files as needed. The default template files <span class=
+ "emphasis"><i class="EMPHASIS">will</i></span> be overwritten. If you have customized, local templates, these
+ should be stored safely in a separate directory and defined in <tt class="FILENAME">config</tt> by the
+ <span class="QUOTE">"templdir"</span> directive. It is of course wise to always back-up any important
+ configuration files <span class="QUOTE">"just in case"</span>. If a previous version of <span class=
+ "APPLICATION">Privoxy</span> is already running, you will have to restart it manually.</p>
+ <p>For more detailed instructions on how to build Redhat RPMs, Windows self-extracting installers, building on
+ platforms with special requirements etc, please consult the <a href=
+ "https://www.privoxy.org/developer-manual/newrelease.html" target="_top">developer manual</a>.</p>
+ <div class="SECT3">
+ <h3 class="SECT3"><a name="WINBUILD-CYGWIN" id="WINBUILD-CYGWIN">2.2.1. Windows</a></h3>
+ <div class="SECT4">
+ <h4 class="SECT4"><a name="WINBUILD-SETUP" id="WINBUILD-SETUP">2.2.1.1. Setup</a></h4>
+ <p>Install the Cygwin utilities needed to build <span class="APPLICATION">Privoxy</span>. If you have a 64
+ bit CPU (which most people do by now), get the Cygwin setup-x86_64.exe program <a href=
+ "https://cygwin.com/setup-x86_64.exe" target="_top">here</a> (the .sig file is <a href=
+ "https://cygwin.com/setup-x86_64.exe.sig" target="_top">here</a>).</p>
+ <p>Run the setup program and from View / Category select:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="SCREEN"> Devel
+ autoconf 2.5
+ automake 1.15
+ binutils
+ cmake
+ gcc-core
+ gcc-g++
+ git
+ make
+ mingw64-i686-gcc-core
+ mingw64-i686-zlib
+ Editors
+ vim
+ Libs
+ libxslt: GNOME XSLT library (runtime)
+ Net
+ curl
+ openssh
+ Text
+ docbook-dssl
+ docbook-sgml31
+ docbook-utils
+ openjade
+ Utils
+ gnupg
+ Web
+ w3m</pre>
+ </td>
+ </tr>
+ </table>
+ <p>If you haven't already downloaded the Privoxy source code, get it now:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="SCREEN"> mkdir <root-dir>
+ cd <root-dir>
+ git clone https://www.privoxy.org/git/privoxy.git</pre>
+ </td>
+ </tr>
+ </table>
+ <p>Get the source code (.zip or .tar.gz) for tidy from <a href="https://github.com/htacg/tidy-html5/releases"
+ target="_top">https://github.com/htacg/tidy-html5/releases</a>, unzip into <root-dir> and build the
+ software:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="SCREEN"> cd <root-dir>
+ cd tidy-html5-x.y.z/build/cmake
+ cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
+ make && make install</pre>
+ </td>
+ </tr>
+ </table>
+ <p>If you want to be able to make a Windows release package, get the NSIS .zip file from <a href=
+ "https://sourceforge.net/projects/nsis/files/NSIS%203/" target=
+ "_top">https://sourceforge.net/projects/nsis/files/NSIS%203/</a> and extract the NSIS directory to <tt class=
+ "LITERAL">privoxy/windows</tt>. Then edit the windows/GNUmakefile to set the location of the NSIS executable
+ - eg:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="SCREEN"># Path to NSIS
+MAKENSIS = ./nsis/makensis.exe</pre>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="SECT4">
+ <h4 class="SECT4"><a name="WINBUILD-BUILD" id="WINBUILD-BUILD">2.2.1.2. Build</a></h4>
+ <p>To build just the Privoxy executable and not the whole installation package, do:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="PROGRAMLISTING"> cd <root-dir>/privoxy
+ ./windows/MYconfigure && make</pre>
+ </td>
+ </tr>
+ </table>
+ <p>Privoxy uses the <a href="https://en.wikipedia.org/wiki/GNU_build_system" target="_top">GNU Autotools</a>
+ for building software, so the process is:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="PROGRAMLISTING"> $ autoheader # creates config.h.in
+ $ autoconf # uses config.h.in to create the configure shell script
+ $ ./configure [options] # creates GNUmakefile
+ $ make [options] # builds the program</pre>
+ </td>
+ </tr>
+ </table>
+ <p>The usual <tt class="LITERAL">configure</tt> options for building a native Windows application under
+ cygwin are</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="LITERALLAYOUT"> --host=i686-w64-mingw32
+ --enable-mingw32
+ --enable-zlib
+ --enable-static-linking
+ --disable-pthread
+ --disable-dynamic-pcre</pre>
+ </td>
+ </tr>
+ </table>
+ <p>You can set the <tt class="LITERAL">CFLAGS</tt> and <tt class="LITERAL">LDFLAGS</tt> envars before running
+ <tt class="LITERAL">configure</tt> to set compiler and linker flags. For example:</p>
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+ <pre class="PROGRAMLISTING"> $ export CFLAGS="-O2" # set gcc optimization level
+ $ export LDFLAGS="-Wl,--nxcompat" # Enable DEP
+ $ ./configure --host=i686-w64-mingw32 --enable-mingw32 --enable-zlib \
+ > --enable-static-linking --disable-pthread --disable-dynamic-pcre
+ $ make # build Privoxy</pre>
+ </td>
+ </tr>
+ </table>
+ <p>See the <a href="../developer-manual/newrelease.html#NEWRELEASE-WINDOWS" target="_top">Developer's
+ Manual</a> for building a Windows release package.</p>
+ </div>
+ </div>