下面介绍如何编译 GephGui, 成品就是你从官网上下载的那样子, tar.gz 解压后的内容
为什么要自己编译? 因为 flatpak 就是一坨热气腾腾的💩
- 准备一个纯净的 debian 系统, 这里就直接使用 docker 的 debian:buster 进行编译
docker run \
-v ~/build:/build \
--rm -it debian:buster /bin/bash
- 复制粘贴以下命令
# prepare compile environment
apt update && apt install -y \
curl git \
libgtk-3-dev libappindicator3-dev libwebkit2gtk-4.0-dev \
librsvg2-dev libssl-dev patchelf strace libpango1.0-dev \
libgdk-pixbuf2.0-dev gcc clang g++ zlib1g-dev libmpc-dev \
libmpfr-dev libgmp-dev build-essential &&\
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh &&\
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&\
source ~/.bashrc &&\
apt update && apt install -y nodejs
# build front end
git clone --recurse-submodules https://github.com/geph-official/gephgui-wry.git /gephgui-wry && \
cd /gephgui-wry/gephgui && npm install && npm run build
# build geph4-client and gephgui-wry, fetch blobs
mkdir -p /build && \
git clone https://github.com/geph-official/geph4-client.git /geph4-client && \
git clone https://github.com/geph-official/gephgui-pkg.git /gephgui-pkg && \
cd /geph4-client && cargo build --release && \
cd /gephgui-wry && cargo build --release && \
mv /geph4-client/target/release/geph4-client /build && \
mv /gephgui-wry/target/release/gephgui-wry /build && \
mv /gephgui-pkg/blobs/linux-x64/* /build && \
chmod -R +x /build
exit
- 编译完成. build 文件夹里的东西就是编译产物了. 执行下面的命令准备运行环境
# 装这个是为了应对缺少 libssl.so.1.1 和 libcrypt.so.1.1 的问题
echo "deb https://security.ubuntu.com/ubuntu focal-security main" | \
tee /etc/apt/sources.list.d/focal-security.list && \
apt update && apt install -y \
libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev libssl1.1 && \
mv ~/build/* /usr/local/bin
- 执行下面命令运行 gephgui
gephgui-wry
我用 github actions 每日自动编译生成 docker image, 如果只要编译好的二进制文件可以直接从 docker image 里 copy 出来.
$ docker run -d justinhimself/gephgui
7b1e6c0b4ed909989091134d478a68a87e1c09db24dd5dbd5e571b9ca03dfcc3
$ docker cp 7b1e6c0b4ed9:/app ~/build
然后安装方法还是和上面一样.
上面的
rm -rf /build
是认真的吗,会对新手造成困扰吧。本来也没必要手动删除容器的内容。