Skip to content

Commit 1fc5d9f

Browse files
committed
we need a Makefile
.. and update README
1 parent 81ec38d commit 1fc5d9f

4 files changed

Lines changed: 254 additions & 215 deletions

File tree

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
all: check git-good
2+
3+
check:
4+
pnpm run lint
5+
6+
clean:
7+
rm -rf dist
8+
9+
nodegit:
10+
pnpm run build:native
11+
12+
git-good: nodegit
13+
pnpm run build

README.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
11
# git-good
2+
23
Just a simple git client using electron and nodegit, focus on lightweight and performance
34

5+
Build for linux:
6+
7+
```bash
8+
pnpm install
9+
10+
# make sure nodegit dependencies are installed and build nodegit against node
11+
# pnpm does not clone with submodules so need to re-clone the nodegit repo
12+
rm -rf node_modules/nodegit && \
13+
mkdir node_modules/nodegit && \
14+
pushd node_modules/nodegit && { \
15+
git clone --recurse-submodules https://github.com/weedz/nodegit . && \
16+
# `--ignore-scripts` to prevent something (node-gyp ?) from automatically building
17+
pnpm install --ignore-scripts && \
18+
JOBS=max pnpm run rebuild \
19+
}; popd;
20+
21+
# build nodegit for electron, and "compile" typescript files
22+
make
23+
pnpm start
24+
```
25+
426
## Build from source
527

628
Follow instructions from <https://github.com/nodegit/nodegit>.
729

830
### Linux
931

10-
```
11-
JOBS=max npm_config_openssl_bin_url=skip pnpm run electron-rebuild
12-
pnpm run dist
32+
```bash
33+
make
1334
```
1435

1536
### Arch Linux
@@ -19,25 +40,30 @@ PKGBUILD is available from <https://github.com/weedz/git-good-pkgbuild>.
1940
### Ubuntu/debian
2041

2142
To successfully build/link nodegit on linux you will need the following packages:
22-
```
43+
44+
```plain
2345
build-essential
2446
libssh-dev
2547
libkrb5-dev
2648
```
2749

2850
### Windows
2951

30-
Install <https://github.com/Microsoft/vcpkg> (C and C++ package manager for windows), needed for openssl dependency. Then install the `openssl` package with:
52+
Install <https://github.com/Microsoft/vcpkg> (C and C++ package manager for windows),
53+
needed for openssl dependency. Then install the `openssl` package with:
54+
3155
```bash
3256
> vcpgk install openssl
3357
```
3458

3559
#### vcpkg
3660

37-
Follow instuctions here, <https://github.com/Microsoft/vcpkg>.
61+
Follow instructions here, <https://github.com/Microsoft/vcpkg>.
3862

3963
1. Clone to something like `C:\dev\vcpkg`. And run the "bootstrap" script.
40-
2. On windows we need `openssl@1.1.1`. In order to install this with `vcpkg` we need a `vcpkg.json` file. Create the following file in `C:\dev`:
64+
2. On windows we need `openssl@1.1.1`. In order to install this with `vcpkg`
65+
we need a `vcpkg.json` file. Create the following file in `C:\dev`:
66+
4167
```json
4268
{
4369
"dependencies": [
@@ -52,26 +78,26 @@ Follow instuctions here, <https://github.com/Microsoft/vcpkg>.
5278
]
5379
}
5480
```
81+
5582
(What is `builtin-baseline`, <https://learn.microsoft.com/en-us/vcpkg/users/examples/versioning.getting-started#builtin-baseline>)
5683
And run `.\vcpkg\vcpkg.exe install` in `C:\dev`.
57-
3. 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`
58-
4. Seems like the "postinstall" script for `nodegit` will fail on windows. But the `electron-rebuild` script will succeed.
84+
3. Make sure to use correct Visual Studio version, <https://github.com/nodejs/node-gyp#on-windows>.
85+
Does not build with msvs2022. Need msvs2019: `npm config set msvs_version 2019`
86+
4. Seems like the "postinstall" script for `nodegit` will fail on windows.
87+
But the `electron-rebuild` script will succeed.
5988

6089
## Start
6190

6291
Install node modules:
92+
6393
```bash
64-
$ pnpm install
94+
pnpm install
6595
```
6696

6797
Then run
68-
```bash
69-
$ pnpm run build
70-
```
71-
to bundle javascript-files and move assets to the `dist/` directory.
7298

73-
Now run
7499
```bash
75-
$ pnpm run dist
100+
pnpm run build
76101
```
77-
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.
102+
103+
to bundle javascript-files and move assets to the `dist/` directory.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@
2222
],
2323
"license": "GPL-3.0-or-later",
2424
"devDependencies": {
25-
"@types/node": "^22.19.2",
25+
"@types/node": "^22.19.3",
2626
"@types/nodegit": "^0.28.9",
2727
"@weedzcokie/store": "^2.0.3",
2828
"electron": "38.7.2",
29-
"esbuild": "^0.27.1",
30-
"oxlint": "^1.32.0",
31-
"oxlint-tsgolint": "^0.8.5",
29+
"esbuild": "^0.27.2",
30+
"oxlint": "^1.35.0",
31+
"oxlint-tsgolint": "^0.10.0",
3232
"preact": "^10.28.0",
3333
"typescript": "^5.9.3"
3434
},
35+
"dependencies": {
36+
"nodegit": "github:weedz/nodegit#master"
37+
},
3538
"resolutions": {
3639
"@electron/get": "^4",
3740
"node-abi": "^4"
@@ -72,8 +75,5 @@
7275
"node": ">=22",
7376
"pnpm": ">=10"
7477
},
75-
"dependencies": {
76-
"nodegit": "github:weedz/nodegit#master"
77-
},
78-
"packageManager": "pnpm@10.25.0+sha512.5e82639027af37cf832061bcc6d639c219634488e0f2baebe785028a793de7b525ffcd3f7ff574f5e9860654e098fe852ba8ac5dd5cefe1767d23a020a92f501"
78+
"packageManager": "pnpm@10.26.1+sha512.664074abc367d2c9324fdc18037097ce0a8f126034160f709928e9e9f95d98714347044e5c3164d65bd5da6c59c6be362b107546292a8eecb7999196e5ce58fa"
7979
}

0 commit comments

Comments
 (0)