From fedf235c8392883bd27e342c9f0c1f8fcd30191d Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Oct 2012 15:56:06 -0500 Subject: [PATCH] Update Config.cs for VS 2012 and fix it failing if the source directory path has spaces in it --- Config.exe | Bin 16896 -> 16896 bytes docs/WIN32.txt | 7 +++---- src/win32/Config.cs | 11 ++++++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Config.exe b/Config.exe index 61a2650e3c97861e5692a5574646f58d5d77a2bf..38c92a4bcf93742ebf257ff00e92fab19a81389f 100644 GIT binary patch delta 914 zcmZvb&1(}u7{=e(d~7zG-DJBlP17_VrZ#K0rD+r!d#YNS7KGN86a~e4sNkU{POp+g zDbj<8aXcx-F9h-8VewE=DDR}9Ow*N^P1!Z^UJBoFCHi(G&H=0 zHi&J~fyUS|IZRgBtemXm?qQtB==1U9KH`qe`2yAJKnle4aty{qtIdty~+E-7a46(bO>fDwZpv!zBml`W#E55y* zZ2?T?AGyjA?ZDPvcKlSlub4xf9tki-X^)N}(Z$A_=dr^rEOXHlW5Y`SAYCF*dY~y$ z;~-9J&PS!Afs8>Ux}-@4Zomy8-D`s8?PhnCxyYXYK&mhWo;Cm+LMmSv8^&k2&FWHb z690yY4O|Vsfj<0=>((p(q)G}b5*zC1fdphB1N~ThTm;%wvg~~9i`rM`SvU=($mZHJ z)?)mlgCI?%#eUe0eqxH7=E(oJ1|z b>avfJbOGpe@+R!&r%ZUE~zb&ig delta 805 zcmZ8f&ubGw6#izLUz^P)*=~#>h9)suH(5#(l^VrD4klJ8R3a4=K@V1uA_-$p9@3ye zJg6j&A}C(OgNTRX9z>CX^rC3#f8Y;1dQd3#pwRjzrloY?&Aj)%Z@%~DN3+G6E!Mv2 z;(?{{&aH%Ur_y0Lzrbx51%Dq8xjWtqr0_7MZQ{cvX8<>d$jAAd~ z5ru5tIj%&!tRSY;$BFAI>a{%JhcC{TH-e~M{K~|Df3}hfpl-P(LEU~zFOHLtY6grz znR28LJS2NV79nIOS#gji!)@)SJ*H-8LlfX*;=A8wPen+}#6L?xjX=wwDZ0wKBoo{t z#?04hP2`2G#ewhHa*De*GFo}Q{}lWLex%Z)O%-jVnf$nN?`+3uY+CB&B`Nw%FllN_!UsdfH4 zBu4ceiNA!H-u246!`&lH(_;D(Vn#3Itb@ef*!INGtwWSBRYSF?T@RwB--hAO0pg2( zIX)K#GLt9pHU^N3%+bkXM`-;Nb1nq$vd}zzFW^S(1BU4#<{WRh8f2s5^gt<;LJb@# z>_r|0?&HUIzs diff --git a/docs/WIN32.txt b/docs/WIN32.txt index 17b4e38ab..769c397d4 100644 --- a/docs/WIN32.txt +++ b/docs/WIN32.txt @@ -25,12 +25,11 @@ Anope for Windows (NOTE: When installing, tell CMake to add itself to the PATH.) - If you have Visual C++ 10 (2010) skip ahead to step 2, else you - need to download the following free component from Microsoft. Once - downloaded, install these packages. + If you have Visual C++ 10 or 11 (2010/2012) skip ahead to step 2, else you + need to download and install the following free component from Microsoft. * Microsoft Visual C++ 2010 Express Edition: - http://www.microsoft.com/express/vc/ + http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express 2) Unpack the Anope tarball with your favorite uncompression program (WinZip or WinRAR, etc). diff --git a/src/win32/Config.cs b/src/win32/Config.cs index 5b0b0af91..0200b80b6 100644 --- a/src/win32/Config.cs +++ b/src/win32/Config.cs @@ -204,7 +204,7 @@ namespace Config Dictionary InstallerQuestions = new Dictionary(); InstallerQuestions.Add(0, "Where do you want Anope to be installed?"); InstallerQuestions.Add(1, "Would you like to build using NMake instead of using Visual Studio?\r\nNOTE: If you decide to use NMake, you must be in an environment where\r\nNMake can function, such as the Visual Studio command line. If you say\r\nyes to this while not in an environment that can run NMake, it can\r\ncause the CMake configuration to enter an endless loop. [y/n]"); - InstallerQuestions.Add(2, "Are you using Visual Studio 2008 or 2010? You can leave this blank\nand have CMake try and auto detect it, but this usually doesn't\nwork correctly. [2008/2010]"); + InstallerQuestions.Add(2, "Are you using Visual Studio 2008, 2010, or 2012? You can leave this blank\nand have CMake try and auto detect it, but this usually doesn't\nwork correctly. [2008/2010/2012]"); InstallerQuestions.Add(3, "Would you like to build a debug version of Anope? [y/n]"); InstallerQuestions.Add(4, "Are there any extra arguments you wish to pass to cmake?\nYou may only need to do this if cmake is unable to locate missing dependencies without hints.\nTo do this, set the variable EXTRA_INCLUDE like this: -DEXTRA_INCLUDE:STRING=c:/some/path/include;c:/some/path/bin;c:/some/path/lib"); @@ -260,7 +260,12 @@ namespace Config ++i; break; case 2: - if (InstallerResponse == "2010") + if (InstallerResponse == "2012") + { + VSVersion = "-G\"Visual Studio 11\" "; + VSShortVer = "2012"; + } + else if (InstallerResponse == "2010") { VSVersion = "-G\"Visual Studio 10\" "; VSShortVer = "2010"; @@ -304,7 +309,7 @@ namespace Config InstallDirectory = "-DINSTDIR:STRING=\"" + InstallDirectory.Replace('\\', '/') + "\" "; string NMake = UseNMake ? "-G\"NMake Makefiles\" " : ""; string Debug = BuildDebug ? "-DCMAKE_BUILD_TYPE:STRING=DEBUG " : "-DCMAKE_BUILD_TYPE:STRING=RELEASE "; - string cMake = InstallDirectory + NMake + Debug + VSVersion + ExtraArguments + Environment.CurrentDirectory.Replace('\\','/'); + string cMake = InstallDirectory + NMake + Debug + VSVersion + ExtraArguments + "\"" + Environment.CurrentDirectory.Replace('\\','/') + "\""; RunCMake(cMake); return 0;