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.
Cross compiling on linux is possible. If the change-password feature is enabled (this is the default), openssl library built for the target (windows) is required. This may be cross-compiled from source or if you are building on Fedora, MinGW has a decent set of cross-compiled libraries available out of the box. The following assumes that the openssl library and include files are installed in $HOME/windows/.
These instructions have been tested on Debian Jessie with automake, mingw-w64 and dependencies installed.
Steps -- building for 64 bit windows
Starting from a clone of the gui repo from github, do
$ autoreconf -i -v
Run configure as
$ ./configure --prefix=/ --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu --program-prefix='' OPENSSL_CRYPTO_CFLAGS="-I $HOME/windows/include/" OPENSSL_CRYPTO_LIBS="-L $HOME/windows/lib/ -lcrypto"
Replace, $HOME/windows by the location of openssl include and libs. If disabling change-password is ok, run configure as
$ ./configure --prefix=/ --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu --program-prefix='' CFLAGS=-DDISABLE_CHANGE_PASSWORD OPENSSL_CRYPTO_LIBS="-L./"
Then run make:
Optionally use -j n with make.
That will build openvpn-gui.exe. The exec can be easily installed manually or using the installer built as
$ make installer
This needs makensis in PATH.