1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #define _CRT_SECURE_NO_DEPRECATE
16 #define CONFIGURE_BUILD
17 #define WIN32_LEAN_AND_MEAN
23 #include "inspircd_win32wrapper.h"
29 void WriteCompileModules();
30 void WriteCompileCommands();
34 /* detects if we are running windows xp or higher (5.1) */
38 vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
40 if(vi.dwMajorVersion >= 5)
46 int get_int_option(const char * text, int def)
48 static char buffer[500];
50 printf_c("%s\n[\033[1;32m%u\033[0m] -> ", text, def);
51 fgets(buffer, 500, stdin);
52 if(sscanf(buffer, "%u", &ret) != 1)
59 bool get_bool_option(const char * text, bool def)
61 static char buffer[500];
63 printf_c("%s [\033[1;32m%c\033[0m] -> ", text, def ? 'y' : 'n');
64 fgets(buffer, 500, stdin);
65 if(sscanf(buffer, "%s", ret) != 1)
66 strcpy(ret, def ? "y" : "n");
69 return !strncmp(ret, "y", 1);
72 void get_string_option(const char * text, char * def, char * buf)
74 static char buffer[500];
76 printf_c("%s\n[\033[1;32m%s\033[0m] -> ", text, def);
78 printf_c("%s\n[] -> ", text);
79 fgets(buffer, 500, stdin);
80 if(sscanf(buffer, "%s", buf) != 1)
86 // escapes a string for use in a c++ file
87 bool escape_string(char * str, size_t size)
89 size_t len = strlen(str);
90 char * d_str = (char*)malloc(len * 2);
121 string get_git_commit()
124 char *ref = NULL, *commit = NULL;
125 FILE *f = fopen("../.git/HEAD", "r");
128 if (fgets(buf, sizeof(buf), f))
130 while (isspace(buf[strlen(buf) - 1]))
131 buf[strlen(buf) - 1] = 0;
132 char *p = strchr(buf, ' ');
140 string ref_file = string("../.git/") + string(ref);
141 f = fopen(ref_file.c_str(), "r");
144 if (fgets(buf, sizeof(buf), f))
146 while (isspace(buf[strlen(buf) - 1]))
147 buf[strlen(buf) - 1] = 0;
153 return commit != NULL ? commit : "";
156 void get_machine_info(char * buffer, size_t len)
161 DWORD dwSize = sizeof(buf);
162 if (!GetComputerNameEx((COMPUTER_NAME_FORMAT)ComputerNameDnsFullyQualified, buf, &dwSize))
163 sprintf(buf, "%s", "unknown");
165 FILE * f = fopen("ver.txt.tmp", "r");
168 while (fgets(buf2, 500, f)) { }
170 unlink("ver.txt.tmp");
173 sprintf(buf2, "%s", "unknown");
175 sprintf(buffer, "%s ", buf);
177 char* b = buffer + strlen(buf)+1;
181 if (*b2 != 10 && *b2 != 13)
191 int __stdcall WinMain(IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, IN LPSTR lpCmdLine, IN int nShowCmd )
193 if (!strcmp(lpCmdLine, "/rebase"))
199 FILE * j = fopen("inspircd_config.h", "r");
202 if (MessageBox(0, "inspircd_config.h already exists. Remove it and build from clean?", "Configure program", MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2) != IDYES)
209 // call before we hook console handles
210 system("ver > ver.txt.tmp");
214 // pipe standard handles to this console
215 freopen("CONIN$", "r", stdin);
216 freopen("CONOUT$", "w", stdout);
217 freopen("CONOUT$", "w", stderr);
227 printf_c("\nWelcome to the \033[1mInspIRCd\033[0m Configuration program! (\033[1minteractive mode\033[0m)\n"
228 "\033[1mPackage maintainers: Type ./configure --help for non-interactive help\033[0m\n\n");
229 printf_c("*** If you are unsure of any of these values, leave it blank for ***\n"
230 "*** standard settings that will work, and your server will run ***\n"
231 "*** using them. Please consult your IRC network admin if in doubt. ***\n\n"
232 "Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter\n"
233 "a new value. Please note: You will \033[1mHAVE\033[0m to read the docs\n"
234 "dir, otherwise you won't have a config file!\n\n");
240 bool use_openssl = false;
242 char mod_path[MAX_PATH];
243 char config_file[MAX_PATH];
244 char base_path[MAX_PATH];
245 char bin_dir[MAX_PATH];
246 char openssl_inc_path[MAX_PATH];
247 char openssl_lib_path[MAX_PATH];
248 string revision = get_git_commit();
250 char machine_text[MAX_PATH];
251 get_machine_info(machine_text, MAX_PATH);
254 FILE * fI = fopen("..\\src\\version.sh", "r");
257 fgets(version, 514, fI);
258 fgets(version, 514, fI);
271 strcpy(version, "InspIRCD-Unknown");
273 printf_c("Your operating system is: \033[1;32mwindows_x64 \033[0m\n");
275 printf_c("Your operating system is: \033[1;32mwindows_x32 \033[0m\n");
277 printf_c("InspIRCd revision ID: \033[1;32m%s \033[0m\n\n", !revision.empty() ? revision.c_str() : "(Non-GIT build)");
279 ipv6 = get_bool_option("Do you want to enable IPv6?", false);
281 printf_c("\033[1mAll paths are relative to the binary directory.\033[0m\n");
282 get_string_option("In what directory do you wish to install the InspIRCd base?", "..", base_path);
283 get_string_option("In what directory are the configuration files?", "conf", config_file);
284 get_string_option("In what directory are the modules to be compiled to?", "modules", mod_path);
285 get_string_option("In what directory is the IRCd binary to be placed?", ".", bin_dir);
287 // NOTE: this may seem hackish (generating a batch build script), but it assures the user knows
288 // what they're doing, and we don't have to mess with copying files and changing around modules.mak
289 // for the extra libraries. --fez
290 // in case it exists, remove old m_ssl_openssl.cpp
291 remove("..\\src\\modules\\m_ssl_openssl.cpp");
292 printf_c("You can compile InspIRCd modules that add OpenSSL or GnuTLS support for SSL functionality.\n"
293 "To do so you will need the appropriate link libraries and header files on your system.\n");
294 use_openssl = get_bool_option("Would you like to compile the IRCd with OpenSSL support?", false);
297 get_string_option("Please enter the full path to your OpenSSL include directory\n"
298 "(e.g., C:\\openssl\\include, but NOT the openssl subdirectory under include\\)\n"
299 "(also, path should not end in '\\')",
300 "C:\\openssl\\include", openssl_inc_path);
302 // NOTE: if inspircd ever changes so that it compiles with /MT instead of the /MTd switch, then
303 // the dependency on libeay32mtd.lib and ssleay32mtd.lib will change to just libeay32.lib and
304 // ssleay32.lib. --fez
306 get_string_option("Please enter the full path to your OpenSSL library directory\n"
307 "(e.g., C:\\openssl\\lib, which should contain libeay32mtd.lib and ssleay32mtd.lib)",
308 "C:\\openssl\\lib", openssl_lib_path);
311 FILE *fp = fopen("compile_openssl.bat", "w");
312 fprintf(fp, "@echo off\n");
313 fprintf(fp, "echo This batch script compiles m_ssl_openssl for InspIRCd.\n");
314 fprintf(fp, "echo NOTE: this batch file should be invoked from the Visual Studio Command Prompt (vsvars32.bat)\n");
315 fprintf(fp, "set OPENSSL_INC_PATH=\"%s\"\n", openssl_inc_path);
316 fprintf(fp, "set OPENSSL_LIB_PATH=\"%s\"\n", openssl_lib_path);
317 fprintf(fp, "set COMPILE=cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" /D \"WIN32\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Wp64 /Zi /TP /I %%OPENSSL_INC_PATH%% m_ssl_openssl.cpp ..\\..\\win\\inspircd_memory_functions.cpp %%OPENSSL_INC_PATH%%\\openssl\\applink.c /link /LIBPATH:%%OPENSSL_LIB_PATH%% ..\\..\\bin\\release\\bin\\inspircd.lib ws2_32.lib /OUT:\"..\\..\\bin\\release\\modules\\m_ssl_openssl.so\" /PDB:\"..\\..\\bin\\release\\modules\\m_ssl_openssl.pdb\" /IMPLIB:\"..\\..\\bin\\release\\modules\\m_ssl_openssl.lib\"\n");
318 fprintf(fp, "cd ..\\src\\modules\n");
319 fprintf(fp, "copy extra\\m_ssl_openssl.cpp .\n");
320 fprintf(fp, "echo \t%%COMPILE%%\n");
321 fprintf(fp, "%%COMPILE%%\n");
322 fprintf(fp, "cd ..\\..\\win\n");
323 fprintf(fp, "echo done... now check for errors.\n");
326 printf_c("\033[1;32m!!!NOTICE!!! The file 'compile_openssl.bat' has been written to your 'win' directory. Launch it\n"
327 "!!! from the Visual Studio Command Prompt !!! to compile the m_ssl_openssl module.\n"
328 "Wait until after compiling inspircd to run it.\n"
329 "Also, ssleay32.dll and libeay32.dll will be required for the IRCd to run.\033[0m\n");
332 printf_c("\n\033[1;32mPre-build configuration is complete!\n\n"); sc(TNORMAL);
336 // dump all the options back out
337 printf_c("\033[0mBase install path:\033[1;32m %s\n", base_path);
338 printf_c("\033[0mConfig path:\033[1;32m %s\n", config_file);
339 printf_c("\033[0mModule path:\033[1;32m %s\n", mod_path);
340 printf_c("\033[0mSocket Engine:\033[1;32m %s\n", "select");
342 printf("\n"); sc(TNORMAL);
343 if(get_bool_option("Are these settings correct?", true) == false)
351 escape_string(config_file, MAX_PATH);
352 escape_string(mod_path, MAX_PATH);
354 printf("\nWriting inspircd_config.h...");
355 FILE * f = fopen("inspircd_config.h", "w");
356 fprintf(f, "/* Auto generated by configure, do not modify! */\n");
357 fprintf(f, "#ifndef __CONFIGURATION_AUTO__\n");
358 fprintf(f, "#define __CONFIGURATION_AUTO__\n\n");
360 fprintf(f, "#define MOD_PATH \"%s\"\n", mod_path);
361 fprintf(f, "#define SOMAXCONN_S \"128\"\n");
362 fprintf(f, "#define MAXBUF 514\n");
364 fprintf(f, "\n#include \"inspircd_win32wrapper.h\"");
365 fprintf(f, "\n#include \"inspircd_namedpipe.h\"");
366 fprintf(f, "\n#include \"threadengines/threadengine_win32.h\"\n\n");
367 fprintf(f, "#endif\n\n");
370 sc(TGREEN); printf(" done\n"); sc(TNORMAL);
371 printf("Writing inspircd_se_config.h...");
373 f = fopen("inspircd_se_config.h", "w");
374 fprintf(f, "/* Auto generated by configure, do not modify or commit to svn! */\n");
375 fprintf(f, "#ifndef __CONFIGURATION_SOCKETENGINE__\n");
376 fprintf(f, "#define __CONFIGURATION_SOCKETENGINE__\n\n");
377 fprintf(f, "#include \"socketengines/socketengine_%s.h\"\n\n", "select");
378 fprintf(f, "#endif\n\n");
381 sc(TGREEN); printf(" done\n"); sc(TNORMAL);
382 printf("Writing inspircd_version.h...");
383 f = fopen("inspircd_version.h", "w");
384 fprintf(f, "#define VERSION \"%s\"\n", version);
385 fprintf(f, "#define REVISION \"%s\"\n", revision.c_str());
386 fprintf(f, "#define SYSTEM \"%s\"\n", machine_text);
389 sc(TGREEN); printf(" done\n"); sc(TNORMAL);
390 printf("Writing command and module compilation scripts...");
391 WriteCompileCommands();
392 WriteCompileModules();
393 sc(TGREEN); printf(" done\n"); sc(TNORMAL);
395 printf("\nconfigure is done.. exiting!\n");
398 /* Keeps files from modules/extra up to date if theyre copied into modules/ */
404 printf("\nUpdating extra modules in src/modules...\n");
407 HANDLE fh = FindFirstFile("..\\src\\modules\\extra\\*.*", &fd);
409 if(fh == INVALID_HANDLE_VALUE)
414 strcpy(dest, "..\\src\\modules\\");
415 strcat(dest, fd.cFileName);
416 strcpy(src, "..\\src\\modules\\extra\\");
417 strcat(src, fd.cFileName);
418 FILE* x = fopen(dest, "r");
422 CopyFile(src, dest, false);
423 sc(TGREEN); printf(" %s", fd.cFileName); sc(TNORMAL);
427 while (FindNextFile(fh, &fd));
443 HANDLE fh = FindFirstFile("..\\bin\\debug\\modules\\*.so", &fd);
445 HANDLE fh = FindFirstFile("..\\bin\\release\\modules\\*.so", &fd);
447 if(fh == INVALID_HANDLE_VALUE)
455 strcat(dest, " ..\\bin\\debug\\modules\\");
457 strcat(dest, " ..\\bin\\release\\modules\\");
459 strcat(dest, fd.cFileName);
461 while (FindNextFile(fh, &fd));
463 sprintf(command, "rebase.exe -v -b 11000000 -c baseaddr_modules.txt %s", dest);
464 printf("%s\n", command);
470 void WriteCompileCommands()
472 char commands[300][100];
473 int command_count = 0;
474 printf("\n Finding Command Sources...\n");
476 HANDLE fh = FindFirstFile("..\\src\\commands\\cmd_*.cpp", &fd);
477 if(fh == INVALID_HANDLE_VALUE)
478 printf_c("\033[1;32m No command sources could be found! This \033[1m*could*\033[1;32m be a bad thing.. :P\033[0m");
484 strcpy(commands[command_count], fd.cFileName);
485 commands[command_count][strlen(fd.cFileName) - 4] = 0;
486 printf(" %s\n", commands[command_count]);
488 } while(FindNextFile(fh, &fd));
492 // Write our spiffy new makefile :D
493 // I am such a lazy fucker :P
494 FILE * f = fopen("..\\src\\commands\\commands.mak", "w");
496 time_t t = time(NULL);
497 fprintf(f, "# Generated at %s\n", ctime(&t));
498 fprintf(f, "all: makedir ");
500 // dump modules.. first time :)
501 for(int i = 0; i < command_count; ++i)
502 fprintf(f, "%s.so ", commands[i]);
504 fprintf(f, "\n.cpp.obj:\n");
508 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug/\" /Fd\"Debug/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\debug_x64\\bin\\inspircd.lib /OUT:\"..\\..\\bin\\debug_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\debug_x64\\modules\\$*.lib\"\n\n");
509 CreateDirectory("..\\src\\debug", NULL);
510 CreateDirectory("..\\bin\\debug\\bin", NULL);
511 CreateDirectory("..\\bin\\debug\\modules", NULL);
513 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"WIN32\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\release_x64\\bin\\inspircd.lib /OUT:\"..\\..\\bin\\release_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\release_x64\\modules\\$*.lib\"\n\n");
514 CreateDirectory("..\\src\\release", NULL);
515 CreateDirectory("..\\bin\\release\\bin", NULL);
516 CreateDirectory("..\\bin\\release\\modules", NULL);
520 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug/\" /Fd\"Debug/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\debug\\bin\\inspircd.lib /OUT:\"..\\..\\bin\\debug\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\debug\\modules\\$*.lib\"\n\n");
521 CreateDirectory("..\\src\\debug", NULL);
522 CreateDirectory("..\\bin\\debug\\bin", NULL);
523 CreateDirectory("..\\bin\\debug\\modules", NULL);
525 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/commands\" /I \"../../win\" /D \"WIN32\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\release\\bin\\inspircd.lib /OUT:\"..\\..\\bin\\release\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\release\\modules\\$*.lib\"\n\n");
526 CreateDirectory("..\\src\\release", NULL);
527 CreateDirectory("..\\bin\\release\\bin", NULL);
528 CreateDirectory("..\\bin\\release\\modules", NULL);
532 fprintf(f, "makedir:\n");
534 fprintf(f, " if not exist ..\\..\\bin\\debug mkdir ..\\..\\bin\\debug\n");
535 fprintf(f, " if not exist ..\\..\\bin\\debug\\modules mkdir ..\\..\\bin\\debug\\modules\n");
537 fprintf(f, " if not exist ..\\..\\bin\\release mkdir ..\\..\\bin\\release\n");
538 fprintf(f, " if not exist ..\\..\\bin\\release\\modules mkdir ..\\..\\bin\\release\\modules\n");
541 // dump modules.. again the second and last time :)
542 for(int i = 0; i < command_count; ++i)
543 fprintf(f, "%s.so : %s.obj\n", commands[i], commands[i]);
549 void WriteCompileModules()
551 char modules[300][100];
552 int module_count = 0;
554 printf("Finding Modules...\n");
556 HANDLE fh = FindFirstFile("..\\src\\modules\\m_*.cpp", &fd);
557 if(fh == INVALID_HANDLE_VALUE)
558 printf_c("\033[1;32m No module sources could be found! This \033[1m*could*\033[1;32m be a bad thing.. :P\033[0m");
564 strcpy(modules[module_count], fd.cFileName);
565 modules[module_count][strlen(fd.cFileName) - 4] = 0;
566 printf(" %s\n", modules[module_count]);
568 } while(FindNextFile(fh, &fd));
572 // Write our spiffy new makefile :D
573 // I am such a lazy fucker :P
574 FILE * f = fopen("..\\src\\modules\\modules.mak", "w");
576 time_t t = time(NULL);
577 fprintf(f, "# Generated at %s\n", ctime(&t));
578 fprintf(f, "all: makedir ");
580 // dump modules.. first time :)
581 for(int i = 0; i < module_count; ++i)
582 fprintf(f, "%s.so ", modules[i]);
584 fprintf(f, "\n.cpp.obj:\n");
588 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug/\" /Fd\"Debug/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\debug_x64\\bin\\inspircd.lib ws2_32.lib /OUT:\"..\\..\\bin\\debug_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\debug_x64\\modules\\$*.lib\"\n\n");
589 CreateDirectory("..\\src\\modules\\debug_x64", NULL);
591 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" /D \"WIN32\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\release_x64\\bin\\inspircd.lib ws2_32.lib /OUT:\"..\\..\\bin\\release_x64\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release_x64\\modules\\$*.pdb\" /MACHINE:X64 /IMPLIB:\"..\\..\\bin\\release_x64\\modules\\$*.lib\"\n\n");
592 CreateDirectory("..\\src\\modules\\release_x64", NULL);
596 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /RTC1 /MDd /Fo\"Debug/\" /Fd\"Debug/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\debug\\bin\\inspircd.lib ws2_32.lib /OUT:\"..\\..\\bin\\debug\\modules\\$*.so\" /PDB:\"..\\..\\bin\\debug\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\debug\\modules\\$*.lib\"\n\n");
597 CreateDirectory("..\\src\\modules\\debug", NULL);
598 CreateDirectory("..\\src\\modules\\debug\\modules", NULL);
599 CreateDirectory("..\\src\\modules\\debug\\bin", NULL);
601 fprintf(f, " cl /nologo /LD /Od /I \".\" /I \"../../include\" /I \"../../include/modes\" /I \"../../include/modules\" /I \"../../win\" /D \"WIN32\" /D \"_CONSOLE\" /D \"_MBCS\" /D \"DLL_BUILD\" /Gm /EHsc /GL /MD /Fo\"Release/\" /Fd\"Release/vc90.pdb\" /W2 /Zi /TP $*.cpp ..\\..\\win\\inspircd_memory_functions.cpp /link ..\\..\\bin\\release\\bin\\inspircd.lib ws2_32.lib /OUT:\"..\\..\\bin\\release\\modules\\$*.so\" /PDB:\"..\\..\\bin\\release\\modules\\$*.pdb\" /IMPLIB:\"..\\..\\bin\\release\\modules\\$*.lib\"\n\n");
602 CreateDirectory("..\\src\\modules\\release", NULL);
603 CreateDirectory("..\\src\\modules\\release\\modules", NULL);
604 CreateDirectory("..\\src\\modules\\release\\bin", NULL);
609 fprintf(f, "makedir:\n if not exist debug mkdir debug\n if not exist ..\\..\\bin\\debug\\modules mkdir ..\\..\\bin\\debug\\modules\n\n");
611 fprintf(f, "makedir:\n if not exist release mkdir release\n if not exist ..\\..\\bin\\release\\modules mkdir ..\\..\\bin\\release\\modules\n\n");
614 // dump modules.. again the second and last time :)
615 for(int i = 0; i < module_count; ++i)
616 fprintf(f, "%s.so : %s.obj\n", modules[i], modules[i]);