qt_cef_poc
qt_cef_poc copied to clipboard
Proof of concept of simple browser w/ CEF and Qt
qt_cef_poc
Proof of concept of a very simplistic cross-platform Qt browser using Chromium Embedded Framework.
Building
Windows Prerequisites
Before running the build script on Windows, you must have the prerequisites:
- Latest Qt (5.x) installed w/
qmake.exeon thePATH - Latest CMake installed w/
cmake.exeon thePATH - Latest Python (2.x) installed w/
python.exeon thePATH - Latest Go installed w/
go.exeon thePATH - MSVC 2015 Build Tools installed w/ the following
executed to put 64-bit VC compiler on the
PATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - Latest Windows 64-bit standard dist of CEF
extracted w/
CEF_DIRenvironment variable set to the base CEF extracted dir - This repo cloned w/ the shell at the repo root
Linux Prerequisites
Before running the build script on Windows, you must have the prerequisites:
- Latest Qt (5.x) installed w/
qmakeon thePATH - Latest CMake installed w/
cmakeon thePATH - Latest Python (2.x) installed w/
pythonon thePATH - Latest Go installed w/
goon thePATH - Latest GCC installed w/
gccandg++on thePATH - Latest Make installed w/
makeon thePATH - Latest Linux 64-bit standard dist of CEF
extracted w/
CEF_DIRenvironment variable set to the base CEF extracted dir - Latest GTK 2.x installed and on the library path
- This repo cloned w/ the shell at the repo root
MacOS Prerequisites
(TODO)
Running Build
The application uses the CEF C++ wrapper, which can be built via:
go run build.go build-cef
Now the application can easily be run via:
go run build.go run
That will run the debug version. For the release version, run:
go run build.go run release
Internally, that just builds and runs the exe. To just build, call build instead. To package a deployment artifact
from a previously run build, package is used. For example, to package a release deployment artifact from a
previously run release build, run:
go run build.go package release
Once complete, the package(s) will in release/package (e.g. qt_cef_poc.zip in Windows)
TODO
- Fix focus issues between browser and URL bar on all platforms
- Move everything but the exe to a sub folder for cleaner deployment
- For CEF, see this post
- May need to manually
LoadLibraryand/or useSetDllDirectory - Consider instead cross platform shortcuts at the top level instead
- Chrome does this, see their deployment dir and then look at their code on how they do it