diff --git a/.gitignore b/.gitignore
index 6f775040..8274175f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -385,4 +385,5 @@ FodyWeavers.xsd
*.sln.iml
# MacOS
-*.DS_Store
\ No newline at end of file
+*.DS_Store
+
diff --git a/src/DevScripts/build-cef-engine-macos64.py b/src/DevScripts/build-cef-engine-macos64.py
deleted file mode 100644
index d12b176a..00000000
--- a/src/DevScripts/build-cef-engine-macos64.py
+++ /dev/null
@@ -1,72 +0,0 @@
-import subprocess
-import shutil
-import os
-
-# Project path
-cef_engine_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/Main'))
-cef_engine_subprocess_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/SubProcess'))
-cef_engine_macos_path = os.path.abspath(os.path.join(__file__, '../../Packages/UnityWebBrowser.Engine.Cef.MacOS-x64/Engine~/'))
-
-# Delete build dir
-cef_engine_build_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/bin/Release/publish/osx-x64/'))
-if os.path.exists(cef_engine_build_path):
- shutil.rmtree(cef_engine_build_path)
-
-# First, build main CEF engine project
-print('Building CEF Engine from {0}'.format(cef_engine_path))
-subprocess.run(['dotnet', 'publish', '-r=osx-x64', '-c=Release'], cwd=cef_engine_path)
-
-# Build SubProcess
-print('Building CEF Engine SubProcess from {0}'.format(cef_engine_subprocess_path))
-subprocess.run(['dotnet', 'publish', '-r=osx-x64', '-c=Release'], cwd=cef_engine_subprocess_path)
-
-cef_framework_path = os.path.abspath(os.path.join(__file__, '../../ThirdParty/Libs/cef/macosx64/Chromium Embedded Framework.framework'))
-
-cef_engine_app_path = os.path.join(cef_engine_build_path, 'UnityWebBrowser.Engine.Cef.app')
-cef_engine_app_contents_path = os.path.join(cef_engine_app_path, 'Contents')
-cef_engine_app_macos_path = os.path.join(cef_engine_app_contents_path, 'MacOS')
-cef_engine_app_resources_path = os.path.join(cef_engine_app_contents_path, 'Resources')
-cef_engine_app_frameworks_path = os.path.join(cef_engine_app_contents_path, 'Frameworks/')
-
-os.makedirs(cef_engine_app_macos_path, exist_ok=True)
-os.makedirs(cef_engine_app_resources_path, exist_ok=True)
-os.makedirs(cef_engine_app_frameworks_path, exist_ok=True)
-
-shutil.copy(os.path.join(cef_engine_build_path, 'UnityWebBrowser.Engine.Cef'), cef_engine_app_macos_path)
-shutil.copy(os.path.join(cef_engine_build_path, 'info.plist'), cef_engine_app_contents_path)
-shutil.copy(os.path.join(cef_engine_build_path, 'icon.icns'), cef_engine_app_resources_path)
-shutil.copytree(cef_framework_path, os.path.join(cef_engine_app_frameworks_path, 'Chromium Embedded Framework.framework'))
-
-# Copy the many different helper apps needed
-subprocess_types = [
- None,
- 'GPU',
- 'Plugin',
- 'Renderer'
-]
-
-for type in subprocess_types:
- if not type:
- name = ''
- plist_file = 'info-subprocess.plist'
- else:
- name = ' ({0})'.format(type)
- plist_file = 'info-subprocess-{0}.plist'.format(type.lower())
-
- bundle_name = 'UnityWebBrowser.Engine.Cef.SubProcess{0}.app/Contents'.format(name)
- cef_engine_subprocess_app_path = os.path.join(cef_engine_app_frameworks_path, bundle_name)
- cef_engine_subprocess_macos_path = os.path.join(cef_engine_subprocess_app_path, 'MacOS')
-
- os.makedirs(cef_engine_subprocess_macos_path, exist_ok=True)
- shutil.copy(os.path.join(cef_engine_build_path, plist_file), os.path.join(cef_engine_subprocess_app_path, 'info.plist'))
- shutil.copy(os.path.join(cef_engine_build_path, 'UnityWebBrowser.Engine.Cef.SubProcess'), os.path.join(cef_engine_subprocess_macos_path, 'UnityWebBrowser.Engine.Cef.SubProcess{0}'.format(name)))
-
-# Copy final app bundle to MacOS package
-if not os.path.exists(cef_engine_macos_path):
- os.makedirs(cef_engine_macos_path, exist_ok=True)
-
-cef_app_final_path = os.path.join(cef_engine_macos_path, 'UnityWebBrowser.Engine.Cef.app')
-if os.path.exists(cef_app_final_path):
- shutil.rmtree(cef_app_final_path)
-
-shutil.copytree(cef_engine_app_path, cef_app_final_path)
diff --git a/src/DevScripts/build-pages.ps1 b/src/DevScripts/build-pages.ps1
deleted file mode 100644
index 28a7f1d1..00000000
--- a/src/DevScripts/build-pages.ps1
+++ /dev/null
@@ -1,6 +0,0 @@
-Push-Location "$PSScriptRoot/../UnityWebBrowser.Pages/"
-
-& yarn
-& yarn run build
-
-Pop-Location
diff --git a/src/DevScripts/build_base.py b/src/DevScripts/build_base.py
new file mode 100644
index 00000000..4ba1eed7
--- /dev/null
+++ b/src/DevScripts/build_base.py
@@ -0,0 +1,25 @@
+import subprocess
+import os
+
+package_rid_mapping = {
+ 'win-x64': 'Win-x64',
+ 'linux-x64': 'Linux-x64'
+}
+
+def build_cef_engine(platform: str) -> None:
+ """
+ Base CEF engine build for Windows and Linux
+ """
+ if platform not in package_rid_mapping:
+ raise Exception('Platform {0} is not valid!'.format(platform))
+
+ platform_folder = package_rid_mapping[platform]
+
+ cef_project_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj'))
+ cef_publish_path = os.path.abspath(os.path.join(__file__, '../../Packages/UnityWebBrowser.Engine.Cef.{0}/Engine~'.format(platform_folder)))
+
+ print('Build CEF project \'{0}\' to \'{1}\''.format(cef_project_path, cef_publish_path))
+
+ subprocess.run(['dotnet', 'publish', cef_project_path, '-r=' + platform, '-p:PublishDir=' + cef_publish_path, '--nologo'])
+
+
diff --git a/src/DevScripts/build_base_macos.py b/src/DevScripts/build_base_macos.py
new file mode 100644
index 00000000..cdc47ace
--- /dev/null
+++ b/src/DevScripts/build_base_macos.py
@@ -0,0 +1,79 @@
+import subprocess
+import shutil
+import os
+
+def build_cef_engine_macos(arch) -> None:
+ """
+ MacOS custom build script.
+
+ MacOS needs a custom build process because of the .plist files and specific folder layout the build needs to be in
+ """
+
+ # Project path
+ cef_engine_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/Main'))
+ cef_engine_subprocess_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/SubProcess'))
+ cef_engine_macos_path = os.path.abspath(os.path.join(__file__, '../../Packages/UnityWebBrowser.Engine.Cef.MacOS-{0}/Engine~/'.format(arch)))
+
+ # Delete build dir
+ cef_engine_build_path = os.path.abspath(os.path.join(__file__, '../../UnityWebBrowser.Engine.Cef/bin/Release/publish/osx-{0}/'.format(arch)))
+ if os.path.exists(cef_engine_build_path):
+ shutil.rmtree(cef_engine_build_path)
+
+ # First, build main CEF engine project
+ print('Building CEF Engine from {0}'.format(cef_engine_path))
+ subprocess.run(['dotnet', 'publish', '-r=osx-{0}'.format(arch), '-c=Release'], cwd=cef_engine_path)
+
+ # Build SubProcess
+ print('Building CEF Engine SubProcess from {0}'.format(cef_engine_subprocess_path))
+ subprocess.run(['dotnet', 'publish', '-r=osx-{0}'.format(arch), '-c=Release'], cwd=cef_engine_subprocess_path)
+
+ cef_framework_path = os.path.abspath(os.path.join(__file__, '../../ThirdParty/Libs/cef/macos{0}/Chromium Embedded Framework.framework'.format(arch)))
+
+ cef_engine_app_path = os.path.join(cef_engine_build_path, 'UnityWebBrowser.Engine.Cef.app')
+ cef_engine_app_contents_path = os.path.join(cef_engine_app_path, 'Contents')
+ cef_engine_app_macos_path = os.path.join(cef_engine_app_contents_path, 'MacOS')
+ cef_engine_app_resources_path = os.path.join(cef_engine_app_contents_path, 'Resources')
+ cef_engine_app_frameworks_path = os.path.join(cef_engine_app_contents_path, 'Frameworks/')
+
+ os.makedirs(cef_engine_app_macos_path, exist_ok=True)
+ os.makedirs(cef_engine_app_resources_path, exist_ok=True)
+ os.makedirs(cef_engine_app_frameworks_path, exist_ok=True)
+
+ shutil.copy(os.path.join(cef_engine_build_path, 'UnityWebBrowser.Engine.Cef'), cef_engine_app_macos_path)
+ shutil.copy(os.path.join(cef_engine_build_path, 'info.plist'), cef_engine_app_contents_path)
+ shutil.copy(os.path.join(cef_engine_build_path, 'icon.icns'), cef_engine_app_resources_path)
+ shutil.copytree(cef_framework_path, os.path.join(cef_engine_app_frameworks_path, 'Chromium Embedded Framework.framework'))
+
+ # Copy the many different helper apps needed
+ subprocess_types = [
+ None,
+ 'GPU',
+ 'Plugin',
+ 'Renderer'
+ ]
+
+ for type in subprocess_types:
+ if not type:
+ name = ''
+ plist_file = 'info-subprocess.plist'
+ else:
+ name = ' ({0})'.format(type)
+ plist_file = 'info-subprocess-{0}.plist'.format(type.lower())
+
+ bundle_name = 'UnityWebBrowser.Engine.Cef.SubProcess{0}.app/Contents'.format(name)
+ cef_engine_subprocess_app_path = os.path.join(cef_engine_app_frameworks_path, bundle_name)
+ cef_engine_subprocess_macos_path = os.path.join(cef_engine_subprocess_app_path, 'MacOS')
+
+ os.makedirs(cef_engine_subprocess_macos_path, exist_ok=True)
+ shutil.copy(os.path.join(cef_engine_build_path, plist_file), os.path.join(cef_engine_subprocess_app_path, 'info.plist'))
+ shutil.copy(os.path.join(cef_engine_build_path, 'UnityWebBrowser.Engine.Cef.SubProcess'), os.path.join(cef_engine_subprocess_macos_path, 'UnityWebBrowser.Engine.Cef.SubProcess{0}'.format(name)))
+
+ # Copy final app bundle to MacOS package
+ if not os.path.exists(cef_engine_macos_path):
+ os.makedirs(cef_engine_macos_path, exist_ok=True)
+
+ cef_app_final_path = os.path.join(cef_engine_macos_path, 'UnityWebBrowser.Engine.Cef.app')
+ if os.path.exists(cef_app_final_path):
+ shutil.rmtree(cef_app_final_path)
+
+ shutil.copytree(cef_engine_app_path, cef_app_final_path)
diff --git a/src/DevScripts/build_linux64.py b/src/DevScripts/build_linux64.py
new file mode 100644
index 00000000..f75f1d54
--- /dev/null
+++ b/src/DevScripts/build_linux64.py
@@ -0,0 +1,3 @@
+from build_base import build_cef_engine
+
+build_cef_engine('linux-x64')
diff --git a/src/DevScripts/build_macosx64.py b/src/DevScripts/build_macosx64.py
new file mode 100644
index 00000000..65c51b90
--- /dev/null
+++ b/src/DevScripts/build_macosx64.py
@@ -0,0 +1,3 @@
+from build_base_macos import build_cef_engine_macos
+
+build_cef_engine_macos('x64')
diff --git a/src/DevScripts/build_windows64.py b/src/DevScripts/build_windows64.py
new file mode 100644
index 00000000..d7548487
--- /dev/null
+++ b/src/DevScripts/build_windows64.py
@@ -0,0 +1,3 @@
+from build_base import build_cef_engine
+
+build_cef_engine('win-x64')
diff --git a/src/DevScripts/download-all.ps1 b/src/DevScripts/download-all.ps1
deleted file mode 100644
index 150c2cf4..00000000
--- a/src/DevScripts/download-all.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-& "$PSScriptRoot/download-cef-windows.ps1"
-& "$PSScriptRoot/download-cef-linux.ps1"
-& "$PSScriptRoot/download-cef-macosx64.ps1"
\ No newline at end of file
diff --git a/src/DevScripts/download-cef-base.ps1 b/src/DevScripts/download-cef-base.ps1
deleted file mode 100644
index ad808034..00000000
--- a/src/DevScripts/download-cef-base.ps1
+++ /dev/null
@@ -1,171 +0,0 @@
-#This script downloads the CEF binaries, since we can't include them in the repo (They are bigger then your mum surprisingly)
-#CefGlue wants the EXACT correct CEF version, so we look at what CEF version CefGlue is targeting and download the right tar.bz2
-#file off from the CEF build server
-
-param
-(
- [Parameter(Mandatory=$true)]
- [string] $OperatingSystem,
-
- [Parameter(Mandatory=$false)]
- [bool] $Cleanup = $true,
-
- [Parameter(Mandatory=$false)]
- [bool] $IncludeResources = $true
-)
-
-function Reset
-{
- #Reset our location
- Pop-Location
-}
-
-function CheckProcess
-{
- param(
- [Parameter (Mandatory = $true)] [String]$ErrorMessage,
- [Parameter (Mandatory = $true)] [System.Diagnostics.Process]$Process
- )
-
- if($Process.ExitCode -ne 0)
- {
- Reset
- throw $ErrorMessage
- }
-}
-
-# Version Check
-if ($PSVersionTable.PSVersion.Major -lt 7)
-{
- throw "You need to use the NEW PowerShell version! You can get it here: https://github.com/powershell/powershell#get-powershell"
-}
-
-#Set location
-Push-Location $PSScriptRoot
-
-#Find what version CefGlue wants
-$CefGlueVersionFile = "../ThirdParty/CefGlue/CefGlue/Interop/version.g.cs"
-
-#Check if the version.g.cs file exists, if it doesn't then there is a good chance the user didn't clone the repo recursively,
-#and didn't init the submodules.
-if(-not (Test-Path -Path $CefGlueVersionFile))
-{
- Write-Warning "The CefGlue version file doesn't exist! Initalizing the submodules for you..."
- Push-Location "$($PSScriptRoot)../../"
-
- #Run git submodule init and update
- $p = Start-Process git -ArgumentList 'submodule init' -Wait -NoNewWindow -PassThru
- CheckProcess "Error running git submodule init!" $p
-
- $p = Start-Process git -ArgumentList 'submodule update' -Wait -NoNewWindow -PassThru
- CheckProcess "Error running git submodule update!" $p
-
- #Return location
- Reset
-}
-
-$CefGlueVersionfileContent = Get-Content $CefGlueVersionFile
-$CefGlueVersionRegex = [regex] 'CEF_VERSION = \"(.*)\"'
-
-if(!$CefGlueVersionfileContent)
-{
- Reset
- throw "Failed to read version info!"
-}
-
-$CefVersion = ""
-foreach($Content in $CefGlueVersionfileContent)
-{
- $Match = [System.Text.RegularExpressions.Regex]::Match($Content, $CefGlueVersionRegex)
- if($Match.Success)
- {
- $CefVersion = $Match.groups[1].value
- }
-}
-
-#Create a temp directory
-#NOTE: We have [void] at the start here so it doens't spew out the logs
-[void](New-Item -Path "../ThirdParty/Libs/cef/" -Name "temp" -ItemType "directory" -Force)
-
-#Lots of variables we gonna use
-$TempDirectory = (Resolve-Path -Path ../ThirdParty/Libs/cef/temp/).Path
-$CefBinName = "cef_binary_$($cefVersion)_$($OperatingSystem)_minimal"
-$CefBinTarFileName = "$($CefBinName).tar"
-$CefBinTarFileLocation = "$($TempDirectory)$($CefBinTarFileName)"
-$CefBinTarBz2FileName = "$($CefBinTarFileName).bz2"
-$CefBinTarBz2FileLocation = "$($TempDirectory)$($CefBinTarBz2FileName)"
-
-Write-Output "Downloading CEF version $($CefVersion) for $($OperatingSystem)..."
-
-#We download the CEF builds off from Spotify's CEF build server
-#The URL look like this:
-# https://cef-builds.spotifycdn.com/cef_binary_[CEF-VERSION]_[OPERATING-SYSTEM]_minimal.tar.bz2
-# Example: https://cef-builds.spotifycdn.com/cef_binary_85.3.12+g3e94ebf+chromium-85.0.4183.121_linux64_minimal.tar.bz2
-
-$progressPreference = 'silentlyContinue'
-Invoke-WebRequest -Uri "https://cef-builds.spotifycdn.com/$($CefBinTarBz2FileName)" -OutFile $CefBinTarBz2FileLocation
-$progressPreference = 'Continue'
-
-#Check to make sure the file downloaded
-if(-not (Test-Path -Path $CefBinTarBz2FileLocation))
-{
- Reset
- throw "CEF build failed to download!"
-}
-
-Write-Output "Downloaded CEF build to '$($CefBinTarBz2FileLocation)'."
-Write-Output "Exracting CEF build..."
-
-#Get 7Zip
-$7zipApp = ""
-if($IsLinux)
-{
- $7zipApp = "../DevTools/7zip/linux-x64/7zz"
-}
-elseif($ISMacOs)
-{
- $7zipApp = "../DevTools/7zip/macos-x64-intel/7zz"
-}
-else
-{
- $7zipApp = "../DevTools/7zip/win-x64/7za.exe"
-}
-
-$7zipApp = (Resolve-Path -Path $7zipApp).Path
-
-#Extract our files
-$p = Start-Process $7zipApp -ArgumentList "x $($CefBinTarBz2FileLocation) -o$($TempDirectory) *.tar -r -y" -Wait -NoNewWindow -PassThru
-CheckProcess "Extracting failed!" $p
-
-$p = Start-Process $7zipApp -ArgumentList "x $($CefBinTarFileLocation) -o$($TempDirectory) $($CefBinName)/ -r -y" -Wait -NoNewWindow -PassThru
-CheckProcess "Extracting failed!" $p
-
-#Setup some variables to using the copying phase
-$CefExtractedLocation = (Resolve-Path -Path "$($TempDirectory)/$($CefBinName)/").Path
-$CefExtractedReleaseLocation = "$($CefExtractedLocation)Release/"
-
-$CefLibsLocation = (Resolve-Path -Path ../ThirdParty/Libs/cef/$($OperatingSystem)).Path
-
-#Copy files
-Write-Output "Copying files..."
-Copy-Item -Path "$($CefExtractedReleaseLocation)/*" -Destination $CefLibsLocation -Force -PassThru -Recurse
-
-if($IncludeResources)
-{
- $CefExtractedResourcesLocation = "$($CefExtractedLocation)Resources/"
- Copy-Item -Path "$($CefExtractedResourcesLocation)/*" -Destination $CefLibsLocation -Force -PassThru -Recurse
-}
-
-Copy-Item -Path "$($CefExtractedLocation)/README.txt" -Destination $CefLibsLocation -Force -PassThru
-Copy-Item -Path "$($CefExtractedLocation)/LICENSE.txt" -Destination $CefLibsLocation -Force -PassThru
-
-#Cleanup
-if($Cleanup)
-{
- Write-Output "Cleaning up..."
- Remove-Item -Path $CefBinTarFileLocation -Force
- Remove-Item -Path $CefBinTarBz2FileLocation -Force
- Remove-Item -Path $CefExtractedLocation -Force -Recurse
-}
-
-Reset
\ No newline at end of file
diff --git a/src/DevScripts/download-cef-linux.ps1 b/src/DevScripts/download-cef-linux.ps1
deleted file mode 100644
index 74e8332c..00000000
--- a/src/DevScripts/download-cef-linux.ps1
+++ /dev/null
@@ -1,15 +0,0 @@
-#Run the base script first
-& "$PSScriptRoot/download-cef-base.ps1" linux64
-
-#"strip" libs of their debug symbols
-if($IsLinux)
-{
- Write-Output "Stipping Linux CEF libs from their debug symbols..."
- Get-ChildItem -Path "../ThirdParty/Libs/cef/linux64/*.so" -Recurse | % { & strip "$($_.FullName)" }
-}
-else
-{
- Write-Warning "Not striping Linux CEF libs. You need to be running under Linux for that."
-}
-
-Write-Output "Done!"
\ No newline at end of file
diff --git a/src/DevScripts/download-cef-macosx64.ps1 b/src/DevScripts/download-cef-macosx64.ps1
deleted file mode 100644
index 0af20b8b..00000000
--- a/src/DevScripts/download-cef-macosx64.ps1
+++ /dev/null
@@ -1,5 +0,0 @@
-& "$PSScriptRoot/download-cef-base.ps1" macosx64 -IncludeResources $false
-
-Move-Item "../ThirdParty/Libs/cef/macosx64/Chromium Embedded Framework.framework/Chromium Embedded Framework" "../ThirdParty/Libs/cef/macosx64/Chromium Embedded Framework.framework/libcef.dylib" -Force
-
-Write-Output "Done!"
\ No newline at end of file
diff --git a/src/DevScripts/download-cef-windows.ps1 b/src/DevScripts/download-cef-windows.ps1
deleted file mode 100644
index 7e59ecbe..00000000
--- a/src/DevScripts/download-cef-windows.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-& "$PSScriptRoot/download-cef-base.ps1" windows64
-
-Write-Output "Done!"
\ No newline at end of file
diff --git a/src/DevScripts/download_cef_base.py b/src/DevScripts/download_cef_base.py
new file mode 100644
index 00000000..3ac830ce
--- /dev/null
+++ b/src/DevScripts/download_cef_base.py
@@ -0,0 +1,60 @@
+import os
+import re
+import shutil
+
+from urllib.request import urlretrieve
+from tarfile import open as taropen
+
+def download_cef(os_platform: str) -> str:
+ """
+ Downloads and extracts CEF binaries
+
+ Returns where the extract tar contents are
+ """
+
+ # Get and read version file
+ cef_version_file = os.path.abspath(os.path.join(__file__, '../../ThirdParty/CefGlue/CefGlue/Interop/version.g.cs'))
+ if not os.path.exists(cef_version_file):
+ raise Exception('Cef version file does not exist!')
+
+ with open(cef_version_file, 'r') as version_file:
+ version_file = version_file.read()
+
+ # Find version in file
+ matches = re.search(r'CEF_VERSION = \"(.*)\"', version_file)
+ version_match = matches.group(1)
+
+ # Get temp path
+ temp_path = os.path.abspath(os.path.join(__file__, '../../ThirdParty/Libs/cef/temp/'))
+ if not os.path.exists(temp_path):
+ os.makedirs(temp_path, exist_ok=True)
+
+ # Download compiled cef tar.bz2
+ cef_tar_name = 'cef_binary_{0}_{1}_minimal'.format(version_match, os_platform)
+ cef_tar_download_url = 'https://cef-builds.spotifycdn.com/{0}.tar.bz2'.format(cef_tar_name)
+ cef_tar_path = os.path.join(temp_path, '{0}.tar.bz2'.format(cef_tar_name))
+
+ print('Downloading cef tar.gz from \'{0}\' to \'{1}\''.format(cef_tar_download_url, cef_tar_path))
+ urlretrieve(cef_tar_download_url, cef_tar_path)
+ if not os.path.exists(cef_tar_path):
+ raise Exception('Cef tar download filed!')
+
+ # Extract tar.bz2
+ cef_extracted_tar_path = os.path.abspath(os.path.join(__file__, '../../ThirdParty/Libs/cef/{0}'.format(os_platform)))
+ if os.path.exists(cef_extracted_tar_path):
+ shutil.rmtree(cef_extracted_tar_path)
+ os.makedirs(cef_extracted_tar_path, exist_ok=True)
+
+ print('Extracting \'{0}\' to \'{1}\'...'.format(cef_tar_path, cef_extracted_tar_path))
+
+ cef_tar_name_length = len(cef_tar_name) + 1
+
+ with taropen(cef_tar_path) as tar_file:
+ cef_subdir_files = []
+ for member in tar_file.getmembers():
+ member.path = member.path[cef_tar_name_length:]
+ cef_subdir_files.append(member)
+
+ tar_file.extractall(cef_extracted_tar_path, members=cef_subdir_files)
+
+ return cef_extracted_tar_path
diff --git a/src/DevScripts/download_cef_linux64.py b/src/DevScripts/download_cef_linux64.py
new file mode 100644
index 00000000..a5e264d3
--- /dev/null
+++ b/src/DevScripts/download_cef_linux64.py
@@ -0,0 +1,13 @@
+import subprocess
+
+from os.path import join
+from glob import glob
+
+from download_cef_base import download_cef
+
+cef_extracted_tar_path = download_cef('linux64')
+
+print('Stripping binaries with sstrip')
+dynamic_binaries = glob(join(cef_extracted_tar_path, 'Release', '*.so*'))
+for binary in dynamic_binaries:
+ subprocess.run(['strip', binary])
diff --git a/src/DevScripts/download_cef_macosarm64.py b/src/DevScripts/download_cef_macosarm64.py
new file mode 100644
index 00000000..635b21bd
--- /dev/null
+++ b/src/DevScripts/download_cef_macosarm64.py
@@ -0,0 +1,3 @@
+from download_cef_base import download_cef
+
+download_cef('macosarm64')
diff --git a/src/DevScripts/download_cef_macosx64.py b/src/DevScripts/download_cef_macosx64.py
new file mode 100644
index 00000000..405cc761
--- /dev/null
+++ b/src/DevScripts/download_cef_macosx64.py
@@ -0,0 +1,3 @@
+from download_cef_base import download_cef
+
+download_cef('macosx64')
diff --git a/src/DevScripts/download_cef_windows64.py b/src/DevScripts/download_cef_windows64.py
new file mode 100644
index 00000000..80896726
--- /dev/null
+++ b/src/DevScripts/download_cef_windows64.py
@@ -0,0 +1,3 @@
+from download_cef_base import download_cef
+
+download_cef('windows64')
diff --git a/src/DevScripts/publish-all.ps1 b/src/DevScripts/publish-all.ps1
deleted file mode 100644
index bb9cedae..00000000
--- a/src/DevScripts/publish-all.ps1
+++ /dev/null
@@ -1,4 +0,0 @@
-& "$PSScriptRoot/publish-shared.ps1"
-& "$PSScriptRoot/publish-cef-engine-windows.ps1"
-& "$PSScriptRoot/publish-cef-engine-linux.ps1"
-& "$PSScriptRoot/publish-cef-engine-macos64.ps1"
\ No newline at end of file
diff --git a/src/DevScripts/publish-cef-engine-linux.ps1 b/src/DevScripts/publish-cef-engine-linux.ps1
deleted file mode 100644
index 136a299e..00000000
--- a/src/DevScripts/publish-cef-engine-linux.ps1
+++ /dev/null
@@ -1,2 +0,0 @@
-dotnet publish ../UnityWebBrowser.Engine.Cef/SubProcess/UnityWebBrowser.Engine.Cef.SubProcess.csproj -r linux-x64 -p:PublishDir=../../Packages/UnityWebBrowser.Engine.Cef.Linux-x64/Engine~ --nologo
-dotnet publish ../UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj -r linux-x64 -p:PublishDir=../../Packages/UnityWebBrowser.Engine.Cef.Linux-x64/Engine~ --nologo
diff --git a/src/DevScripts/publish-cef-engine-macos64.ps1 b/src/DevScripts/publish-cef-engine-macos64.ps1
deleted file mode 100644
index 0aa1a9a3..00000000
--- a/src/DevScripts/publish-cef-engine-macos64.ps1
+++ /dev/null
@@ -1,12 +0,0 @@
-# Any platform can compile MacOS Ready to Run
-# https://docs.microsoft.com/en-us/dotnet/core/deploying/ready-to-run#cross-platformarchitecture-restrictions
-
-dotnet publish ../UnityWebBrowser.Engine.Cef/UnityWebBrowser.Engine.Cef.csproj -c ReleaseUnity -r osx-x64 -p:PublishReadyToRun=true --self-contained true --nologo
-
-#Create Engine~/ directory if it doesn't exist
-if (-Not (Test-Path "../Packages/UnityWebBrowser.Engine.Cef.MacOS-x64/Engine~/")) {
- New-Item -Path "../Packages/UnityWebBrowser.Engine.Cef.MacOS-x64/Engine~/" -ItemType Directory
- New-Item -Path "../Packages/UnityWebBrowser.Engine.Cef.MacOS-x64/Engine~/swiftshader/" -ItemType Directory
-}
-
-Copy-Item -Path "../UnityWebBrowser.Engine.Cef/bin/ReleaseUnity/osx-x64/publish/*" -Destination "../Packages/UnityWebBrowser.Engine.Cef.MacOS-x64/Engine~/" -Recurse -Force -PassThru
\ No newline at end of file
diff --git a/src/DevScripts/publish-cef-engine-windows.ps1 b/src/DevScripts/publish-cef-engine-windows.ps1
deleted file mode 100644
index 9b607d5c..00000000
--- a/src/DevScripts/publish-cef-engine-windows.ps1
+++ /dev/null
@@ -1 +0,0 @@
-dotnet publish ../UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj -r win-x64 -p:PublishDir=../../Packages/UnityWebBrowser.Engine.Cef.Win-x64/Engine~ --nologo
diff --git a/src/DevScripts/publish-shared.ps1 b/src/DevScripts/publish-shared.ps1
deleted file mode 100644
index 4adeb069..00000000
--- a/src/DevScripts/publish-shared.ps1
+++ /dev/null
@@ -1 +0,0 @@
-dotnet build ../VoltstroStudios.UnityWebBrowser.Shared/VoltstroStudios.UnityWebBrowser.Shared.csproj -c ReleaseUnity --nologo
\ No newline at end of file
diff --git a/src/DevScripts/sync-package-all.ps1 b/src/DevScripts/sync-package-all.ps1
deleted file mode 100644
index 70a88b27..00000000
--- a/src/DevScripts/sync-package-all.ps1
+++ /dev/null
@@ -1,2 +0,0 @@
-& "$PSScriptRoot/sync-package-main.ps1"
-& "$PSScriptRoot/sync-package-cef-engine.ps1"
\ No newline at end of file
diff --git a/src/DevScripts/sync-package-cef-engine.ps1 b/src/DevScripts/sync-package-cef-engine.ps1
deleted file mode 100644
index eac4b7a4..00000000
--- a/src/DevScripts/sync-package-cef-engine.ps1
+++ /dev/null
@@ -1,48 +0,0 @@
-# Version Check
-if ($PSVersionTable.PSVersion.Major -lt 7)
-{
- throw "You need to use the NEW PowerShell version! You can get it here: https://github.com/powershell/powershell#get-powershell"
-}
-
-$LicensePath = "../../LICENSE.md"
-Copy-Item -Path $LicensePath -Destination "../Packages/UnityWebBrowser.Engine.Cef/LICENSE.md" -Force -PassThru
-Copy-Item -Path $LicensePath -Destination "../Packages/UnityWebBrowser.Engine.Cef.Linux-x64/LICENSE.md" -Force -PassThru
-Copy-Item -Path $LicensePath -Destination "../Packages/UnityWebBrowser.Engine.Cef.Win-x64/LICENSE.md" -Force -PassThru
-
-#Find what version of CefGlue we are using
-$CefGlueVersionFile = "../ThirdParty/CefGlue/CefGlue/Interop/version.g.cs"
-$CefGlueVersionfileContent = Get-Content $CefGlueVersionFile
-$CefGlueVersionRegex = [regex] 'CEF_VERSION = \"(\d+.\d+.\d+)'
-
-$CefVersion = ""
-foreach($Content in $CefGlueVersionfileContent)
-{
- $Match = [System.Text.RegularExpressions.Regex]::Match($Content, $CefGlueVersionRegex)
- if($Match.Success)
- {
- $CefVersion = $Match.groups[1].value
- }
-}
-
-$CorePackagePath = "../Packages/UnityWebBrowser/package.json"
-$CorePackageJson = Get-Content $CorePackagePath | ConvertFrom-Json -AsHashtable
-$CorePackageVersion = $CorePackageJson["version"]
-
-$CefPackagesVersion = "$($CorePackageVersion)-$($CefVersion)"
-
-$EngineCefJsonPath = "../Packages/UnityWebBrowser.Engine.Cef/package.json"
-$EngineCefJson = Get-Content $EngineCefJsonPath | ConvertFrom-Json -AsHashtable
-$EngineCefJson["version"] = $CefPackagesVersion
-$EngineCefJson | ConvertTo-Json | Out-File -FilePath $EngineCefJsonPath
-
-$EngineCefLinuxJsonPath = "../Packages/UnityWebBrowser.Engine.Cef.Linux-x64/package.json"
-$EngineCefLinuxJson = Get-Content $EngineCefLinuxJsonPath | ConvertFrom-Json -AsHashtable
-$EngineCefLinuxJson["version"] = $CefPackagesVersion
-$EngineCefLinuxJson["dependencies"]["dev.voltstro.unitywebbrowser.engine.cef"] = $CefPackagesVersion
-$EngineCefLinuxJson | ConvertTo-Json | Out-File -FilePath $EngineCefLinuxJsonPath
-
-$EngineCefWinJsonPath = "../Packages/UnityWebBrowser.Engine.Cef.Win-x64/package.json"
-$EngineCefWinJson = Get-Content $EngineCefWinJsonPath | ConvertFrom-Json -AsHashtable
-$EngineCefWinJson["version"] = $CefPackagesVersion
-$EngineCefWinJson["dependencies"]["dev.voltstro.unitywebbrowser.engine.cef"] = $CefPackagesVersion
-$EngineCefWinJson | ConvertTo-Json | Out-File -FilePath $EngineCefWinJsonPath
\ No newline at end of file
diff --git a/src/DevScripts/sync-package-main.ps1 b/src/DevScripts/sync-package-main.ps1
deleted file mode 100644
index 1bdf715a..00000000
--- a/src/DevScripts/sync-package-main.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-Copy-Item -Path "../../LICENSE.md" -Destination "../Packages/UnityWebBrowser/LICENSE.md" -Force -PassThru
-Copy-Item -Path "../../LICENSE.md" -Destination "../Packages/UnityWebBrowser.Communication.Pipes/LICENSE.md" -Force -PassThru
-Copy-Item -Path "../../LICENSE.md" -Destination "../Packages/UnityWebBrowser.Unix-Support/LICENSE.md" -Force -PassThru
\ No newline at end of file
diff --git a/src/ThirdParty/Libs/cef/.gitignore b/src/ThirdParty/Libs/cef/.gitignore
new file mode 100644
index 00000000..d311c298
--- /dev/null
+++ b/src/ThirdParty/Libs/cef/.gitignore
@@ -0,0 +1,6 @@
+temp/
+linux64/
+macosarm64/
+macosx64/
+windows64/
+
diff --git a/src/ThirdParty/Libs/cef/linux64/.gitignore b/src/ThirdParty/Libs/cef/linux64/.gitignore
deleted file mode 100644
index 1a677b51..00000000
--- a/src/ThirdParty/Libs/cef/linux64/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-**.pak
-**.dat
-**.bin
-**.txt
-**.so
-**.so.1
-**.json
-chrome-sandbox
\ No newline at end of file
diff --git a/src/ThirdParty/Libs/cef/macosx64/.gitignore b/src/ThirdParty/Libs/cef/macosx64/.gitignore
deleted file mode 100644
index 54aa23b6..00000000
--- a/src/ThirdParty/Libs/cef/macosx64/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/Chromium Embedded Framework.framework/**
-**.a
-**.txt
-chrome-sandbox
\ No newline at end of file
diff --git a/src/ThirdParty/Libs/cef/windows64/.gitignore b/src/ThirdParty/Libs/cef/windows64/.gitignore
deleted file mode 100644
index d79a0e66..00000000
--- a/src/ThirdParty/Libs/cef/windows64/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-**.pak
-**.dat
-**.bin
-**.txt
-**.dll
-**.lib
-**.json
\ No newline at end of file
diff --git a/src/UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj b/src/UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj
index 14ea6f80..b695d4d0 100644
--- a/src/UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj
+++ b/src/UnityWebBrowser.Engine.Cef/Main/UnityWebBrowser.Engine.Cef.csproj
@@ -44,9 +44,9 @@
-
+
-
+
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
@@ -61,7 +61,7 @@
true
-
+
PreserveNewest
locales/%(Filename)%(Extension)
true
@@ -70,37 +70,37 @@
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
-
+
PreserveNewest
%(Filename)%(Extension)
true
@@ -118,7 +118,7 @@
true
-
+
PreserveNewest
locales/%(Filename)%(Extension)
true
diff --git a/src/UnityWebBrowser.Engine.Cef/SubProcess/UnityWebBrowser.Engine.Cef.SubProcess.csproj b/src/UnityWebBrowser.Engine.Cef/SubProcess/UnityWebBrowser.Engine.Cef.SubProcess.csproj
index bbe6cf5d..f7de003c 100644
--- a/src/UnityWebBrowser.Engine.Cef/SubProcess/UnityWebBrowser.Engine.Cef.SubProcess.csproj
+++ b/src/UnityWebBrowser.Engine.Cef/SubProcess/UnityWebBrowser.Engine.Cef.SubProcess.csproj
@@ -37,7 +37,7 @@
-
+
PreserveNewest
diff --git a/src/UnityWebBrowser.sln.DotSettings b/src/UnityWebBrowser.sln.DotSettings
index 0b461e52..88a6958f 100644
--- a/src/UnityWebBrowser.sln.DotSettings
+++ b/src/UnityWebBrowser.sln.DotSettings
@@ -71,4 +71,7 @@
UWB
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
<Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy>
+ <Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Types and namespaces"><ElementKinds><Kind Name="NAMESPACE" /><Kind Name="CLASS" /><Kind Name="STRUCT" /><Kind Name="ENUM" /><Kind Name="DELEGATE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy>
+ True
True
\ No newline at end of file