mirror of
https://github.com/chenasraf/webview_cef.git
synced 2026-05-18 01:49:03 +00:00
Merge pull request #38 from mantreshkhurana/README-Update
README Update
This commit is contained in:
75
README.md
75
README.md
@@ -1,14 +1,21 @@
|
||||
# webview_cef <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/pub/likes/webview_cef?logo=dart" alt="Pub.dev likes"/></a> <a href="https://pub.dev/packages/webview_cef" alt="Pub.dev popularity"><img src="https://img.shields.io/pub/popularity/webview_cef?logo=dart"/></a> <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/pub/points/webview_cef?logo=dart" alt="Pub.dev points"/></a> <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/pub/v/webview_cef.svg" alt="latest version"/></a> <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/badge/macOS%20%7C%20Windows-blue?logo=flutter" alt="Platform"/></a>
|
||||
Flutter Desktop webview backed by CEF (Chromium Embedded Framework). *Still working in progress
|
||||
# WebView CEF
|
||||
|
||||
<a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/pub/likes/webview_cef?logo=dart" alt="Pub.dev likes"/></a> <a href="https://pub.dev/packages/webview_cef" alt="Pub.dev popularity"><img src="https://img.shields.io/pub/popularity/webview_cef?logo=dart"/></a> <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/pub/points/webview_cef?logo=dart" alt="Pub.dev points"/></a> <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/pub/v/webview_cef.svg" alt="latest version"/></a> <a href="https://pub.dev/packages/webview_cef"><img src="https://img.shields.io/badge/macOS%20%7C%20Windows-blue?logo=flutter" alt="Platform"/></a>
|
||||
|
||||
Flutter Desktop WebView backed by CEF (Chromium Embedded Framework).
|
||||
|
||||
## Requirements
|
||||
|
||||
# requirements
|
||||
- Windows 7+
|
||||
- macOS 10.12+
|
||||
|
||||
# How To Use
|
||||
## Windows
|
||||
Inside your application folder, you need to add two lines in your ```windows\runner\main.cpp```.(Because of Chromium multi process arch.)
|
||||
```
|
||||
## How To Use
|
||||
|
||||
### Windows
|
||||
|
||||
Inside your application folder, you need to add two lines in your `windows\runner\main.cpp`.(Because of Chromium multi process architecture.)
|
||||
|
||||
```cpp
|
||||
#include "webview_cef/webview_cef_plugin_c_api.h"
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
@@ -16,45 +23,57 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
//start cef deamon processes. MUST CALL FIRST
|
||||
initCEFProcesses();
|
||||
```
|
||||
When first time building the project, a prebuilt cef bin package (200MB, link in release) will be downloaded automatically, hence you may wait for a longer time if you are building the project for the first time.
|
||||
|
||||
When building the project for the first time, a prebuilt cef bin package (200MB, link in release) will be downloaded automatically, so you may wait for a longer time if you are building the project for the first time.
|
||||
|
||||
## macOS
|
||||
1.Download prebuilt cef bundles from [arm64](https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_mac_arm64/CEFbins-mac103.0.12-arm64.zip) or [intel](https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_mac_intel/mac103.0.12-Intel.zip) depends on your target machine arch.
|
||||
|
||||
Note: You can also download [universal binary](https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_mac_universal/mac103.0.12-universal.zip) for build an mac-universal app if you want to build an mac universal app. See [#30](/../../issues/30). Thanks to @okiabrian123.
|
||||
1. Download prebuilt cef bundles from [arm64](https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_mac_arm64/CEFbins-mac103.0.12-arm64.zip) or [intel](https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_mac_intel/mac103.0.12-Intel.zip) depends on your target machine arch.
|
||||
|
||||
2.Unzip the archieve and put all files into macos/third/cef.
|
||||
> Note: You can also download [universal binary](https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin_mac_universal/mac103.0.12-universal.zip) for build an mac-universal app if you want to build an mac universal app. See [#30](/../../issues/30). Thanks to @okiabrian123.
|
||||
|
||||
3.Run the example app.
|
||||
2. Unzip the archive and put all files into `macos/third/cef`.
|
||||
|
||||
[HELP WANTED!] Finding a more elegant way to distribute the prebuilt package.
|
||||
3 Run the example app.
|
||||
|
||||
Notice: currently the project haven't enable multi process mode because of debug convenience. You may want enable multi process mode by changing the implementation and built your own helper bundle. (Finding a more elegant way in the future)
|
||||
`**[HELP WANTED!]**` Finding a more elegant way to distribute the prebuilt package.
|
||||
|
||||
# todos (PR welcome!)
|
||||
- [x] macos support
|
||||
> Note: Currently the project has not been enabled with multi process support due to debug convenience. If you want to enable multi process support, you may want enable multi process mode by changing the implementation and build your own helper bundle. (Finding a more elegant way in the future.)
|
||||
|
||||
## Todos
|
||||
|
||||
> PRs are welcome!
|
||||
|
||||
- [x] Windows support
|
||||
- [x] macOS support
|
||||
- [ ] Linux support
|
||||
- [ ] multi instance support
|
||||
- [ ] Multi instance support
|
||||
- [ ] IME support
|
||||
- [x] mouse events support
|
||||
- [ ] js bridge support
|
||||
- [x] release to pub
|
||||
- [x] trackpad support (flutter 3.3)
|
||||
- [ ] better macos binary distribution
|
||||
- [ ] easier way to integrate macos helper bundles(multi process)
|
||||
- [x] Mouse events support
|
||||
- [ ] JS bridge support
|
||||
- [x] Release to pub
|
||||
- [x] Trackpad support (flutter 3.3)
|
||||
- [ ] Better macOS binary distribution
|
||||
- [ ] Easier way to integrate macos helper bundles(multi process)
|
||||
- [x] devTools support
|
||||
|
||||
# demo
|
||||
### Windows
|
||||
## Demo
|
||||
|
||||
This demo is a simple webview app that can be used to test the webview_cef plugin.
|
||||
|
||||
### In Windows
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### macOS
|
||||
### In macOS
|
||||
|
||||

|
||||

|
||||
<img width="1397" alt="image" src="https://user-images.githubusercontent.com/7610615/195818746-e5adf0ef-dc8c-48ad-9b11-e552ca65b08a.png">
|
||||
|
||||
# thanks
|
||||
This project inspired by https://github.com/jnschulze/flutter-webview-windows
|
||||
## Thanks
|
||||
|
||||
This project is inspired from [**`flutter_webview_windows`**](https://github.com/jnschulze/flutter-webview-windows)
|
||||
|
||||
Reference in New Issue
Block a user