webkit编译
程序员文章站
2022-04-05 15:21:00
...
环境: ubuntu21x64
安装apt-fast
add-apt-repository ppa:apt-fast/stable
apt update
apt install apt-fast -y
#cat /etc/apt/sources.list.d/apt-fast-ubuntu-stable-impish.list
#debian需要下面这句话:
#apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 1EE2FF37CA8DA16B
安装webkit依赖
apt-fast install build-essential -y
apt-fast install cmake -y
apt install libcairo2* -y
apt-fast install libgcrypt20* -y
apt-fast install libharfbuzz* -y
apt-fast install libjpeg* -y
apt-fast install libxml2* -y
apt-fast install sqlite3* libsqlite3-dev -y
apt list libatk1.0-0
apt-fast install libatk1.0-* -y
apt-fast install libwebp-dev -y
apt-fast install libgtk-3-dev -y
apt list libsoup2.4-1
apt-fast install libsoup2.4-1 -y
apt-fast install libsoup2.4-dev -y
apt search libwpe
apt search wpe
apt-fast install libxslt-dev -y
apt-fast install libsecret-1-dev -y
apt-fast install gobject-introspection -y
apt-fast install libtasn1-6-dev -y
apt-fast install libxt-dev -y
apt-fast install libnotify-dev -y
apt-fast install libhyphen-dev -y
apt-fast install libjpeg-dev -y
apt-fast install libwoff-dev -y
apt-fast install libsystemd-dev -y
apt-fast install libseccomp-dev -y
apt-fast install libgstreamer1.0-dev -y
apt-fast install libgstreamer-plugins-base1.0-dev -y
apt-fast install gperf -y
下载webkit并编译
axel -n 20 https://codeload.github.com/WebKit/WebKit/zip/refs/heads/main
#保存成 WebKit-main.zip了
unzip WebKit-main.zip
#解压、并重命名、移动 为 /webkit
mkdir /webkit/build
cd /webkit/build
#生成Makefile
cmake -DCMAKE_BUILD_TYPE=Debug -DPORT=GTK -DUSE_SOUP2=ON -DUSE_WPE_RENDERER=OFF -DENABLE_GAMEPAD=OFF -DENABLE_INTROSPECTION=OFF -DENABLE_SPELLCHECK=OFF -DUSE_OPENJPEG=OFF -DUSE_LCMS=OFF -DENABLE_MINIBROWSER=ON ..
#通过Makefile编译
make -j 8
建议开发工具用clion
clion 编译会产生目录 /webkit/cmake-build-debug/
MiniBrowser编译
安装Makefile依赖查看工具 makefile2graph
git clone https://github.com/lindenb/makefile2graph
cd makefile2graph
make
sudo mv ./make2graph /bin/
编译MiniBrowser
cmake --build /webkit/cmake-build-debug --target MiniBrowser -- -j 6
查看MiniBrowser的依赖
只要有Makefile即可,无需先编译
cd /webkit/cmake-build-debug/Tools/MiniBrowser/gtk/
make -Bnd | make2graph > output.dot
# apt-fast install graphviz -y
#make -Bnd | make2graph | dot -Tpng -o out.png
上一篇: java反射机制是什么
下一篇: php-fpm工作原理是什么