Skip to content
This repository was archived by the owner on Mar 14, 2021. It is now read-only.

Commit

Permalink
updated to newest cef; removed net47x support
Browse files Browse the repository at this point in the history
  • Loading branch information
baetz-daniel committed Feb 23, 2021
1 parent e65aef8 commit cc82e9d
Show file tree
Hide file tree
Showing 12 changed files with 307 additions and 72 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*.cs]

# IDE0056: Use index operator
csharp_style_prefer_index_operator = false:none

# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = none

# Default severity for analyzer diagnostics with category 'Style'
dotnet_analyzer_diagnostic.category-Style.severity = none
51 changes: 51 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build & test
on:
push:
branches:
- master
pull_request:
branches:
- master
- development
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build-windows:
name: build release and debug for windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: build debug
run: |
dotnet build src/Exomia.CEF --configuration Debug --force --nologo -p:Platform=AnyCPU
dotnet build src/Exomia.CEF --configuration Debug --force --nologo -p:Platform=x86
dotnet build src/Exomia.CEF --configuration Debug --force --nologo -p:Platform=x64
- name: build release
run: |
dotnet build src/Exomia.CEF --configuration Release --force --nologo -p:Platform=AnyCPU
dotnet build src/Exomia.CEF --configuration Release --force --nologo -p:Platform=x86
dotnet build src/Exomia.CEF --configuration Release --force --nologo -p:Platform=x64
test-windows:
name: test release and debug for windows
needs: [build-windows]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: test debug
run: |
dotnet test tests/L0/Exomia.CEF.Tests --configuration Debug --nologo -p:Platform=AnyCPU
dotnet test tests/L0/Exomia.CEF.Tests --configuration Debug --nologo -p:Platform=x86
dotnet test tests/L0/Exomia.CEF.Tests --configuration Debug --nologo -p:Platform=x64
- name: test release
run: |
dotnet test tests/L0/Exomia.CEF.Tests --configuration Release --nologo -p:Platform=AnyCPU
dotnet test tests/L0/Exomia.CEF.Tests --configuration Release --nologo -p:Platform=x86
dotnet test tests/L0/Exomia.CEF.Tests --configuration Release --nologo -p:Platform=x64
92 changes: 92 additions & 0 deletions .github/workflows/build_test_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: build, test & publish
on:
release:
types: [published]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build-windows:
name: build release and debug for windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: build debug
run: |
dotnet build src/Exomia.CEF --configuration Debug --force --nologo -p:Platform=AnyCPU
dotnet build src/Exomia.CEF --configuration Debug --force --nologo -p:Platform=x86
dotnet build src/Exomia.CEF --configuration Debug --force --nologo -p:Platform=x64
- name: build release
run: |
dotnet build src/Exomia.CEF --configuration Release --force --nologo -p:Platform=AnyCPU
dotnet build src/Exomia.CEF --configuration Release --force --nologo -p:Platform=x86
dotnet build src/Exomia.CEF --configuration Release --force --nologo -p:Platform=x64
test-windows:
name: test release and debug for windows
needs: [build-windows]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: test debug
run: |
dotnet test tests/L0/Exomia.CEF.Tests --configuration Debug --nologo -p:Platform=AnyCPU
dotnet test tests/L0/Exomia.CEF.Tests --configuration Debug --nologo -p:Platform=x86
dotnet test tests/L0/Exomia.CEF.Tests --configuration Debug --nologo -p:Platform=x64
- name: test release
run: |
dotnet test tests/L0/Exomia.CEF.Tests --configuration Release --nologo -p:Platform=AnyCPU
dotnet test tests/L0/Exomia.CEF.Tests --configuration Release --nologo -p:Platform=x86
dotnet test tests/L0/Exomia.CEF.Tests --configuration Release --nologo -p:Platform=x64
publish-github-windows:
name: publish debug for windows on github
needs: [test-windows]
if: ${{ github.event_name == 'release' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: extract tag version
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: publish ${{ github.repository }} [v${{ env.TAG_VERSION }}]
run: |
dotnet pack --configuration Debug --verbosity m --force --nologo -p:Platform=AnyCPU -p:Version=$TAG_VERSION
dotnet pack --configuration Debug --verbosity m --force --nologo -p:Platform=x86 -p:Version=$TAG_VERSION
dotnet pack --configuration Debug --verbosity m --force --nologo -p:Platform=x64 -p:Version=$TAG_VERSION
for f in ./*.nupkg
do
STATUSCODE=$(curl -sSX PUT --retry 3 -o /dev/null -w "%{http_code}" -u "${{ github.repository_owner }}:${{ github.token }}" -F package=@$f https://nuget.pkg.github.com/${{ github.repository_owner }}/)
echo "[$STATUSCODE:https://nuget.pkg.github.com/${{ github.repository_owner }}/] $f"
if [ "${STATUSCODE}" != 200 ] && [ "${STATUSCODE}" != 409 ]; then exit 1; fi
done
shell: bash
working-directory: src/Exomia.CEF
publish-nuget-windows:
name: publish release for windows on nuget
needs: [test-windows, publish-github-windows]
if: ${{ github.event_name == 'release' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: extract tag version
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: publish ${{ github.repository }} [v${{ env.TAG_VERSION }}]
run: |
dotnet pack src/Exomia.CEF --configuration Release --verbosity m --force --nologo -p:Platform=AnyCPU -p:Version=$TAG_VERSION
dotnet pack src/Exomia.CEF --configuration Release --verbosity m --force --nologo -p:Platform=x86 -p:Version=$TAG_VERSION
dotnet pack src/Exomia.CEF --configuration Release --verbosity m --force --nologo -p:Platform=x64 -p:Version=$TAG_VERSION
dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.EXOMIA_NUGET_API_KEY_PUSH }} --skip-duplicate
shell: bash
16 changes: 16 additions & 0 deletions Exomia.CEF.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ VisualStudioVersion = 16.0.29709.97
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Exomia.CEF", "src\Exomia.CEF\Exomia.CEF.csproj", "{25D9B629-E538-498F-BE33-75D5883164B5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4DE02C23-CFFF-409D-BA15-B24656DC6712}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exomia.CEF.Tests", "tests\L0\Exomia.CEF.Tests\Exomia.CEF.Tests.csproj", "{A176B9CC-B4CD-40A3-A733-CDA82076BC0F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5BE69773-34D1-456B-9DFE-63B7910C66C8}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,10 +24,17 @@ Global
{25D9B629-E538-498F-BE33-75D5883164B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25D9B629-E538-498F-BE33-75D5883164B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25D9B629-E538-498F-BE33-75D5883164B5}.Release|Any CPU.Build.0 = Release|Any CPU
{A176B9CC-B4CD-40A3-A733-CDA82076BC0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A176B9CC-B4CD-40A3-A733-CDA82076BC0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A176B9CC-B4CD-40A3-A733-CDA82076BC0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A176B9CC-B4CD-40A3-A733-CDA82076BC0F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A176B9CC-B4CD-40A3-A733-CDA82076BC0F} = {4DE02C23-CFFF-409D-BA15-B24656DC6712}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {014C1820-0280-4D67-8236-9214FCB90B4D}
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018-2019, exomia
Copyright (c) 2018-2021, exomia
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions src/Exomia.CEF/CefWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static CefWrapper()
AppDomain.CurrentDomain.AssemblyResolve += (s, args) =>
{
string archSpecificPath = Path.Combine(
AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
AppDomain.CurrentDomain.BaseDirectory,
Environment.Is64BitProcess ? "x64" : "x86", args.Name.Split(new[] { ',' }, 2)[0] + ".dll");
return File.Exists(archSpecificPath)
? Assembly.LoadFile(archSpecificPath)
Expand All @@ -50,7 +50,6 @@ private CefWrapper(Action<CefSettingsWrapper>? overrideCefSettings)
{
if (!Cef.IsInitialized)
{
CefSharpSettings.LegacyJavascriptBindingEnabled = false;
CefSharpSettings.ConcurrentTaskExecution = true;
CefSharpSettings.ShutdownOnExit = true;
CefSharpSettings.SubprocessExitIfParentProcessClosed = true;
Expand Down
83 changes: 55 additions & 28 deletions src/Exomia.CEF/Exomia.CEF.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net471;net472;net48</TargetFrameworks>
<Authors>exomia</Authors>
<TargetFrameworks>net48</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<LangVersion>8.0</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile></DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<NullableReferenceTypes>true</NullableReferenceTypes>
<DefineConstants>TRACE;$(Platform)</DefineConstants>
<CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport>
</PropertyGroup>

<PropertyGroup>
<Company>exomia</Company>
<Authors>exomia;saika01</Authors>
<Description>a wrapper around cef for use in the exomia framework to build an ui</Description>
<Copyright>Copyright © $([System.DateTime]::Now.Year) exomia</Copyright>
<Version>1.1.0.0</Version>
</PropertyGroup>

<PropertyGroup>
<PackageProjectUrl>https://github.com/exomia/cef</PackageProjectUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageTags>exomia cef ui framework</PackageTags>
<RepositoryUrl>https://github.com/exomia/cef</RepositoryUrl>
<Platforms>AnyCPU;x64;x86</Platforms>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RepositoryType>git</RepositoryType>
<IncludeBuildOutput>true</IncludeBuildOutput>
<PackageOutputPath>.</PackageOutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile></DocumentationFile>
<Nullable>enable</Nullable>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIconUrl>https://avatars0.githubusercontent.com/u/37782223</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport>
<IncludeBuildOutput>true</IncludeBuildOutput>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>Exomia.CEF.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DebugType>full</DebugType>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors>NU1605</WarningsAsErrors>
<DefineConstants Condition="'$(Platform)'=='AnyCPU'">DEBUG;TRACE;x86</DefineConstants>
<DefineConstants Condition="'$(Platform)'!='AnyCPU'">DEBUG;TRACE;$(Platform)</DefineConstants>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors>NU1605</WarningsAsErrors>
<DefineConstants Condition="'$(Platform)'=='AnyCPU'">TRACE;x86</DefineConstants>
<DefineConstants Condition="'$(Platform)'!='AnyCPU'">TRACE;$(Platform)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
Expand All @@ -53,23 +62,41 @@
<PackageId>$(MSBuildProjectName).$(Platform)</PackageId>
</PropertyGroup>

<PropertyGroup>
<NoWarn>1701;1702;IDE0063;IDE0079</NoWarn>
<WarningsAsErrors>NU1605</WarningsAsErrors>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\.editorconfig" Link=".editorconfig" />
<None Include="..\..\LICENSE" Pack="true" Visible="false" PackagePath="" />
<None Include="..\..\..\icon.png" Pack="true" Visible="false" PackagePath="" />
<None Include="..\..\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CefSharp.OffScreen" Version="79.1.350">
<PrivateAssets>none</PrivateAssets>
</PackageReference>
<PackageReference Include="CefSharp.Common" Version="87.1.132" PrivateAssets="none" />
<PackageReference Include="CefSharp.OffScreen" Version="87.1.132" PrivateAssets="none"/>
</ItemGroup>

<ItemGroup Condition="'$(Platform)'=='AnyCPU'">
<PackageReference Include="Exomia.Framework" Version="1.3.0" />
<PackageReference Include="Exomia.Framework" Version="1.5.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(Platform)'!='AnyCPU'">
<PackageReference Include="Exomia.Framework.$(Platform)" Version="1.3.0" />
<PackageReference Include="Exomia.Framework.$(Platform)" Version="1.5.0" PrivateAssets="all" />
</ItemGroup>

<!-- Source Link Support -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<IncludeSymbols>true</IncludeSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Deterministic>True</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)'=='true'">True</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup Condition="'$(Configuration)'=='Debug'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
</Project>
Binary file added src/Exomia.CEF/Exomia.CEF.snk
Binary file not shown.
Loading

0 comments on commit cc82e9d

Please sign in to comment.