From 30e841f41ef7e86bebc03d33b835b1de89771a10 Mon Sep 17 00:00:00 2001 From: yugensoft Date: Sun, 7 May 2017 16:26:41 +0300 Subject: [PATCH 1/2] Added windows-specific setup notes These tweaks are required to get a development instance up and running on windows Pursuant to https://status-im.slack.com/archives/C3NFZKNRG/p1494009635732517 --- .../development/building-status.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/contributing/development/building-status.md b/docs/contributing/development/building-status.md index 8d29cab..b32bcb3 100644 --- a/docs/contributing/development/building-status.md +++ b/docs/contributing/development/building-status.md @@ -7,7 +7,7 @@ This guide is written with OS X in mind. ## Build and Test ### Requirements -- [Homebrew](http://brew.sh/) + `brew update` (optional, for OS X) +- [Homebrew](http://brew.sh/) + `brew update` (optional, for OS X). For Windows use [Chocolatey](https://chocolatey.org/). - [Node & NPM](https://nodejs.org/en/) `brew install node watchman` - [Lein](http://leiningen.org) `brew install leiningen` - [react-native](https://facebook.github.io/react-native/docs/getting-started.html) `npm install -g react-native-cli` @@ -17,7 +17,23 @@ This guide is written with OS X in mind. - [Setup Android Development Environment / Simulator](https://facebook.github.io/react-native/docs/android-setup.html) - GIT over SSH, please add public key to Github - [Maven](https://maven.apache.org/install.html) `brew install maven` -- [Cocoapods](https://cocoapods.org) `sudo gem install cocoapods` +- [Ruby](https://www.ruby-lang.org/en/) `brew install ruby` +- [Cocoapods](https://cocoapods.org) `sudo gem install cocoapods`. + +#### Windows-specific Setup Notes +Setting up a development instance in Windows requires some tweaks. Consider the following before attempting the following sections: +- Make sure you run everything in a elevated command prompt (Right-click a link to Cmd.exe or Cygwin and click 'Run as Administrator') +- Do not use the ./re-natal symlink. Write your own `re-natal.sh` script that uses full relative paths, give it execution permissions with `chmod +x`, and use it instead. Script: +``` +#!/usr/bin/env node + +require('coffee-script/register'); +require('./node_modules/re-natal/index.js'); +``` +- In the root `package.json` edit `"./postinstall.sh"` to `"postinstall.sh"` +- Any `npm install` commands (except for `npm install -g` global commands) should be done as follows, to avoid windows symlink problems: `npm install --no-bin-links` +- Do not use Cygwin for `npm install` commands, use cmd.exe. +- React-native is not bug-free. If you run into an error like `error: bundling: UnableToResolveError: Unable to resolve module...`, the guaranteed solution is to manually edit the `require()` statements to the full relative path. E.g. `(crypt = require('crypto'))` becomes `(crypt = require('../../../../node_modules/crypto/package.json'))`. ### Dependencies & Setup $ git clone git@github.com:status-im/status-react.git -b master && cd status-react @@ -35,6 +51,7 @@ This guide is written with OS X in mind. # for iOS, build in Xcode ### Building Status for Development + $ lein prod-build $ ./re-natal use-android-device # (genymotion, real or avd) # or From 034967e673ca54a0cc2c21b1b6e25244381b0084 Mon Sep 17 00:00:00 2001 From: yugensoft Date: Mon, 8 May 2017 15:51:50 +0300 Subject: [PATCH 2/2] Updated as per comment https://github.com/status-im/wiki.status.im/pull/28#issuecomment-299851188 --- docs/contributing/development/building-status.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/development/building-status.md b/docs/contributing/development/building-status.md index b32bcb3..59d52bf 100644 --- a/docs/contributing/development/building-status.md +++ b/docs/contributing/development/building-status.md @@ -17,7 +17,7 @@ This guide is written with OS X in mind. - [Setup Android Development Environment / Simulator](https://facebook.github.io/react-native/docs/android-setup.html) - GIT over SSH, please add public key to Github - [Maven](https://maven.apache.org/install.html) `brew install maven` -- [Ruby](https://www.ruby-lang.org/en/) `brew install ruby` +- For Windows, [Ruby](https://www.ruby-lang.org/en/) `choco install ruby` - [Cocoapods](https://cocoapods.org) `sudo gem install cocoapods`. #### Windows-specific Setup Notes