| 3 | | {{{ |
| 4 | | --- msvccompiler_orig.py 2007-04-01 12:29:48.000000000 -0800 |
| 5 | | +++ msvccompiler.py 2008-09-10 00:53:53.467400000 -0800 |
| 6 | | @@ -126,7 +126,11 @@ |
| 7 | | self.set_macro("FrameworkDir", net, "installroot") |
| 8 | | try: |
| 9 | | if version > 7.0: |
| 10 | | - self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") |
| 11 | | + # pks |
| 12 | | + try: |
| 13 | | + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") |
| 14 | | + except KeyError: |
| 15 | | + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv2.0") |
| 16 | | else: |
| 17 | | self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") |
| 18 | | except KeyError, exc: # |
| 19 | | @@ -288,10 +292,17 @@ |
| 20 | | |
| 21 | | self.preprocess_options = None |
| 22 | | if self.__arch == "Intel": |
| 23 | | - self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' , |
| 24 | | - '/DNDEBUG'] |
| 25 | | - self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX', |
| 26 | | - '/Z7', '/D_DEBUG'] |
| 27 | | + if get_build_version() > 7: |
| 28 | | + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/EHsc' , |
| 29 | | + '/DNDEBUG'] |
| 30 | | + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/EHsc', |
| 31 | | + '/Z7', '/D_DEBUG'] |
| 32 | | + else: |
| 33 | | + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' , |
| 34 | | + '/DNDEBUG'] |
| 35 | | + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX', |
| 36 | | + '/Z7', '/D_DEBUG'] |
| 37 | | + |
| 38 | | else: |
| 39 | | # Win64 |
| 40 | | self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , |
| 41 | | @@ -609,6 +620,22 @@ |
| 42 | | |
| 43 | | if not _can_read_reg: |
| 44 | | return [] |
| 45 | | + |
| 46 | | + #pks |
| 47 | | + if self.__version >= 8: |
| 48 | | + |
| 49 | | + # With .NET 8.0, the environment variables are not stored in the |
| 50 | | + # registry anymore. They are stored in a platform specific file |
| 51 | | + # under C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages\ |
| 52 | | + # Instead of parsing these files (which I don't know how to do), |
| 53 | | + # we simply rely on the fact that the python script is being |
| 54 | | + # called from a "Visual Studio 2005 Command Prompt". In these |
| 55 | | + # consoles, the environment variables are properly defined. |
| 56 | | + |
| 57 | | + real_path = path |
| 58 | | + if path == "library": |
| 59 | | + real_path = "lib"; |
| 60 | | + return string.split(os.environ[real_path], ";") |
| 61 | | |
| 62 | | path = path + " dirs" |
| 63 | | if self.__version >= 7: |
| 64 | | }}} |
| | 3 | Check out the attachments for the distutils config for VS 2005. |