Browse Source

Added IronRuby WPF application and file templates.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6381 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Matt Ward 15 years ago
parent
commit
d26cbb04a1
  1. 6
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/RubyBinding.csproj
  2. 90
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/WPFApplication.xpt
  3. 26
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/WPFWindow.xft
  4. 6
      src/Setup/Files.wxs
  5. 2
      src/Setup/Setup.wxs

6
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/RubyBinding.csproj

@ -171,6 +171,12 @@ @@ -171,6 +171,12 @@
<None Include="Templates\LibraryProject.xpt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Templates\WPFApplication.xpt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Templates\WPFWindow.xft">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestRunner\sdselectedtestsfile.rb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

90
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/WPFApplication.xpt

@ -0,0 +1,90 @@ @@ -0,0 +1,90 @@
<?xml version="1.0"?>
<Template originator="Matt Ward">
<TemplateConfiguration>
<Name>${res:Templates.Project.WinFXApplication.Name}</Name>
<Category>Ruby</Category>
<Icon>Ruby.Template.WinFormsProject</Icon>
<Description>${res:Templates.Project.WinFXApplication.Description}</Description>
<SupportedTargetFrameworks>v3.0</SupportedTargetFrameworks>
</TemplateConfiguration>
<!-- Actions -->
<Actions>
<Open filename="Window1.xaml"/>
</Actions>
<!-- Template Content -->
<Project language="Ruby">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<MainFile>Application.rb</MainFile>
<DebugInfo>True</DebugInfo>
<StartArguments>-1.9 -D Application.rb</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>
</PropertyGroup>
<PropertyGroup configuration="Release" escapeValue="false">
<OutputType>WinExe</OutputType>
<MainFile>Application.rb</MainFile>
<StartArguments>-1.9 Application.py</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>
</PropertyGroup>
<ProjectItems>
<Reference Include="mscorlib"/>
<Reference Include="System"/>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="IronRuby">
<HintPath>${addinpath:ICSharpCode.RubyBinding}\IronRuby.dll</HintPath>
</Reference>
</ProjectItems>
<Files>
<File
name="Application.rb"
SubType="Code">
<![CDATA[require "mscorlib"
require "PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Window = System::Windows::Window
Application = System::Windows::Application
FileStream = System::IO::FileStream
XamlReader = System::Windows::Markup::XamlReader
FileMode = System::IO::FileMode
stream = FileStream.new('Window1.xaml', FileMode.Open)
window = XamlReader.Load(stream)
app = Application.new()
app.Run(window)
]]></File>
<File
name="Window1.xaml"
buildAction="None"
language="XML">
<![CDATA[<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="${StandardNamespace}"
Height="300"
Width="300">
<Grid>
</Grid>
</Window>]]></File>
</Files>
</Project>
</Template>

26
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/WPFWindow.xft

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
<Template author="Matt Ward" version="1.0">
<Config
name = "${res:Templates.File.WinFXWindow.Name}"
icon = "Ruby.Template.Form"
category = "Ruby"
defaultname = "Window${Number}.xaml"
language = "Ruby"/>
<Description>${res:Templates.File.WinFXWindow.Description}</Description>
<Files>
<File
name="${FullName}"
language="XML"
buildAction="None">
<![CDATA[<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="${ClassName}" Height="300" Width="300">
<Grid>
</Grid>
</Window>]]></File>
</Files>
<AdditionalOptions/>
</Template>

6
src/Setup/Files.wxs

@ -1163,6 +1163,12 @@ @@ -1163,6 +1163,12 @@
<Component Guid="BDB0208E-B04F-42F5-B3FB-97F77D6C4C7B" Id="RubyLibraryProjectTemplate" DiskId="1">
<File Source="..\..\AddIns\BackendBindings\RubyBinding\Templates\LibraryProject.xpt" Name="LibraryProject.xpt" Id="LibraryProject.xpt" KeyPath="yes" />
</Component>
<Component Id="RubyWPFApplicationProjectTemplate" Guid="758A30A3-10EF-44A8-BD05-F55043D8CCC5" DiskId="1">
<File Id="Ruby.WPFApplication.xpt" Name="WPFApplication.xpt" Source="..\..\AddIns\BackendBindings\RubyBinding\Templates\WPFApplication.xpt" KeyPath="yes" />
</Component>
<Component Id="RubyWPFWindowFileTemplate" Guid="F2CD996D-B165-4F30-B70F-33DC1841610D" DiskId="1">
<File Id="Ruby.WPFWindow.xft" Name="WPFWindow.xft" Source="..\..\AddIns\BackendBindings\RubyBinding\Templates\WPFWindow.xft" KeyPath="yes" />
</Component>
</Directory>
<Directory Id="RubyBindingTestRunner" Name="TestRunner">
<Component Id="RubyBindingSdSelectedTestsFileRb" Guid="8F37FDB9-ED10-4A13-857A-FD0BD7231D13" DiskId="1">

2
src/Setup/Setup.wxs

@ -437,6 +437,8 @@ @@ -437,6 +437,8 @@
<ComponentRef Id="RubyEmptyUserControlFileTemplate"/>
<ComponentRef Id="RubyFormsProjectTemplate"/>
<ComponentRef Id="RubyLibraryProjectTemplate"/>
<ComponentRef Id="RubyWPFApplicationProjectTemplate"/>
<ComponentRef Id="RubyWPFWindowFileTemplate"/>
<ComponentRef Id="RubyBindingSdSelectedTestsFileRb"/>
<ComponentRef Id="RubyBindingSdTestRb"/>
<ComponentRef Id="RubyBindingSdTestResultRb"/>

Loading…
Cancel
Save