Compiling KVIrc on 64 bits from svn, using Visual Studio 2008 or 2010

[Updated: 17/05/2011]

This doc, which CtrlAltCa kindly wrote, explains how to compile KVIrc using mingw on 32 bits. I’ll use it as a base for this.

He explains how to make a complete build. I’ll compile OpenSSL support, to show you how easy it is, but I won’t compile some things, like Perl, Python or gettext, because this document is not focused on how to compile a full build, but on how to compile a 64 bits build using VS.

You have to build Qt using Visual Studio if you want to do this. That will take from one to several hours. I just want to make sure you are aware of this before you start downloading and installing all the requisites.

Requisites

  • Windows x64. Yes, that OS. I’ll use 7 Professional. I don’t know if you can compile x64 applications on a x32 system, but I’m certain you can’t run them. Get it at your retail store. You probably installed it already, or you wouldn’t be able to read this.
  • Visual Studio 2008. I’ll use Professional Edition. I don’t know if you can do this using the Express (free) Edition. Get it at your retail store. Install it.
  • CMake. To generate makefiles. Get it here. Install it, remembering to choose “Add CMake to command path for all users”.
  • TortoiseSVN. To get KVIrc source code from the svn server. Get it here. Remember to get the x64 version or you won’t be able to use it! Install it.
  • zlib. A compression library. Get the zlib compiled DLL, not the source code, here. Uncompress it to C:\zlib.
  • Qt. The framework KVIrc uses. Get it here. I downloaded the .tar.gz version, and then I uncompressed it to C:\Qt. You may want to download the MSVS version, and so you won’t have to compile it, but I’ll compile it.
  • ActivePerl. Yes, I know I said we won’t compile Perl support for KVIrc, but OpenSSL build system and KVIrc help system require it. Get it here. We need the x64 version, of course. Install it.
  • OpenSSL. Get it here. The latest version is marked red.

Start!

Compile OpenSSL

First, uncompress it. I’ll do it into C:\openssl. Next open a Visual Studio x64 Command Prompt, go to that folder and type these commands:

perl Configure VC-WIN64A
ms\do_win64a
nmake -f ms\ntdll.mak
cd out32dll
..\ms\test

All of them should run flawlessly.

Compile Qt

If you’re going to use Qt with Visual Studio, you need to recompile it. Instructions, borrowed from here:

  1. Open a Visual Studio x64 Command Prompt.
  2. Add Qt binaries to the %PATH%:
    set PATH=%PATH%;C:\Qt\bin
  3. Add OpenSSL to the include path:
    set INCLUDE=%INCLUDE%;C:\openssl\include
  4. Configure Qt. I’ll use:
    cd c:\Qt
    configure -release -opensource -openssl
  5. Compile:
    nmake

    (You should use jom instead of nmake if you have a multi-cored processor).

Get the KVIrc source code

Open C:\ using the Windows explorer, right-click any empty space, and click “SVN Checkout”. Insert https://svn.kvirc.de/svn/trunk/kvirc and then hit OK. Wait for it… yeah, done! The KVIrc source code will be placed at C:\kvirc.

Compile!

  1. Open a Visual Studio x64 command prompt. Before starting the fun, we have to set some environment variables.
    set PATH=%PATH%;C:\zlib\bin;C:\Qt\bin;C:\Perl64\bin;C:\Perl64\site\bin
    set CMAKE_INCLUDE_PATH=%CMAKE_INCLUDE_PATH%;C:\openssl\include;C:\zlib\include
    set CMAKE_LIBRARY_PATH=%CMAKE_LIBRARY_PATH%;C:\openssl\out32dll;C:\zlib\lib;C:\Qt\lib
    
  2. Next, create a build directory and its Makefiles using cmake:
    md build
    cd build
    cmake .. -G "NMake Makefiles"
  3. And compile!
    nmake

    Remember to use jom if you’re using a processor which has more than one core.

  4. Now, install:
    nmake install

    Your binaries are now located at C:\kvirc\build\release. But you can’t start kvirc.exe: there are some libraries missing.

  5. Go to C:\Qt\bin and copy QtCore4d.dll and QtGui4d.dll if you compiled with debug support, or QtCore4.dll and QtGui4.dll if you compiled without it, into C:\kvirc\build\release
  6. Go to C:\openssl\out32dll and copy libeay32.dll and ssleay32.dll into C:\kvirc\build\release
  7. Start KVIrc!
    KVIrcIt has no *32: it’s a 64 bits application.

Done 🙂

If you find any problem which is not covered here, or if something is not correct, you probably will find me at #KVIrc @ irc.freenode.net, my nick is wodim.

Anuncios

1 Response to “Compiling KVIrc on 64 bits from svn, using Visual Studio 2008 or 2010”


  1. 1 justin beiber 05/07/2013 en 12:12

    Wow, this piece of writing is nice, my younger sister is analyzing
    these things, therefore I am going to let know her.


Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s





A %d blogueros les gusta esto: