2021-06-30 04:24:06 -04:00
|
|
|
# Build
|
|
|
|
|
|
|
|
## Table of Contents
|
|
|
|
|
|
|
|
- [Dependencies](#dependencies)
|
|
|
|
- [Linux](#dependencies-linux)
|
|
|
|
- [MacOS](#dependencies-macos)
|
|
|
|
- [Windows](#dependencies-windows)
|
|
|
|
- [Build Scripts](#build-scripts)
|
|
|
|
- [Build in Docker](#build-docker)
|
2022-06-20 04:34:50 -04:00
|
|
|
- [X64](#build-docker-x64)
|
|
|
|
- [ARM 32bits](#build-docker-arm32)
|
2022-06-19 06:08:28 -04:00
|
|
|
- [Patch Update Process](#patch-update-process)
|
2022-06-20 04:34:50 -04:00
|
|
|
- [Semi-Automated](#patch-update-process-semiauto)
|
|
|
|
- [Manual](#patch-update-process-manual)
|
2021-06-30 04:24:06 -04:00
|
|
|
|
|
|
|
## <a id="dependencies"></a>Dependencies
|
|
|
|
|
2022-04-19 16:55:02 -04:00
|
|
|
- node 16
|
2021-06-30 04:24:06 -04:00
|
|
|
- yarn
|
|
|
|
- jq
|
2021-08-22 23:05:01 -04:00
|
|
|
- git
|
2021-06-30 04:24:06 -04:00
|
|
|
|
|
|
|
### <a id="dependencies-linux"></a>Linux
|
|
|
|
|
2021-12-12 16:08:34 -05:00
|
|
|
- GCC
|
|
|
|
- make
|
|
|
|
- pkg-config
|
2021-06-30 04:24:06 -04:00
|
|
|
- libx11-dev
|
|
|
|
- libxkbfile-dev
|
|
|
|
- libsecret-1-dev
|
|
|
|
- fakeroot
|
|
|
|
- rpm
|
2021-07-23 03:48:52 -04:00
|
|
|
- rpmbuild
|
|
|
|
- dpkg
|
2021-12-12 16:08:34 -05:00
|
|
|
- python3
|
|
|
|
- imagemagick (for AppImage)
|
2021-06-30 04:24:06 -04:00
|
|
|
|
|
|
|
### <a id="dependencies-macos"></a>MacOS
|
|
|
|
|
|
|
|
### <a id="dependencies-windows"></a>Windows
|
|
|
|
|
|
|
|
- powershell
|
|
|
|
- sed
|
2021-09-08 19:38:07 -04:00
|
|
|
- 7z
|
|
|
|
- [WiX Toolset](http://wixtoolset.org/releases/)
|
2022-05-07 03:50:30 -04:00
|
|
|
- python3
|
2021-12-12 16:08:34 -05:00
|
|
|
- 'Tools for Native Modules' from official Node.js installer
|
2021-06-30 04:24:06 -04:00
|
|
|
|
|
|
|
## <a id="build-scripts"></a>Build Scripts
|
|
|
|
|
|
|
|
Each platform has its build helper script in the directory `build`.
|
|
|
|
|
|
|
|
- Linux: `./build/build_linux.sh`
|
2021-08-22 23:05:01 -04:00
|
|
|
- MacOS: `./build/build_macos.sh`
|
2021-06-30 04:24:06 -04:00
|
|
|
- Windows: `powershell -ExecutionPolicy ByPass -File .\build\build_windows.ps1`
|
|
|
|
|
|
|
|
## <a id="build-docker"></a>Build in Docker
|
|
|
|
|
|
|
|
To build for Linux, you can alternatively build VSCodium in docker
|
|
|
|
|
2022-06-20 04:34:50 -04:00
|
|
|
### <a id="build-docker-x64"></a>X64
|
2022-05-14 12:44:59 -04:00
|
|
|
|
2021-06-30 04:24:06 -04:00
|
|
|
Firstly, create the container with:
|
|
|
|
```
|
|
|
|
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
|
|
|
|
```
|
|
|
|
|
|
|
|
When inside the container, you can use the following commands to build:
|
|
|
|
```
|
2022-04-19 16:55:02 -04:00
|
|
|
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
2021-07-25 19:15:55 -04:00
|
|
|
sudo apt-get install -y nodejs desktop-file-utils
|
2021-06-30 04:24:06 -04:00
|
|
|
|
|
|
|
npm install -g yarn
|
|
|
|
|
2022-05-14 12:44:59 -04:00
|
|
|
cd /root/vscodium
|
2021-06-30 04:24:06 -04:00
|
|
|
|
|
|
|
./get_repo.sh
|
|
|
|
|
|
|
|
export SHOULD_BUILD=yes
|
|
|
|
export OS_NAME=linux
|
|
|
|
export VSCODE_ARCH=x64
|
|
|
|
|
|
|
|
./build.sh
|
2021-10-27 21:37:44 -04:00
|
|
|
```
|
2022-05-14 12:44:59 -04:00
|
|
|
|
2022-06-20 04:34:50 -04:00
|
|
|
### <a id="build-docker-arm32"></a>ARM 32bits
|
2022-05-14 12:44:59 -04:00
|
|
|
|
|
|
|
Firstly, create the container with:
|
|
|
|
```
|
|
|
|
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
|
|
|
|
```
|
|
|
|
|
|
|
|
When inside the container, you can use the following commands to build:
|
|
|
|
```
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
|
|
|
sudo apt-get install -y nodejs desktop-file-utils
|
|
|
|
|
|
|
|
cd /root/vscodium
|
|
|
|
|
|
|
|
./get_repo.sh
|
|
|
|
|
|
|
|
export SHOULD_BUILD=yes
|
|
|
|
export OS_NAME=linux
|
|
|
|
export VSCODE_ARCH=armhf
|
|
|
|
export npm_config_arch=armv7l
|
|
|
|
export npm_config_force_process_config="true"
|
|
|
|
|
|
|
|
./build.sh
|
|
|
|
```
|
2022-06-19 06:08:28 -04:00
|
|
|
|
|
|
|
## <a id="patch-update-process"></a>Patch Update Process
|
|
|
|
|
2022-06-20 04:34:50 -04:00
|
|
|
## <a id="patch-update-process-semiauto"></a>Semi-Automated
|
|
|
|
|
|
|
|
- run `./build/build_<os>.sh`, if a patch is failing then,
|
|
|
|
- run `./build/update_patches.sh`
|
|
|
|
- when the script pause at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
|
|
|
|
- fix all the `*.rej` files
|
|
|
|
- run `yarn watch`
|
|
|
|
- run `./script/code.sh` until everything ok
|
|
|
|
- press any key to continue the script `update_patches.sh`
|
|
|
|
|
|
|
|
## <a id="patch-update-process-manual"></a>Manual
|
|
|
|
|
2022-06-19 06:08:28 -04:00
|
|
|
- run `./build/build_<os>.sh`, if a patch is failing then,
|
2022-06-20 04:34:50 -04:00
|
|
|
- open `vscode` directory in **VSCodium**
|
2022-06-19 06:08:28 -04:00
|
|
|
- revert all changes
|
|
|
|
- run `git apply --reject ../patches/<name>.patch`
|
|
|
|
- fix all the `*.rej` files
|
|
|
|
- run `yarn watch`
|
|
|
|
- run `./script/code.sh` until everything ok
|
|
|
|
- run `git diff > ../patches/<name>.patch`
|