Skip to content

Commit

Permalink
Fix to irtests.rb for changing Silverlight install folder (it has cha…
Browse files Browse the repository at this point in the history
…nged once again to 3.0.40818.0)
  • Loading branch information
Shri Borde committed Sep 30, 2009
1 parent 03054a5 commit 8674ea7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
Expand Up @@ -7,14 +7,20 @@
module MiniTest
class Assertion < Exception; end
class Skip < Assertion; end

file = if RUBY_VERSION =~ /^1\.9/ then # bt's expanded, but __FILE__ isn't :(
File.expand_path __FILE__
elsif __FILE__ =~ /^[^\.]/ then # assume both relative
require 'pathname'
pwd = Pathname.new Dir.pwd
pn = Pathname.new File.expand_path(__FILE__)
pn = File.join(".", pn.relative_path_from(pwd)) unless pn.relative?
# Fix for http://rubyforge.org/tracker/?func=detail&atid=4097&aid=26434&group_id=1040
begin
pn = File.join(".", pn.relative_path_from(pwd)) unless pn.relative?
rescue ArgumentError => e
if not /different prefix/ =~ e.message
raise
end
end
pn.to_s
else # assume both are expanded
__FILE__
Expand Down
5 changes: 2 additions & 3 deletions Merlin/Main/Languages/Ruby/Scripts/irtests.rb
Expand Up @@ -108,12 +108,11 @@ def build_sl
if git?
program_files = ENV['ProgramFiles(x86)'] ? ENV['ProgramFiles(x86)'] : ENV['ProgramFiles']
# Patches change the version number
sl_path_candidates = ["3.0.40624.0", "3.0.40723.0"].map {|ver| "#{program_files}\\Microsoft Silverlight\\#{ver}" }
sl_path = sl_path_candidates.select {|p| File.exist? p }.first
sl_path = Dir[File.expand_path("Microsoft Silverlight", program_files) + "/3.0.*"].first
if sl_path
options = "/p:SilverlightPath=\"#{sl_path}\""
else
puts "Skipping Silverlight build since a Silverlight installation was not found at #{sl_path}..."
warn "\nSkipping Silverlight build since a Silverlight installation was not found at #{program_files}...\n"
return
end
end
Expand Down
8 changes: 4 additions & 4 deletions Merlin/Main/Scripts/Bat/Alias.ps1
Expand Up @@ -33,10 +33,10 @@ function global:gencache { cmd /C "${env:MERLIN_ROOT}\Languages\Ruby\Ruby\Compil
# Silverlight Build Commands
#

function global:bsrbd { cmd /C "msbuild ${env:MERLIN_ROOT}\Languages\Ruby\Ruby.sln /p:Configuration=`"Silverlight Debug`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40723.0`"" }
function global:bsrbr { cmd /C "msbuild ${env:MERLIN_ROOT}\Languages\Ruby\Ruby.sln /p:Configuration=`"Silverlight Release`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40723.0`"" }
function global:bsd { cmd /C "msbuild ${env:MERLIN_ROOT}\Hosts\Silverlight\Silverlight.sln /p:Configuration=`"Silverlight Debug`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40723.0`"" }
function global:bsr { cmd /C "msbuild ${env:MERLIN_ROOT}\Hosts\Silverlight\Silverlight.sln /p:Configuration=`"Silverlight Release`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40723.0`"" }
function global:bsrbd { cmd /C "msbuild ${env:MERLIN_ROOT}\Languages\Ruby\Ruby.sln /p:Configuration=`"Silverlight Debug`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40818.0`"" }
function global:bsrbr { cmd /C "msbuild ${env:MERLIN_ROOT}\Languages\Ruby\Ruby.sln /p:Configuration=`"Silverlight Release`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40818.0`"" }
function global:bsd { cmd /C "msbuild ${env:MERLIN_ROOT}\Hosts\Silverlight\Silverlight.sln /p:Configuration=`"Silverlight Debug`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40818.0`"" }
function global:bsr { cmd /C "msbuild ${env:MERLIN_ROOT}\Hosts\Silverlight\Silverlight.sln /p:Configuration=`"Silverlight Release`" /p:SilverlightPath=`"C:\Program Files\Microsoft Silverlight\3.0.40818.0`"" }

#=============================================================================
# [Iron]Python program aliases
Expand Down
8 changes: 4 additions & 4 deletions Merlin/Main/Scripts/Bat/Alias.txt
Expand Up @@ -33,10 +33,10 @@ gencache =%MERLIN_ROOT%\Languages\Ruby\Ruby\Compiler\GenerateReflectionCache.cm
;= Silverlight Build Commands
;=

bsrbd =msbuild %MERLIN_ROOT%\Languages\Ruby\Ruby.sln /p:Configuration="Silverlight Debug" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40723.0"
bsrbr =msbuild %MERLIN_ROOT%\Languages\Ruby\Ruby.sln /p:Configuration="Silverlight Release" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40723.0"
bsd =msbuild %MERLIN_ROOT%\Hosts\Silverlight\Silverlight.sln /p:Configuration="Silverlight Debug" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40723.0"
bsr =msbuild %MERLIN_ROOT%\Hosts\Silverlight\Silverlight.sln /p:Configuration="Silverlight Release" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40723.0"
bsrbd =msbuild %MERLIN_ROOT%\Languages\Ruby\Ruby.sln /p:Configuration="Silverlight Debug" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40818.0"
bsrbr =msbuild %MERLIN_ROOT%\Languages\Ruby\Ruby.sln /p:Configuration="Silverlight Release" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40818.0"
bsd =msbuild %MERLIN_ROOT%\Hosts\Silverlight\Silverlight.sln /p:Configuration="Silverlight Debug" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40818.0"
bsr =msbuild %MERLIN_ROOT%\Hosts\Silverlight\Silverlight.sln /p:Configuration="Silverlight Release" /p:SilverlightPath="C:\Program Files\Microsoft Silverlight\3.0.40818.0"

;==============================================================================
;= [Iron]Python program aliases
Expand Down
6 changes: 5 additions & 1 deletion Merlin/Users/sborde/Dev.bat
@@ -1,6 +1,10 @@
color 47

set MERLIN_TFS=c:\vs_langs01_s\Merlin\Main
if "%COMPUTERNAME%" == "SBORDE1" (
set MERLIN_TFS=d:\vs_langs01_s\Merlin\Main
) else (
set MERLIN_TFS=c:\vs_langs01_s\Merlin\Main
)
path=%path%;%MERLIN_TFS%\External\Tools
path=%path%;%ProgramFiles%\Windows Resource Kits\Tools
path=%path%;%MERLIN_TFS%\..\External.LCA_RESTRICTED\languages\ruby\ruby-1.8.6p368\bin
Expand Down

0 comments on commit 8674ea7

Please sign in to comment.