2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-17 14:02:12 +00:00

refactor: use new webwindowed api (#831)

* chore: update webview with new api

* chore: update modman to use new webview api

* chore: use title handler plugin from webview lib

* chore: use favicon plugin from webview lib

* chore: use vite-plugin-cpp-header from webview repo

* chore: use asset handler from webview lib

* chore: make webview utility

* chore: rename webview to webwindowed

* chore: Rename code usages to webwindowed
This commit is contained in:
Jan
2026-06-16 09:50:34 +02:00
committed by GitHub
parent b2aa4749c1
commit 8dba13f913
41 changed files with 352 additions and 1116 deletions
Submodule thirdparty/webview deleted from 0ae23fc2da
Vendored Submodule
+1
Submodule thirdparty/webwindowed added at 1e5e89d054
+12 -21
View File
@@ -1,20 +1,17 @@
webview = {}
webwindowed = {}
function webview:include(includes)
function webwindowed:include(includes)
if includes:handle(self:name()) then
includedirs {
path.join(ThirdPartyFolder(), "webview/core/include"),
path.join(ThirdPartyFolder(), "webwindowed/include"),
path.join(self:msWebviewDir(), "build/native/include")
}
end
end
function webview:link(links)
function webwindowed:link(links)
if os.host() == "windows" then
links:add("WebView2LoaderStatic")
links:add("gdiplus.lib")
filter "platforms:x86"
libdirs {
path.join(self:msWebviewDir(), "build/native/x86")
@@ -30,32 +27,26 @@ function webview:link(links)
links:add(self:name())
end
function webview:use()
function webwindowed:use()
end
function webview:name()
return "webview"
function webwindowed:name()
return "webwindowed"
end
function webview:project()
function webwindowed:project()
local folder = ThirdPartyFolder()
local includes = Includes:create()
project(self:name())
targetdir(TargetDirectoryLib)
location "%{wks.location}/thirdparty/%{prj.name}"
kind "StaticLib"
kind "Utility"
language "C++"
files {
path.join(folder, "webview/core/include/**.h"),
path.join(folder, "webview/core/include/**.hh"),
path.join(folder, "webview/core/src/**.cc")
}
defines {
"WEBVIEW_STATIC"
path.join(folder, "webwindowed/include/**.hpp")
}
if os.host() == "windows" then
@@ -73,11 +64,11 @@ function webview:project()
warnings "off"
end
function webview:msWebviewDir()
function webwindowed:msWebviewDir()
return path.join(BuildFolder(), "thirdparty/ms-webview2")
end
function webview:installWebview2()
function webwindowed:installWebview2()
local version = "1.0.3485.44"
local webviewDir = self:msWebviewDir()
local versionFile = path.join(webviewDir, "ms-webview2.txt")