Browse Source

- Improved doc/compiling_win32.txt a lot: now VC7 only, and has instructions on:

compiling modules and their (binary) compatability, zip links (zlib), ssl (OpenSSL)...
  Remote includes (curl and c-ares) instructions still need to be added.
- Made 'Install as a service' unchecked by default, this should help beginners a lot.
pull/2/head
Bram Matthys 19 years ago
parent
commit
d97c8de0b1
  1. 4
      Changes
  2. 99
      doc/compiling_win32.txt
  3. 2
      src/win32/unrealinst.iss

4
Changes

@ -294,3 +294,7 @@
/connect or autoconnect) and was not present in the cache. Reported and traced by sh0
(#0001976).
- Fixed compile bug at *NIX caused by ModuleGetErrorStr fix.
- Improved doc/compiling_win32.txt a lot: now VC7 only, and has instructions on:
compiling modules and their (binary) compatability, zip links (zlib), ssl (OpenSSL)...
Remote includes (curl and c-ares) instructions still need to be added.
- Made 'Install as a service' unchecked by default, this should help beginners a lot.

99
doc/compiling_win32.txt

@ -1,6 +1,6 @@
==[ IMPORTANT MESSAGE ABOUT DISABLING NOSPOOF ]==
Disabling NOSPOOF at windows (w9x, nt, w2k, xp) is NOT recommended since this
will allow users to use "spoofed hosts" (like the IP of someone you trust).
WILL allow users to use "spoofed hosts" (like the IP of someone you trust).
If you got problems with NOSPOOF fix your client (bot?) instead (you should
PONG back to the initial PING at connect).
@ -9,22 +9,12 @@ PONG back to the initial PING at connect).
First of all you need Microsoft Visual C++, compiling with cygwin
is not supported.
== "old" VC++ 6.0 ==
1. You need the Platform SDK (PSDK)
Grab it at: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ ->
core sdk -> install this sdk.
Note that this can take some time to download because it's >200Mb
(450mb installed) [!].
2. To compile:
start -> programs -> platform sdk blabla -> open build env. -> (choose os) ->
set blabla build env (debug). This will launch a DOS window.
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
nmake -f makefile.win32
This will generate a wircd.exe and unreal.exe
4. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
5. Done!
VC++ 7.x (.NET) is highly recommended. VC 6 might work but it requires
the Platform SDK (PSDK), it also has quite some bugs (there are 5 servicepacks!).
Basically VC7 is just much easier and known to work, therefore we'll assume
in this text that you are using it.
== VC++ 7.x (.NET) ==
== Simple compile (no SSL/ZIP/Remote includes) ==
1. Start the Visual Studio .NET Command Prompt
2. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
nmake -f makefile.win32
@ -32,12 +22,73 @@ is not supported.
3. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
4. Done!
==[ HOW TO COMPILE UNREALIRCD WITH SSL AT WINDOWS ]==
Ouch, that's much work ;).
You need to compile openssl yourself.
Then have a look at makefile.win32 for instruction on how
to enable / specify path / etc...
DO NOT ask us for help with compiling openssl!
== Compiling modules ==
1. Put your module (the .c file) in src\modules (eg: c:\dev\unreal3.2\src\modules).
2. Start the Visual Studio .NET Command Prompt
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2).
4. Compile the module with:
nmake -f makefile.win32 custommodule MODULEFILE=<name>
<name> is the name of the module WITHOUT the .c suffix, so if your
module has the filename 'm_crappymod.c', then you use:
nmake -f makefile.win32 custommodule MODULEFILE=m_crappymod
5. Done. A .dll file should have been created.
If you compiled with VC7 and used the official source (not a CVS version,
but for example 3.2.1 source) then the module should work on all these
versions (binary compatible) and you could for example put them on
your website so users can download them.
Such a module will work on both SSL and non-SSL, there should be no need
for separate versions... unless, of course, you use SSL-specific code in your mod.
DO NOT download a CVS version & compile your mod and then start
distributing the .dll for use at another (non-CVS) version!!
Every time we change a struct (and in some other cases) it makes the
binary/module binary incompatible which practically means your module
will CRASH or cause memory corruption and other subtle errors.
== GENERAL NOTES FOR ZIP LINKS / SSL / CURL (READ THIS FIRST!) ==
1. Precompiled DLL's should NOT be used because they are compiled with
other/wrong parameters and/or use different api call systems..
This usually causes a CRASH if the library is used.
2. Just like with UnrealIRCd, in all compile steps below you MUST start
the 'Visual Studio .NET Command Prompt' before you go compile it.
3. Obviously you can combine things (eg: SSL+ZIP), in such a case
you just put all the required compile parameters on 1 line, like:
nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib-1.2.1" ZLIB_LIB_DIR="c:\dev\zlib-1.2.1" USE_SSL=1 OPENSSL_INC_DIR="c:\openssl\inc32\openssl" OPENSSL_LIB_DIR="C:\Dev\openssl\out32dll.dbg"
== ZIP LINKS (zlib) ==
[NOTE: precompiled dlls should NOT be used because they will cause a crash
(this is due to different compile parameters / api call systems]
To compile with ziplinks support you need to do the following:
Download the SOURCE from http://www.winimage.com/zLibDll/
(at the time of writing, http://www.winimage.com/zLibDll/zlib121.zip)
and extract it to somewhere, for example c:\dev\zlib-1.2.1
Then, edit win32\makefile.msc:
- Change -MD to -MDd
- Add -D ZLIB_WINAPI to CFLAGS
- so the result will be like:
CFLAGS = -nologo -MDd -O2 $(LOC) -D ZLIB_WINAPI
- Then compile: nmake -f win32\Makefile.msc
- Assuming the above step went fine, your zlib is now ready.
- Now, to compile UnrealIRCd with ziplinks you do something like this:
nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib-1.2.1" ZLIB_LIB_DIR="c:\dev\zlib-1.2.1"
Obviously, change the paths if needed [1st = *.h files, 2nd=*.dll/*.lib]
== SSL (OpenSSL) ==
[note: openssl requires perl to configure/compile!]
- Download latest openssl (eg: openssl-0.9.7d.tar.gz) and extract it somewhere
(we'll use c:\dev\openssl-0.9.7d in this example)
- Open util\do_masm.bat, add 'debug' to the lines with 'mk1mf.pl' BUT be careful
since it should NOT be the last word, so add it somewhere before that.
For example: perl util\mk1mf.pl dll debug VC-W31-32 >ms\w31dll.mak
- Start the
- Now we go build openssl, run:
ms\do_masm
nmake -f ms\ntdll.mak
- Assuming the above step went fine, your OpenSSL is now ready.
- Now, to compile UnrealIRCd with ziplinks you do something like this:
nmake -f makefile.win32 USE_SSL=1 OPENSSL_INC_DIR="c:\openssl\inc32\openssl" OPENSSL_LIB_DIR="C:\Dev\openssl\out32dll.dbg"
Obviously, change the paths if needed [1st=*.h files, 2nd=*.dll/*.lib]
==[ AND ZIP LINKS SUPPORT? ]==
See makefile.win32 for instructions.
== REMOTE INCLUDES (curl,cares) ==
[TODO]

2
src/win32/unrealinst.iss

@ -32,7 +32,7 @@ OutputDir=../../
[Tasks]
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; Flags: unchecked
Name: "installservice"; Description: "Install as a &service (not for beginners)"; GroupDescription: "Service support:"; MinVersion: 0,4.0
Name: "installservice"; Description: "Install as a &service (not for beginners)"; GroupDescription: "Service support:"; Flags: unchecked; MinVersion: 0,4.0
Name: "installservice/startboot"; Description: "S&tart UnrealIRCd when Windows starts"; GroupDescription: "Service support:"; MinVersion: 0,4.0; Flags: exclusive
Name: "installservice/startdemand"; Description: "Start UnrealIRCd on &request"; GroupDescription: "Service support:"; MinVersion: 0,4.0; Flags: exclusive
Name: "installservice/crashrestart"; Description: "Restart UnrealIRCd if it &crashes"; GroupDescription: "Service support:"; MinVersion: 0,5.0;

Loading…
Cancel
Save