I got it working - fairly straightforward.
Certainly I can now fire up the browser and get on with trying to understand safe-nodejs.
Still havent managed to actually upload a file though…
I got it working - fairly straightforward.
Yes, that’s what I’m doing (although I downloaded the zip rather than cloning). Then I ran the build script
cargo build --release --features use-mock-routing which seemed to go fine and copied
libsafe_core.so to src/ffi
After that I ran
npm install and got a few warnings then
npm run rebuild-native which failed.
Any ideas what I’m doing wrong?
EDIT: ah … do I need to run those npm commands from within the launcher repo folder ?
Yes - I’m being an idiot… bear with me!
Linux is done now and I’ll post the binary tomorrow. Windows isn’t behaving though, it’s failing to compile
safe_core. Anyone have any ideas? I’m using Rust 1.16.0 btw.
OK I give up on Windows. Life’s too short, it’s a nice day and the Launcher is not long for this world anyway.
A packaged Linux version as a zip file can be downloaded here. Just use it in the normal way.
Annoyingly you still have to ask for an authentication code even though the network is not real. EDIT: You don’t have to - just make one up.
If you fancy building the Launcher yourself here are the steps I took (basically a fleshed out version of these instructions https://github.com/maidsafe/safe_launcher#installation for Ubuntu / Debian linux)
Install node and npm
$ sudo apt-get install nodejs npm
Install nvm so you can choose node version 6.5 - not sure if later versions work too, I didn’t try. Possibly you can miss this step. https://github.com/creationix/nvm#installation
Install Rust version 1.16.0
$ curl https://sh.rustup.rs -sSf | sh
Follow the instructions and select defaults
$ source $HOME/.cargo/env
safe_client_libs-master.zipfrom https://github.com/maidsafe/safe_client_libs (or clone the repo). Extract it somewhere, e.g. home folder.
Download safe_launcher-master.zip from https://github.com/maidsafe/safe_launcher (or clone the repo). Extract it somewhere, e.g. home folder.
In a terminal cd into the safe_client_libs-master directory and run
$ cargo build --release --features use-mock-routing
Make a cup of tea. It takes a while…
libsafe_core.sofrom the safe_client_libs-master/target/release subfolder to safe_launcher-master/app/ffi
In a terminal cd into safe_launcher-master directory and run
$ npm install
$ npm run rebuild-native
- Once that’s done, to start the launcher with mock routing run:
$ npm run dev
- To make a distribution package use command based on the platform:
$ npm run package
this will generate the package files in the release subfolder.
Thanks for the detailed guide. I got the launcher to run in mock-routing, but how to login the account? Do I still need to register one, and get the invitation token also?
I just reused the code from my last invite and it JustWorks.
I suspect you might get away with making a random string of the appropriate length if you don’t have an old invite to hand although I have not tested this. I’m not at home right now, perhaps some kind person can post an old auth code for others to use.
Nothing is going outside your own box so I don’t see a security issue there.
I’m sure I’ll be told soon enough if I’m wrong.
Yes, you need to register an account. But you don’t need to have an invitation token. You can enter anything you want in the “Invitation Token” field.
You can enter a random string of any length
Ah OK. That’s good to know. I just used my twitter account to get another one without trying the easy way first.
Ohh that’s the step I been missing. Never able to get mock routing work.
Now I got a problem with NPM. I always have problems with NPM for some reason. (I hate npm) Could someone help me out?
safe_launcher is on master branch.
npm version is 4.6.1
I clean out npm cache, and re-install npm. Same error.
What version of Node are you using?
I updated my system, and nodejs. The latest version is
he said use the 6.5 version in his step-by-step, it’s more stable
This is amazing, I’ll send your GH link to everyone who needs it. Great read, makes much more convenient thanks
BTC address? Or do you prefer a bit of MAID
What were the problems you were having on Windows?
Yes, I’m just following the instructions! I don’t know how backwards compatible node is but my guess is ‘not very’. If you can’t build it you can always use the pre-compiled package. which I guess will work on any 64-bit Linux.
Does this mock routing give you an unlimited PUT balance? Haven’t tested yet
Also, what problems were stopping you from doing this on Windows?
I couldn’t get safe_core to compile. Seems to be something to do with the C++ compiler so I reinstalled Visual Studio but no joy. Then I gave up. You should have a try if you have a few hours to kill. The basic process is the same except on point (8) the file you copy across is different (see the original instructions).
Don’t worry about payment. It’s fun (mostly)!