6 | | = Creating the NSIS installer = |
| 7 | This is the most generic method: it can cross compile OpenVPN using any toolchain to any environment. Make sure you have installed [http://mingw-w64.sourceforge.net/ mingw-w64] before you start. Also, if you have [http://nsis.sourceforge.net/Main_Page NSIS] installed, you can use it to generate Windows installers. Below a few usage examples. |
| 8 | |
| 9 | Until the buildsystem is integrated with Git master, you need to copy Alon's Git repository on top of OpenVPN sources. If you're starting from scratch, use something like this: |
| 10 | |
| 11 | {{{ |
| 12 | $ git clone git://openvpn.git.sourceforge.net/gitroot/openvpn/openvpn.git |
| 13 | $ git clone https://github.com/alonbl/openvpn-build |
| 14 | $ cp -r openvpn-build/* openvpn |
| 15 | }}} |
| 16 | |
| 17 | The build files are in ''generic'' and ''msvc'' subdirectories. |
| 18 | |
| 19 | == Compile 32/64-bit Windows binaries on Linux == |
| 20 | |
| 21 | {{{ |
| 22 | $ cd generic |
| 23 | $ IMAGEROOT=`pwd`/image-win32 CHOST=i686-w64-mingw32 |
| 24 | CBUILD=x86_64-pc-linux-gnu ./build |
| 25 | $ IMAGEROOT=`pwd`/image-win64 CHOST=x86_64-w64-mingw32 |
| 26 | CBUILD=x86_64-pc-linux-gnu ./build |
| 27 | }}} |
| 28 | |
| 29 | == Compile 32/64-bit Windows binaries on Cygwin == |
| 30 | |
| 31 | Read README for required packages. |
| 32 | |
| 33 | {{{ |
| 34 | $ cd generic |
| 35 | $ IMAGEROOT=`pwd`/image-win32 CHOST=i686-w64-mingw32 |
| 36 | CBUILD=i686-pc-cygwin ./build |
| 37 | $ IMAGEROOT=`pwd`/image-win64 CHOST=x86_64-w64-mingw32 |
| 38 | CBUILD=i686-pc-cygwin ./build |
| 39 | }}} |
| 40 | |
| 41 | == Cross-compile arm binaries on Linux == |
| 42 | |
| 43 | {{{ |
| 44 | $ cd generic |
| 45 | $ CHOST="arm-unknown-linux-gnueabi" CBUILD="x86_64-pc-linux-gnu" DO_STATIC=1 ./build |
| 46 | }}} |
| 47 | |
| 48 | This will create static dependencies, but a dynamic libc. If you want to keep everything really static use set the ''DO_REALLY_STATIC=1'' variable. |
| 49 | |
| 50 | = MSVC build method = |
| 51 | |
| 52 | '''NOTE:''' These instructions are still incomplete. |
| 53 | |
| 54 | First install Perl (e.g. [http://www.activestate.com/activeperl ActivePerl]). |
| 55 | |
| 56 | {{{ |
| 57 | cd msvc |
| 58 | build |
| 59 | }}} |
| 60 | |
| 61 | == Visual Studio IDE == |
| 62 | |
| 63 | After you have the dependencies of Complete Batch or your own. Create msvc-env-local.bat with OPENVPN_DEPROOT pointing to the |
| 64 | location of the dependencies. |
| 65 | |
| 66 | {{{ |
| 67 | $ msvc-dev |
| 68 | }}} |
| 69 | |
| 70 | == MSBuild == |
| 71 | |
| 72 | After you have the dependencies of Complete Batch or your own. Create msvc-env-local.bat with OPENVPN_DEPROOT pointing to the location of the dependencies. |
| 73 | |
| 74 | {{{ |
| 75 | $ msvc-build |
| 76 | }}} |
| 77 | |
| 78 | = Creating a NSIS installer = |