wiki:BuildingOpenVPN-GUI

Version 4 (modified by Samuli Seppänen, 8 years ago) (diff)

Add more up-to-date instructions

Introduction

OpenVPN Windows releases include a Windows GUI, which is not part of the core project. OpenVPN versions 2.2.x and earlier include the old Windows GUI, whereas 2.3 and later include the new Windows GUI. These instruction cover building the new GUI, although instruction for the old one are probably very similar.

Building the OpenVPN installer bundle

Currently the easiest way to build OpenVPN-GUI is to build the entire OpenVPN Windows installer bundle and extract the produced OpenVPN-GUI binary. Thorough instructions are available here.

Building OpenVPN-GUI

This information is adapted from Selva's email to openvpn-devel mailing list.


Cross compiling on linux is possible. Actually its the only way I've build the gui. Its well documented when done as a part of the full distribution build using openvpn-build (as Samuli pointed out), but could be built alone as well. Here is a very basic description of what I do. The only complication is you need openssl built for the target (windows). I have this cross-compiled from source and installed in $HOME/windows/. There are some tutorials out there on how to cross-compile openssl. Alternatively if change-password feature is not required, you don't need openssl at all to build the gui (see below).

I work on Debian Jessie, have autoconf, automake etc and mingw-w64-x86-64-dev and mingw-w64-i686-dev installed.

Steps -- building for 64 bit windows

Starting from a clone of this gui repo from github, do

$ autoreconf -i -v

run configure as

$ OPENSSL_CRYPTO_CFLAGS="-I /home/selva/windows/include/ OPENSSL_CRYPTO_LIBS="-L/home/selva/windows/lib/ -lcrypto" ./configure --prefix=/ --libdir=//lib --host=x86_64-w64-mingw32 --target= --build=x86_64-pc-linux-gnu --program-prefix='' --sbindir=/bin

Replace, /home/selva/windows by the location of openssl include and libs. If disable-change-password is ok, run configure as

$ ./configure --prefix=/ --libdir=//lib --host=x86_64-w64-mingw32 --target= --build=x86_64-pc-linux-gnu --program-prefix='' --sbindir=/bin CFLAGS=-DDISABLE_CHANGE_PASSWORD OPENSSL_CRYPTO_LIBS="-L./"

Then run make:

$ make

Optionally use -j n with make.

That will build openvpn-gui.exe. The exec can be easily installed manually but you can also make the installer as

$ make installer

This needs makensis in PATH.

Attachments (1)

Download all attachments as: .zip