- nodejs 16.17 or higher
- yarn 1.x
- jq 1.x
- git
- python3.11
- python3-distutils
- python3-setuptools
- gcc
- g++
- make
- pkg-config
- libx11-dev
- libxkbfile-dev
- libsecret-1-dev
- libkrb5-dev
- fakeroot
- rpm
- rpmbuild
- dpkg
- imagemagick (for AppImage)
- snapcraft (for .snap)
See the common dependencies and XCode 13.x or higher
- bash (such as Git Bash from Git for Windows or MSYS2)
- powershell
- sed (bundled with Git Bash)
- jq.exe > https://jqlang.github.io/jq/download/ (rename to jq.exe and put in your PATH)
- 7z > https://www.7-zip.org/download.html (download the "7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager " and add to your existing 7-Zip installation folder, then add that folder to your path)
- WiX Toolset
- 'Tools for Native Modules' from the official Node.js installer OR Visual Studio 2019/2022 with C++ Workload added
A build helper script can be found at build/build.sh
.
A wrapper I made for this script that also passes compiler optimization flags, and patches the source for Win7/8/8.1 is ./build.sh
- Linux:
./get_repo.sh && ./build.sh --linux
- MacOS:
./get_repo.sh && ./build.sh --mac
- Windows:
./get_repo.sh && ./build.sh --win
– Use the --help
flag to see all available options.
NOTE: To build for Windows 7/8/8.1 or Ubuntu 18.04/Debian 9, use ./win7_patch.sh
after get_repo.sh, and before build_codium.sh. For MacOS 10.13/10.14, use ./macos_patch.sh
instead.
The insider
version can be built with ./build/build.sh -i
on the insider
branch.
You can try the latest version with the command ./build/build.sh -il
but the patches might not be up to date.
The script build/build.sh
provides several flags:
-i
: build the Insiders version-l
: build with latest version of Visual Studio Code-o
: skip the build step-p
: do not generate the packages/assets/installers-s
: do not retrieve the source code of Visual Studio Code, it won't delete the existing build
# for the stable version
cd ./stores/snapcraft/stable
# for the insider version
cd ./stores/snapcraft/insider
# create the snap
snapcraft --use-lxd
# verify the snap
review-tools.snap-review --allow-classic codium*.snap
- run
./build/build_<os>.sh
, if a patch is failing then, - run
./build/update_patches.sh
- when the script pauses at
Press any key when the conflict have been resolved...
, openvscode
directory in Codium - fix all the
*.rej
files - run
yarn watch
- run
./script/code.sh
until everything is ok - press any key to continue the script
update_patches.sh
- run
./build/build_<os>.sh
, if a patch is failing then, - open
vscode
directory in Codium - revert all changes
- run
git apply --reject ../patches/<name>.patch
- fix all the
*.rej
files - run
yarn watch
- run
./script/code.sh
until everything is ok - run
git diff > ../patches/<name>.patch
To run icons/build_icons.sh
, you will need:
- imagemagick
- png2icns (
npm install png2icns -g
) - librsvg