Jump to content

Compiling Zandronum with Visual Studio: Difference between revisions

Line 43: Line 43:
== OpenSSL ==
== OpenSSL ==


Precompiled versions of OpenSSL for Windows are available from [https://slproweb.com/products/Win32OpenSSL.html Shining Light Productions].  You will want the latest non-light edition of OpenSSL 1.0.2 - the description of the correct package mentions "software developers".  You should have a choice between 32-bit and 64-bit versions - you will most likely need the 32-bit version unless you are using CMake and select the 64-bit compiler when generating your build files.
OpenSSL is necessary in order for Zandronum to communicate securely with the account authentication server.


=== Wait, why do we need this huge library? ===
Precompiled binaries for Windows are available from [https://slproweb.com/products/Win32OpenSSL.html Shining Light Productions].  You will want the latest non-light edition of OpenSSL 1.0.2 - the description of the correct package mentions "software developers".  You should have a choice between 32-bit and 64-bit versions - you will most likely need the 32-bit version unless you are using CMake and select the 64-bit compiler when generating your build files.
 
The authentication protocol needs OpenSSL for "Big Integer" math, a cryptographically secure random number generator, and the SHA256 hash function.


=== Building OpenSSL ===
=== Building OpenSSL ===


If the above packages don't work for you for some weird reason, you can try compiling OpenSSL yourself. This is going to be a huge pain in the neck, so be '''sure''' that the Shining Light distributions of OpenSSL definitely don't work before you try this.
If the above packages do not work, you can compile OpenSSL yourself. This is a lengthy and complicated process, so be sure that the existing binaries of OpenSSL definitely don't work before you try this.


Perl is necessary to build OpenSSL. If you don't have Perl installed already, install [http://www.activestate.com/activeperl ActiveState Perl].
* Perl is necessary to build OpenSSL. If you don't have Perl installed already, install [http://www.activestate.com/activeperl ActiveState Perl].


* NASM executable directory <I>must</I> be in the host system's Environment Variables.  Meaning, that NASM must be in the system's $PATH (or %PATH%).
* NASM executable directory must be in the host system's <code>PATH</code> environment variable.


* Download and decompress the latest source of [https://www.openssl.org/source/ OpenSSL]. In the openssl source directory call
* Download and decompress the latest source of [https://www.openssl.org/source/ OpenSSL]. In the source directory call


  perl Configure VC-WIN32 --prefix=c:\Tools\Util\openssl
  perl Configure VC-WIN32 --prefix=c:\Tools\Util\openssl
  ms\do_nasm
  ms\do_nasm


* Replace "c:\Tools\Util\openssl" with the path where you want OpenSSL to be installed. Then, in the same directory, but within a [http://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx VC++ command prompt], call
* Replace <code>c:\Tools\Util\openssl</code> with the path where you want OpenSSL to be installed. Then, in the same directory, but within a [http://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx VC++ command prompt], call


  nmake -f ms\nt.mak
  nmake -f ms\nt.mak
Line 68: Line 66:
  nmake -f ms\nt.mak install
  nmake -f ms\nt.mak install


NOTE: If an error message 'WinSock32.h does not exist!' is displayed (or the like), you'll need to add these two lines to your console's temporary environment:<br>
* If an error message 'WinSock32.h does not exist!' is displayed (or the like), you'll need to add these two lines to your console's temporary environment:
  <code>SET INCLUDE=%INCLUDE%;c:\Program Files\Microsoft SDKs\Windows\v7.0\Include\</code><br>
 
  <code>SET LIB=%LIB%;c:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\</code>
  SET INCLUDE=%INCLUDE%;c:\Program Files\Microsoft SDKs\Windows\v7.0\Include\
  SET LIB=%LIB%;c:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\


== Python ==
== Python ==