Mercurial > dwindows
changeset 2123:589896c07c91
Win: Use GetTempPathW() to get a location for the embedded Edge (Chromium) data.
This allows apps to run from \Program Files\ since the apps can't normally write to
this location, prior to this change trying to open a web view would fail after install.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 25 Jun 2020 00:00:48 +0000 |
parents | 7ba8c8ff548f |
children | f9a2fc59611c |
files | win/edge.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/win/edge.cpp Wed Jun 24 02:27:28 2020 +0000 +++ b/win/edge.cpp Thu Jun 25 00:00:48 2020 +0000 @@ -226,7 +226,11 @@ BOOL EdgeBrowser::Detect(VOID) { - CreateCoreWebView2EnvironmentWithOptions(nullptr, nullptr, nullptr, + WCHAR tempdir[MAX_PATH+1]; + + GetTempPathW(MAX_PATH, tempdir); + + CreateCoreWebView2EnvironmentWithOptions(nullptr, tempdir, nullptr, Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>( [this](HRESULT result, ICoreWebView2Environment* env) -> HRESULT { // Successfully created Edge environment, return TRUE