Skip to content

Commit

Permalink
Fix Debug and SL4 build, IronStudio and move Chiron to Debug/Release …
Browse files Browse the repository at this point in the history
…dir.
  • Loading branch information
tmat committed Dec 30, 2011
1 parent 33be245 commit d8d9765
Show file tree
Hide file tree
Showing 67 changed files with 561 additions and 1,981 deletions.
6 changes: 2 additions & 4 deletions Hosts/Silverlight/Chiron/Chiron.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'v2Release|AnyCPU' ">
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppManifestTemplate.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight4Release|AnyCPU' ">
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj" Condition=" '$(TargetFrameworkVersion)' == 'v3.5' ">
<Project>{2AE75F5A-CD1F-4925-9647-AF4D1C282FB4}</Project>
<Name>Microsoft.Scripting.Core</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\Runtime\Microsoft.Scripting\Microsoft.Scripting.csproj">
<Project>{02FF0909-F5AD-48CF-A86A-345E721B7E40}</Project>
<Name>Microsoft.Scripting</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Runtime\Microsoft.Dynamic\Microsoft.Dynamic.csproj">
<Project>{EB66B766-6354-4208-A3D4-AACBDCB5C3B3}</Project>
<Name>Microsoft.Dynamic</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\SilverlightVersion.cs">
<Link>Properties\SilverlightVersion.cs</Link>
Expand All @@ -51,13 +36,34 @@
<ItemGroup>
<EmbeddedResource Include="agdlr.css" />
<EmbeddedResource Include="agdlr.js" />
<EmbeddedResource Include="init.rb" />
<EmbeddedResource Include="repl_formatter.py" />
<EmbeddedResource Include="repl_formatter.rb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="init.rb" />
<Reference Include="System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(FrameworkReferences)\System.Windows.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Browser, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(FrameworkReferences)\System.Windows.Browser.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="repl_formatter.py" />
<EmbeddedResource Include="repl_formatter.rb" />
<ProjectReference Include="..\..\..\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj" Condition=" '$(TargetFrameworkVersion)' == 'v3.5' ">
<Project>{2AE75F5A-CD1F-4925-9647-AF4D1C282FB4}</Project>
<Name>Microsoft.Scripting.Core</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\Runtime\Microsoft.Scripting\Microsoft.Scripting.csproj">
<Project>{02FF0909-F5AD-48CF-A86A-345E721B7E40}</Project>
<Name>Microsoft.Scripting</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Runtime\Microsoft.Dynamic\Microsoft.Dynamic.csproj">
<Project>{EB66B766-6354-4208-A3D4-AACBDCB5C3B3}</Project>
<Name>Microsoft.Dynamic</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
4 changes: 2 additions & 2 deletions Hosts/Silverlight/Microsoft.Scripting.Silverlight/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private static string GetAndValidateEntryPoint
var vfs = BrowserPAL.PAL.VirtualFilesystem;
var stream = vfs.GetFile(entryPoint);
if (stream == null) {
throw new ApplicationException(
throw new Exception(
string.Format(
"Application expected to have an entry point called {0}, but was not found (check the {1})",
entryPoint, BrowserPAL.PAL.VirtualFilesystem.Name()));
Expand Down Expand Up @@ -201,7 +201,7 @@ private static string FindEntryPoint(DynamicLanguageConfig langConfig) {
var tempStream = BrowserPAL.PAL.VirtualFilesystem.GetFile(file);
if (tempStream != null) {
if (entryPoint != null) {
throw new ApplicationException(string.Format(
throw new Exception(string.Format(
"Application can only have one entry point, but found two: {0}, {1}",
_entryPoint, file
));
Expand Down
2 changes: 1 addition & 1 deletion Hosts/Silverlight/Samples1/deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo Building samples
call %~dp0build.bat

echo Building dlr.xap
%~dp0..\..\..\Bin\"Silverlight Release"\Chiron.exe /s /d:%~dp0dlr\dlr /z:%~dp0dlr\dlr.xap /e:"/dlr-slvx"
%~dp0..\..\..\Bin\Release\Chiron.exe /s /d:%~dp0dlr\dlr /z:%~dp0dlr\dlr.xap /e:"/dlr-slvx"

echo Deploying samples
if not exist C:\inetpub\wwwroot\gestalt ( mkdir C:\inetpub\wwwroot\gestalt )
Expand Down
2 changes: 1 addition & 1 deletion Hosts/Silverlight/Samples1/run.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off
call %~dp0build.bat
%~dp0..\..\..\Bin\"Silverlight Release"\Chiron.exe /n /b:%~dp0index.html
%~dp0..\..\..\Bin\Release\Chiron.exe /n /b:%~dp0index.html
2 changes: 1 addition & 1 deletion Hosts/Silverlight/Samples1/units.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off
call %~dp0build.bat
%DLR_ROOT%"\Bin\Silverlight Debug\Chiron.exe" /n /b:units/index.html
%DLR_ROOT%"\Bin\Debug\Chiron.exe" /n /b:units/index.html
2 changes: 1 addition & 1 deletion Hosts/Silverlight/Scripts/release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if errorlevel 1 goto BUILDFAIL
echo Build dlr.xap

mkdir "%~dp0release\dlr"
%~dp0"..\..\..\Bin\Silverlight %config%\Chiron.exe" /d:"%~dp0release-dlrxap" /x:"%~dp0release\dlr\dlr.xap" /s
%~dp0"..\..\..\Bin\%config%\Chiron.exe" /d:"%~dp0release-dlrxap" /x:"%~dp0release\dlr\dlr.xap" /s

echo Copy slvx files to release

Expand Down
2 changes: 1 addition & 1 deletion Hosts/Silverlight/Tests/test_chiron/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def load_rspec
end

def load_constants
$BUILD ||= "Silverlight3#{ARGV.first || "Debug"}"
$BUILD ||= "#{ARGV.first || "Debug"}"
$BUILD_PATH ||= File.join(File.expand_path(ENV['DLR_ROOT']), "bin", $BUILD)
$CHIRON ||= File.join($BUILD_PATH, "Chiron.exe")
$DIR ||= File.join(File.expand_path(File.dirname(__FILE__)), "fixtures")
Expand Down
4 changes: 2 additions & 2 deletions Languages/IronPython/CreateRelease.bat
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ mkdir Silverlight\bin
copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\Microsoft.Dynamic.dll Silverlight\bin\
copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\Microsoft.Scripting.dll Silverlight\bin\
copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\Microsoft.Scripting.Silverlight.dll Silverlight\bin\
copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\Chiron.exe Silverlight\bin\
copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\Chiron.exe.config Silverlight\bin\
copy %DLR_ROOT%\Bin\%BUILD_FLAVOR%\Chiron.exe Silverlight\bin\
copy %DLR_ROOT%\Bin\%BUILD_FLAVOR%\Chiron.exe.config Silverlight\bin\

copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\IronPython.dll Silverlight\bin\
copy %DLR_ROOT%\Bin\Silverlight4%BUILD_FLAVOR%\IronPython.Modules.dll Silverlight\bin\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<Compile Include="NativeSignal.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="mmap.cs" />
<Compile Include="Properties\BuildInfo.Generated.cs" />
<Compile Include="signal.cs" />
<Compile Include="zipimport.cs" />
<Compile Include="zlib\Compress.cs" />
Expand Down Expand Up @@ -141,4 +140,7 @@
<Name>IronPython</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(SolutionDir)Versioning.targets" /> <Target Name="BeforeBuild" DependsOnTargets="GenerateBuildInfo" /></Project>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Versioning.targets" />
<Target Name="BeforeBuild" DependsOnTargets="GenerateBuildInfo" />
</Project>
12 changes: 3 additions & 9 deletions Languages/IronPython/IronPython/Runtime/PythonContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public sealed partial class PythonContext : LanguageContext {
private readonly PythonOverloadResolverFactory _sharedOverloadResolverFactory;
private readonly PythonBinder _binder;
private readonly SysModuleDictionaryStorage _sysDict = new SysModuleDictionaryStorage();
#if FEATURE_ASSEMBLY_RESOLVE
#if FEATURE_ASSEMBLY_RESOLVE && FEATURE_FILESYSTEM
private readonly AssemblyResolveHolder _resolveHolder;
#if !CLR2
private readonly HashSet<Assembly> _loadedAssemblies = new HashSet<Assembly>();
Expand Down Expand Up @@ -1316,9 +1316,9 @@ internal ModuleGlobalCache GetModuleGlobalCache(string name) {
}

#region Assembly Loading
#if FEATURE_ASSEMBLY_RESOLVE && FEATURE_FILESYSTEM

internal Assembly LoadAssemblyFromFile(string file) {
#if FEATURE_ASSEMBLY_RESOLVE
// check all files in the path...
List path;
if (TryGetSystemPath(out path)) {
Expand All @@ -1335,17 +1335,11 @@ internal Assembly LoadAssemblyFromFile(string file) {
}
}
}
#endif
return null;
}

#if FEATURE_ASSEMBLY_RESOLVE
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadFile")]
#if CLR2
private static bool TryLoadAssemblyFromFileWithPath(string path, out Assembly res) {
#else
internal bool TryLoadAssemblyFromFileWithPath(string path, out Assembly res) {
#endif
if (File.Exists(path) && Path.IsPathRooted(path)) {
try {
res = Assembly.LoadFile(path);
Expand Down Expand Up @@ -1433,7 +1427,7 @@ public override void SetSearchPaths(ICollection<string> paths) {
public override void Shutdown() {
object callable;

#if FEATURE_ASSEMBLY_RESOLVE
#if FEATURE_ASSEMBLY_RESOLVE && FEATURE_FILESYSTEM
UnhookAssemblyResolve();
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
*
* ***************************************************************************/
#if !WIN8
#if !WIN8 && !SILVERLIGHT
using System.Xml;
using System.Xml.XPath;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Languages/IronPython/IronPythonTest/IronPythonTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<Compile Include="TypeDescriptor.cs" />
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup Condition=" '$(IsFullFramework)' == 'true' ">
<ItemGroup Condition=" '$(IsFullFramework)' == 'true' and '$(TargetFrameworkVersion)' != 'v3.5'" >
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Languages/Ruby/Libraries/Builtins/KernelOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public static void RaiseException(RubyContext/*!*/ context, object self) {
exception = new RuntimeError();
}

#if DEBUG && FEATURE_THREAD
#if DEBUG && FEATURE_THREAD && !SILVERLIGHT
if (RubyOptions.UseThreadAbortForSyncRaise) {
RubyUtils.RaiseAsyncException(Thread.CurrentThread, exception);
}
Expand All @@ -308,7 +308,7 @@ public static void RaiseException(RubyContext/*!*/ context, object self) {
public static void RaiseException(object self, [NotNull]MutableString/*!*/ message) {
Exception exception = RubyExceptionData.InitializeException(new RuntimeError(message.ToString()), message);

#if DEBUG && FEATURE_THREAD
#if DEBUG && FEATURE_THREAD && !SILVERLIGHT
if (RubyOptions.UseThreadAbortForSyncRaise) {
RubyUtils.RaiseAsyncException(Thread.CurrentThread, exception);
}
Expand All @@ -326,7 +326,7 @@ public static void RaiseException(RespondToStorage/*!*/ respondToStorage, UnaryO
object self, object/*!*/ obj, [Optional]object arg, [Optional]RubyArray backtrace) {

Exception exception = CreateExceptionToRaise(respondToStorage, storage0, storage1, setBackTraceStorage, obj, arg, backtrace);
#if DEBUG && FEATURE_THREAD
#if DEBUG && FEATURE_THREAD && !SILVERLIGHT
if (RubyOptions.UseThreadAbortForSyncRaise) {
RubyUtils.RaiseAsyncException(Thread.CurrentThread, exception);
}
Expand Down
4 changes: 2 additions & 2 deletions Languages/Ruby/Libraries/Initializers.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11978,12 +11978,12 @@ public sealed class Open3LibraryInitializer : IronRuby.Builtins.LibraryInitializ
protected override void LoadModules() {


#if !SILVERLIGHT
#if FEATURE_PROCESS
DefineGlobalModule("Open3", typeof(IronRuby.StandardLibrary.Open3.Open3), 0x00000008, null, LoadOpen3_Class, null, IronRuby.Builtins.RubyModule.EmptyArray);
#endif
}

#if !SILVERLIGHT
#if FEATURE_PROCESS
private static void LoadOpen3_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
DefineLibraryMethod(module, "popen3", 0x21,
0x00020004U,
Expand Down
4 changes: 2 additions & 2 deletions Languages/Ruby/Libraries/Open3/Open3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
*
* ***************************************************************************/
#if FEATURE_CRYPTOGRAPHY
#if FEATURE_PROCESS

using System.Diagnostics;
using IronRuby.Builtins;
Expand All @@ -21,7 +21,7 @@

namespace IronRuby.StandardLibrary.Open3 {

[RubyModule("Open3", BuildConfig = "!SILVERLIGHT")]
[RubyModule("Open3", BuildConfig = "FEATURE_PROCESS")]
public static class Open3 {
[RubyMethod("popen3", RubyMethodAttributes.PublicSingleton)]
public static RubyArray/*!*/ OpenPipe(
Expand Down
2 changes: 1 addition & 1 deletion Languages/Ruby/Ruby/Builtins/RubyClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ public void BuildObjectConstructionNoFlow(MetaObjectBuilder/*!*/ metaBuilder, Ca
}
}

private IEnumerable<OverloadInfo>/*!*/ GetConstructors(Type/*!*/ type) {
private IEnumerable<ReflectionOverloadInfo>/*!*/ GetConstructors(Type/*!*/ type) {
return
from ctor in type.GetDeclaredConstructors()
where !ctor.IsStatic && (Context.DomainManager.Configuration.PrivateBinding || ctor.IsPublic)
Expand Down
4 changes: 2 additions & 2 deletions Languages/Ruby/Samples/Tutorial/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ if ENV["DLR_ROOT"]
IRONRUBY_LIBS = "#{root}/Languages/Ruby/Libs"
GEMS = "#{root}/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems"

chiron = "#{root}/Bin/Silverlight3Debug/Chiron.exe"
chiron = "#{root}/Bin/Silverlight3Release/Chiron.exe" unless File.exist?(chiron)
chiron = "#{root}/Bin/Debug/Chiron.exe"
chiron = "#{root}/Bin/Release/Chiron.exe" unless File.exist?(chiron)
raise "Could not find Chiron.exe. Do you have a build of Silverlight? If not, type 'bsd'" unless File.exist?(chiron)
CHIRON = chiron
else
Expand Down
4 changes: 2 additions & 2 deletions Languages/Ruby/Scripts/CreateRelease.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ pushd Silverlight\bin
copy %SRC_SL_BIN%\Microsoft.Dynamic.dll .
copy %SRC_SL_BIN%\Microsoft.Scripting.dll .
copy %SRC_SL_BIN%\Microsoft.Scripting.Silverlight.dll .
copy %SRC_SL_BIN%\Chiron.exe .
copy %SRC_SL_BIN%\Chiron.exe.config .
copy %SRC_BIN%\Chiron.exe .
copy %SRC_BIN%\Chiron.exe.config .

copy %SRC_SL_BIN%\IronRuby.dll .
copy %SRC_SL_BIN%\IronRuby.Libraries.dll .
Expand Down
8 changes: 6 additions & 2 deletions Msi/Ruby/Msi/Silverlight.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
<File Name="Microsoft.Scripting.dll" />
<File Name="Microsoft.Dynamic.dll" />
<File Name="Microsoft.Scripting.Silverlight.dll" />
<File Name="Chiron.exe" />
<File Name="Chiron.exe.Config" />
<File Name="IronRuby.dll" />
<File Name="IronRuby.Libraries.dll" />
<File Name="IronRuby.Libraries.Yaml.dll" />
<File Name="System.Numerics.dll" />
</Component>
</Directory>
<Directory Id="Dir_Silverlight_bin" Name="bin" FileSource="$(var.OutputPath)">
<Component Id="Comp_Chiron" DiskId="1" Guid="504F28C5-1607-42FD-8425-4309699017C4">
<File Name="Chiron.exe" />
<File Name="Chiron.exe.Config" />
</Component>
</Directory>
<Directory Id="Dir_Silverlight_script" Name="script" FileSource="$(var.SilverlightScriptDir)">
<Component Id="Comp_SLScript" DiskId="1" Guid="AD564294-EAF6-44E2-994E-D6570B4546BC">
<File Name="server" />
Expand Down
Loading

0 comments on commit d8d9765

Please sign in to comment.