Limour

Limour

临床医学在读。

[Record] Building ChatGPT-Next-Web Desktop Application

ChatGPT-Next-Web code updates quickly, but the provided client is only released once a week. If you want to use the latest features, you need to build the desktop client yourself. Here is a record of the building process.

Conclusion: Do not cross-compile Tauri programs, otherwise it will become unfortunate.

Preparation#

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

Modify configuration#

# Modify the default mask in app/masks/cn.ts
# Modify the default model in app/constant.ts
# Modify the default settings in app/store/config.ts

Build the application#

export PATH=$HOME/.cargo/bin:$PATH
rustc --print target-list | grep 'x86_64'| grep 'windows'
rustup target add x86_64-pc-windows-gnu
(Outside the container) sudo docker-compose exec code-server apt update
(Outside the container) 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

  • Solution for Windows
  • I have no idea where to install NSIS-ApplicationID on Linux. Setting up a regular proxy doesn't work, and there are too many changes to make for a transparent proxy, so I gave up.
  • Finally finished downloading, don't know why I have to run makensis.exe on Linux.
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.