Skip to content

Commit

Permalink
Migrate samples from Gtk2 to Gtk
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Dec 20, 2019
1 parent 24dcdb0 commit cb9f24f
Show file tree
Hide file tree
Showing 25 changed files with 111 additions and 547 deletions.
26 changes: 13 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ variables:
build.version: 2.5.0-ci-$(build.increment)
build.configuration: Release
build.arguments: /t:Package /p:Configuration=$(build.configuration) /p:BuildVersion=$(build.version) /p:Branch=$(Build.SourceBranch)
build.dotnetversion: 3.1.100
build.xamarinversion: 6_4_0

trigger:
branches:
Expand All @@ -16,11 +18,18 @@ trigger:
jobs:
- job: Mac
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.14'

steps:
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(build.xamarinversion)
displayName: 'Select Xamarin SDK version'

- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:
packageType: sdk
version: $(build.dotnetversion)

- task: msbuild@1
displayName: Build and Package
inputs:
Expand Down Expand Up @@ -71,23 +80,14 @@ jobs:

- job: Windows
pool:
vmImage: 'VS2017-Win2016'
vmImage: 'windows-2019'

steps:
- powershell: |
Write-Host "##vso[task.setvariable variable=DOTNET_SDK_VERSION]3.0.100"
displayName: Set .NET Core SDK version to install
- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:
packageType: sdk
version: $(DOTNET_SDK_VERSION)
- powershell: |
$DOTNET_CLI_COMMAND = Get-Command -CommandType Application dotnet | Select-Object -First 1
$DOTNET_ROOT = (Join-Path -Resolve $DOTNET_CLI_COMMAND.Path ..)
$MSBuildSDKsPath = (Join-Path -Resolve $DOTNET_ROOT sdk/$ENV:DOTNET_SDK_VERSION/Sdks)
Write-Host "##vso[task.setvariable variable=MSBuildSDKsPath]$MSBuildSDKsPath"
displayName: Add installed .NET Core SDKs to MSBuild SDK lookup path
version: $(build.dotnetversion)

- task: msbuild@1
displayName: Build and Package
Expand Down
95 changes: 13 additions & 82 deletions samples/Gtk/EmbedEtoInGtk/EmbedEtoInGtk.csproj
Original file line number Diff line number Diff line change
@@ -1,90 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{27E7436C-0B29-430C-9A21-A5812FC72311}</ProjectGuid>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>EmbedEtoInGtk</RootNamespace>
<AssemblyName>EmbedEtoInGtk</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FixGtkReferences Condition="$(FixGtkReferences)==''">true</FixGtkReferences>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\artifacts\samples\Debug\net461</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<StartAction>Project</StartAction>
<ExternalConsole>true</ExternalConsole>
<EnvironmentVariables>
<Variable name="DYLD_FALLBACK_LIBRARY_PATH" value="/usr/local/lib" />
</EnvironmentVariables>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\artifacts\samples\Release\net461</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>gtk-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>gdk-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>glib-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>glade-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>pango-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>atk-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="Mono.Posix" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="MainWindow.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MyEtoPanel.cs" />
<Compile Include="gtk-gui\EmbedEtoInGtk.MainWindow.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

<ItemGroup>
<ProjectReference Include="..\..\..\src\Eto\Eto.csproj">
<Project>{35EF0A4E-2A1A-492C-8BED-106774EA09F2}</Project>
<Name>Eto</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Eto.Gtk\Eto.Gtk2.csproj">
<Project>{80915A80-CA54-11E3-9C1A-0800200C9A66}</Project>
<Name>Eto.Gtk2</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Eto\Eto.csproj" />
<ProjectReference Include="..\..\..\src\Eto.Gtk\Eto.Gtk.csproj" />
</ItemGroup>
</Project>
11 changes: 8 additions & 3 deletions samples/Gtk/EmbedEtoInGtk/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@

namespace EmbedEtoInGtk
{
public partial class MainWindow: Gtk.Window

public class MainWindow: Gtk.Window
{
public MainWindow() : base(Gtk.WindowType.Toplevel)
{
Build();
Title = "EmbedEtoInGtk.MainWindow";
WindowPosition = Gtk.WindowPosition.CenterOnParent;
DefaultWidth = 423;
DefaultHeight = 312;
DeleteEvent += OnDeleteEvent;

var nativeWidget = new MyEtoPanel().ToNative(true);

this.Child = nativeWidget;
Child = nativeWidget;
}

protected void OnDeleteEvent(object sender, DeleteEventArgs a)
Expand Down
27 changes: 0 additions & 27 deletions samples/Gtk/EmbedEtoInGtk/Properties/AssemblyInfo.cs

This file was deleted.

23 changes: 0 additions & 23 deletions samples/Gtk/EmbedEtoInGtk/gtk-gui/EmbedEtoInGtk.MainWindow.cs

This file was deleted.

30 changes: 0 additions & 30 deletions samples/Gtk/EmbedEtoInGtk/gtk-gui/generated.cs

This file was deleted.

20 changes: 0 additions & 20 deletions samples/Gtk/EmbedEtoInGtk/gtk-gui/gui.stetic

This file was deleted.

95 changes: 13 additions & 82 deletions samples/Gtk/EmbedGtkInEto/EmbedGtkInEto.csproj
Original file line number Diff line number Diff line change
@@ -1,90 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8096E21D-28E4-4A1B-973A-B60EC23C3772}</ProjectGuid>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>EmbedGtkInEto</RootNamespace>
<AssemblyName>EmbedGtkInEto</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FixGtkReferences Condition="$(FixGtkReferences)==''">true</FixGtkReferences>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\artifacts\samples\Debug\net461</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<StartAction>Project</StartAction>
<ExternalConsole>true</ExternalConsole>
<EnvironmentVariables>
<Variable name="DYLD_FALLBACK_LIBRARY_PATH" value="/usr/local/lib" />
</EnvironmentVariables>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\artifacts\samples\Release\net461</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>gtk-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>gdk-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>glib-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>glade-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>pango-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Name>atk-sharp</Name>
<PackageVersion>2.0</PackageVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="Mono.Posix" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MainForm.cs" />
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="MyNativeWidget.cs" />
<Compile Include="gtk-gui\EmbedGtkInEto.MyNativeWidget.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\..\..\src\Eto\Eto.csproj">
<Project>{35EF0A4E-2A1A-492C-8BED-106774EA09F2}</Project>
<Name>Eto</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Eto.Gtk\Eto.Gtk2.csproj">
<Project>{80915A80-CA54-11E3-9C1A-0800200C9A66}</Project>
<Name>Eto.Gtk2</Name>
</ProjectReference>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
<ProjectReference Include="..\..\..\src\Eto\Eto.csproj" />
<ProjectReference Include="..\..\..\src\Eto.Gtk\Eto.Gtk.csproj" />
</ItemGroup>
</Project>
Loading

0 comments on commit cb9f24f

Please sign in to comment.