-
Notifications
You must be signed in to change notification settings - Fork 41
Update WindowsPort.md as per #129 and other advisories #130
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
base: main
Are you sure you want to change the base?
Changes from 13 commits
dfc98a3
aa4b6c7
23de9e0
6beb1ae
617bab2
17f7833
c413ea1
f17aab2
8a3f853
4e61b14
8dc22c0
e7e3f67
be90997
f03dd45
49c61a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,42 @@ | ||
| # Windows port | ||
|
|
||
| It is using [cairo](https://www.cairographics.org/) for the graphics backend, [libcurl](https://curl.se/libcurl/) for the network backend. | ||
| It is using [skia](https://skia.org/) for the graphics backend, [libcurl](https://curl.se/libcurl/) for the network backend. | ||
| It supports only 64 bit Windows. | ||
|
|
||
| ## Cloning Webkit | ||
| Ensure that you are NOT cloning under an ancestor directory that is a git repository. This may confuse the `build-webkit` script and result in failure. | ||
| A shallow clone of the WebKit repository at a detached hash may work if you are just building and not intending to develop WebKit. Official Apple release tags are unlikely to work. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’d probably say “not guaranteed to work” instead of “unlikely to work”. We strive to keep things working on the main branch, but breakages happen and Apple can create a tag at any time. |
||
|
|
||
| ## Installing Development Tools | ||
|
|
||
| Install [the latest Visual Studio with "Desktop development with C++" workload](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation). | ||
| Install [the latest Visual Studio with "Desktop development with C++" workload](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation). Ensure that "vcpkg" has been included. | ||
citkane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [Activate Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode). | ||
| build-webkit script creates a symlink to a generated compile_commands.json. | ||
| If you have included *C++ Clang Tools for Windows* for the workload, it's Llvm will take precedence and the build may fail. For this scenario, explicitilty provide the full path to an alternative Windows Llvm's `clang-cl.exe` in the Webkit Command Prompt script. | ||
|
|
||
| Install CMake, Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. | ||
| Python 3.12 has [a problem for WebKit at the moment](https://webkit.org/b/261113). Use Python 3.11. | ||
| [Activate Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode). | ||
| `build-webkit` script creates a symlink to a generated compile_commands.json. | ||
|
|
||
| Install Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. | ||
| - Python 3.12+ potentially has [a problem for WebKit in some contexts](https://webkit.org/b/261113). Use Python 3.11.x if you experience issues. | ||
| - We use CMake 3.x that is bundled with the "Desktop development with C++" workload. Downstream vcpkg Woff2 has problems compiling with CMake 4+. | ||
|
|
||
| You can use [Chocolatey](https://community.chocolatey.org/) to install the tools. | ||
| [ActivePerl chocolatey package](https://community.chocolatey.org/packages/ActivePerl) has a problem and no package maintainer now. | ||
| XAMPP includes Perl, and running layout tests needs XAMPP. Install XAMPP instead. | ||
|
|
||
| ``` | ||
| choco install -y xampp-81 python311 ruby git cmake gperf llvm ninja | ||
| ```powershell | ||
| choco install -y xampp-81 python ruby git gperf llvm ninja | ||
| ``` | ||
|
|
||
| Install pywin32 Python module for run-webkit-tests and git-webkit. | ||
|
|
||
| ``` | ||
| ```powershell | ||
| python -m pip install pywin32 | ||
| ``` | ||
|
|
||
| Windows Git enables `autocrlf` by default. But, some layout tests files have to be checked out as LF line end style. See [Bug 240158](https://bugs.webkit.org/show_bug.cgi?id=240158). | ||
|
|
||
| ``` | ||
| ```powershell | ||
| git config --global core.autocrlf input | ||
| ``` | ||
|
|
||
|
|
@@ -39,7 +46,7 @@ If you prefer [WinGet](https://learn.microsoft.com/en-us/windows/package-manager | |
| Invoke the following command in an elevated PowerShell or cmd prompt. | ||
|
|
||
| ``` | ||
| winget install --scope=machine --id Git.Git Kitware.CMake Ninja-build.Ninja Python.Python.3.11 RubyInstallerTeam.Ruby.3.2 ApacheFriends.Xampp.8.2 LLVM.LLVM | ||
| winget install --scope=machine --id Git.Git Ninja-build.Ninja Python.Python.3.11 RubyInstallerTeam.Ruby.3.2 ApacheFriends.Xampp.8.2 LLVM.LLVM | ||
| winget install --id GnuWin32.Gperf | ||
| ``` | ||
|
|
||
|
|
@@ -62,7 +69,6 @@ cd %~dp0 | |
|
|
||
| path C:\xampp\apache\bin;%path% | ||
| path C:\xampp\perl\bin;%path% | ||
| path %ProgramFiles%\CMake\bin;%path% | ||
| path %ProgramFiles(x86)%\Microsoft Visual Studio\Installer;%path% | ||
| for /F "usebackq delims=" %%I in (`vswhere.exe -latest -property installationPath`) do set VSPATH=%%I | ||
|
|
||
|
|
@@ -73,6 +79,8 @@ set DUMPRENDERTREE_TEMP=%TEMP% | |
|
|
||
| set CC=clang-cl | ||
| set CXX=clang-cl | ||
| rem set CC=<path-to-llvm>\clang-cl.exe | ||
| rem set CXX=<path-to-llvm>\clang-cl.exe | ||
|
|
||
| rem set http_proxy=http://your-proxy:8080 | ||
| rem set https_proxy=%http_proxy% | ||
|
|
@@ -87,7 +95,13 @@ rem set JSC_useDOMJIT=0 | |
| rem You can show check TextureMapper FPS via WEBKIT_SHOW_FPS. | ||
citkane marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rem set WEBKIT_SHOW_FPS=1 | ||
|
|
||
| rem You can use ccache with pre-compiled headers @see https://ccache.dev/manual/latest.html#_precompiled_headers | ||
| rem set CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime | ||
|
|
||
| call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" | ||
| rem Set PATH to use the VS toolchain bundled CMake 3.x. This ensures that downstream vcpkg builds will succeed. | ||
| path %DevEnvDir%CommonExtensions\\Microsoft\\CMake\\CMake\\bin;%path% | ||
|
|
||
|
Comment on lines
103
to
113
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This patches the triplet file to force vcpkg to use the VS toolchain version of CMake 3. It is potentially fragile, but I think it beats all the messing with the devs build environment outside of the project scope.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies for the flip flop...
Comment on lines
+111
to
+113
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of forcing CMake 3.x in the developers global ENV, use the VS 2022 bundled CMake 3.x for the project build. |
||
| cd %~dp0 | ||
| start powershell | ||
| ``` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I right that skia is now the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, Skia is the default.