Skip to content

Commit

Permalink
cleans up docs and bumps version
Browse files Browse the repository at this point in the history
  • Loading branch information
a7ul committed Jul 9, 2021
1 parent bcd1f8e commit 06d735f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 73 deletions.
73 changes: 39 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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=<your qt path>` . 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 <your qt path>. 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/)
Expand Down
2 changes: 1 addition & 1 deletion 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 package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions scripts/setupMiniQt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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);
});
Expand Down
73 changes: 39 additions & 34 deletions website/docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=<your qt path>` . 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 <your qt path>. Hence, skipping Mini Qt installation`.


### Hello World

Clone and run the code in this tutorial by using the
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 06d735f

Please sign in to comment.