-
Notifications
You must be signed in to change notification settings - Fork 5
Build on Windows
This page provides step by step instructions on how to build PHP Desktop Chrome from sources.
Table of Contents
- Requirements
- Download PHP Desktop sources
- Download CEF sources / prebuilt binaries
- Build cefclient and copy CEF files to phpdesktop
These instructions are for building "chrome99" branch.
Requirements:
- Visual Studio 2022 Community Edition
- Windows SDK 10.0.19041
Clone git repository
If you would like to use CEF prebuilt binaries then go to Spotify Automated CEF Builds. You have to download CEF for the same branch and revision that phpdesktop uses, see "cef/README.txt". Look for CEF version in that file. Choose "Standard Distribution" binaries.
If you would like to build CEF from sources then see CEF Branches and building (external) wiki page.
The CEF binaries downloaded from Spotify after extracting have the "cef_binary_99.2.9+gf426765+chromium-99.0.4844.51_windows32" directory. From now on we will refer to this directory as "cef_binary/" directory.
- Install CMake 3.19.8 or newer from http://www.cmake.org/ . During installation choose an option to add cmake to user's PATH.
- Download Ninja from https://github.com/ninja-build/ninja/releases . Put ninja.exe in your PATH or copy it to the build/ directory you will be creating in next step.
- In "cef_binary/" create a "build" directory and enter it
- Execute
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"
(with quotes) - this sets environment variables for VS2022 for current session - all further commands need to be executed in current command window - Execute
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DUSE_SANDBOX=OFF ..
- Execute
ninja cefclient