Just a simple git client using electron and nodegit, focus on lightweight and performance
Build for linux:
pnpm install
# make sure nodegit dependencies are installed and build nodegit against node
# pnpm does not clone with submodules so need to re-clone the nodegit repo
rm -rf node_modules/nodegit && \
mkdir node_modules/nodegit && \
pushd node_modules/nodegit && { \
git clone --recurse-submodules https://github.com/weedz/nodegit . && \
# `--ignore-scripts` to prevent something (node-gyp ?) from automatically building
pnpm install --ignore-scripts && \
JOBS=max pnpm run rebuild \
}; popd;
# build nodegit for electron, and "compile" typescript files
make
pnpm startFollow instructions from https://github.com/nodegit/nodegit.
makePKGBUILD is available from https://github.com/weedz/git-good-pkgbuild.
To successfully build/link nodegit on linux you will need the following packages:
build-essential
libssh-dev
libkrb5-dev
Install https://github.com/Microsoft/vcpkg (C and C++ package manager for windows),
needed for openssl dependency. Then install the openssl package with:
> vcpgk install opensslFollow instructions here, https://github.com/Microsoft/vcpkg.
-
Clone to something like
C:\dev\vcpkg. And run the "bootstrap" script. -
On windows we need
openssl@1.1.1. In order to install this withvcpkgwe need avcpkg.jsonfile. Create the following file inC:\dev:{ "dependencies": [ "openssl" ], "builtin-baseline": "2ac61f87f69f0484b8044f95ab274038fbaf7bdd", "overrides": [ { "name": "openssl", "version-string": "1.1.1n" } ] }(What is
builtin-baseline, https://learn.microsoft.com/en-us/vcpkg/users/examples/versioning.getting-started#builtin-baseline) And run.\vcpkg\vcpkg.exe installinC:\dev. -
Make sure to use correct Visual Studio version, https://github.com/nodejs/node-gyp#on-windows. Does not build with msvs2022. Need msvs2019:
npm config set msvs_version 2019 -
Seems like the "postinstall" script for
nodegitwill fail on windows. But theelectron-rebuildscript will succeed.
Install node modules:
pnpm installThen run
pnpm run buildto bundle javascript-files and move assets to the dist/ directory.