Commits

Jeff Hardy  committed 8b4b53f

Handle non-64-bit IronPython intallations

  • Participants
  • Parent commits eb5c503

Comments (0)

Files changed (2)

File IronPython.Zlib.sln

 # Visual Studio 2010
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CE0DF1EB-9A74-4F61-A022-38ED616A5C5B}"
 	ProjectSection(SolutionItems) = preProject
+		default.ps1 = default.ps1
 		licence.txt = licence.txt
 		readme.txt = readme.txt
 	EndProjectSection
 
 task Default -Depends Build,Test
 
-task GenVersion {
-    $template = @"
-namespace $ProjectName
-{
-    class AssemblyInfo
-    {
-        internal const string Version = "$ProjectVersion";
-    }
-}
-"@
-    
-    $template | Out-File 'src\Version.cs'
-}
-
 task Build -Depends GenVersion {
     exec { 
         msbuild /nologo /verbosity:minimal "$ProjectPath" `
     Copy-Item -Force $TargetPath .\tests\
     
     if(($IronPythonVersion -eq '2.6') -and ($TargetFrameworkVersion -eq 'v4.0')) {
-        $ipyPath = "C:\Program Files (x86)\IronPython 2.6 for .NET 4.0"
+        $ipyPaths = "C:\Program Files\IronPython 2.6 for .NET 4.0","C:\Program Files (x86)\IronPython 2.6 for .NET 4.0"
     } else {
-        $ipyPath = "C:\Program Files (x86)\IronPython $IronPythonVersion"
+        $ipyPaths = "C:\Program Files\IronPython $IronPythonVersion","C:\Program Files (x86)\IronPython $IronPythonVersion"
     }
     
     $oldEnvPath = $env:Path
-    $env:Path = $ipyPath + ";$env:Path"
+    $env:Path = $ipyPaths + @("$env:Path") -join ';'
     
     Push-Location .\tests\
     ipy test_zlib.py
     $env:Path = $oldEnvPath
 }
 
+task GenVersion {
+    $template = @"
+namespace $ProjectName
+{
+    internal partial class AssemblyInfo
+    {
+        internal const string Version = "$ProjectVersion";
+    }
+}
+"@
+    
+    $template | Out-File 'src\Version.cs'
+}
+
 function Get-Platform {
     if($framework -match '(\d\.\d)(x86|x64)?') {
         if($matches[2] -ne $null) {