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

Linux #27

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@
"version": "5.22.0",
"commands": [
"fake"
]
],
"rollForward": false
},
"paket": {
"version": "7.1.5",
"version": "8.0.3",
"commands": [
"paket"
]
],
"rollForward": false
},
"fsharp.formatting.commandtool": {
"version": "11.4.3",
"commands": [
"fsdocs"
]
],
"rollForward": false
}
}
}
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# top-most EditorConfig file
root = true

[*]
end_of_line = lf

[*.{fs,fsi,fsx}]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
max_line_length = 120
insert_final_newline = true

[*.{proto,props,targets,fsproj,csproj}]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,json,md,sh,ps1}]
trim_trailing_whitespace = true
insert_final_newline = true

[{Dockerfile,.editorconfig,.gitignore}]
trim_trailing_whitespace = true
insert_final_newline = true
61 changes: 45 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,85 @@ jobs:
build-windows:
name: CI (Windows)
runs-on: windows-latest
timeout-minutes: 25

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.400'
dotnet-version: 8.0.x
- name: Restore
run: |
dotnet tool restore
dotnet paket restore
- name: Build
run: dotnet fake build
run: .\build.cmd -t Build
- name: Pack
run: |
dotnet fake build -t PackAll
.\build.cmd -t PackAll
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: interstellar-windows
path: artifacts
- name: Test
run: |
dotnet fake build -t Test -- Release
.\build.cmd -t Test -- Release

build-macos:
name: CI (macOS)
runs-on: macos-latest
timeout-minutes: 25

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.400'
- name: Install workloads
run: |
dotnet tool restore
sudo dotnet workload install macos
dotnet-version: 8.0.x
- name: Restore
run: |
sudo dotnet workload install macos
dotnet tool restore
dotnet paket restore
dotnet restore Interstellar.MacOS.sln
- name: Build
run: dotnet fake build -- Release
run: ./build.sh -t Build
- name: Pack
run: dotnet fake build -t PackAll -- Release
run: ./build.sh -t PackAll
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: interstellar-macos
path: artifacts/
- name: Test
run: |
dotnet fake build -t Test -- Release
./build.sh -t Test

build-ubuntu:
name: CI (Ubuntu)
runs-on: ubuntu-latest
timeout-minutes: 25

steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore
run: |
sudo dotnet workload install macos
dotnet tool restore
dotnet paket restore
dotnet restore Interstellar.MacOS.sln
- name: Build
run: ./build.sh -t Build
- name: Pack
run: ./build.sh -t PackAll
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: interstellar-linux
path: artifacts/
- name: Test
run: |
./build.sh -t Test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -415,4 +415,4 @@ output/
temp/

# CEF
GPUCache/
GPUCache/
2 changes: 1 addition & 1 deletion AssemblyAndPackageInfo.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
<ItemGroup>
<None Include="$(SolutionDir)\LICENSE" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
</Project>
18 changes: 18 additions & 0 deletions Examples/Examples.GtkSharp.WebKit/Examples.GtkSharp.WebKit.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Examples.Linux.Webkit</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Content Include="paket.references" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Interstellar.Core\Interstellar.Core.fsproj" />
<ProjectReference Include="..\..\src\Interstellar.GtkSharp.WebKit\Interstellar.GtkSharp.WebKit.fsproj" />
<ProjectReference Include="..\Examples.SharedCode\Examples.SharedCode.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
35 changes: 35 additions & 0 deletions Examples/Examples.GtkSharp.WebKit/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
open System.Threading
open Examples.SharedCode
open Gtk
open Interstellar
open Interstellar.GtkSharp.Webkit
open WebKit

module Main =
let runApp () =
let mainCtx = SynchronizationContext.Current
Async.Start <| async {
let onMainWindowCreated (w: IBrowserWindow<Window>) =
let nativeWindow = w.NativeWindow
// This is where you could call some GTK-specific APIs on this window
()
do! BrowserApp.runAsync mainCtx (SimpleBrowserApp.app onMainWindowCreated)
Application.Quit ()
}

[<EntryPoint>]
let main argv =
Application.Init ()

// let wv = new WebView(WidthRequest = 400, HeightRequest = 100, Hexpand = true)
// let window = new Window("WebView Sample")
// window.Add wv
// wv.LoadUri "https://en.wikipedia.org/"
// window.DeleteEvent.Add (fun _ -> Application.Quit ())

// window.ShowAll ()

runApp ()

Application.Run ()
0
1 change: 1 addition & 0 deletions Examples/Examples.GtkSharp.WebKit/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FSharp.Core
2 changes: 2 additions & 0 deletions Examples/Examples.SharedCode/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ module SimpleBrowserApp =
<button onclick="ex('%s')">Interstellar detector</button> - %s
<br>
<button onclick="ex('%s')">Inter window communication</button>
<br>
<button onclick="alert('hello')">Alert</button>
</body>
</html>""" AppletIds.Calculator AppletIds.InjectedContent AppletIds.InterstellarDetector detectorPageUrl.AbsoluteUri AppletIds.InterWindowCommunication
let selectorWindow = createWindow { defaultBrowserWindowConfig with html = Some page }
Expand Down
6 changes: 3 additions & 3 deletions Examples/Examples.macOS.WebKit/Examples.macOS.WebKit.fsproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-macos</TargetFramework>
<TargetFramework>net8.0-macos</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>Example.macOS.WebKit</RootNamespace>
<AssemblyName>InterstellarExample</AssemblyName>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion>10.15</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<EnableCodeSigning>false</EnableCodeSigning>
Expand All @@ -29,4 +29,4 @@
<ProjectReference Include="..\..\src\Interstellar.MacOS.WebKit\Interstellar.MacOS.WebKit.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
</Project>
2 changes: 1 addition & 1 deletion Examples/Examples.macOS.WebKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
<string>10.15</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand Down
58 changes: 58 additions & 0 deletions Interstellar.Linux.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Interstellar.Core", "src\Interstellar.Core\Interstellar.Core.fsproj", "{7D096C2C-0960-4754-9954-421832426807}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Examples.SharedCode", "Examples\Examples.SharedCode\Examples.SharedCode.fsproj", "{0332BEB2-0915-47CC-A709-49FC4C2B3DB5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE6ABDEA-53B5-4D1C-9E46-6B783CD97234}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
AssemblyAndPackageInfo.props = AssemblyAndPackageInfo.props
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Interstellar.GtkSharp.WebKit", "src\Interstellar.GtkSharp.WebKit\Interstellar.GtkSharp.WebKit.fsproj", "{D8257812-AF39-46C2-B55F-D179D16516EA}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Examples.GtkSharp.WebKit", "Examples\Examples.GtkSharp.WebKit\Examples.GtkSharp.WebKit.fsproj", "{269B546E-C1A6-4A70-AE5B-586FADCFFDB2}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "build", "build\build.fsproj", "{8F10DEC7-442B-46A4-AC7A-4887C3A09B2B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E1DEB9D4-FA97-4F81-8F2C-E2583E355B58}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7D096C2C-0960-4754-9954-421832426807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D096C2C-0960-4754-9954-421832426807}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D096C2C-0960-4754-9954-421832426807}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D096C2C-0960-4754-9954-421832426807}.Release|Any CPU.Build.0 = Release|Any CPU
{0332BEB2-0915-47CC-A709-49FC4C2B3DB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0332BEB2-0915-47CC-A709-49FC4C2B3DB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0332BEB2-0915-47CC-A709-49FC4C2B3DB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0332BEB2-0915-47CC-A709-49FC4C2B3DB5}.Release|Any CPU.Build.0 = Release|Any CPU
{14C8FADA-AD8F-421E-8FB3-F9EA797E507C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14C8FADA-AD8F-421E-8FB3-F9EA797E507C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14C8FADA-AD8F-421E-8FB3-F9EA797E507C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14C8FADA-AD8F-421E-8FB3-F9EA797E507C}.Release|Any CPU.Build.0 = Release|Any CPU
{D8257812-AF39-46C2-B55F-D179D16516EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8257812-AF39-46C2-B55F-D179D16516EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8257812-AF39-46C2-B55F-D179D16516EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8257812-AF39-46C2-B55F-D179D16516EA}.Release|Any CPU.Build.0 = Release|Any CPU
{269B546E-C1A6-4A70-AE5B-586FADCFFDB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{269B546E-C1A6-4A70-AE5B-586FADCFFDB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{269B546E-C1A6-4A70-AE5B-586FADCFFDB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{269B546E-C1A6-4A70-AE5B-586FADCFFDB2}.Release|Any CPU.Build.0 = Release|Any CPU
{8F10DEC7-442B-46A4-AC7A-4887C3A09B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F10DEC7-442B-46A4-AC7A-4887C3A09B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F10DEC7-442B-46A4-AC7A-4887C3A09B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F10DEC7-442B-46A4-AC7A-4887C3A09B2B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8F10DEC7-442B-46A4-AC7A-4887C3A09B2B} = {E1DEB9D4-FA97-4F81-8F2C-E2583E355B58}
EndGlobalSection
EndGlobal
12 changes: 11 additions & 1 deletion Interstellar.MacOS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Examples.SharedCode", "Exam
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE6ABDEA-53B5-4D1C-9E46-6B783CD97234}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
AssemblyAndPackageInfo.props = AssemblyAndPackageInfo.props
paket.dependencies = paket.dependencies
EndProjectSection
Expand All @@ -16,6 +15,10 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Examples.macOS.WebKit", "Ex
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Interstellar.MacOS.WebKit", "src\Interstellar.MacOS.WebKit\Interstellar.MacOS.WebKit.fsproj", "{77FAE56F-23ED-4B30-B961-BBC7B492AAFE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{2B1A37B9-3FA4-4FA3-A26F-32F2B5C2CF91}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "build", "build\build.fsproj", "{684CD76F-3338-42D4-8D53-0DA6F5F03C69}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -42,5 +45,12 @@ Global
{77FAE56F-23ED-4B30-B961-BBC7B492AAFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77FAE56F-23ED-4B30-B961-BBC7B492AAFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77FAE56F-23ED-4B30-B961-BBC7B492AAFE}.Release|Any CPU.Build.0 = Release|Any CPU
{684CD76F-3338-42D4-8D53-0DA6F5F03C69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{684CD76F-3338-42D4-8D53-0DA6F5F03C69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{684CD76F-3338-42D4-8D53-0DA6F5F03C69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{684CD76F-3338-42D4-8D53-0DA6F5F03C69}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{684CD76F-3338-42D4-8D53-0DA6F5F03C69} = {2B1A37B9-3FA4-4FA3-A26F-32F2B5C2CF91}
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet run --project ./build/build.fsproj -- %*
Loading
Loading