Just a simple git client using electron and nodegit, focus on lightweight and performance
Follow instructions from https://github.com/nodegit/nodegit.
JOBS=max npm_config_openssl_bin_url=skip pnpm run electron-rebuild
pnpm run dist
PKGBUILD 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 openssl
Follow instuctions 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 withvcpkg
we need avcpkg.json
file. Create the following file inC:\dev
:(What is{ "dependencies": [ "openssl" ], "builtin-baseline": "2ac61f87f69f0484b8044f95ab274038fbaf7bdd", "overrides": [ { "name": "openssl", "version-string": "1.1.1n" } ] }
builtin-baseline
, https://learn.microsoft.com/en-us/vcpkg/users/examples/versioning.getting-started#builtin-baseline) And run.\vcpkg\vcpkg.exe install
inC:\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
nodegit
will fail on windows. But theelectron-rebuild
script will succeed.
Install node modules:
$ pnpm install
Then run
$ pnpm run build
to bundle javascript-files and move assets to the dist/
directory.
Now run
$ pnpm run dist
to compile all the native dependencies etc. You can run this with CC="ccache gcc" JOBS=max pnpm run dist
(omit CC="ccache gcc"
if you don't have ccache
installed) to speed up compile time.