mirror of
https://github.com/anope/anope.git
synced 2026-07-10 23:03:14 +02:00
BUILD : 1.7.14 (1061) BUGS : 408 NOTES : Added support for Visual Studio 2005, partially by replacing install.vbs by a more robust install.js -- thanks heinz!
git-svn-id: svn://svn.anope.org/anope/trunk@1061 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@785 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
ad0a95da48
commit
f191314c0f
@@ -2,6 +2,7 @@ Anope Version S V N
|
||||
--------------------
|
||||
Provided by Anope Dev. <dev@anope.org> - 2006
|
||||
06/14 A Indication in the version string if we're running on win32. [ #00]
|
||||
06/20 A Added support for Visual Studio 2005. [#408]
|
||||
04/08 F Fixed Charybdis support on win32. [#487]
|
||||
04/08 F Fixed thread stuff on windows. [#488]
|
||||
04/08 F Fixed SGLine stuff on inspircd (not supported). [#489]
|
||||
|
||||
+470
@@ -0,0 +1,470 @@
|
||||
//
|
||||
// install.js - Windows Configuration
|
||||
//
|
||||
// (C) 2003-2005 Anope Team
|
||||
// Contact us at info@anope.org
|
||||
//
|
||||
// This program is free but copyrighted software; see the file COPYING for
|
||||
// details.
|
||||
//
|
||||
// Based on the original code of Epona by Lara.
|
||||
// Based on the original code of Services by Andy Church.
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
var anopeVersion = "Unknown";
|
||||
var defaultDrive = "C";
|
||||
|
||||
var installerResponses = new Array();
|
||||
var softwareVersions = {
|
||||
'Compiler' : false,
|
||||
'MySQLDB' : false
|
||||
};
|
||||
|
||||
var installerQuestions = [
|
||||
{
|
||||
'question' : [
|
||||
'Do you want to compile Anope with MySQL Support?',
|
||||
'NOTE: You will need to have installed MySQL 3.23 or Above'
|
||||
],
|
||||
'short' : 'Enable MySQL Support?',
|
||||
'options' : [
|
||||
'yes',
|
||||
'no'
|
||||
],
|
||||
'default_answer' : 'no',
|
||||
'store_answer' : function (answer) {
|
||||
if (answer == 'yes') {
|
||||
if (!findMySQL()) {
|
||||
WScript.Echo("\nERROR: Cannot find MySQL - See error messages above for details.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
installerResponses['MySQL DB Support'] = answer;
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'question' : [
|
||||
'Do you want to compile Anope with Encrypted Passwords?',
|
||||
'NOTE: Once passwords are encrypted, they CANNOT be recovered!',
|
||||
'NOTE: Enabling Encrypted Passwords will also disable GETPASS/SENDPASS'
|
||||
],
|
||||
'short' : 'Enable Encrypted Passwords?',
|
||||
'options' : [
|
||||
'yes',
|
||||
'no'
|
||||
],
|
||||
'default_answer' : 'no',
|
||||
'store_answer' : function (answer) {
|
||||
installerResponses['Encrypted Passwords'] = answer;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
var buildPackages = [
|
||||
{
|
||||
'name' : 'Microsoft Visual Studio 98',
|
||||
'libpaths' : [
|
||||
'Program Files\\Microsoft Visual Studio\\VC98\\Lib'
|
||||
],
|
||||
'incpaths' : [
|
||||
'Program Files\\Microsoft Visual Studio\\VC98\\Include'
|
||||
],
|
||||
'nmake' : [
|
||||
'Program Files\\Microsoft Visual Studio\\VC98\\Bin',
|
||||
''
|
||||
],
|
||||
'additional_switches' : [
|
||||
'/QIfist'
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
'name' : 'Microsoft Visual Studio .NET 2003',
|
||||
'libpaths' : [
|
||||
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Lib',
|
||||
'Program Files\\Microsoft Visual Studio .NET 2003\\PlatformSDK\\Lib'
|
||||
],
|
||||
'incpaths' : [
|
||||
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Include',
|
||||
'Program Files\\Microsoft Visual Studio .NET 2003\\PlatformSDK\\Include'
|
||||
],
|
||||
'nmake' : [
|
||||
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Bin',
|
||||
''
|
||||
],
|
||||
'additional_switches' : false
|
||||
},
|
||||
|
||||
{
|
||||
'name' : 'Microsoft Visual Studio 2005',
|
||||
'libpaths' : [
|
||||
'Program Files\\Microsoft Visual Studio 8\\VC\\Lib',
|
||||
'Program Files\\Microsoft Platform SDK\\Lib'
|
||||
],
|
||||
'incpaths' : [
|
||||
'Program Files\\Microsoft Visual Studio 8\\VC\\Include',
|
||||
'Program Files\\Microsoft Platform SDK\\Include'
|
||||
],
|
||||
'nmake' : [
|
||||
'Program Files\\Microsoft Platform SDK\\Bin',
|
||||
''
|
||||
],
|
||||
'additional_switches' : [
|
||||
'/w'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
var mysqlVersions = [
|
||||
{
|
||||
'name' : 'MySQL 5.0',
|
||||
'libpaths' : [
|
||||
'Program Files\\MySQL\\MySQL Server 5.0\\Lib\\opt'
|
||||
],
|
||||
'incpaths' : [
|
||||
'Program Files\\MySQL\\MySQL Server 5.0\\Include'
|
||||
],
|
||||
'additional_switches' : false
|
||||
},
|
||||
|
||||
{
|
||||
'name' : 'MySQL 4.1',
|
||||
'libpaths' : [
|
||||
'Program Files\\MySQL\\MySQL Server 4.1\\Lib\\opt'
|
||||
],
|
||||
'incpaths' : [
|
||||
'Program Files\\MySQL\\MySQL Server 4.1\\Include'
|
||||
],
|
||||
'additional_switches' : false
|
||||
},
|
||||
|
||||
{
|
||||
'name' : 'MySQL 4.0',
|
||||
'libpaths' : [
|
||||
'Program Files\\MySQL\\MySQL Server 4.0\\Lib\\opt'
|
||||
],
|
||||
'incpaths' : [
|
||||
'Program Files\\MySQL\\MySQL Server 4.0\\Include'
|
||||
],
|
||||
'additional_switches' : false
|
||||
},
|
||||
|
||||
{
|
||||
'name' : 'MySQL 3.23 or older (or other default path)',
|
||||
'libpaths' : [
|
||||
'mysql\\lib\\opt'
|
||||
],
|
||||
'incpaths' : [
|
||||
'mysql\\include'
|
||||
],
|
||||
'additional_switches' : false
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
var bannerReplacements = [
|
||||
{
|
||||
'findtext' : /CURVER/g,
|
||||
'replacement' : function() { FindAnopeVersion(); return anopeVersion; }
|
||||
},
|
||||
{
|
||||
'findtext' : / For more options type .\/Config --help/g,
|
||||
'replacement' : function() { return ''; }
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
var fso = WScript.CreateObject("Scripting.FileSystemObject");
|
||||
var x, y, z;
|
||||
|
||||
if (fso.FileExists('.BANNER')) {
|
||||
var bannerStream = fso.OpenTextFile(".BANNER");
|
||||
var bannerText = bannerStream.ReadAll();
|
||||
bannerStream.close();
|
||||
|
||||
for (x in bannerReplacements) {
|
||||
var thisReplacement = bannerReplacements[x];
|
||||
bannerText = bannerText.replace(thisReplacement['findtext'], thisReplacement['replacement']);
|
||||
}
|
||||
|
||||
WScript.Echo(bannerText+"\n");
|
||||
}
|
||||
else {
|
||||
WScript.Echo("ERROR: Cannot find banner file!\n");
|
||||
}
|
||||
|
||||
WScript.Echo("Press Enter to Begin...");
|
||||
InstallerInput();
|
||||
WScript.Echo("");
|
||||
|
||||
for (x in installerQuestions) {
|
||||
var thisQuestion = installerQuestions[x];
|
||||
var validResponse = false;
|
||||
var validOpts = new Array();
|
||||
while (!validResponse) {
|
||||
for (y in thisQuestion.question) {
|
||||
var qLine = thisQuestion.question[y];
|
||||
WScript.Echo(qLine);
|
||||
}
|
||||
WScript.Echo('');
|
||||
var choiceLine = '';
|
||||
for (y in thisQuestion.options) {
|
||||
choiceLine += thisQuestion.options[y] + ', ';
|
||||
validOpts[thisQuestion.options[y]] = true;
|
||||
}
|
||||
choiceLine = choiceLine.substring(0, choiceLine.length - 2);
|
||||
WScript.Echo("Available Options: "+choiceLine);
|
||||
WScript.Echo("Default Answer: "+thisQuestion.default_answer+"\n");
|
||||
WScript.Echo(thisQuestion.short);
|
||||
var inputValue = InstallerInput().toLowerCase();
|
||||
if (!inputValue) {
|
||||
inputValue = thisQuestion.default_answer;
|
||||
}
|
||||
if (!validOpts[inputValue]) {
|
||||
WScript.Echo("ERROR: Invalid option '"+inputValue+"'\n");
|
||||
}
|
||||
else if (thisQuestion.store_answer(inputValue)) {
|
||||
validResponse = true;
|
||||
}
|
||||
}
|
||||
WScript.Echo("");
|
||||
}
|
||||
|
||||
if (!findCompiler()) {
|
||||
WScript.Echo("\nERROR: No suitable build tools were found!");
|
||||
WScript.Echo("Please ensure you have downloaded and installed a version of Visual C++ and/or PlatformSDK.\n");
|
||||
WScript.Echo("For more information on the tools needed to build Anope on Windows, see:\nhttp://windows.anope.org\n");
|
||||
}
|
||||
else {
|
||||
WScript.Echo("\nBuild tools were found successfully!\n");
|
||||
WScript.Echo("\nAnope will be compiled with the following options:\n");
|
||||
for (x in installerResponses) {
|
||||
var thisResponse = installerResponses[x];
|
||||
WScript.Echo("\t"+x+":\t\t["+thisResponse.toUpperCase()+"]");
|
||||
}
|
||||
for (x in softwareVersions) {
|
||||
var thisVer = softwareVersions[x];
|
||||
if (!thisVer) {
|
||||
WScript.Echo("\t"+x+" Version:\t\tNot Enabled");
|
||||
}
|
||||
else {
|
||||
WScript.Echo("\t"+x+" Version:\t\t"+thisVer.name);
|
||||
}
|
||||
}
|
||||
WScript.Echo("\nTo continue, please press Enter...");
|
||||
InstallerInput();
|
||||
|
||||
var f = fso.OpenTextFile("Makefile.inc.win32", 2);
|
||||
f.WriteLine("#");
|
||||
f.WriteLine("# Generated by install.js");
|
||||
f.WriteLine("#");
|
||||
|
||||
if (typeof(softwareVersions['Compiler'].additional_switches) !== 'boolean') {
|
||||
var switch_line = '';
|
||||
for (x in softwareVersions['Compiler'].additional_switches) {
|
||||
switch_line += softwareVersions['Compiler'].additional_switches[x]+" ";
|
||||
}
|
||||
f.WriteLine("VC6="+switch_line);
|
||||
}
|
||||
var path_line = '';
|
||||
for (x in softwareVersions['Compiler'].libpaths) {
|
||||
path_line += "/LIBPATH:\""+defaultDrive+":\\"+softwareVersions['Compiler'].libpaths[x]+"\" ";
|
||||
}
|
||||
f.WriteLine("LIBPATH="+path_line);
|
||||
path_line = '';
|
||||
var path_line_rc = '';
|
||||
for (x in softwareVersions['Compiler'].incpaths) {
|
||||
path_line += "/I \""+defaultDrive+":\\"+softwareVersions['Compiler'].incpaths[x]+"\" ";
|
||||
path_line_rc += "/i \""+defaultDrive+":\\"+softwareVersions['Compiler'].incpaths[x]+"\" ";
|
||||
}
|
||||
f.WriteLine("INCFLAGS="+path_line);
|
||||
f.WriteLine("VERSION="+anopeVersion);
|
||||
f.WriteLine("PROGRAM=anope.exe");
|
||||
f.WriteLine("DATDEST=data");
|
||||
f.WriteLine("CC=cl");
|
||||
f.WriteLine("RC=rc");
|
||||
f.WriteLine("MAKE=nmake -f Makefile.win32");
|
||||
f.WriteLine("BASE_CFLAGS=$(VC6) /O2 /MD $(INCFLAGS)");
|
||||
f.WriteLine("RC_FLAGS="+path_line_rc);
|
||||
f.WriteLine("LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib");
|
||||
f.WriteLine("LFLAGS=$(LIBPATH)");
|
||||
|
||||
if (installerResponses['MySQL DB Support'] == 'yes') {
|
||||
f.WriteLine("USE_MYSQL=1");
|
||||
f.WriteLine("MYSQL_LIB=\""+defaultDrive+":\\"+softwareVersions['MySQLDB'].libpaths[0]+"\"");
|
||||
f.WriteLine("MYSQL_INC=\""+defaultDrive+":\\"+softwareVersions['MySQLDB'].incpaths[0]+"\"");
|
||||
f.WriteLine("LIBS=$(LIBS) /LIBPATH:$(MYSQL_LIB)");
|
||||
f.WriteLine("MYSQL_LIB_PATH=/LIBPATH:$(MYSQL_LIB)");
|
||||
f.WriteLine("BASE_CFLAGS=$(BASE_CFLAGS) /I $(MYSQL_INC)");
|
||||
f.WriteLine("MYSQL_INC_PATH=/I $(MYSQL_INC)");
|
||||
f.WriteLine("RDB_C=rdb.c");
|
||||
f.WriteLine("RDB_O=rdb.obj");
|
||||
f.WriteLine("MYSQL_C=mysql.c");
|
||||
f.WriteLine("MYSQL_O=mysql.obj");
|
||||
f.WriteLine("BASE_CFLAGS=/D USE_MYSQL /D USE_RDB $(BASE_CFLAGS) /D HAVE_MYSQL_MYSQL_H");
|
||||
f.WriteLine("MYPASQL_BUILD=$(CC) /LD $(MYSQL_INC_PATH) src\\mypasql.c /link $(MYSQL_LIB_PATH) $(LFLAGS) /DEF:src\mypasql.def libmysql.lib zlib.lib ws2_32.lib advapi32.lib /NODEFAULTLIB:LIBCMTD.lib");
|
||||
f.WriteLine("LIBS=$(LIBS) libmysql.lib zlib.lib");
|
||||
}
|
||||
else {
|
||||
f.WriteLine("USE_MYSQL=0");
|
||||
}
|
||||
|
||||
if (installerResponses['Encrypted Passwords'] == 'yes') {
|
||||
f.WriteLine("DB_ENCRYPTION=1");
|
||||
f.WriteLine("BASE_CFLAGS=/D USE_ENCRYPTION /D ENCRYPT_MD5 $(BASE_CFLAGS)");
|
||||
}
|
||||
else {
|
||||
f.WriteLine("DB_ENCRYPTION=0");
|
||||
}
|
||||
|
||||
f.WriteLine("MORE_CFLAGS = /I\"../include\"");
|
||||
f.WriteLine("CFLAGS = /nologo $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)");
|
||||
f.close();
|
||||
|
||||
WScript.Echo("Configuration Complete!");
|
||||
WScript.Echo("-------------------------------\n");
|
||||
WScript.Echo("Anope has been configured to your system. To compile, simply type:");
|
||||
WScript.Echo("nmake -f Makefile.win32\n");
|
||||
|
||||
}
|
||||
// Fin.
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
// Functions
|
||||
|
||||
function FindAnopeVersion() {
|
||||
if (!fso.FileExists('version.log')) {
|
||||
anopeVersion = 'Unknown';
|
||||
return;
|
||||
}
|
||||
|
||||
var vMaj, vMin, vPat, vBuild, vExtra;
|
||||
|
||||
var versionLog = fso.OpenTextFile("version.log");
|
||||
while (!versionLog.atEndOfStream) {
|
||||
var versionLine = versionLog.readline();
|
||||
var thisMatch = versionLine.replace('\n', '');
|
||||
while (thisMatch.match(/\"/g)) {
|
||||
thisMatch = thisMatch.replace('"', '');
|
||||
}
|
||||
versionLine = thisMatch;
|
||||
if (versionLine.match(/VERSION_MAJOR=/g)) {
|
||||
vMaj = versionLine.replace('VERSION_MAJOR=', '');
|
||||
continue;
|
||||
}
|
||||
if (versionLine.match(/VERSION_MINOR=/g)) {
|
||||
vMin = versionLine.replace('VERSION_MINOR=', '');
|
||||
continue;
|
||||
}
|
||||
if (versionLine.match(/VERSION_PATCH=/g)) {
|
||||
vPat = versionLine.replace('VERSION_PATCH=', '');
|
||||
continue;
|
||||
}
|
||||
if (versionLine.match(/VERSION_EXTRA=/g)) {
|
||||
vExtra = versionLine.replace('VERSION_EXTRA=', '');
|
||||
continue;
|
||||
}
|
||||
if (versionLine.match(/VERSION_BUILD=/g)) {
|
||||
vBuild = versionLine.replace('VERSION_BUILD=', '');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
versionLog.close();
|
||||
anopeVersion = vMaj+"."+vMin+"."+vPat+"."+vBuild+vExtra;
|
||||
return;
|
||||
}
|
||||
|
||||
function InstallerInput() {
|
||||
var input = WScript.StdIn.Readline();
|
||||
return input;
|
||||
}
|
||||
|
||||
function findMySQL() {
|
||||
WScript.Echo("\nLooking for MySQL...\n");
|
||||
for (x in mysqlVersions) {
|
||||
var thisSQLVer = mysqlVersions[x];
|
||||
WScript.Echo("Looking for: "+thisSQLVer.name+"...");
|
||||
if (!findFile("libmysql.lib", thisSQLVer.libpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find libmysql.lib - This version is probably not installed...\n");
|
||||
continue;
|
||||
}
|
||||
if (!findFile("mysql.h", thisSQLVer.incpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find mysql.h - Half of this version of MySQL is installed (strange)...\n");
|
||||
continue;
|
||||
}
|
||||
WScript.Echo("SUCCESS: "+thisSQLVer.name+" is installed, and is complete!\n");
|
||||
softwareVersions.MySQLDB = thisSQLVer;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function findCompiler() {
|
||||
WScript.Echo("\nLooking for a suitable compiler...\n");
|
||||
var noPSDK = false;
|
||||
for (x in buildPackages) {
|
||||
var thisPack = buildPackages[x];
|
||||
WScript.Echo("Looking for: "+thisPack.name+"...");
|
||||
if (!findFile("MSVCRT.lib", thisPack.libpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find MSVCRT.lib - This version is probably not installed...\n");
|
||||
continue;
|
||||
}
|
||||
if (!findFile("wsock32.lib", thisPack.libpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find wsock32.lib - Probably missing PlatformSDK...\n");
|
||||
noPSDK = true;
|
||||
continue;
|
||||
}
|
||||
if (!findFile("advapi32.lib", thisPack.libpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find advapi32.lib - Probably missing PlatformSDK...\n");
|
||||
noPSDK = true;
|
||||
continue;
|
||||
}
|
||||
if (!findFile("stdio.h", thisPack.incpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find stdio.h - Missing core header files...\n");
|
||||
continue;
|
||||
}
|
||||
if (!findFile("windows.h", thisPack.incpaths)) {
|
||||
WScript.Echo("ERROR: Cannot find windows.h - Probably missing PlatformSDK headers...\n");
|
||||
noPSDK = true;
|
||||
continue;
|
||||
}
|
||||
if (!findFile("nmake.exe", thisPack.nmake)) {
|
||||
WScript.Echo("ERROR: Cannot find a copy of nmake.exe...\n");
|
||||
WScript.Echo("In order to compile Anope, you need a working copy of nmake.exe on your system.");
|
||||
WScript.Echo("A freely available copy can be downloaded from the url below.");
|
||||
WScript.Echo("nmake.exe is also available in the PlatformSDK which can be freely downloaded from Microsoft.\n");
|
||||
WScript.Echo("nmake.exe:\nhttp://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe\n");
|
||||
break;
|
||||
}
|
||||
WScript.Echo("SUCCESS: "+thisPack.name+" was found, and is complete!");
|
||||
softwareVersions.Compiler = thisPack;
|
||||
return true;
|
||||
}
|
||||
if (noPSDK) {
|
||||
WScript.Echo("Some of the build tools were detected on your computer, but the essential PlatformSDK components were missing.");
|
||||
WScript.Echo("You will need to download the PlatformSDK from the URL below, ensuring that the Core Windows files, and Debugging Tools are installed.");
|
||||
WScript.Echo("For more details on installing the PlatformSDK, visit http://windows.anope.org\n");
|
||||
WScript.Echo("PSDK: http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe\n");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function findFile(fileName, arrayOfPaths) {
|
||||
for (z in arrayOfPaths) {
|
||||
var thisPath = arrayOfPaths[z];
|
||||
if (fso.FileExists(defaultDrive+":\\"+thisPath+"\\"+fileName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
-400
@@ -1,400 +0,0 @@
|
||||
'
|
||||
' install.vbs - Windows Configuration
|
||||
'
|
||||
' (C) 2003-2005 Anope Team
|
||||
' Contact us at info@anope.org
|
||||
'
|
||||
' This program is free but copyrighted software; see the file COPYING for
|
||||
' details.
|
||||
'
|
||||
' Based on the original code of Epona by Lara.
|
||||
' Based on the original code of Services by Andy Church.
|
||||
'
|
||||
' $Id$
|
||||
'
|
||||
|
||||
' Declare global variables
|
||||
Dim AnoVersion
|
||||
Dim UseMySQL
|
||||
Dim UseDBEnc
|
||||
Dim CompilerVer
|
||||
Dim fso
|
||||
Dim DefaultDrive
|
||||
Dim MySQLLibPath
|
||||
Dim MySQLHeadPath
|
||||
Dim LibPath
|
||||
Dim LibPath2
|
||||
Dim IncDir
|
||||
Dim IncDir2
|
||||
Dim verMaj
|
||||
Dim verMin
|
||||
Dim verPatch
|
||||
Dim verExtra
|
||||
Dim verBuild
|
||||
Dim verStringShort
|
||||
Dim verStringLong
|
||||
Dim f2
|
||||
Dim i
|
||||
|
||||
' Set default values
|
||||
|
||||
' If you have installed your files onto a different drive letter
|
||||
' please specify that drive letter here.
|
||||
DefaultDrive = "C"
|
||||
|
||||
AnoVersion = "1.7.10"
|
||||
UseMySQL = "0"
|
||||
UseDBEnc = "0"
|
||||
CompilerVer = "VC7"
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
MySQLLibPath = DefaultDrive & ":\Program Files\mysql\MySQL Server 4.1\lib\opt"
|
||||
MySQLHeadPath = DefaultDrive & ":\Program Files\mysql\MySQL Server 4.1\include"
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
IncDir = ""
|
||||
IncDir2 = ""
|
||||
|
||||
' Get Version
|
||||
If (fso.FileExists("version.log") = False) Then
|
||||
WScript.Echo "I can't find 'version.log' in this directory."
|
||||
WScript.Echo "Please run this script from a complete Anope source."
|
||||
Else
|
||||
Set f2 = fso.OpenTextFile("version.log", ForReading)
|
||||
Do While (i < 7)
|
||||
f2.SkipLine()
|
||||
i = i + 1
|
||||
Loop
|
||||
verMaj = Replace(Replace(Trim(f2.ReadLine), "VERSION_MAJOR=" & chr(34), ""), chr(34), "")
|
||||
verMin = Replace(Replace(Trim(f2.ReadLine), "VERSION_MINOR=" & chr(34), ""), chr(34), "")
|
||||
verPatch = Replace(Replace(Trim(f2.ReadLine), "VERSION_PATCH=" & chr(34), ""), chr(34), "")
|
||||
verExtra = Replace(Replace(Trim(f2.ReadLine), "VERSION_EXTRA=" & chr(34), ""), chr(34), "")
|
||||
verBuild = Replace(Replace(Trim(f2.ReadLine), "VERSION_BUILD=" & chr(34), ""), chr(34), "")
|
||||
f2.close
|
||||
verStringShort = verMaj & "." & verMin & "." & verPatch & verExtra
|
||||
verStringLong = verStringShort & "." & verBuild
|
||||
|
||||
' Display Header
|
||||
WScript.Echo ""
|
||||
WScript.Echo " ___"
|
||||
WScript.Echo " / _ \ http://www.anope.org"
|
||||
WScript.Echo " | /_\ | _ __ _ _ _ _ ___"
|
||||
WScript.Echo " | _ || '_ \/ _ \/ _ \ / _ \"
|
||||
WScript.Echo " | | | || | | |_| |_| | __/"
|
||||
WScript.Echo " |_| |_||_| |_\___/| _/ \___|"
|
||||
WScript.Echo " | |"
|
||||
WScript.Echo " |_| IRC Services"
|
||||
WScript.Echo " v" & verStringShort
|
||||
WScript.Echo ""
|
||||
WScript.Echo ""
|
||||
WScript.Echo "This program will help you to compile your Services, and ask you"
|
||||
WScript.Echo "questions regarding the compile-time settings of it during the"
|
||||
WScript.Echo "process."
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Anope is a set of Services for IRC networks that allows users to"
|
||||
WScript.Echo "manage their nicks and channels in a secure and efficient way,"
|
||||
WScript.Echo "and administrators to manage their network with powerful tools."
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Do not forget to read all the documents located in docs/,"
|
||||
WScript.Echo "especially the README and INSTALL files."
|
||||
WScript.Echo ""
|
||||
WScript.Echo "For all your Anope needs please visit our portal at"
|
||||
WScript.Echo "http://www.anope.org/"
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Press Enter to Continue..."
|
||||
Wscript.StdIn.ReadLine
|
||||
|
||||
' Enable MySQL Support?
|
||||
Do While (UseMySQL <> "Y" AND UseMySQL <> "N" AND UseMySQL <> "YES" AND UseMySQL <> "NO")
|
||||
WScript.Echo "Would you like to compile Anope with MySQL Support?"
|
||||
WScript.Echo "(NOTE: You must have MySQL 3.23 or Later installed)"
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Yes / No (Default)"
|
||||
UseMySQL = UCase(Trim(WScript.StdIn.ReadLine))
|
||||
If (UseMySQL = "") Then
|
||||
UseMySQL = "N"
|
||||
End If
|
||||
If (UseMySQL <> "Y" AND UseMySQL <> "N" AND UseMySQL <> "YES" AND UseMySQL <> "NO") Then
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Invalid Selection!"
|
||||
WScript.Echo ""
|
||||
End If
|
||||
Loop
|
||||
WScript.Echo ""
|
||||
|
||||
' If enabled, find the required files
|
||||
If (UseMySQL = "Y" OR UseMySQL = "YES") Then
|
||||
If (fso.FileExists(MySQLLibPath & "\libmysql.lib") = False) Then
|
||||
Do While (fso.FileExists(MySQLLibPath & "\libmysql.lib") = False)
|
||||
WScript.Echo "ERROR: Cannot find 'libmysql.lib' in " & MySQLLibPath
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Please enter the path to 'libmysql.lib': "
|
||||
WScript.Echo "(Please DO NOT include a trailing slash '\')"
|
||||
MySQLLibPath = Trim(WScript.StdIn.ReadLine)
|
||||
Loop
|
||||
End If
|
||||
If (fso.FileExists(MySQLHeadPath & "\mysql.h") = False) Then
|
||||
Do While (fso.FileExists(MySQLHeadPath & "\mysql.h") = False)
|
||||
WScript.Echo "ERROR: Cannot find 'mysql.h' in " & MySQLHeadPath
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Please enter the path to 'mysql.h': "
|
||||
WScript.Echo "(Please DO NOT include a trailing slash '\')"
|
||||
MySQLHeadPath = Trim(WScript.StdIn.ReadLine)
|
||||
Loop
|
||||
End If
|
||||
WScript.Echo "All required files for MySQL Support have been located!"
|
||||
WScript.Echo "MySQL Support Enabled.."
|
||||
UseMySQL = "1"
|
||||
Else
|
||||
WScript.Echo "MySQL Support Disabled.."
|
||||
UseMySQL = "0"
|
||||
End If
|
||||
WScript.Echo ""
|
||||
|
||||
' Enable Database Encryption Support?
|
||||
Do While (UseDBEnc <> "Y" AND UseDBEnc <> "N" AND UseDBEnc <> "YES" AND UseDBEnc <> "NO")
|
||||
WScript.Echo "Would you like to enable Database Encryption?"
|
||||
WScript.Echo "(NOTE: If you enable encryption, you will NOT be able to recover"
|
||||
WScript.Echo "passwords at a later date. GETPASS and SENDPASS will also be useless)"
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Yes / No (Default)"
|
||||
UseDBEnc = UCase(Trim(WScript.StdIn.ReadLine))
|
||||
If (UseDBEnc = "") Then
|
||||
UseDBEnc = "N"
|
||||
End If
|
||||
If (UseDBEnc <> "Y" AND UseDBEnc <> "N" AND UseDBEnc <> "YES" AND UseDBEnc <> "NO") Then
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Invalid Selection!"
|
||||
WScript.Echo ""
|
||||
End If
|
||||
Loop
|
||||
WScript.Echo ""
|
||||
If (UseDBEnc = "Y" OR UseDBEnc = "YES") Then
|
||||
WScript.Echo "Database Encryption Enabled.."
|
||||
UseDBEnc = "1"
|
||||
Else
|
||||
WScript.Echo "Database Encryption Disabled.."
|
||||
UseDBEnc = "0"
|
||||
End If
|
||||
WScript.Echo ""
|
||||
|
||||
' Check for required libraries and paths
|
||||
WScript.Echo "I will now check you have all the things I need..."
|
||||
WScript.Echo ""
|
||||
If (fso.FolderExists(DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\VC7\Lib")) Then
|
||||
WScript.Echo "I found a copy of Microsoft Visual Studio .NET 2003.."
|
||||
LibPath = DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\VC7\Lib"
|
||||
LibPath2 = DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib"
|
||||
If (fso.FileExists(LibPath & "/MSVCRT.lib") = False And fso.FileExists(LibPath2 & "/MSVCRT.lib") = False) Then
|
||||
WScript.Echo "Hm. I can't seem to find the default library.. You probably only have the SDK installed.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/wsock32.lib") = False And fso.FileExists(LibPath2 & "/wsock32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find wsock32.lib.. You probably only have the SDK installed.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/advapi32.lib") = False And fso.FileExists(LibPath2 & "/advapi32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find advapi32.lib.. You probably only have the SDK installed.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/uuid.lib") = False And fso.FileExists(LibPath2 & "/uuid.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find uuid.lib.. You probably only have the SDK installed.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
End If
|
||||
IncDir = DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\VC7\Include"
|
||||
IncDir2 = DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include"
|
||||
End If
|
||||
|
||||
If (fso.FolderExists(DefaultDrive & ":\Program Files\Microsoft Visual Studio\VC98\Lib") And LibPath = "") Then
|
||||
WScript.Echo "I found a copy of Microsoft Visual Studio 6.. It's old, but we can use it.."
|
||||
LibPath = DefaultDrive & ":\Program Files\Microsoft Visual Studio\VC98\Lib"
|
||||
CompilerVer = "VC6"
|
||||
If (fso.FileExists(LibPath & "/MSVCRT.lib") = False) Then
|
||||
WScript.Echo "Hm. I can't seem to find the default library.. Are you sure this is installed properly?"
|
||||
LibPath = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/wsock32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find wsock32.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/advapi32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find advapi32.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/uuid.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find uuid.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
End If
|
||||
IncDir = DefaultDrive & ":\Program Files\Microsoft Visual Studio\VC98\Inlcude"
|
||||
End If
|
||||
|
||||
If (fso.FolderExists(DefaultDrive & ":\Program Files\Microsoft Platform SDK\Lib") And LibPath = "") Then
|
||||
WScript.Echo "I found a copy of Microsoft Platform SDK.."
|
||||
LibPath = DefaultDrive & ":\Program Files\Microsoft Platform SDK\Lib"
|
||||
LibPath2 = DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\VC7\Lib"
|
||||
CompilerVer = "SDK"
|
||||
If (fso.FileExists(LibPath & "/MSVCRT.lib") = False And fso.FileExists(LibPath2 & "/MSVCRT.lib") = False) Then
|
||||
WScript.Echo "Hm. I can't seem to find the default library.. Are you sure this is installed properly?"
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/wsock32.lib") = False And fso.FileExists(LibPath2 & "/wsock32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find wsock32.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/advapi32.lib") = False And fso.FileExists(LibPath2 & "/advapi32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find advapi32.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
ElseIf (fso.FileExists(LibPath & "/uuid.lib") = False And fso.FileExists(LibPath2 & "/uuid.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find uuid.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
LibPath2 = ""
|
||||
End If
|
||||
IncDir = DefaultDrive & ":\Program Files\Microsoft Visual C++ Toolkit 2003\include"
|
||||
IncDir2 = "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\Include"
|
||||
End If
|
||||
|
||||
If (fso.FileExists(DefaultDrive & ":\Program Files\Microsoft Visual Studio .NET 2003\VC7\Bin\nmake.exe") = False AND fso.FileExists(DefaultDrive & ":\Program Files\Microsoft Visual Studio\VC98\Bin\nmake.exe") = False AND fso.FileExists(DefaultDrive & ":\nmake.exe") = False AND fso.FileExists(DefaultDrive & ":\Program Files\Microsoft Platform SDK\Bin\nmake.exe") = False) Then
|
||||
WScript.Echo ""
|
||||
WScript.Echo "I couldn't seem to find a copy of nmake.exe on your system.."
|
||||
WScript.Echo ""
|
||||
WScript.Echo "I can continue without it for now, but you'll need it when you want to compile."
|
||||
WScript.Echo "I suggest downloading a copy from the URL below, and placing it in your C:\ drive."
|
||||
WScript.Echo ""
|
||||
WScript.Echo "http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe"
|
||||
WScript.Echo ""
|
||||
WScript.Echo "You should place nmake.exe in " & DefaultDrive & ":\"
|
||||
WScript.Echo ""
|
||||
End If
|
||||
|
||||
If (LibPath = "") Then
|
||||
Dim tmpPath
|
||||
WScript.Echo "I couldn't find any of the paths I was looking for.."
|
||||
WScript.Echo "If you have installed the Visual C++ Libraries in a non-standard location, enter"
|
||||
WScript.Echo "this location below, and I will try and look there.."
|
||||
WScript.Echo "(NOTE: Do NOT enter a trailing slash)"
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Path to Visual C++ Libraries: "
|
||||
tmpPath = Trim(WScript.StdIn.ReadLine)
|
||||
If (fso.FolderExists(tmpPath) AND fso.FileExists(tmpPath & "\MSVCRT.lib")) Then
|
||||
LibPath = tmpPath
|
||||
If (fso.FileExists(LibPath & "\wsock32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find wsock32.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
ElseIf (fso.FileExists(LibPath & "\advapi32.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find advapi32.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
ElseIf (fso.FileExists(LibPath & "\uuid.lib") = False) Then
|
||||
WScript.Echo "I couldn't seem to find uuid.lib.. We kind of need this.."
|
||||
LibPath = ""
|
||||
Else
|
||||
WScript.Echo "Okay, I found what I was looking for.."
|
||||
End If
|
||||
Else
|
||||
WScript.Echo "I couldn't find the default library in that folder."
|
||||
End If
|
||||
End If
|
||||
|
||||
If (LibPath <> "") Then
|
||||
Dim f
|
||||
Const ForReading = 1, ForWriting = 2
|
||||
WScript.Echo "Looks like you've got all the libraries I need.."
|
||||
Set f = fso.OpenTextFile("Makefile.inc.win32", ForWriting)
|
||||
f.WriteLine("USE_MYSQL=" & UseMySQL)
|
||||
If (UseMySQL = "1") Then
|
||||
f.WriteLine("MYSQL_LIB=" & chr(34) & MySQLLibPath & chr(34))
|
||||
f.WriteLine("MYSQL_INC=" & chr(34) & MySQLHeadPath & chr(34))
|
||||
End If
|
||||
f.WriteLine("DB_ENCRYPTION=" & UseDBEnc)
|
||||
If (CompilerVer = "VC6") Then
|
||||
f.WriteLine("VC6=/QIfist")
|
||||
End If
|
||||
if (LibPath2 <> "") Then
|
||||
LibPath = LibPath2 & chr(34) & " /LIBPATH:" & chr(34) & LibPath
|
||||
End If
|
||||
f.WriteLine("VERSION=" & verMaj & "." & verMin & "." & verPatch & verExtra & "." & verBuild)
|
||||
f.WriteLine("LIBPATH=" & LibPath)
|
||||
f.WriteLine("PROGRAM=anope.exe")
|
||||
f.WriteLine("DATDEST=data")
|
||||
f.WriteLine("CC=cl")
|
||||
f.WriteLine("RC=rc")
|
||||
f.WriteLine("MAKE=nmake -f Makefile.win32")
|
||||
f.WriteLine("BASE_CFLAGS=/O2 /MD /I " & Chr(34) & IncDir & Chr(34))
|
||||
If IncDir2 <> "" Then
|
||||
f.WriteLine("BASE_CFLAGS=$(BASE_CFLAGS) /I " & Chr(34) & IncDir2 & Chr(34))
|
||||
f.WriteLine("RC_FLAGS=/i " & Chr(34) & IncDir2 & Chr(34))
|
||||
End If
|
||||
f.WriteLine("RC_FLAGS=$(RC_FLAGS) /i " & Chr(34) & IncDir & Chr(34))
|
||||
f.WriteLine("LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib")
|
||||
f.WriteLine("LFLAGS=/LIBPATH:" & chr(34) & "$(LIBPATH)" & chr(34))
|
||||
If (UseMySQL = "1") Then
|
||||
f.WriteLine("LIBS=$(LIBS) /LIBPATH:$(MYSQL_LIB)")
|
||||
f.WriteLine("MYSQL_LIB_PATH=/LIBPATH:$(MYSQL_LIB)")
|
||||
f.WriteLine("BASE_CFLAGS=$(BASE_CFLAGS) /I $(MYSQL_INC)")
|
||||
f.WriteLine("MYSQL_INC_PATH=/I $(MYSQL_INC)")
|
||||
f.WriteLine("RDB_C=rdb.c")
|
||||
f.WriteLine("RDB_O=rdb.obj")
|
||||
f.WriteLine("MYSQL_C=mysql.c")
|
||||
f.WriteLine("MYSQL_O=mysql.obj")
|
||||
f.WriteLine("BASE_CFLAGS=/D USE_MYSQL /D USE_RDB $(BASE_CFLAGS) /D HAVE_MYSQL_MYSQL_H")
|
||||
f.WriteLine("MYPASQL_BUILD=$(CC) /LD $(MYSQL_INC_PATH) src\mypasql.c /link $(MYSQL_LIB_PATH) $(LFLAGS) \")
|
||||
f.WriteLine("/DEF:src\mypasql.def libmysql.lib zlib.lib ws2_32.lib advapi32.lib /NODEFAULTLIB:LIBCMTD.lib")
|
||||
f.WriteLine("LIBS=$(LIBS) libmysql.lib zlib.lib")
|
||||
End If
|
||||
If (UseDBEnc = "1") Then
|
||||
f.WriteLine("BASE_CFLAGS=/D USE_ENCRYPTION /D ENCRYPT_MD5 $(BASE_CFLAGS)")
|
||||
End If
|
||||
f.WriteLine("MORE_CFLAGS = /I" & chr(34) & "../include" & chr(34))
|
||||
f.WriteLine("CFLAGS = /nologo $(VC6) $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)")
|
||||
f.close()
|
||||
Set f = fso.CreateTextFile("make.bat")
|
||||
f.WriteLine("@echo off")
|
||||
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||
Set WshSysEnv = WshShell.Environment("SYSTEM")
|
||||
EnvLibPath = WshSysEnv("PATH")
|
||||
If CompilerVer = "SDK" Then
|
||||
If InStr(EnvLibPath, "C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin") Then
|
||||
f.WriteLine("Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%")
|
||||
f.WriteLine("Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE%")
|
||||
f.WriteLine("Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%")
|
||||
End If
|
||||
ElseIf CompilerVer = "VC6" Then
|
||||
If InStr(EnvLibPath, "C:\PROGRA~1\MICROS~3\VC98\LIB") Then
|
||||
f.WriteLine("set VSCommonDir=C:\PROGRA~1\MICROS~3\Common")
|
||||
f.WriteLine("set MSDevDir=C:\PROGRA~1\MICROS~3\Common\msdev98")
|
||||
f.WriteLine("set MSVCDir=C:\PROGRA~1\MICROS~3\VC98")
|
||||
f.WriteLine("set VcOsDir=WIN95")
|
||||
f.WriteLine("if " & Chr(34) & "%OS%" & Chr(34) & " == " & Chr(34) & "Windows_NT" & Chr(34) & " set VcOsDir=WINNT")
|
||||
f.WriteLine("if " & Chr(34) & "%OS%" & Chr(34) & " == " & Chr(34) & "Windows_NT" & Chr(34) & " set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%")
|
||||
f.WriteLine("if " & Chr(34) & "%OS%" & Chr(34) & " == " & Chr(34) & "" & Chr(34) & " set PATH=" & Chr(34) & "%MSDevDir%\BIN" & Chr(34) & ";" & Chr(34) & "%MSVCDir%\BIN" & Chr(34) & ";" & Chr(34) & "%VSCommonDir%\TOOLS\%VcOsDir%" & Chr(34) & ";" & Chr(34) & "%VSCommonDir%\TOOLS" & Chr(34) & ";" & Chr(34) & "%windir%\SYSTEM" & Chr(34) & ";" & Chr(34) & "%PATH%" & Chr(34) & "")
|
||||
f.WriteLine("set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%")
|
||||
f.WriteLine("set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%")
|
||||
f.WriteLine("set VcOsDir=")
|
||||
f.WriteLine("set VSCommonDir=")
|
||||
End If
|
||||
Else
|
||||
If InStr(EnvLibPath, "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools") Then
|
||||
f.WriteLine("@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE")
|
||||
f.WriteLine("@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003")
|
||||
f.WriteLine("@set VCINSTALLDIR=%VSINSTALLDIR%")
|
||||
f.WriteLine("@set DevEnvDir=%VSINSTALLDIR%")
|
||||
f.WriteLine("@set MSVCDir=%VCINSTALLDIR%\VC7")
|
||||
f.WriteLine("@set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;")
|
||||
f.WriteLine("@set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%")
|
||||
f.WriteLine("@set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%")
|
||||
End If
|
||||
End If
|
||||
If (fso.FileExists("anope.exe")) Then
|
||||
f.WriteLine("nmake -f Makefile.win32 spotless")
|
||||
End If
|
||||
f.WriteLine("nmake -f Makefile.win32")
|
||||
f.close()
|
||||
WScript.Echo "Configuration Complete!"
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Type make to Compile Anope"
|
||||
Else
|
||||
WScript.Echo ""
|
||||
WScript.Echo "Sorry, but you didn't have all the required libraries installed."
|
||||
WScript.Echo ""
|
||||
WScript.Echo "See http://wiki.anope.org/Documentation:Windows for a list of downloads needed to install Anope"
|
||||
WScript.Echo ""
|
||||
End If
|
||||
|
||||
End If
|
||||
+2
-1
@@ -44,9 +44,10 @@ spotless:
|
||||
-@erase *.obj *.exe *.exp *.lib tools\*.exe *.res
|
||||
|
||||
install:
|
||||
-@copy anope.exe ..\anope.exe
|
||||
-@copy anope.exe ..\anope.exe
|
||||
-@mkdir ..\$(DATDEST)\bin
|
||||
-@copy bin\* ..\$(DATDEST)\bin
|
||||
-@copy anope.exe.manifest ..\anope.exe.manifest
|
||||
|
||||
win32.res: win32.rc
|
||||
$(RC) /l 0x409 $(RC_FLAGS) /fowin32.res win32.rc
|
||||
|
||||
+5
-1
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="14"
|
||||
VERSION_EXTRA=""
|
||||
VERSION_BUILD="1060"
|
||||
VERSION_BUILD="1061"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.14 (1061)
|
||||
# BUGS : 408
|
||||
# NOTES : Added support for Visual Studio 2005, partially by replacing install.vbs by a more robust install.js -- thanks heinz!
|
||||
#
|
||||
# BUILD : 1.7.14 (1060)
|
||||
# BUGS : 523
|
||||
# NOTES : Module data was cleared before calling AnopeFini, thus being evil to saving-routines and such (like in ns_noop)
|
||||
|
||||
Reference in New Issue
Block a user