diff --git a/README.md b/README.md index bc5766503..9ed0d2416 100644 --- a/README.md +++ b/README.md @@ -73,40 +73,6 @@ brew install cmake brew install make ``` -__*Only for M1 Macs*__ - -**_Setting up Qt:_** - -You will need to download and install Qt from source since there are no binaries from Qt for M1 yet. - -(https://www.reddit.com/r/QtFramework/comments/ll58wg/how_to_build_qt_creator_for_macos_arm64_a_guide/) - -``` -git clone git://code.qt.io/qt/qt5.git -cd qt5 -git checkout 5.15 - -./init-repository --module-subset=essential -f -git submodule init qtsvg -git submodule update qtsvg - -cd .. -mkdir qt5-5.15-macOS-release -cd qt5-5.15-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 -``` - -This should install Qt into something like this `/usr/local/Qt-5.15.3` (your directory can change. This will be displayed when running make) - -Now just set `export QT_INSTALL_DIR=/usr/local/Qt-5.15.3` in either your .zshrc or .bashrc - -Further steps would now use this custom Qt installation. - Windows https://cmake.org/download/ @@ -157,6 +123,45 @@ npm install @nodegui/nodegui See [FAQs](https://github.com/nodegui/nodegui/tree/master/website/docs/faq.md#why-does-installation-fail-at-minimal-qt-setup) for more details. + +#### Using your own custom Qt installation (Optional) + +**Compiling Qt from source** + +You will need to download and install Qt from source since there are no binaries from Qt for M1 yet. + +(https://www.reddit.com/r/QtFramework/comments/ll58wg/how_to_build_qt_creator_for_macos_arm64_a_guide/) + +``` +git clone git://code.qt.io/qt/qt5.git +cd qt5 +git checkout 5.15 + +./init-repository --module-subset=essential -f +git submodule init qtsvg +git submodule update qtsvg + +cd .. +mkdir qt5-5.15-macOS-release +cd qt5-5.15-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 +``` + +This should install Qt into something like this `/usr/local/Qt-5.15.3` (your directory can change. This will be displayed when running make) + +**Pointing nodegui to use your custom Qt installation** + +Now just set `export QT_INSTALL_DIR=` . In the above example it would look something like this `export QT_INSTALL_DIR=/usr/local/Qt-5.15.3`. Add this in your .zshrc or .bashrc so that you dont need to repeat this process again. + +Now just `rm -rf node_modules` and do `npm install` again. + +The logs should say something like `CustomQt detected at . Hence, skipping Mini Qt installation`. + **Community guides** - [Tutorial: Build a native Meme Search Desktop app with Javascript (NodeGui) and Giphy API](https://www.sitepoint.com/build-native-desktop-gif-searcher-app-using-nodegui/) diff --git a/package-lock.json b/package-lock.json index 1de27a365..344a21646 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@nodegui/nodegui", - "version": "0.33.0", + "version": "0.33.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 434e67253..3efbfdaa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nodegui/nodegui", - "version": "0.33.0", + "version": "0.33.1", "description": "A cross platform library to build native desktop apps.", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/scripts/setupMiniQt.js b/scripts/setupMiniQt.js index 77f6b2b3b..69d1724c6 100644 --- a/scripts/setupMiniQt.js +++ b/scripts/setupMiniQt.js @@ -5,7 +5,7 @@ const { miniQt, useCustomQt, qtHome } = require('../config/qtConfig'); async function setupQt() { return Promise.all( - miniQt.artifacts.map(async artifact => + miniQt.artifacts.map(async (artifact) => setupArtifact({ outDir: miniQt.setupDir, id: 'nodegui-mini-qt', @@ -20,7 +20,7 @@ async function setupQt() { if (!useCustomQt) { console.log(`Minimal Qt ${miniQt.version} setup:`); - setupQt().catch(err => { + setupQt().catch((err) => { console.error(err); process.exit(1); }); diff --git a/website/docs/guides/getting-started.md b/website/docs/guides/getting-started.md index 77e13e41a..05d98c5b1 100644 --- a/website/docs/guides/getting-started.md +++ b/website/docs/guides/getting-started.md @@ -42,40 +42,6 @@ If both commands printed a version number, you are all set! Before you get started, you might want to install a [code editor](#a-good-editor) suited for JavaScript development. -__*Only for M1 Macs*__ - -**_Setting up Qt:_** - -You will need to download and install Qt from source since there are no binaries from Qt for M1 yet. - -(https://www.reddit.com/r/QtFramework/comments/ll58wg/how_to_build_qt_creator_for_macos_arm64_a_guide/) - -``` -git clone git://code.qt.io/qt/qt5.git -cd qt5 -git checkout 5.15 - -./init-repository --module-subset=essential -f -git submodule init qtsvg -git submodule update qtsvg - -cd .. -mkdir qt5-5.15-macOS-release -cd qt5-5.15-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 -``` - -This should install Qt into something like this `/usr/local/Qt-5.15.3` (your directory can change. This will be displayed when running make) - -Now just set `export QT_INSTALL_DIR=/usr/local/Qt-5.15.3` in either your .zshrc or .bashrc - -Further steps would now use this custom Qt installation. - ### Setting up on Windows > NodeGui supports Windows 7 and later versions – attempting to develop NodeGui @@ -144,6 +110,45 @@ virtually all code editors and IDEs these days support JavaScript. [code]: https://code.visualstudio.com/ [atom]: https://atom.io/ +#### Using your own custom Qt installation (Optional) + +**Compiling Qt from source** + +You will need to download and install Qt from source since there are no binaries from Qt for M1 yet. + +(https://www.reddit.com/r/QtFramework/comments/ll58wg/how_to_build_qt_creator_for_macos_arm64_a_guide/) + +``` +git clone git://code.qt.io/qt/qt5.git +cd qt5 +git checkout 5.15 + +./init-repository --module-subset=essential -f +git submodule init qtsvg +git submodule update qtsvg + +cd .. +mkdir qt5-5.15-macOS-release +cd qt5-5.15-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 +``` + +This should install Qt into something like this `/usr/local/Qt-5.15.3` (your directory can change. This will be displayed when running make) + +**Pointing nodegui to use your custom Qt installation** + +Now just set `export QT_INSTALL_DIR=` . In the above example it would look something like this `export QT_INSTALL_DIR=/usr/local/Qt-5.15.3`. Add this in your .zshrc or .bashrc so that you dont need to repeat this process again. + +Now just `rm -rf node_modules` and do `npm install` again. + +The logs should say something like `CustomQt detected at . Hence, skipping Mini Qt installation`. + + ### Hello World Clone and run the code in this tutorial by using the diff --git a/website/package.json b/website/package.json index bd25b6191..fc89ec7f2 100644 --- a/website/package.json +++ b/website/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "start": "docusaurus start", - "build": "docusaurus build", + "build": "node --max_old_space_size=32000 node_modules/@docusaurus/core/bin/docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy" },