Go to the safe_launcher folder, find the packages.json file. In the bottom of it, you’ll see a section called 'devEngines", which specifies the supported node and npm version. Change those to the corresponding ones on your system. I changed to node: 7.x, and left npm: 3.x untouched, because my node version is 7.2.1, and npm - 3.10.9. Then everything went smoothly from there. Good luck.
For anyone’s interested in compiling on the Mac:
Prerequisites
-
Xcode is need. The command line tools can be installed with:
$ xcode-select --install -
Have Homebrew installed. With that, then install the node package:
$ brew install node -
Install Rust
$ curl https://sh.rustup.rs -sSf | sh
Follow the instructions and select defaults
Compile safe_client_libs
-
To make the rust commands working, type the following:
$ source $HOME/.cargo/env -
Download safe_client_libs-master.zip from https://github.com/maidsafe/safe_client_libs (or clone the repo). Extract it somewhere, e.g. home folder.
-
Open your favorite terminal app, and cd into the safe_client_libs folder and run:
$ cargo build --release --features use-mock-routing
It may take quite a while to complete.
Compile and run the safe_launcher
-
Download safe_launcher-master.zip from GitHub - maidsafe-archive/safe_launcher: Node.js App for SAFE Launcher (or clone the repo). Extract it somewhere, e.g. home folder.
-
After safe_client_libs’s compilation finishes successfully, Copy libsafe_core.dylib from the safe_client_libs/target/release subfolder to safe_launcher/app/ffi
-
In the terminal, cd into safe_launcher folder and run the following to install the dependencies
$ npm install
Note that if you get errors complaining about the node version. You may need to edit node and npm version numbers in the ‘devEngines’ section, which is at the bottom of the packages.json file. So that it’ll be compatible with the version of the node & npm installed on your system. My node is 7.2.1 and npm is 3.10.9. So I changed the value for the “node” to be 7.x, and then got thru. -
Once that finishes successfully, you can run the launcher in dev mode with the following:
$ npm run dev
Or to make a distribution package:
$ npm run package
Which will generate the binary in the safe_launcher/release subfolder.
Great work @maxweng, and useful info about the node version, which seems to be a big sticking point.
Hmmm, I get a bunnncch of errors when running cargo build.
error: attribute must only have one argument
--> /Users/joshuef/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-0.9.14/src/lib.rs:24:3
|
24 | #[proc_macro_derive(Serialize, attributes(serde))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: attribute must only have one argument
--> /Users/joshuef/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-0.9.14/src/lib.rs:33:3
|
33 | #[proc_macro_derive(Deserialize, attributes(serde))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `proc-macro` crate type is experimental
|
= help: add #![feature(proc_macro)] to the crate attributes to enable
error: the `#[proc_macro_derive]` attribute is an experimental feature (see issue #35900)
--> /Users/joshuef/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-0.9.14/src/lib.rs:24:1
|
24 | #[proc_macro_derive(Serialize, attributes(serde))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_derive]` attribute is an experimental feature (see issue #35900)
--> /Users/joshuef/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-0.9.14/src/lib.rs:33:1
|
33 | #[proc_macro_derive(Deserialize, attributes(serde))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
What version of Rust are you running?
Mine is cargo-0.17.0-nightly (f9e5481 2017-03-03).
maybe do a cargo clean, and start from scratch? I’m also new to Rust tho
And maybe to upgrade to the latest Rust version might solve the issue.
cargo clean and moving onto nightly seems to be getting along ![]()
Great job Max, they’re sending your bounty
#Still $20 of BTC left for anyone who finishes this for Windows
OK well it’s been 3 days, gave community time so now I’m just going ahead and working on windows build myself now that I have time.
Looks like its needing VStudio (3.5 GB download & install) so it’s taking a while, but getting thru it today.
Then every OS will be able to use SAFE anytime, with mock-routing
this is huge!

dang, I have rust, npm, node and now VisualStudio '15 like it kept asking for.
Any idea why it can’t build? (Windows)
This was what I had with the Vault some time ago, don’t know if this applies here.
a different error message is always progress ![]()
Sorry I can’t be more use, I gave up on Windows many years ago.
gcc is not installed.
Don’t know if this is helpful but the build script just got updated.
For what it’s worth I managed to compile safe_client_libs in Windows eventually (Rust), only to come unstuck on the compilation of the launcher (node) - doesn’t seem to be possible on Win 10, not without a hell of a lot of fiddling around anyway. You need a depricated version of the Visual C++ compiler vcbuild.exe, which won’t install on Win 10 by any of the usual methods.
Doing this stuff on Windows is a truly horrible experience…
Fixed that for you, …
hmm Ok installed GCC from Cygwin64 (good?) and still same error. Is there a different GCC I need too?
error message hasn’t change so I guess it means to progress
#STILL LARGE BTC BOUNTY FOR ANYONE AT ALL IN THIS WHOLE COMMUNITY WHO CAN MAKE MOCK-ROUTING BUILD WORK ON WINDOWS!!!
System cannot find file specified.
Hmm interesting. If it is already installed, then my guess is PATH environment hasn’t been set up correctly.
Is gcc.exe on your PATH (environment variable?).

