-
Notifications
You must be signed in to change notification settings - Fork 85
Dev env setup
Vitaliy Vlasov edited this page May 23, 2018
·
21 revisions
lein, node.js v.8 , cmake, Qt 5.9.1, Qt's qmake available in PATH
Note: add qmake to PATH via
export PATH=<QT_PATH>/clang_64/bin:$PATH
Caveats:
- if npm hangs at some step, check the version. If it's 5.6.0, try downgrading to 5.5.1 via
npm install -g [email protected]
(or upgrade to 6.0.1) - if
status-react/re-natal
is not available, try manually installing vianpm install re-natal
in status-react dir and symlinkre-natal
tostatus-react/node_modules/re-natal/index.js
- also it might happen that metro-bundler is missing, so you'll have to force install it via
npm install metro-bundler
- git clone https://github.com/status-im/react-native-desktop.git
- cd react-native-desktop/react-native-cli
- npm update
- npm install -g
- mkdir status-go-root
- Install GoLang, make sure that go is available in PATH. On macOS, following steps have to be done:
export GOPATH=<path_to_status-go-root>
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
- cd status-go-root
- mkdir -p src/github.com/status-im && cd src/github.com/status-im
- git clone [email protected]:status-im/status-go.git
- cd status-go
- git checkout develop-desktop
- cd ./lib && go get ./ && cd ..
- make statusgo-library
- If build is success you should be able to find built status-go binaries in ./build directory. Please edit CMakeList.txt file to point correct local paths to the status-go lib in your status-react git clone: /modules/react-native-status/desktop/CMakeList.txt
Replace 2 occurrences of /Users/vkjr/work/projects/github/status-im3/status-go/src/github.com/status-im/status-go/build/bin
in CMakeLists.txt with your local path to status-go build
- git clone https://github.com/status-im/status-react.git
- cd status-react
- git checkout desktop
- npm install
- react-native desktop (this command should create "desktop" directory in root of your project and default index.desktop.js file as well. note: for some reasons,
npm
internally might remove whole react-native package from node_modules; if this happens, you need to install it back withnpm install react-native
) - remove manually index.desktop.js auto generated file
- Edit node_modules\metro\src\defaults.js and change the line
to
exports.platforms = ['ios', 'android', 'windows', 'web'];
exports.platforms = ['ios', 'android', 'windows', 'web', 'desktop'];
- lein deps
- ./re-natal use-figwheel
- ./re-natal enable-source-maps
- In separate terminal tab:
npm start
(note: it starts react-native packager ) - In separate terminal tab: node ./ubuntu_server.js
- In separate terminal tab: lein figwheel-repl desktop (note: wait until sources compiled)
- In separate terminal tab: react-native run-desktop
Note: react-native run-desktop
might give this error:
CMake Error at CMakeLists.txt:18 (add_subdirectory):
add_subdirectory given source
"/path/status-react/desktop/../node_modules/react-native-webview-bridge/desktop"
which is not an existing directory.
Resolve it with npm install react-native-webview-bridge
The app window will say that it is waiting for Figwheel reload. Press Cmd+R to force reload.