nodeguy/content---docs-development-setting-up-28-c-666.3ed03febaee8901fd048.js

1 line
6.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{117:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return b}));n(0);var a=n(161);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function r(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i={},l=[{value:"Development setup and getting started",id:"development-setup-and-getting-started",children:[{value:"MacOSX:",id:"macosx",children:[]},{value:"Windows:",id:"windows",children:[]},{value:"Linux:",id:"linux",children:[]},{value:"Common:",id:"common",children:[]}]}],c={rightToc:l},p="wrapper";function b(e){var t=e.components,n=r(e,["components"]);return Object(a.b)(p,o({},c,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h1",{id:"setup-project-for-development"},"Setup project for development"),Object(a.b)("h2",{id:"development-setup-and-getting-started"},"Development setup and getting started"),Object(a.b)("p",null,"Make sure you follow the setup guide of ",Object(a.b)("a",o({parentName:"p"},{href:"https://github.com/nodegui/qode"}),"Qode")," so that you have a build environment ready for Qode."),Object(a.b)("h3",{id:"macosx"},"MacOSX:"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Make, GCC v7"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("h3",{id:"windows"},"Windows:"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Visual Studio Community 2017"),Object(a.b)("li",{parentName:"ol"},"Powershell"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("h3",{id:"linux"},"Linux:"),Object(a.b)("p",null,"Supported versions: Ubuntu 17.10 and up"),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"Requirements")),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Node version: > 11"),Object(a.b)("li",{parentName:"ol"},"CMake 3.1 and up (Installation instructions can be found here: ",Object(a.b)("a",o({parentName:"li"},{href:"https://cmake.org/install/"}),"https://cmake.org/install/"),")"),Object(a.b)("li",{parentName:"ol"},"Make, GCC v7, pkg-config"),Object(a.b)("li",{parentName:"ol"},"Qt (",Object(a.b)("em",{parentName:"li"},"Optional"),"): Make sure you followed the setup instructions from ",Object(a.b)("a",o({parentName:"li"},{href:"https://github.com/nodegui/qode"}),"Qode"))),Object(a.b)("p",null,"On Ubuntu: ",Object(a.b)("inlineCode",{parentName:"p"},"$ sudo apt-get install pkg-config build-essentials")," should install everything except Qt5."),Object(a.b)("p",null,"Note: If you are using your own version of Qt make sure to"),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},'export PKG_CONFIG_PATH="<path to qt installation>/5.13.0/gcc_64/lib/pkgconfig"')),Object(a.b)("h3",{id:"common"},"Common:"),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Once you have setup the platform specific stuff as mentioned above, follow these:"),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"git clone")," this repo."),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn install")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn build:addon")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("inlineCode",{parentName:"li"},"yarn dev"))),Object(a.b)("p",null,"If you want to run with your own version of Qt make sure to pass qt_home_dir variable when building addon."),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"npm run rebuild:addon [--qt_home_dir=/path/to/qt]")))}b.isMDXComponent=!0},161:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var a=n(0),o=n.n(a),r=o.a.createContext({}),i=function(e){var t=o.a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):Object.assign({},t,e)),n},l=function(e){var t=i(e.components);return o.a.createElement(r.Provider,{value:t},e.children)};var c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}(e,["components","mdxType","originalType","parentName"]),b=i(n),u=a,s=b[l+"."+u]||b[u]||p[u]||r;return n?o.a.createElement(s,Object.assign({},{ref:t},c,{components:n})):o.a.createElement(s,Object.assign({},{ref:t},c))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=b;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var u=2;u<r;u++)i[u]=n[u];return o.a.createElement.apply(null,i)}return o.a.createElement.apply(null,n)}b.displayName="MDXCreateElement"}}]);