Commit 31d71b4
committed
windows: fixed native build for windows
* Added `scripts/prebuild.js` which is set as the `prebuild` script in `package.json`
* The `scripts/prebuild.js` supports `npm_config_devdir`, `npm_config_nodedir` and `npm_config_arch` as environment variables
* Environment variables are necessary to pass configuration when using `npm run build` because the prebuild script doesn't receive commmand line parameters
* Added `engines` which specifies the node runtime and msvs version, used by `scripts/prebuild.js`
* Renamed `src/rocksdb` to `src/native` to avoid name conflict with `deps/rocksdb`, this affects windows builds
* All `package.json` scripts must be prefixed with the actual program to be executable on Windows
* The `execFile` functions do not read `PATHEXT` requiring the usage of `shell: true` option on windows
* Node headers and static libraries are installed into `npm_config_devdir` but only for window and macos, nix still uses `npm_config_nodedir`
* The `scripts/prebuild.js` supports incremental compilation, just need to cache the `./build` directory
* No more `prebuildify`, completely replaced by `scripts/prebuild.js`, replicates expected `./prebuilds` file and directory structure1 parent 5b43d96 commit 31d71b4
File tree
46 files changed
+210
-382
lines changed- scripts
- src
- native
- napi
- workers
- tests
- rocksdb
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+210
-382
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | | - | |
158 | | - | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | | - | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
168 | | - | |
169 | 170 | | |
170 | 171 | | |
171 | | - | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
206 | | - | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments