Mac M1 Support

Aperta
#1,004 12 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp, javascript, node.js

Direzione di ricerca

Start by reproducing npm install on an M1 Mac and inspect the release download path for nodegui-binary-v0.59.0-darwin-arm64.tar.gz. Follow the listed Qt 6.4 and NodeGui build commands, then verify that the artifact is published where the installer expects it and that installation succeeds.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

help wanted

Hi,
Following this closed issue: https://github.com/nodegui/nodegui/issues/969

When npm attempts to install nodegui on an M1 mac, it tries to download nodegui-binary-v0.59.0-darwin-arm64.tar.gz. An error is given that this package is not found. When looking at the release page, an arm64.tar.gz package does not exist.

Here is the error from the log regarding this issue:

Error: Error while downloading Precompiled NodeGui binary:https://github.com/nodegui/nodegui/releases/download/v0.59.0/nodegui-binary-v0.59.0-darwin-arm64.tar.gz. Not Found.

Temporary solution

As temporary solution, we can build ourself the artifact and add it to the cache:

cd /tmp

# 1. Build Qt
git clone git://code.qt.io/qt/qt5.git
cd qt5
git checkout 6.4

./init-repository --module-subset=essential -f
git submodule init qtsvg
git submodule update qtsvg

cd ..
mkdir qt5-6.4-macOS-release
cd qt5-6.4-macOS-release

../qt5/configure -release QMAKE_APPLE_DEVICE_ARCHS=arm64 -opensource -confirm-license -nomake examples -nomake tests -skip qt3d -skip webengine -skip qtactiveqt -skip qtcanvas3d  -skip qtdeclarative -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtcharts -skip qtgraphicaleffects -skip qtlocation  -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtscript

make -j15
make install

# 2. Add this to .bashrc or .zshrc
export QT_INSTALL_DIR="/usr/local/Qt-6.4.3"

# 3. Build nodegui
cd ..
gcl https://github.com/nodegui/nodegui.git
cd nodegui
npm install
npm run build

# Save the artifact to the cache directory
cd build/Release
tar -czf nodegui-binary-v0.59.0-darwin-arm64.tar.gz nodegui_core.node
mkdir -p ~/Library/Caches/nodegui-core-nodejs
mv nodegui-binary-v0.59.0-darwin-arm64.tar.gz ~/Library/Caches/nodegui-core-nodejs/.

Long-term solution

We should definitely add the artifact nodegui-binary-v0.59.0-darwin-arm64.tar.gz to the official release. What is the process to do it ?

Thanks.

Lingua principale
C++
Stelle
9.2k
Fork
315
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodegui/nodegui

Tutte le issue di nodegui/nodegui

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.