Deploy website - based on 4adef0a280
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="NodeGui" href="/opensearch.xml"><title data-react-helmet="true">Getting started | NodeGui</title><meta data-react-helmet="true" name="docsearch:version" content="current,latest"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:title" content="Getting started | NodeGui"><meta data-react-helmet="true" name="description" content="NodeGui enables you to create desktop applications with JavaScript. You could see it"><meta data-react-helmet="true" property="og:description" content="NodeGui enables you to create desktop applications with JavaScript. You could see it"><meta data-react-helmet="true" property="og:url" content="https://nodegui.org/docs/guides/getting-started"><link data-react-helmet="true" rel="shortcut icon" href="/img/favicon.ico"><link data-react-helmet="true" rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin="true"><link data-react-helmet="true" rel="canonical" href="https://nodegui.org/docs/guides/getting-started"><link rel="stylesheet" href="/styles.920797bd.css">
|
||||
<link rel="preload" href="/styles.712c3c28.js" as="script">
|
||||
<link rel="preload" href="/runtime~main.2682e1bf.js" as="script">
|
||||
<link rel="preload" href="/runtime~main.7293295f.js" as="script">
|
||||
<link rel="preload" href="/main.d3cdd7c2.js" as="script">
|
||||
<link rel="preload" href="/1.e2b5b3c1.js" as="script">
|
||||
<link rel="preload" href="/2.05e94c07.js" as="script">
|
||||
@@ -18,7 +18,7 @@
|
||||
<link rel="preload" href="/383.3b605302.js" as="script">
|
||||
<link rel="preload" href="/935f2afb.983952c5.js" as="script">
|
||||
<link rel="preload" href="/17896441.413cfaf0.js" as="script">
|
||||
<link rel="preload" href="/c9ea0dcf.74d23e0b.js" as="script">
|
||||
<link rel="preload" href="/c9ea0dcf.732739fa.js" as="script">
|
||||
</head>
|
||||
<body>
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
@@ -26,10 +26,15 @@
|
||||
as a lightly modified variant of the Node.js runtime that is focused on desktop applications
|
||||
instead of web servers.</p><p>NodeGui is also an efficient JavaScript binding to a cross platform graphical user interface
|
||||
(GUI) library <code>Qt</code>. Qt is one of the most mature and efficient library for building desktop applications.
|
||||
This enabled NodeGui to be extremely memory and CPU efficient as compared to other popular Javascript Desktop GUI solutions. A hello world app built with NodeGui runs on less than 20Mb of memory.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="developer-environment"></a>Developer environment<a aria-hidden="true" tabindex="-1" class="hash-link" href="#developer-environment" title="Direct link to heading">#</a></h2><p>To turn your operating system into an environment capable of building desktop apps with NodeGui, you would need Node.js, npm,a code editor of your choice, and a rudimentary understanding of your operating system's command line client.</p><p>Along with these, there are a few operating system dependent instructions that are listed below.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="setting-up-on-macos"></a>Setting up on macOS<a aria-hidden="true" tabindex="-1" class="hash-link" href="#setting-up-on-macos" title="Direct link to heading">#</a></h3><p><strong>Requirements:</strong></p><ul><li>NodeGui supports macOS 10.10 (Yosemite) and up. NodeGui currently only supports 64bit OS.</li><li>CMake 3.1 and up (Installation instructions can be found here: <a href="https://cmake.org/install/" target="_blank" rel="noopener noreferrer">https://cmake.org/install/</a>)</li><li>Make, GCC v7</li><li>Currently supported Node.Js versions are 12.x and up.</li></ul><p>We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily. We recommend <code>nvm</code>: <a href="https://github.com/nvm-sh/nvm" target="_blank" rel="noopener noreferrer">https://github.com/nvm-sh/nvm</a></p><p>Confirm that both <code>node</code> and <code>npm</code> are available by running:</p><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-sh codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain"># This command should print the version of Node.js</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">node -v</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
This enabled NodeGui to be extremely memory and CPU efficient as compared to other popular Javascript Desktop GUI solutions. A hello world app built with NodeGui runs on less than 20Mb of memory.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="developer-environment"></a>Developer environment<a aria-hidden="true" tabindex="-1" class="hash-link" href="#developer-environment" title="Direct link to heading">#</a></h2><p>To turn your operating system into an environment capable of building desktop apps with NodeGui, you would need Node.js, npm,a code editor of your choice, and a rudimentary understanding of your operating system's command line client.</p><p>Along with these, there are a few operating system dependent instructions that are listed below.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="setting-up-on-macos"></a>Setting up on macOS<a aria-hidden="true" tabindex="-1" class="hash-link" href="#setting-up-on-macos" title="Direct link to heading">#</a></h3><p><strong>Requirements:</strong></p><ul><li>NodeGui supports macOS 10.10 (Yosemite) and up. NodeGui currently only supports 64bit OS.</li><li>CMake 3.1 and up (Installation instructions can be found here: <a href="https://cmake.org/install/" target="_blank" rel="noopener noreferrer">https://cmake.org/install/</a>)</li><li>Make, GCC v7</li><li>Currently supported Node.Js versions are 14.x.</li></ul><p>We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily. We recommend <code>nvm</code>: <a href="https://github.com/nvm-sh/nvm" target="_blank" rel="noopener noreferrer">https://github.com/nvm-sh/nvm</a></p><p>Confirm that both <code>node</code> and <code>npm</code> are available by running:</p><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-sh codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain"># This command should print the version of Node.js</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">node -v</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"># This command should print the version of npm</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">npm -v</span></div></div></div></div></div><p>If both commands printed a version number, you are all set! Before you get
|
||||
started, you might want to install a <a href="#a-good-editor">code editor</a> suited
|
||||
for JavaScript development.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="setting-up-on-windows"></a>Setting up on Windows<a aria-hidden="true" tabindex="-1" class="hash-link" href="#setting-up-on-windows" title="Direct link to heading">#</a></h3><blockquote><p>NodeGui supports Windows 7 and later versions – attempting to develop NodeGui
|
||||
for JavaScript development.</p><p><strong><em>Only for M1 Macs</em></strong></p><p><strong><em>Setting up Qt:</em></strong></p><p>You will need to download and install Qt from source since there are no binaries from Qt for M1 yet. </p><p>(<a href="https://www.reddit.com/r/QtFramework/comments/ll58wg/how_to_build_qt_creator_for_macos_arm64_a_guide/" target="_blank" rel="noopener noreferrer">https://www.reddit.com/r/QtFramework/comments/ll58wg/how_to_build_qt_creator_for_macos_arm64_a_guide/</a>)</p><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-undefined codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">git clone git://code.qt.io/qt/qt5.git</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">cd qt5</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">git checkout 5.15</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">./init-repository --module-subset=essential -f</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">git submodule init qtsvg</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">git submodule update qtsvg</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">cd ..</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">mkdir qt5-5.15-macOS-release</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">cd qt5-5.15-macOS-release</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">../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</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">make -j15</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">make install</span></div></div></div></div></div><p>This should install Qt into something like this <code>/usr/local/Qt-5.15.3</code> (your directory can change. This will be displayed when running make)</p><p>Now just set <code>export QT_INSTALL_DIR=/usr/local/Qt-5.15.3</code> in either your .zshrc or .bashrc</p><p>Further steps would now use this custom Qt installation.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="setting-up-on-windows"></a>Setting up on Windows<a aria-hidden="true" tabindex="-1" class="hash-link" href="#setting-up-on-windows" title="Direct link to heading">#</a></h3><blockquote><p>NodeGui supports Windows 7 and later versions – attempting to develop NodeGui
|
||||
applications on earlier versions of Windows might not work. NodeGui currently only supports 64bit OS.</p></blockquote><p><strong>Requirements:</strong></p><ul><li>Visual studio 2017 and up.</li><li>CMake 3.1 and up (Installation instructions can be found here: <a href="https://cmake.org/install/" target="_blank" rel="noopener noreferrer">https://cmake.org/install/</a>)</li><li>Currently supported Node.Js versions are 12.x and up.</li></ul><p>We strongly suggest you use some kind of version manager for Node.Js. This would allow you to switch to any version of nodejs quite easily.</p><p>We strongly recommend Powershell as preferred terminal in Windows.</p><p>Confirm that both <code>node</code> and <code>npm</code> are available by running:</p><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-powershell codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain"># This command should print the version of Node.js</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">node -v</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"># This command should print the version of npm</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">npm -v</span></div></div></div></div></div><p>If both commands printed a version number, you are all set! Before you get
|
||||
started, you might want to install a <a href="#a-good-editor">code editor</a> suited
|
||||
@@ -47,7 +52,7 @@ virtually all code editors and IDEs these days support JavaScript.</p><h3><a ari
|
||||
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">npm start</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
||||
</span></div></div></div></div></div><p><strong>Note</strong>: If you encounter errors installing <code>nodegui</code>, please check the <a href="/docs/faq#why-does-installation-fail-at-minimal-qt-setup">FAQs</a> for additional help.</p><p>That's it!</p><p>Congratulations! You've successfully run and modified your first NodeGui app.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="now-what"></a>Now what?<a aria-hidden="true" tabindex="-1" class="hash-link" href="#now-what" title="Direct link to heading">#</a></h3><p>If you're curious to learn more about NodeGui, continue on to the <a href="/docs/guides/tutorial">tutorial</a>.</p></div></article><div class="margin-vert--xl"><div class="row"><div class="col"><a href="https://github.com/nodegui/nodegui/edit/master/website/docs/guides/getting-started.md" target="_blank" rel="noreferrer noopener"><svg fill="currentColor" height="1.2em" width="1.2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 40 40" style="margin-right:0.3em;vertical-align:sub"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div></div></div><div class="margin-vert--lg"><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/guides/tutorial"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Learn the Basics »</div></a></div></nav></div></div></div><div class="col col--3"><div class="tableOfContents_3SO_"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#developer-environment" class="table-of-contents__link">Developer environment</a><ul><li><a href="#setting-up-on-macos" class="table-of-contents__link">Setting up on macOS</a></li><li><a href="#setting-up-on-windows" class="table-of-contents__link">Setting up on Windows</a></li><li><a href="#setting-up-on-linux" class="table-of-contents__link">Setting up on Linux</a></li><li><a href="#a-good-editor" class="table-of-contents__link">A Good Editor</a></li><li><a href="#hello-world" class="table-of-contents__link">Hello World</a></li><li><a href="#now-what" class="table-of-contents__link">Now what?</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">Docs</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/guides/getting-started">Getting Started</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/api/manual/synopsis">API</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">Community</h4><ul class="footer__items"><li class="footer__item"><a href="https://spectrum.chat/nodegui" target="_blank" rel="noopener noreferrer" class="footer__link-item">Spectrum</a></li><li class="footer__item"><a href="https://nodegui.slack.com" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack</a></li><li class="footer__item"><a href="https://twitter.com/node_gui" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter</a></li><li class="footer__item"><a href="https://medium.com/nodegui" target="_blank" rel="noopener noreferrer" class="footer__link-item">Medium</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">More</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://react.nodegui.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">React NodeGui</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/faq">FAQ</a></li></ul></div></div><div class="text--center"><div>Copyright © 2021 NodeGui</div></div></div></footer></div>
|
||||
<script src="/styles.712c3c28.js"></script>
|
||||
<script src="/runtime~main.2682e1bf.js"></script>
|
||||
<script src="/runtime~main.7293295f.js"></script>
|
||||
<script src="/main.d3cdd7c2.js"></script>
|
||||
<script src="/1.e2b5b3c1.js"></script>
|
||||
<script src="/2.05e94c07.js"></script>
|
||||
@@ -56,6 +61,6 @@ virtually all code editors and IDEs these days support JavaScript.</p><h3><a ari
|
||||
<script src="/383.3b605302.js"></script>
|
||||
<script src="/935f2afb.983952c5.js"></script>
|
||||
<script src="/17896441.413cfaf0.js"></script>
|
||||
<script src="/c9ea0dcf.74d23e0b.js"></script>
|
||||
<script src="/c9ea0dcf.732739fa.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user