Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
Adds apple silicon support (#32)
Browse files Browse the repository at this point in the history
* add m1 instructions;

* Update to node v14.17.0 + apple silicon support

* bump version
  • Loading branch information
a7ul committed Jun 12, 2021
1 parent 602cb55 commit f344f40
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

# github: [master-atul] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
# github: [a7ul] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: atul94 # Replace with a single Ko-fi username
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
SYNC_GIT_SUBMODULE: 1

- name: Compress files
uses: master-atul/[email protected]
uses: a7ul/[email protected]
with:
command: c
cwd: ./node/out/Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
SYNC_GIT_SUBMODULE: 1

- name: Compress files
uses: master-atul/[email protected]
uses: a7ul/[email protected]
with:
command: c
cwd: ./node/out/Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
SYNC_GIT_SUBMODULE: 1

- name: Compress files
uses: master-atul/[email protected]
uses: a7ul/[email protected]
id: compress
with:
command: c
Expand Down
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ It is designed to be used together with `@nodegui/nodegui`. Qode achieves this b

<img alt="logo" src="https://github.com/nodegui/nodegui/raw/master/extras/logo/nodegui.png" height="200" />


## Changes in v2.0

> In version 2.0, Qode no longer depends on Qt as a dependency.
Expand All @@ -16,8 +15,6 @@ It is designed to be used together with `@nodegui/nodegui`. Qode achieves this b
>
> Now, Qode essentially becomes nodejs + `<some code changes to allow message loop injection via an addon>`


### Note:

Qode is published as a NPM module as `@nodegui/qode`.
Expand Down Expand Up @@ -66,6 +63,13 @@ sudo apt install libgtk-3-dev patchelf

2. Building Qode. Run `node build.js`

> If you want to build for Apple Silicon Macs
> Make sure you have python 3.8.10 installed
>
> ```
> SYNC_GIT_SUBMODULE=true HOST_ARCH=arm64 TARGET_ARCH=arm64 node build.js
> ```
### Common build errors:

1. if you get an error similar to:
Expand Down Expand Up @@ -111,7 +115,7 @@ or

_PS: I havent tested ia32 builds_

The output of the build will be present at node/out/Release/qode
The output of the build will be present at node/out/Release/qode

## Configurations (Available from qode v1.0.3)

Expand All @@ -121,7 +125,7 @@ Additional configurations can be done via a qode.json file in the same directory

```javascript
{
distPath: "./dist/index.js" // This will try to load the index.js inside dist folder when qode.exe is run.
distPath: "./dist/index.js"; // This will try to load the index.js inside dist folder when qode.exe is run.
}
```

Expand All @@ -146,6 +150,18 @@ namespace qode {
} // namespace qode
```
## Building for M1 Mac
In order to build for M1 mac
Make sure you have python 3.8.10 installed
and then do:
```
SYNC_GIT_SUBMODULE=true HOST_ARCH=arm64 TARGET_ARCH=arm64 node build.js
```
## License
The MIT license.
Expand All @@ -165,7 +181,6 @@ The idea of Qode is derived from [yode][yode] and [electron](https://github.com/
## Qode - Node version table
| Qode | Node |
| ------------- |:-------------:|
| v2.1.0 | v14.2.0 |
| Qode | Node |
| ------ | :-----: |
| v2.1.0 | v14.2.0 |
2 changes: 1 addition & 1 deletion node
Submodule node updated from 338581 to 14c93b
2 changes: 1 addition & 1 deletion npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodegui/qode",
"version": "2.1.0",
"version": "2.1.1",
"description": "Qode is a lightly modified fork of Node.js that merges Node's event loop with Qt's event loop. It is designed to be used together with `@nodegui/nodegui`",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/qode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "src/integration/node_integration.h"
#include "src/helpers/qode_helper.h"

std::string qodeVersion = "2.1.0";
std::string qodeVersion = "2.1.1";

namespace qode {

Expand Down

0 comments on commit f344f40

Please sign in to comment.