Browse Source

Reference Boo.Lang.Useful by default. Automatically copy Boo.Lang.dll to the output directory.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@650 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
e402835d8b
  1. 32
      src/AddIns/BackendBindings/Boo/Boo.Microsoft.Build.Tasks/Boo.Microsoft.Build.targets
  2. 7
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs
  3. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/ConsoleProject.xpt
  4. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/FormsProject.xpt
  5. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/Library.xpt

32
src/AddIns/BackendBindings/Boo/Boo.Microsoft.Build.Tasks/Boo.Microsoft.Build.targets

@ -147,17 +147,6 @@
</PropertyGroup> </PropertyGroup>
<!--
These two compiler warnings are raised when a reference is bound to
a different version than specified in the assembly reference version
number. MSBuild raises the same warning in this case, so the compiler
warning would be redundant.
-->
<PropertyGroup Condition="'$(TargetFrameworkVersion)' != 'v1.0'">
<NoWarn Condition="'$(NoWarn)' != ''">$(NoWarn);</NoWarn>
<NoWarn>$(NoWarn)1701;1702</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<DocFileItem <DocFileItem
Include="$(DocumentationFile)" Include="$(DocumentationFile)"
@ -173,6 +162,13 @@
</CoreCompileDependsOn> </CoreCompileDependsOn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(BoocToolPath)' != '' ">
<ReferencePath>$(ReferencePath);$(BoocToolPath)</ReferencePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(BoocToolPath)' == '' ">
<ReferencePath>$(ReferencePath);$(BooBinPath)</ReferencePath>
</PropertyGroup>
<Target <Target
Name="CoreCompile" Name="CoreCompile"
Inputs="$(MSBuildAllProjects); Inputs="$(MSBuildAllProjects);
@ -192,8 +188,7 @@
<Booc <Booc
OutputAssembly="@(IntermediateAssembly)" OutputAssembly="@(IntermediateAssembly)"
References="@(ReferencePath)" References="@(ReferencePath)"
Resources= " Resources= "@(ManifestResourceWithNoCulture);
@(ManifestResourceWithNoCulture);
@(ManifestNonResxWithNoCultureOnDisk); @(ManifestNonResxWithNoCultureOnDisk);
@(CompiledLicenseFile)" @(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)" ResponseFiles="$(CompilerResponseFile)"
@ -206,6 +201,17 @@
SourceDirectory="$(SourceDirectory)" SourceDirectory="$(SourceDirectory)"
/> />
<Copy
Condition=" '$(BoocToolPath)' == '' "
SkipUnchangedFiles="true"
SourceFiles="$(BooBinPath)\Boo.Lang.dll"
DestinationFolder="$(OutputPath)"/>
<Copy
Condition=" '$(BoocToolPath)' != '' "
SkipUnchangedFiles="true"
SourceFiles="$(BoocToolPath)\Boo.Lang.dll"
DestinationFolder="$(OutputPath)"/>
</Target> </Target>
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />

7
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs

@ -51,6 +51,7 @@ namespace Grunwald.BooBinding
} }
internal static IProjectContent BooCompilerPC; internal static IProjectContent BooCompilerPC;
internal static IProjectContent BooUsefulPC;
public override ParseProjectContent CreateProjectContent() public override ParseProjectContent CreateProjectContent()
{ {
@ -59,10 +60,14 @@ namespace Grunwald.BooBinding
pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference(systemItem)); pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference(systemItem));
ReferenceProjectItem booLangItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Builtins).Assembly.Location); ReferenceProjectItem booLangItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Builtins).Assembly.Location);
pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference(booLangItem)); pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference(booLangItem));
if (BooCompilerPC == null) {
ReferenceProjectItem booCompilerItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Compiler.AbstractAstAttribute).Assembly.Location); ReferenceProjectItem booCompilerItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Compiler.AbstractAstAttribute).Assembly.Location);
BooCompilerPC = ProjectContentRegistry.GetProjectContentForReference(booCompilerItem); BooCompilerPC = ProjectContentRegistry.GetProjectContentForReference(booCompilerItem);
}
if (BooUsefulPC == null) {
ReferenceProjectItem booUsefulItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Useful.Attributes.SingletonAttribute).Assembly.Location); ReferenceProjectItem booUsefulItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Useful.Attributes.SingletonAttribute).Assembly.Location);
pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference(booUsefulItem)); BooUsefulPC = ProjectContentRegistry.GetProjectContentForReference(booUsefulItem);
}
pc.DefaultImports = new DefaultUsing(pc); pc.DefaultImports = new DefaultUsing(pc);
pc.DefaultImports.Usings.Add("Boo.Lang.Builtins"); pc.DefaultImports.Usings.Add("Boo.Lang.Builtins");
return pc; return pc;

1
src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/ConsoleProject.xpt

@ -23,6 +23,7 @@
<ProjectItems> <ProjectItems>
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Boo.Lang.Useful" />
</ProjectItems> </ProjectItems>
<Files> <Files>

1
src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/FormsProject.xpt

@ -25,6 +25,7 @@
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Boo.Lang.Useful" />
</ProjectItems> </ProjectItems>
<Files> <Files>

1
src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/Library.xpt

@ -22,6 +22,7 @@
<ProjectItems> <ProjectItems>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Boo.Lang.Useful" />
</ProjectItems> </ProjectItems>
<Files> <Files>

Loading…
Cancel
Save