OSDN Git Service

na-get-lib,Windows 2008 Server用記述を追加
authorttp <ttp@users.sourceforge.jp>
Mon, 17 Mar 2008 10:24:14 +0000 (10:24 +0000)
committerttp <ttp@users.sourceforge.jp>
Mon, 17 Mar 2008 10:24:14 +0000 (10:24 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@877 34ed2c89-c49f-4a4b-abdb-c318350108cf

na-get-lib/NaGet.Packages/Platform.cs

index ff77eda..d5ba839 100644 (file)
@@ -18,6 +18,7 @@ namespace NaGet.Packages
                WINXP,\r
                WIN2003,\r
                VISTA,\r
+               WIN2008,\r
        }\r
        \r
        public class Platform\r
@@ -100,9 +101,9 @@ namespace NaGet.Packages
                /// <returns>現在のマシンのアーキテクチャ</returns>\r
                public static ProcessorArchitecture GetArch()\r
                {\r
-               Module[] moduleArray = Assembly.GetExecutingAssembly().GetModules();\r
-               Module md = moduleArray[0];\r
-               \r
+                       Module[] moduleArray = Assembly.GetExecutingAssembly().GetModules();\r
+                       Module md = moduleArray[0];\r
+\r
                        PortableExecutableKinds pekinds;\r
                        ImageFileMachine ifm;\r
                        md.GetPEKind(out pekinds, out ifm);\r
@@ -168,7 +169,12 @@ namespace NaGet.Packages
                                                                return PlatformOSType.WIN2003;\r
                                                }\r
                                        } else if (osVer.Major == 6) {\r
-                                               return PlatformOSType.VISTA;\r
+                                               switch (osVer.Minor) {\r
+                                                       case 0:\r
+                                                               return PlatformOSType.VISTA;\r
+                                                       case 1:\r
+                                                               return PlatformOSType.WIN2008;\r
+                                               }\r
                                        }\r
                                        break;\r
 //                             case PlatformID.WinCE:\r