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

Feature request: enable to specify userdata path in ctor of webview::webview #1008

Open
TsXor opened this issue Aug 28, 2023 · 2 comments
Open
Labels
enhancement New feature, enhancement of an existing feature or a request

Comments

@TsXor
Copy link

TsXor commented Aug 28, 2023

What OS are you using (uname -a, or Windows version)?

Windows 22H2

What programming language are you using (C/C++/Go/Rust)?

>gcc --version
gcc.exe (x86_64-posix-seh-rev2, Built by MinGW-W64 project) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What did you expect to see and what you saw instead?

I wanted to specify userdata path in windows, so I located the call to CreateCoreWebView2EnvironmentWithOptions in webview.
Sadly, I found that the userdata path was hardcoded to %APPDATA%\[program executable name].
I think an optional parameter that specify userdata path can be added to webview::webview::webview(bool debug = false, void *wnd = nullptr) in windows. Or at least provide a function to get where userdata went so that I can delete it on request or use some symlink magic.
Not clear about Linux or MacOS backend, but they should have an option to specify userdata path?

@SteffenL SteffenL added the enhancement New feature, enhancement of an existing feature or a request label Aug 28, 2023
@TsXor
Copy link
Author

TsXor commented Aug 29, 2023

Here is my commit to enable to specify userdata path on Windows: TsXor@52dc59e
I only modified the Windows part, which is not enough for a PR, so I put it here.

@SteffenL
Copy link
Collaborator

Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, enhancement of an existing feature or a request
Development

No branches or pull requests

2 participants