update document of build
This commit is contained in:
parent
cf425dfa56
commit
10fd1c7e9f
1 changed files with 69 additions and 2 deletions
71
README.md
71
README.md
|
|
@ -21,8 +21,75 @@ clang-format -style="{BasedOnStyle: webkit}" -i XX.c
|
|||
|
||||
使用默认 gofmt
|
||||
|
||||
# 3. misc
|
||||
## 3.1. Windows remap ctrl and alt key
|
||||
# 3. build environment and build (example of ubuntu)
|
||||
## 3.1 build environment
|
||||
|
||||
- Install nix package management tool
|
||||
|
||||
```sh
|
||||
sh <(curl -L https://nixos.org/nix/install) --daemon
|
||||
```
|
||||
|
||||
- Edit /etc/nix/nix.conf to make sure
|
||||
|
||||
```
|
||||
experimental-features = nix-command flakes
|
||||
sandbox = true
|
||||
sandbox-fallback = false
|
||||
substituters = https://mirrors.ustc.edu.cn/nix-channels/store https://cache.nixos.org https://cache.nixos.org/
|
||||
trusted-users = root <your account>
|
||||
```
|
||||
|
||||
make sure that you have restarted nix-daemon service after you have checked /etc/nix/nix.conf
|
||||
|
||||
- Install socat and config ssh (for clone by ssh protocol)
|
||||
|
||||
```sh
|
||||
nix profile add nixpkgs#socat
|
||||
```
|
||||
|
||||
.ssh/config
|
||||
```
|
||||
Host gitea.shenrs.eu
|
||||
HostName gitea.shenrs.eu
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
ProxyCommand socat - openssl-connect:gitea.shenrs.eu:2022,snihost=gitea.shenrs.eu,verify=0
|
||||
```
|
||||
|
||||
## 3.2 checkout source code
|
||||
|
||||
## 3.3 build (for package and release)
|
||||
|
||||
```sh
|
||||
cd xce/src
|
||||
|
||||
# for build debug version
|
||||
nix build --option sandbox false .#xce_debug
|
||||
|
||||
# for normal build
|
||||
nix build --option sandbox false .#xce
|
||||
```
|
||||
|
||||
You can find the generated binaries at =result= directory
|
||||
|
||||
## 3.4 build (for daily develop)
|
||||
|
||||
```sh
|
||||
cd xce/src
|
||||
nix develop
|
||||
|
||||
# using meson to generated build configuration (debug and address sanitize)
|
||||
|
||||
meson setup build --buildtype=debug -Db_sanitize=address
|
||||
|
||||
# run meson to build
|
||||
meson compile -C build
|
||||
|
||||
# The generated files will be in build/
|
||||
```
|
||||
|
||||
# 4. misc
|
||||
## 4.1. Windows remap ctrl and alt key
|
||||
create a reg file, e.g. remapkey.reg
|
||||
```
|
||||
Windows Registry Editor Version 5.00
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue