Opened 3 years ago

Last modified 3 years ago

#869 assigned Feature Wish

x86 binaries on x64 OS

Reported by: Claudi Owned by: Samuli Seppänen
Priority: minor Milestone:
Component: Installation Version: OpenVPN 2.4.1 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:


I really like the idea of having just one installer for x86 and x64 Windows. Sadly I am in the need of the x86 binaries but I am on a x64 OS and I have no access to a x86 OS. It would be nice to have a way to install OpenVPN the x86 way on a x64 OS. Perhaps just an installer option in NSIS.

Is there a way of receiving the x86 binaries on a x64 system?

Change History (4)

comment:1 Changed 3 years ago by Gert Döring

Owner: set to Samuli Seppänen
Status: newassigned

comment:2 Changed 3 years ago by Samuli Seppänen

There is no easy way to install 32-bit OpenVPN on 64-bit OS using 2.4.x installers. hints that running the installer from a 32-bit command prompt might do the trick. I tested that with a 32-bit Powershell prompt in Windows 2012r2 64-bit and it did not fool the installer into thinking it runs in a 32-bit OS.

Windows XP compatibility mode might work, except that the 2.4.x installers explicitly refuse to install anything if they think they're running on Windows XP.

That leaves you with the more tricky options:

  1. Hack together a custom NSIS installer. The Custom OpenVPN Installer (NSIS) page might be helpful.
  2. Install 64-bit first, then replace the 64-bit binaries/libraries with 32-bit versions afterwards. You can extract the 32-bit files using 7-zip. 32-bit and 64-bit files are in the same directories, but the smaller ones are 32-bit. In addition you need to move or copy the HKLM:\\SOFTWARE\OpenVPN and HKCU:\\SOFTWARE\OpenVPN-GUI registry keys from the 64-bit registry to the 32-bit registry. This might be ok for one-time installs, but keeping OpenVPN/OpenSSL updated will be painful.
  3. Build a custom installer using openvpn-build. This will require stripping out the bitness checks in openvpn.nsi (e.g. lines lines 319-323).

All this said: why do you need to run 32-bit version of OpenVPN on 64-bit Windows? Or do you just need the binaries as you said? In that case 7-zip will do the trick.

comment:3 Changed 3 years ago by Claudi

First, thanks for your detailed help.

I don't really need a "proper" 32 bit installation (anyway this would be desirable), just the binaries. It would be really nice to have an option in the NSIS installer to choose which bitness is being installed.

I will try it with the 7-Zip way. Strange that the binaries are all mixed up in the same directory. But I will just take the smaller ones and hope that they are right.

I am trying to deploy an OpenVPN based tool which should work on 32 and 64 bit operating systems. I need the 32 bit binaries because they are working on 64 bit but the other way around it is not.

comment:4 Changed 3 years ago by Samuli Seppänen

One more note about openvpn-build: before it generates the NSIS installer it puts all the required files under openvpn-build/windows-nsis/tmp/installer. There you will find two directories: x86_64 (64-bit) and i686 (32-bit). Those directories contain the files you need:

├── bin
│   ├── c_rehash
│   ├── libeay32.dll
│   ├── liblzo2-2.dll
│   ├── libpkcs11-helper-1.dll
│   ├── openssl.exe
│   ├── openvpn.exe
│   ├── openvpn-gui.exe
│   ├── openvpnserv.exe
│   └── ssleay32.dll
--- snip ---

That said, simply extracting the files using 7-zip is easier unless you also want/need to build OpenVPN and its dependencies.

Note: See TracTickets for help on using tickets.