Jeff Hardy avatar Jeff Hardy committed 8b4b53f

Handle non-64-bit IronPython intallations

Comments (0)

Files changed (2)

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) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.