Skip to content

Commit

Permalink
adds support for QODE_MIRROR
Browse files Browse the repository at this point in the history
  • Loading branch information
a7ul committed Sep 11, 2021
1 parent 89ccb29 commit 2b2ce83
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions qode/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ or
npm install @nodegui/qode
```

### Dowload mirrors

By default qode is downloaded using the github releases at

```js
`https://github.com/nodegui/qodejs/releases/download/v${libVersion}-qode/${gitTagVersion}-${platform}-${arch}.tar.gz`
```

if you need to specify an alternative download path you can set the environment variable `QODE_MIRROR` like so and run npm install

```
QODE_MIRROR=https://github.com/nodegui/qodejs/releases/download/v1.2-qode/1.2-linux-x64.tar.gz npm install @nodegui/qodejs
```

If it doesnt download make sure to clear the cached qode at https://github.com/nodegui/qodejs/blob/89ccb29fe3c9d66426311a95369c47820bca4de5/qode/npm/src/config.js#L29

# Version Table:

| Qode | Node | Qt |
Expand Down
2 changes: 1 addition & 1 deletion qode/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodegui/qode",
"version": "16.4.0",
"version": "16.4.1",
"description": "Qode is a lightly modified fork of Node.js that allows injecting a third party event loop alongside Node's event loop. It is designed to be used together with `@nodegui/nodegui`",
"main": "index.js",
"files": [
Expand Down
4 changes: 3 additions & 1 deletion qode/npm/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const gitTagVersion = `v${libVersion}-qode`;

const qodePath = path.resolve(extractDir, executableNames[platform]);
const downloadArchiveName = `${gitTagVersion}-${platform}-${arch}.tar.gz`;
const downloadLink = `https://github.com/nodegui/qodejs/releases/download/${gitTagVersion}/${downloadArchiveName}`;
const downloadLink =
process.env.QODE_MIRROR ||
`https://github.com/nodegui/qodejs/releases/download/${gitTagVersion}/${downloadArchiveName}`;

module.exports = {
downloadLink,
Expand Down

0 comments on commit 2b2ce83

Please sign in to comment.