Historical:Compiling 1.1 Under Windows

From the makers of InspIRCd.
(Redirected from Compiling 1.1 Under Windows)
Jump to: navigation, search
Development Development Material - Information posted here is for developer reference only. This material is subject to possible change and will be technical in nature.

Version Note

This tutorial only applies to InspIRCd 1.1.8 and later. For instructions on compiling 1.0, see our section on Compiling 1.0 Under Windows. InspIRCd 1.1.0 through 1.1.7 will not build on windows at all, natively or under cygwin.

Requirements

A copy of visual studio 2005 express, and the platform SDK (Windows Server 2003 Platform SDK (R2)). Visual studio 2008 express should work, but is not recommended at this time.

IMPORTANT NOTE: Both of these are FREE LEGALLY FROM MICROSOFT FOR PERSONAL USE. You don't need to 'warez' anything, nor would we ever recommend you do so. If you happen to have the full editions of visual studio, these should work without issue and without needing to follow the platform SDK installation steps, below.

Installing Visual C++ 2005 Express and the Platform SDK

This is the hardest part of building, but when it's done you'll never have to do it again.

Installing Visual C++ 2005 Express

Download Visual Studio, select the GUI component, and install. When it's finished, run it at least once and continue as listed below.

Installing the Platform SDK

Download the Platform SDK and select the typical install. When it's finished follow the steps below.

Update the paths for the PSDK

  1. Go Into Visual C++ 2005 and go to the menu. Click Options -> Projects and Solutions.
  2. Add these paths to the appropriate subsections (change the paths if you installed the Platform SDK elsewhere):
  • Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
  • Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
  • Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

Update the corewin_express.vsprops file

  1. Make sure visual studio 2005 is closed before you proceed any further!
  2. Open up notepad (NOT Microsoft Word, Wordpad is acceptable but only if you save it as plain text)
  3. Open C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults (change the path if you installed Visual Studio elsewhere)
  4. Change the text that reads:
AdditionalDependencies="kernel32.lib"
to
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Vista specific updates

If you are building InspIRCd on windows Vista in Visual Studio 2005 Express, you will need to apply Microsoft's service packs and patches otherwise you may have issues building programs in Visual Studio.


Now you can start building!

Starting Off

Head over to our download page and downloading the latest version of InspIRCd to an easy to reach directory (You may have to do some command-line work). Use 7-zip or a similar program to extract it to the working directory.

In explorer, navigate to the win directory of the InspIRCd install, and double click on the inspircdVS80.sln file.

Changing the build profile

Before you start, you should change the build profile to 'Release' as shown below. The Debug profile is for internal use by developers and may not work or may cause performance issues.

Release.png

Building

From the Build menu in visual studio 2005 express, choose Rebuild solution. You will be prompted by a familiar looking InspIRCd configure screen similar to that in Linux. Fill in the details as required. Do not enable IOCP or IPv6 as these are not tested and known to cause issues at present. Once you have filled in the details the build will run and complete.


Building extra modules under Windows

For certain extra modules such as gnutls, where these are supported you must follow extra steps to build them. See the section on Building the GnuTLS module on windows for more information.

Locate the compiled code

Usually, when you build InspIRCd on windows, the source code will be located in the directory bin\release with a directory structure as follows:

 + <build target>
 |
 |`-- bin
 |  `-- inspircd.exe
 |
 |`-- lib
 |  `-- lots of command modules
 |
  `-- modules
    `-- lots of module files

We need to go back to the folder where you extracted InspIRCd, browse into the conf directory, and find the config files in the conf dir. Copy them into the directory structure so you have something looking like this:

 + <build target>
 |
 |`-- bin
 |  `-- inspircd.exe
 |
 |`-- lib
 |  `-- lots of command modules
 |
 |`-- conf
 |  `-- lots of configuration files
 |
  `-- modules
    `-- lots of module files

Configuring

There are no significant differences between InspIRCd on windows and InspIRCd on POSIX platforms as of 1.1.8. Please note that the modules are named *.so on both to ease documenting the project. Please do not attempt to rename them, this will break your install.

Launching

There are two options for this, generally the second is easier

Using the Official Launcher

Download the official Windows Build of InspIRCd from our download page, install it, then replace the files in bin, lib and modules provided with the one you have made yourself, then use the official launcher, this will allow you to start InspIRCd via the GUI.

Running the easy way

Simply double click the inspircd.exe. It will appear to vanish, however if you check your task list, you will find it running daemonized.

Congratulations

You've now built your own copy of InspIRCd under windows, Use it as you wish, and enjoy :)