Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Xamarin.Mac platform #2629

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, Gtk, Mac64, XamMac2, etc -->
- Platform(s): <!-- WPF, WinForms, Gtk, Mac64, macOS, etc -->
- Operating System(s): <!-- E.g. Windows 10, macOS 10.13, Ubuntu 18.04, etc -->

19 changes: 6 additions & 13 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: "7.0.108"
DotNetVersion: "7.0.116"
BuildConfiguration: "Release"
BuildParameters: "build/Build.proj /v:Minimal /consoleLoggerParameters:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"

Expand All @@ -28,9 +28,6 @@ jobs:
with:
dotnet-version: ${{ env.DotNetVersion }}

- name: Setup msbuild
uses: microsoft/setup-msbuild@v1

- name: Build
run: dotnet build ${{ env.BuildParameters }} /p:Platform=Windows /t:Build /bl:artifacts/log/Build.Windows.binlog

Expand Down Expand Up @@ -63,7 +60,7 @@ jobs:

build-mac:

runs-on: macos-11
runs-on: macos-14

steps:
- uses: actions/checkout@v2
Expand All @@ -81,13 +78,11 @@ jobs:
- name: Install macos workload
run: sudo dotnet workload install macos --from-rollback-file dotnet-workloads.json

- name: Setup Xamarin and XCode
uses: maxim-lobanov/setup-xamarin@v1
- name: Setup XCode
uses: maxim-lobanov/setup-xcode@v1
with:
mono-version: latest
xamarin-mac-version: latest
xcode-version: latest

xcode-version: latest-stable

- name: Import code signing certificate
if: github.event_name != 'pull_request'
uses: apple-actions/import-codesign-certs@v1
Expand All @@ -113,7 +108,6 @@ jobs:
with:
name: nuget
path: |
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.XamMac2*.nupkg
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.macOS*.nupkg

- name: Upload test artifacts
Expand All @@ -122,7 +116,6 @@ jobs:
name: test
path: |
artifacts/test/Eto.Test.Mac64/${{ env.BuildConfiguration }}/**/Eto.Test.Mac64.dmg
artifacts/test/Eto.Test.XamMac2/${{ env.BuildConfiguration }}/**/Eto.Test.XamMac2.app
artifacts/test/Eto.Test.macOS/${{ env.BuildConfiguration }}/*/Eto.Test.macOS.app

- name: Upload log files
Expand Down
24 changes: 6 additions & 18 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-mac64",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Mac64/${config:var.configuration}/net6.0/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Mac64/${config:var.configuration}/net7.0/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
// "targetArchitecture": "x86_64", // uncomment to test intel on M1
"args": [],
"console": "internalConsole",
Expand All @@ -30,30 +30,18 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-macos",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.macOS/${config:var.configuration}/net6.0-macos/Eto.Test.macOS.app/Contents/MacOS/Eto.Test.macOS",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.macOS/${config:var.configuration}/net7.0-macos/Eto.Test.macOS.app/Contents/MacOS/Eto.Test.macOS",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"justMyCode": false
},
{
"name": "Eto.Test.XamMac2 - mono",
"type": "mono",
"request": "launch",
"preLaunchTask": "build-xammac2",
"program": ".",
"runtimeExecutable": "${workspaceFolder}/artifacts/test/Eto.Test.XamMac2/${config:var.configuration}/net48/Eto.Test.XamMac2.app/Contents/MacOS/Eto.Test.XamMac2",
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Gtk",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-gtk",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Gtk/${config:var.configuration}/net6.0/Eto.Test.Gtk.dll",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Gtk/${config:var.configuration}/net7.0/Eto.Test.Gtk.dll",
"args": [],
"osx": {
"env": {
Expand Down Expand Up @@ -97,7 +85,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-wpf",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Wpf/${config:var.configuration}/net6.0-windows/Eto.Test.Wpf.exe",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Wpf/${config:var.configuration}/net7.0-windows/Eto.Test.Wpf.exe",
// "targetArchitecture": "x86_64",
"args": [],
"console": "internalConsole",
Expand All @@ -120,7 +108,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-winforms",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.WinForms/${config:var.configuration}/net6.0-windows/Eto.Test.WinForms.exe",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.WinForms/${config:var.configuration}/net7.0-windows/Eto.Test.WinForms.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
Expand All @@ -142,7 +130,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-direct2d",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Direct2D/${config:var.configuration}/net6.0-windows/Eto.Test.Direct2D.exe",
"program": "${workspaceFolder}/artifacts/test/Eto.Test.Direct2D/${config:var.configuration}/net7.0-windows/Eto.Test.Direct2D.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
Expand Down
10 changes: 0 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,6 @@
"clear": true
}
},
{
"label": "build-xammac2",
"command": "dotnet build ${config:var.buildProperties} /p:Configuration=${config:var.configuration} ${workspaceFolder}/test/Eto.Test.Mac/Eto.Test.XamMac2.csproj",
"type": "shell",
"group": "build",
"problemMatcher": "$msCompile",
"presentation": {
"clear": true
}
},
{
"label": "build-wpf",
"command": "dotnet build ${config:var.buildProperties} /p:Configuration=${config:var.configuration} ${workspaceFolder}/test/Eto.Test.Wpf/Eto.Test.Wpf.csproj",
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ Your project only needs to reference Eto.dll, and include the corresponding plat

* Eto.dll - Eto.Forms (UI), Eto.Drawing (Graphics), and platform loading
* Eto.Mac64.dll - Lightweight Mac platform using .NET 6+ or mono
* Eto.XamMac2.dll - Xamarin.Mac Unified platform for Mac to embed mono
* Eto.macOS.dll - .NET 6+ platform for Mac (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
Expand All @@ -137,7 +136,7 @@ Your project only needs to reference Eto.dll, and include the corresponding plat
Currently supported targets
---------------------------

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

Expand Down
35 changes: 9 additions & 26 deletions build/Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@
<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)" CombinedId="%(Combined.Identity)" Combined="%(Combined.Value)" />
Expand All @@ -221,33 +219,23 @@
<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')" />
<!-- 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="$([MSBuild]::IsOSPlatform(Windows)) and %(CombinedId) == 'combined' and %(LanguageId) == 'fs' and (%(OtherId) != 'wf_macos' and %(OtherId) != 'wf' and %(OtherId) != 'wf_xm')" />
Condition="$([MSBuild]::IsOSPlatform(Windows)) and %(CombinedId) == 'combined' and %(LanguageId) == 'fs' and (%(OtherId) != 'wf_macos' and %(OtherId) != 'wf')" />

<!-- Separate Rules -->

<!-- Build Wpf on Windows -->
<CombinedProject Update="@(CombinedProject)"
Condition="%(CombinedId) == 'separate' and $([MSBuild]::IsOSPlatform(Windows))"
Condition="%(CombinedId) == 'separate'"
BuildCommand="&amp;&amp; cd %(ProjectName).Wpf &amp;&amp; dotnet build &amp;&amp; cd .." />

<!-- 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' )"
Condition="%(CombinedId) == 'separate' and ( %(OtherId) == 'wf_macos' or %(OtherId) == 'wf' )"
BuildCommand="%(BuildCommand) &amp;&amp; cd %(ProjectName).WinForms &amp;&amp; dotnet build &amp;&amp; cd .." />

<!-- Build Mac -->
Expand All @@ -260,14 +248,9 @@
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"' />

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

</ItemGroup>
Expand Down Expand Up @@ -303,10 +286,10 @@
<Config Include="debug" Value="-c Debug" />

<Build Include="build-net4" Create="-f net48" Build="build" />
<Build Include="build-net5" Create="-f net6.0" Build="build" />
<Build Include="build-rid-net5" Create="-f net6.0" Build="build -r osx-x64" />
<Build Include="publish-net5" Create="-f net6.0" Build="publish" />
<Build Include="publish-rid-net5" Create="-f net6.0" Build="publish -r osx-x64" />
<Build Include="build-net6" Create="-f net6.0" Build="build" />
<Build Include="build-rid-net6" Create="-f net6.0" Build="build -r osx-x64" />
<Build Include="publish-net6" Create="-f net6.0" Build="publish" />
<Build Include="publish-rid-net6" Create="-f net6.0" Build="publish -r osx-x64" />

<Combined Include="combined" Value="-c" />
<Combined Include="separate" Value="" Build="**/*.Mac.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions build/Common.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<!-- GtkSharp package likes to install things during package restore, we don't want that -->
<SkipGtkInstall>True</SkipGtkInstall>

<!-- Ignore errors/warnings about semver 2.0 when packing CI builds -->
<NoWarn>$(NoWarn);NU5105</NoWarn>
<!-- Ignore errors/warnings about semver 2.0 when packing CI builds and lowercase aliases -->
<NoWarn>$(NoWarn);NU5105;CS8981</NoWarn>
<LangVersion Condition="$(MSBuildProjectExtension) == '.csproj'">10</LangVersion>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
Expand Down
6 changes: 0 additions & 6 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
<OSPlatform Condition="$(OSPlatform) == '' and '$(OS)' == 'Unix' and Exists('/Library/Frameworks')">Mac</OSPlatform>
<OSPlatform Condition="$(OSPlatform) == '' and '$(OS)' != 'Unix'">Windows</OSPlatform>

<XamarinMacPath>\Library\Frameworks\Xamarin.Mac.framework\Versions\Current\</XamarinMacPath>
<XamarinMacLibPath>$(XamarinMacPath)lib\mono\</XamarinMacLibPath>
<XamarinMacTargetsPath>$(XamarinMacPath)lib\msbuild\</XamarinMacTargetsPath>
<HasXamarinMac Condition="!Exists('$(XamarinMacTargetsPath)Xamarin.Mac.CSharp.targets')">False</HasXamarinMac>
<HasXamarinMac Condition="$(HasXamarinMac) == ''">True</HasXamarinMac> <!-- VS for Mac needs this, Exists isn't evaluated -->

<ArtifactsDir Condition="$(BuildOutoutDir) == ''">$(BasePath)artifacts\</ArtifactsDir>
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(ArtifactsDir)obj\$(OSPlatform)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<SourceDir Condition="$(SourceDir) == ''">$(BasePath)src\</SourceDir>
Expand Down
Loading
Loading