Skip to content

Commit

Permalink
Merge branch 'develop' into NoAddChildWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley authored Jun 30, 2023
2 parents 0c60240 + 0ba43c5 commit 3586d64
Show file tree
Hide file tree
Showing 1,538 changed files with 67,639 additions and 66,819 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ indent_style = tab
indent_size = 4
charset=utf-8
csharp_new_line_before_open_brace = all
csharp_indent_braces=false

[*.{csproj,vbproj,fsproj,proj,targets,props}]
indent_style = space
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
## Specifications

- Version:
- Platform(s): <!-- WPF, WinForms, Gtk2, Gtk3, Mac, XamMac, etc -->
- Platform(s): <!-- WPF, WinForms, Gtk, Mac64, XamMac2, etc -->
- Operating System(s): <!-- E.g. Windows 10, macOS 10.13, Ubuntu 18.04, etc -->

12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [ published ]

env:
DotNetVersion: "6.0.202"
DotNetVersion: "7.0.108"
BuildConfiguration: "Release"
BuildParameters: "build/Build.proj /v:Minimal /consoleLoggerParameters:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"

Expand All @@ -24,7 +24,7 @@ jobs:
submodules: true

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DotNetVersion }}

Expand Down Expand Up @@ -71,12 +71,15 @@ jobs:
submodules: true

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DotNetVersion }}

- name: Create global.json for the version we are using
run: del global.json || echo '{"sdk":{"version":"${{ env.DotNetVersion }}"}}' > global.json

- name: Install macos workload
run: sudo dotnet workload install macos
run: sudo dotnet workload install macos --from-rollback-file dotnet-workloads.json

- name: Setup Xamarin and XCode
uses: maxim-lobanov/setup-xamarin@v1
Expand Down Expand Up @@ -112,7 +115,6 @@ jobs:
path: |
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.XamMac2*.nupkg
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.macOS*.nupkg
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.Gtk2*.nupkg
- name: Upload test artifacts
uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- uses: dsaltares/fetch-gh-release-asset@master
with:
version: ${{ steps.get_version.outputs.VERSION }}
file: "*.nupkg"
file: ".*\\.nupkg"
regex: true
token: ${{ secrets.GITHUB_TOKEN }}

- name: Push packages to nuget.org
Expand Down
14 changes: 5 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"justMyCode": false
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.macOS",
Expand All @@ -47,8 +46,7 @@
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"justMyCode": false
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Gtk",
Expand Down Expand Up @@ -81,8 +79,7 @@
}
},
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"justMyCode": false
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Gtk2",
Expand All @@ -93,16 +90,15 @@
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"justMyCode": false
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Wpf",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-wpf",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Wpf/${config:var.configuration}/net6.0-windows/Eto.Test.Wpf.exe",
"targetArchitecture": "x86_64",
// "targetArchitecture": "x86_64",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
Expand Down
12 changes: 11 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,17 @@
"presentation": {
"clear": true
}
}
},
{
"label": "install-macos-workload",
"type": "shell",
"command": "sudo dotnet workload install macos --from-rollback-file dotnet-workloads.json",
"problemMatcher": "$msCompile",
"presentation": {
"clear": true,
"focus": true
}
}
],
"inputs": [
{
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Applications
------------
* [MonoGame Pipeline Tool](https://github.com/MonoGame/MonoGame) - Content manager for MonoGame
* [Manager](http://www.manager.io) - Accounting Software
* [PabloDraw](http://picoe.ca/products/pablodraw/alpha) - Character based drawing application
* [PabloDraw](http://picoe.ca/products/pablodraw) - Character based drawing application
* [Notedown](https://github.com/cwensley/Notedown) - Note taking application
* [Eto.Test](https://github.com/picoe/Eto/tree/master/test/Eto.Test) - Application to test the functionality of each widget
* [DWSIM](https://github.com/DanWBR/dwsim5) - Chemical Process Simulator
Expand Down Expand Up @@ -123,24 +123,21 @@ Assemblies
Your project only needs to reference Eto.dll, and include the corresponding platform assembly that you wish to target. To run on a Mac platform, you need to [bundle your app](https://github.com/picoe/Eto/wiki/Running-your-application).

* Eto.dll - Eto.Forms (UI), Eto.Drawing (Graphics), and platform loading
* Eto.Mac.dll - MonoMac platform for OS X using 32-bit mono
* Eto.Mac64.dll - MonoMac platform for OS X using 64-bit mono
* Eto.XamMac.dll - Xamarin.Mac Classic platform for OS X to embed mono
* Eto.XamMac2.dll - Xamarin.Mac Unified platform for OS X to embed mono
* Eto.macOS.dll - .NET 6 platform for OS X (for use with the net6.0-macos target)
* Eto.WinForms.dll - Windows Forms platform using GDI+ for graphics
* Eto.Direct2D.dll - Windows Forms platform using Direct2D for graphics
* Eto.Wpf.dll - Windows Presentation Foundation platform
* Eto.Gtk.dll - Gtk+3 platform for Mac, Windows, and Linux.
* Eto.Gtk2.dll - Gtk2 platform using gtk-sharp2 on Mac, Windows, and Linux.
* Eto.Gtk3.dll - [deprecated] Gtk3 platform for running on Linux with gtk-sharp3 package
* Eto.iOS.dll - Xamarin.iOS platform
* Eto.Android.dll - Xamarin.Android platform

Currently supported targets
---------------------------

* OS X: MonoMac or Xamarin.Mac
* Linux: GTK# 2 or 3
* OS X: MonoMac, Xamarin.Mac, or net6.0-macos
* Linux: GTK+ 3
* Windows: Windows Forms (using GDI or Direct2D) or WPF

Under development
Expand Down
73 changes: 54 additions & 19 deletions build/Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -200,41 +200,75 @@
<Framework Include="net48" Value="net48" />

<OtherOptions Include="none" Value="" />
<OtherOptions Include="macos" Value="-macos" />
<OtherOptions Include="wf" Value="-wf" />
<OtherOptions Include="wf_macos" Value="-wf -macos" />
<OtherOptions Include="wf_xm" Value="-wf -xm" />
<OtherOptions Include="xm" Value="-xm" />

<CombinedProject1 Include="*" LanguageId="%(Language.Identity)" Language="%(Language.Value)" />
<CombinedProject2 Include="@(CombinedProject1)" ModeId="%(Mode.Identity)" Mode="%(Mode.Identity)" />
<CombinedProject3 Include="@(CombinedProject2)" CombinedId="%(Combined.Identity)" Combined="%(Combined.Value)" />
<CombinedProject4 Include="@(CombinedProject3)" FrameworkId="%(Framework.Identity)" Framework="%(Framework.Value)" />
<CombinedProject Include="@(CombinedProject4)" OtherId="%(OtherOptions.Identity)" Other="%(OtherOptions.Value)" />
<CombinedProject2 Include="@(CombinedProject1)" CombinedId="%(Combined.Identity)" Combined="%(Combined.Value)" />
<CombinedProject3 Include="@(CombinedProject2)" FrameworkId="%(Framework.Identity)" Framework="%(Framework.Value)" />
<CombinedProject4 Include="@(CombinedProject3)" OtherId="%(OtherOptions.Identity)" Other="%(OtherOptions.Value)" />
<CombinedProject Include="@(CombinedProject4)" ModeId="%(Mode.Identity)" Mode="%(Mode.Identity)" />
<CombinedProject Update="@(CombinedProject)"
OutputPath="$(ArtifactsDir)templates\App.%(LanguageId)-%(CombinedId)-%(OtherId)-%(ModeId)-%(FrameworkId)"
BuildCommand="&amp;&amp; dotnet build" />
ProjectName="App.%(LanguageId)-%(CombinedId)-%(OtherId)-%(ModeId)-%(FrameworkId)" />

<!-- Combined Rules -->

<!-- By default, use dotnet build to build combined project-->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'combined'"
BuildCommand="&amp;&amp; dotnet build" />
<!-- Xamarin.Mac doesn't support VB -->
<CombinedProject Remove="@(CombinedProject)" Condition="%(CombinedId) == 'combined' and %(LanguageId) == 'vb' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm')" />
<CombinedProject Remove="@(CombinedProject)"
Condition="%(CombinedId) == 'combined' and %(LanguageId) == 'vb' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm')" />
<!-- Xamarin.Mac only supports net4x -->
<CombinedProject Remove="@(CombinedProject)"
Condition="$([MSBuild]::IsOSPlatform(osx)) and %(CombinedId) == 'combined' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm') and %(FrameworkId) != 'net48'" />
<!-- Xamarin.Mac can only use dotnet to build in C#, F# requires msbuild -->
<CombinedProject Update="@(CombinedProject)"
Condition="$([MSBuild]::IsOSPlatform(osx)) and %(CombinedId) == 'combined' and (%(LanguageId) != 'cs' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm'))"
BuildCommand='&amp;&amp; env -i HOME="$HOME" bash -l -c "msbuild /restore /v:Minimal"' />
<!-- macos doesn't support VB -->
<CombinedProject Remove="@(CombinedProject)"
Condition="%(CombinedId) == 'combined' and %(LanguageId) == 'vb' and (%(OtherId) == 'macos' or %(OtherId) == 'wf_macos')" />
<!-- Wpf doesn't support F# -->
<CombinedProject Remove="@(CombinedProject)" Condition="%(LanguageId) == 'fs' and (%(OtherId) == 'none' or %(OtherId) == 'xm')" />
<CombinedProject Remove="@(CombinedProject)"
Condition="$([MSBuild]::IsOSPlatform(Windows)) and %(CombinedId) == 'combined' and %(LanguageId) == 'fs' and (%(OtherId) != 'wf_macos' and %(OtherId) != 'wf' and %(OtherId) != 'wf_xm')" />

<!-- Separate Rules -->

<!-- Can only build wpf/winforms .NET 5 projects on windows.. :( -->
<!-- Build Wpf on Windows -->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'separate' and !$([MSBuild]::IsOSPlatform(Windows))"
BuildCommand="&amp;&amp; dotnet build **/*.Mac.*proj &amp;&amp;dotnet build **/*.Gtk.*proj" />
Condition="%(CombinedId) == 'separate' and $([MSBuild]::IsOSPlatform(Windows))"
BuildCommand="&amp;&amp; cd %(ProjectName).Wpf &amp;&amp; dotnet build &amp;&amp; cd .." />

<!-- Xamarin.Mac separate projects require msbuild -->
<CombinedProject Update="@(CombinedProject)" Condition="%(CombinedId) == 'separate' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm')"
BuildCommand='%(BuildCommand) &amp;&amp;env -i HOME="$HOME" bash -l -c "msbuild /restore /v:Minimal **/*.XamMac.*proj"' />
<!-- Build WinForms on Windows -->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'separate' and $([MSBuild]::IsOSPlatform(Windows)) and ( %(OtherId) == 'wf_macos' or %(OtherId) == 'wf' or %(OtherId) == 'wf_xm' )"
BuildCommand="%(BuildCommand) &amp;&amp; cd %(ProjectName).WinForms &amp;&amp; dotnet build &amp;&amp; cd .." />

<!-- Xamarin.Mac combined doesn't support building with dotnet other than csharp :( -->
<CombinedProject Update="@(CombinedProject)" Condition="%(CombinedId) == 'combined' and (%(LanguageId) != 'cs' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm'))"
BuildCommand='&amp;&amp; env -i HOME="$HOME" bash -l -c "msbuild /restore /v:Minimal"' />
<!-- Build Mac -->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'separate'"
BuildCommand="%(BuildCommand) &amp;&amp; cd %(ProjectName).Mac &amp;&amp; dotnet build &amp;&amp; cd .." />

<!-- Build Gtk -->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'separate'"
BuildCommand="%(BuildCommand) &amp;&amp; cd %(ProjectName).Gtk &amp;&amp; dotnet build &amp;&amp; cd .." />

<!-- Build Xamarin.Mac with msbuild on Mac only -->
<CombinedProject Update="@(CombinedProject)"
Condition="$([MSBuild]::IsOSPlatform(osx)) and %(CombinedId) == 'separate' and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm')"
BuildCommand='%(BuildCommand) &amp;&amp;env -i HOME="$HOME" bash -l -c "msbuild /restore /v:Minimal **/*.XamMac.*proj"' />

<!-- Only build Xamarin.Mac on Mac -->
<CombinedProject Update="@(CombinedProject)" Condition="!$([MSBuild]::IsOSPlatform(OSX)) and (%(OtherId) == 'xm' or %(OtherId) == 'wf_xm')"
BuildCommand="" />
<!-- Build MacOS on Mac only -->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'separate' and $([MSBuild]::IsOSPlatform(osx)) and (%(OtherId) == 'macos' or %(OtherId) == 'wf_macos')"
BuildCommand="%(BuildCommand) &amp;&amp; dotnet build **/*.MacOS.*proj" />

</ItemGroup>

Expand All @@ -260,6 +294,7 @@
<RemoveDir Directories="$(ArtifactsDir)mac-publish"/>

<!-- install the current version of the templates -->
<Exec Command="dotnet new -u Eto.Forms.Templates" />
<Exec Command="dotnet new -i $(PackageOutputPath)Eto.Forms.Templates.$(InformationalVersion).nupkg" />

<!-- generate project templates -->
Expand Down
29 changes: 29 additions & 0 deletions build/Common.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,42 @@

<!-- Ignore errors/warnings about semver 2.0 when packing CI builds -->
<NoWarn>$(NoWarn);NU5105</NoWarn>
<LangVersion Condition="$(MSBuildProjectExtension) == '.csproj'">10</LangVersion>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

<!-- support t4 templates in projects -->
<ItemGroup>
<TextTemplate Include="**\*.tt" />
<AvailableItemName Include="TextTemplate" />
</ItemGroup>

<ItemGroup Condition="$(UseGlobalUsings) == 'true'">
<Using Include="System" />
<Using Include="System.Collections" />
<Using Include="System.Collections.Generic" />
<Using Include="System.Collections.ObjectModel" />
<Using Include="System.Collections.Specialized" />
<Using Include="System.ComponentModel" />
<Using Include="System.Diagnostics" />
<Using Include="System.Globalization" />
<Using Include="System.IO" />
<Using Include="System.Linq" />
<Using Include="System.Linq.Expressions" />
<Using Include="System.Reflection" />
<Using Include="System.Runtime.InteropServices" />
<Using Include="System.Runtime.Serialization" />
<Using Include="System.Text" />
<Using Include="System.Text.RegularExpressions" />
<Using Include="System.Threading" />
<Using Include="System.Threading.Tasks" />
<Using Include="Eto.Forms" />
<Using Include="Eto.Drawing" />
<Using Include="Eto.Forms.Container" Alias="Container" />
<Using Include="Eto.Forms.Calendar" Alias="Calendar" />
<Using Include="System.ComponentModel" Alias="sc" />
<Using Include="System.Windows.Input.ICommand" Alias="ICommand" />
</ItemGroup>

<Import Condition="Exists('$(BasePath)..\Eto.Common.props')" Project="$(BasePath)..\Eto.Common.props" />
</Project>
4 changes: 2 additions & 2 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<HasXamarinMac Condition="$(HasXamarinMac) == ''">True</HasXamarinMac> <!-- VS for Mac needs this, Exists isn't evaluated -->

<ArtifactsDir Condition="$(BuildOutoutDir) == ''">$(BasePath)artifacts\</ArtifactsDir>
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(BasePath)artifacts\obj\$(OSPlatform)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(ArtifactsDir)obj\$(OSPlatform)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<SourceDir Condition="$(SourceDir) == ''">$(BasePath)src\</SourceDir>
<NugetDir Condition="$(NugetDir) == ''">$(SourceDir)</NugetDir>
<PackageOutputPath>$(ArtifactsDir)nuget\$(Configuration)\</PackageOutputPath>
Expand All @@ -27,7 +27,7 @@
<PropertyGroup>
<!-- global nuget/assembly properties -->

<DevVersion>2.7.1</DevVersion>
<DevVersion>2.7.2</DevVersion>

<Version Condition="$(Version) == ''">2.7.0.0</Version>

Expand Down
3 changes: 3 additions & 0 deletions dotnet-workloads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"microsoft.net.sdk.macos": "12.3.2372"
}
2 changes: 1 addition & 1 deletion lib/monomac
2 changes: 1 addition & 1 deletion samples/SdkTest/SdkTest.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Eto.Forms/2.7.1-dev">
<Project Sdk="Eto.Forms/2.7.2-dev">

<!--
Set the BuildPlatform property to the Eto platform you wish to build for.
Expand Down
6 changes: 5 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseGlobalUsings>true</UseGlobalUsings>
</PropertyGroup>

<Import Project="..\build\Common.Build.props" />
<PropertyGroup>
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(BasePath)artifacts\core\$(MSBuildProjectName)\</BaseOutputPath>
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(ArtifactsDir)core\$(MSBuildProjectName)\</BaseOutputPath>
</PropertyGroup>
</Project>
Loading

0 comments on commit 3586d64

Please sign in to comment.