ChatGPT-Next-Web 代碼更新很快,但是提供的客戶端一週才發布一次,想用上最新的功能就需要自己構建一下桌面客戶端了,這裡記錄一下構建流程。
結論:不要交叉編譯 Tauri 程序,否則會變得不幸。
準備工作#
conda activate node
git clone --depth=1 -b main --single-branch https://github.com/Yidadaa/ChatGPT-Next-Web.git
cd ChatGPT-Next-Web
npm install -g yarn
npm install
# conda install -c conda-forge rust
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
curl https://sh.rustup.rs -sSf | sh
yarn tauri info
修改配置#
# app/masks/cn.ts 中修改默認的面具
# app/constant.ts 中修改默認的模型
# app/store/config.ts 中修改默認的設置
構建應用#
export PATH=$HOME/.cargo/bin:$PATH
rustc --print target-list | grep 'x86_64'| grep 'windows'
rustup target add x86_64-pc-windows-gnu
(容器外) sudo docker-compose exec code-server apt update
(容器外) sudo docker-compose exec code-server apt-get install gcc-mingw-w64-x86-64
yarn tauri build --target x86_64-pc-windows-gnu
Network Error: Error encountered in the status line: Connection reset by peer
- Windows 上的解決方案
- linux 上完全不知道 NSIS-ApplicationID 要安裝到哪裡,設置普通的代理沒用,透明代理要改的地方太多了,放棄了。
- 好不容易下載完了,不知道為什麼要在 linux 上運行
makensis.exe