Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2c57bb6
Update .NET sdk version
jwosty Mar 3, 2021
0e26e3f
macOS - demonstrate issue #17 (cant use insterstellar from xam.mac fu…
jwosty Mar 3, 2021
e917d26
macOS - create Xam.Mac FullFramework-compatible library
jwosty Mar 3, 2021
565485b
macos - fix full-framework project references
jwosty Mar 3, 2021
4469032
macos - fix some build system problems
jwosty Mar 3, 2021
0623a4e
macos - build system progress
jwosty Mar 3, 2021
91c9147
macos - disable CreatePackage
jwosty Mar 3, 2021
17ca3f8
macos - fix more build problems (shaving the yak)
jwosty Mar 3, 2021
68bd57e
Discriminate btwn sdk-style vs traditional-style projects in build sc…
jwosty Mar 4, 2021
27b42a4
update fsdocs
jwosty Mar 4, 2021
c77b75c
Successfuly build a nuget package for full-framework macos library (j…
jwosty Mar 4, 2021
900d188
macos - get it to properly set most nupkg props
jwosty Mar 4, 2021
c7ddefd
Add Xamarin to GitHub CI
jwosty Mar 4, 2021
10b482d
CI - bump Xamarin.Mac version
jwosty Mar 4, 2021
236554f
Work around xamarin/xamarin-macios/issues/10652
jwosty Mar 4, 2021
fa2c6f1
windows - fix build silly build script mistake
jwosty Mar 4, 2021
c6e5b9b
macos - Remove template minor version from package
jwosty Mar 4, 2021
48ca850
macos - fix build script typo
jwosty Mar 5, 2021
0628c5b
macos - add auto-updating AssemblyInfo.fs
jwosty Mar 5, 2021
2da4dc1
Lock CefSharp version to 86
jwosty Mar 14, 2021
b8490f4
Upgrade FSharp.Core
jwosty Jul 3, 2021
41a070f
Merge branch 'master' into xammac-full-framework
jwosty Nov 4, 2021
d5d952a
Merge branch 'master' into xammac-full-framework
jwosty May 12, 2022
2dcf63f
Paket install
jwosty May 12, 2022
e5fbf6d
Merge branch 'master' into xammac-full-framework
jwosty May 12, 2022
696a2b1
Update version to 0.3.2
jwosty May 12, 2022
befd138
Undo template library upgrade
jwosty May 12, 2022
2d31c8c
Undo template library upgrade pt 2
jwosty May 13, 2022
ced82b9
Undo template library upgrade pt 3
jwosty May 13, 2022
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 .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"fsharp.formatting.commandtool": {
"version": "7.2.9",
"version": "9.0.1",
"commands": [
"fsdocs"
]
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
path: artifacts
- name: Test
run: |
dotnet fake build -t Test
dotnet fake build -t BuildTemplateProjects
dotnet fake build -t Test -- Release
dotnet fake build -t BuildTemplateProjects -- Release

build-macos:
name: CI (macOS)
Expand All @@ -40,20 +40,31 @@ jobs:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.300'
- name: setup-xamarin
uses: maxim-lobanov/setup-xamarin@v1
with:
mono-version: 6
# xamarin-mac-version: 7
xcode-version: 12.x
# temporary workaround for https://github.com/xamarin/xamarin-macios/issues/10652 until Xamarin.Mac 7.4.0.10 lands in GitHub Actions
- name: setup-xamarin-mac-patched
run: |
curl -o xamarinmac.pkg 'https://bosstoragemirror.blob.core.windows.net/wrench/xcode12.4/a4c70e7d04e3904d17aa60f6d640eb048081c757/4477741/package/notarized/xamarin.mac-7.4.0.10.pkg'
sudo installer -pkg xamarinmac.pkg -target /
- name: Restore
run: |
dotnet tool restore
dotnet paket restore
- name: Build
run: dotnet fake build
run: dotnet fake build -- Release
- name: Pack
run: dotnet fake build -t PackAll
run: dotnet fake build -t PackAll -- Release
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: interstellar-macos
path: artifacts/
- name: Test
run: |
dotnet fake build -t Test
dotnet fake build -t BuildTemplateProjects
dotnet fake build -t Test -- Release
dotnet fake build -t BuildTemplateProjects -- Release
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.3.2

* WinForms, WPF - Fix a bug that happens under Windows high-DPI mode
* Change targets to netcoreapp3.1

## 0.3.1

* WinForms - Fixed an issue that could cause apps to crash at startup in release mode (https://github.com/jwosty/Interstellar/issues/10 ; thanks to @amaitland for the fix)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{F2A71F9B-5D33-465A-A702-920D77279786}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>Example.macOS.WebKit</RootNamespace>
<AssemblyName>InterstellarExample</AssemblyName>
<ErrorReport>prompt</ErrorReport>
<ProjectGuid>{98BEAAC4-9ADD-4D08-B3A7-06BD5934A721}</ProjectGuid>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<UseXamMacFullFramework>true</UseXamMacFullFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<EnableCodeSigning>false</EnableCodeSigning>
<CodeSigningKey>Mac Developer</CodeSigningKey>
<CreatePackage>false</CreatePackage>
<EnablePackageSigning>false</EnablePackageSigning>
<IncludeMonoRuntime>false</IncludeMonoRuntime>
<UseSGen>true</UseSGen>
<UseRefCounting>true</UseRefCounting>
<HttpClientHandler>
</HttpClientHandler>
<LinkMode>
</LinkMode>
<XamMacArch>
</XamMacArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<EnableCodeSigning>false</EnableCodeSigning>
<CreatePackage>true</CreatePackage>
<EnablePackageSigning>false</EnablePackageSigning>
<IncludeMonoRuntime>true</IncludeMonoRuntime>
<UseSGen>true</UseSGen>
<UseRefCounting>true</UseRefCounting>
<LinkMode>None</LinkMode>
<GenerateTailCalls>true</GenerateTailCalls>
<PlatformTarget>
</PlatformTarget>
<HttpClientHandler>
</HttpClientHandler>
<XamMacArch>
</XamMacArch>
<AOTMode>None</AOTMode>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.Mac" />
<Reference Include="mscorlib" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-128.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-128%402x.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-16.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-16%402x.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-256.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-256%402x.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-32.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-32%402x.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512.png" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512%402x.png" />
<ImageAsset Include="Assets.xcassets\Contents.json" />
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
<Compile Include="AppDelegate.fs" />
<Compile Include="Main.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Interstellar.Core\Interstellar.Core.fsproj">
<Project>{7D096C2C-0960-4754-9954-421832426807}</Project>
<Name>Interstellar.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Examples.SharedCode\Examples.SharedCode.fsproj">
<Project>{0332BEB2-0915-47CC-A709-49FC4C2B3DB5}</Project>
<Name>Examples.SharedCode</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Interstellar.MacOS.WebKit.FullFramework\Interstellar.MacOS.WebKit.FullFramework.fsproj">
<Project>{DA9591A8-4189-4171-AF3F-85F1F3EA22A2}</Project>
<Name>Interstellar.MacOS.WebKit.FullFramework</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.FSharp.targets" />
<Import Project="..\..\.paket\Paket.Restore.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')">
<ItemGroup>
<Reference Include="BlackFox.MasterOfFoo">
<HintPath>..\..\packages\BlackFox.MasterOfFoo\lib\net45\BlackFox.MasterOfFoo.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v3.1' Or ($(TargetFrameworkVersion) == 'v5.0' And '$(TargetPlatformIdentifier)' == 'Windows'))) Or ($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
<ItemGroup>
<Reference Include="BlackFox.MasterOfFoo">
<HintPath>..\..\packages\BlackFox.MasterOfFoo\lib\netstandard2.0\BlackFox.MasterOfFoo.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="($(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')) Or ($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
<ItemGroup>
<Reference Include="FSharp.Core">
<HintPath>..\..\packages\FSharp.Core\lib\netstandard2.0\FSharp.Core.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v3.1' Or ($(TargetFrameworkVersion) == 'v5.0' And '$(TargetPlatformIdentifier)' == 'Windows'))">
<ItemGroup>
<Reference Include="FSharp.Core">
<HintPath>..\..\packages\FSharp.Core\lib\netstandard2.1\FSharp.Core.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')">
<ItemGroup>
<Reference Include="System.Buffers">
<HintPath>..\..\packages\System.Buffers\lib\net461\System.Buffers.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
<ItemGroup>
<Reference Include="System.Buffers">
<HintPath>..\..\packages\System.Buffers\lib\netstandard2.0\System.Buffers.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0'">
<ItemGroup>
<Reference Include="System.Buffers">
<HintPath>..\..\packages\System.Buffers\ref\netstandard2.0\System.Buffers.dll</HintPath>
<Private>False</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')">
<ItemGroup>
<Reference Include="System.Memory">
<HintPath>..\..\packages\System.Memory\lib\net461\System.Memory.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
<ItemGroup>
<Reference Include="System.Memory">
<HintPath>..\..\packages\System.Memory\lib\netstandard2.0\System.Memory.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')">
<ItemGroup>
<Reference Include="System.Numerics.Vectors">
<HintPath>..\..\packages\System.Numerics.Vectors\lib\net46\System.Numerics.Vectors.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0'">
<ItemGroup>
<Reference Include="System.Numerics.Vectors">
<HintPath>..\..\packages\System.Numerics.Vectors\lib\netstandard2.0\System.Numerics.Vectors.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0'">
<ItemGroup>
<Reference Include="System.Numerics.Vectors">
<HintPath>..\..\packages\System.Numerics.Vectors\ref\netstandard2.0\System.Numerics.Vectors.dll</HintPath>
<Private>False</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')">
<ItemGroup>
<Reference Include="System.Runtime.CompilerServices.Unsafe">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v3.1' Or ($(TargetFrameworkVersion) == 'v5.0' And '$(TargetPlatformIdentifier)' == 'Windows'))">
<ItemGroup>
<Reference Include="System.Runtime.CompilerServices.Unsafe">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\netcoreapp3.1\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
<ItemGroup>
<Reference Include="System.Runtime.CompilerServices.Unsafe">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.7.2' Or $(TargetFrameworkVersion) == 'v4.8')">
<ItemGroup>
<Reference Include="System.Text.Encodings.Web">
<HintPath>..\..\packages\System.Text.Encodings.Web\lib\net461\System.Text.Encodings.Web.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v3.1' Or ($(TargetFrameworkVersion) == 'v5.0' And '$(TargetPlatformIdentifier)' == 'Windows'))">
<ItemGroup>
<Reference Include="System.Text.Encodings.Web">
<HintPath>..\..\packages\System.Text.Encodings.Web\lib\netcoreapp3.1\System.Text.Encodings.Web.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v2.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
<ItemGroup>
<Reference Include="System.Text.Encodings.Web">
<HintPath>..\..\packages\System.Text.Encodings.Web\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>
3 changes: 3 additions & 0 deletions Examples/Examples.macOS.WebKit.FullFramework/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FSharp.Core
BlackFox.MasterOfFoo
System.Text.Encodings.Web
30 changes: 30 additions & 0 deletions Examples/Examples.macOS.WebKit.ModernFramework/AppDelegate.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Example.macOS.WebKit
open System
open System.Threading
open AppKit
open Foundation
open Interstellar
open Interstellar.MacOS.WebKit
open Examples.SharedCode

[<Register("AppDelegate")>]
type AppDelegate() =
inherit NSApplicationDelegate()

override this.ApplicationShouldTerminateAfterLastWindowClosed sender = false

override this.DidFinishLaunching notification =
printfn "DidFinishLaunching"
Thread.CurrentThread.Name <- "Main"

let mainCtx = SynchronizationContext.Current
Async.Start <| async {
let onMainWindowCreated (w: IBrowserWindow<NSWindow>) =
let nsWindow = w.NativeWindow
// This is where you could call some Cocoa-specific APIs on this window
()
do! BrowserApp.runAsync mainCtx (SimpleBrowserApp.app ignore)
NSApplication.SharedApplication.Terminate null
}

()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading