]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fixed Windows build, int32_t is already defined in stdint.h.
authorAdam <Adam@anope.org>
Mon, 9 Jul 2012 05:53:07 +0000 (01:53 -0400)
committerAdam <Adam@anope.org>
Mon, 9 Jul 2012 05:53:07 +0000 (01:53 -0400)
Add GnuTLS support for Windows.
Made NSIS script include extra DLL files if supplied and
include the conf/aliases and conf/modules example configuration files.
Added make_gnutls_cert.bat to generate GnuTLS certificates on Windows.
Fixed typo in gnutlscert.pm.

make/gnutlscert.pm
src/modules/extra/m_ssl_gnutls.cpp
win/inspircd.nsi
win/inspircd_win32wrapper.h
win/make_gnutls_cert.bat [new file with mode: 0644]

index 1621c2c274566e5ca78715fd907dbc21be3665f7..ab8aae4279d1a4d45f251736bff6d5de34510800 100644 (file)
@@ -36,7 +36,7 @@ sub make_gnutls_cert()
        my $timestr = time();
        my $org = promptstring_s("Please enter the organization name", "My IRC Network");
        my $unit = promptstring_s("Please enter the unit Name", "Server Admins");
-       my $state = promptstring_s("Pleae enter your state (two letter code)", "CA");
+       my $state = promptstring_s("Please enter your state (two letter code)", "CA");
        my $country = promptstring_s("Please enter your country", "Oompa Loompa Land");
        my $commonname = promptstring_s("Please enter the certificate common name (hostname)", "irc.mynetwork.com");
        my $email = promptstring_s("Please enter a contact email address", "oompa\@loompa.com");
index 6ca876d4ccfb354694cc777f87d593e074b25a90..c631642cee610e74f030117af62f35200df63f62 100644 (file)
 #include "ssl.h"
 #include "m_cap.h"
 
+#ifdef WINDOWS
+# pragma comment(lib, "libgnutls.lib")
+# pragma comment(lib, "libgcrypt.lib")
+# pragma comment(lib, "libgpg-error.lib")
+# pragma comment(lib, "user32.lib")
+# pragma comment(lib, "advapi32.lib")
+# pragma comment(lib, "libgcc.lib")
+# pragma comment(lib, "libmingwex.lib")
+# pragma comment(lib, "gdi32.lib")
+#endif
+
 /* $ModDesc: Provides SSL support for clients */
 /* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") */
 /* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") -lgcrypt */
index e263f45614f10c8a094133316c4a8def8a2099a6..1fa21c6f931fba52c3c97a03fcee93274640021f 100644 (file)
@@ -153,6 +153,10 @@ SectionEnd
 Section "Config Files" SEC02
   SetOutPath "$INSTDIR\conf"
   File "..\docs\conf\*.example"
+  SetOutPath "$INSTDIR\conf\aliases"
+  File "..\docs\conf\aliases\*.example"
+  SetOutPath "$INSTDIR\conf\modules"
+  File "..\docs\conf\modules\modules.*"
 SectionEnd
 
 Section "Command Handlers" SEC03
@@ -163,6 +167,10 @@ SectionEnd
 Section "Modules" SEC04
   SetOutPath "$INSTDIR\modules"
   File "..\bin\${BUILD}\modules\m_*.so"
+  ; Copy DLLs required for modules
+  SetOutPath "$INSTDIR"
+  File /nonfatal "*.dll"
+  File "make_gnutls_cert.bat"
 SectionEnd
 
 Section -AdditionalIcons
@@ -216,9 +224,13 @@ Section Uninstall
   Delete "$INSTDIR\uninst.exe"
   Delete "$INSTDIR\modules\*.so"
   Delete "$INSTDIR\conf\*.example"
+  Delete "$INSTDIR\conf\aliases\*.example"
+  Delete "$INSTDIR\conf\modules\*.example"
   Delete "$INSTDIR\*.log"
   Delete "$INSTDIR\logs\*"
   Delete "$INSTDIR\data\*"
+  Delete "$INSTDIR\*.dll"
+  Delete "$INSTDIR\make_gnutls_cert.bat"
   Delete "$INSTDIR\inspircd.exe"
   Delete "$SMPROGRAMS\InspIRCd\Uninstall.lnk"
   Delete "$SMPROGRAMS\InspIRCd\InspIRCd Website.lnk"
index 85572fd64fdd6595768b073e8910d82808bf4b3e..bc716526273cae05a19ee26d09b75d1ecfd4dfab 100644 (file)
@@ -231,7 +231,6 @@ CoreExport int clock_gettime(int clock, struct timespec * tv);
 typedef unsigned char uint8_t;
 typedef unsigned long long uint64_t;
 typedef signed char int8_t;
-typedef signed long int32_t;
 typedef signed long long int64_t;
 typedef signed long ssize_t;
 
diff --git a/win/make_gnutls_cert.bat b/win/make_gnutls_cert.bat
new file mode 100644 (file)
index 0000000..97792cc
--- /dev/null
@@ -0,0 +1,14 @@
+@echo off\r
+\r
+echo This program will generate SSL certificates for m_ssl_gnutls.so\r
+echo Ensure certtool.exe is in your system path. It can be downloaded\r
+echo at ftp://ftp.gnu.org/gnu/gnutls/w32/. If you do not know the answer\r
+echo to one of the questions just press enter.\r
+echo.\r
+\r
+pause\r
+\r
+certtool --generate-privkey --outfile conf/key.pem\r
+certtool --generate-self-signed --load-privkey conf/key.pem --outfile conf/cert.pem\r
+\r
+pause
\ No newline at end of file