Ok so i’ve just pushed Version change to 0.6.1 by ustulation · Pull Request #45 · maidsafe-archive/safe_ffi · GitHub - if that passes all tests on the CI we should hopefully be good.
I didn’t try safe_ffi 0.6.0
before because I wasn’t sure safe_launcher
was compatible with it. But it worked! Woohoo
@Krishna_Kumar:
This should be the file name. The convention followed by crust is,
<binary_name>.crust.config.
So it should beelectron.cruct.config
That’s odd, cos I haven’t copied electron.crust.config.
For me it started working when I copied the safe_launcher.crust.config
Also, isn’t the binary name “safe_launcher”, not “electron”?
Confused!
It should be otherwise we should make sure it is. Electron is a bit finicky there, but we should ensure this is the case.
@happybeing, I was referring electron
when we use npm start
command
The executable that starts the process when we use npm start
can be found in this path safe_launcher\node_modules\electron-prebuilt\dist\electron.exe
. So we have to place the config file near this binary to connect to the network. In this case the the config file name should be electron.crust.config
.
The one you were referring, is in the case when we use npm run package
. When we run the package command, the application is built and placed in the app_dist folder. This will create the safe_launcher binary, in this case the config file name will be safe_launcher.crust.config
Then npm start
approach will save time, if you want to test by coding against the network. You don`t have to package the application each time to test your code.
Hope, I didn’t add more to your confusion.
Got it - yes this is very confusing!
It is so easy to trip over details like this when you don’t know the details already. Thanks for clarifying.
Please spell things out for those of us who don’t have a clue what we’re doing (and I know I’m not alone there )
When we work on launcher, we use npm start
command to start the launcher application and test the changes we make.
-
Using ffi mock feature
Use the safe_ffi built with the mock routing (cargo build --release --features use-mock-routing
). Copy the ffi library and place it in theapp/api/ffi
folder (the usual step). Usenpm start
command to start the application. This helps in faster development. -
Using actual network
To connect with the network, the safe_ffi must be built without the mock feature (cargo build --release
). Copy the binary to theapp/api/ffi.
folder. Copy thesafe_launcher.crust.config
file from the release archive and place it in the electron binary folder which can be found in the pathsafe_launcher\node_modules\electron-prebuilt\dist\electron.exe
. Rename the config file toelectron.crust.config
. Usenpm start
command to start the application.
Marvellous thank you, thank you.
Sorry @Krishna_Kumar …you answer one question thoroughly and along comes another almost immediately…
In trying to modify the apps and play I started to look at Angular and see Angular 2 is in beta and appears much simpler to get started on, so…
Do you plan to stick with Angular 1 for MaidSafe stuff, or just these early demos, or plan to use Angular 2 or something else?
I guess for now I should continue with Angular 1 but I’m curious if you have any thoughts or plans in this area.
It would be great to have this in the github page, so it is easy to find (to connect to test net).
Is their source somewhere for this? I have been building out something, but I may be reinventing the wheel!
That also has type script
support which will help in organising the code much better. We picked angular 1 just because we wanted to reduce the learning curve and to avoid uncertain issues which we might hit during the development. We had a very short time frame to get the first version out. Thus we decided to go with angular 1.
We might definitely switch some time later to angular2 (or any better framework). Angular 1 has few issues which will start showing up when there is more activity happening on the UI. Migrating to typescript shouldn’t be a time taking process I hope.
We will definitely migrate to a better UI framework in future. More than the UI framework there are few places which needs to be improved on the whole in the launcher, I am trying to prioritise backend issues over the UI.
Hope to keep improving in shorter iterations.
Is their source somewhere for this? I have been building out something, but I may be reinventing the wheel!
Is there source for safe_launcher / demo_app? Yes, but I think you must be asking something else…? Confused again?
Is it just me or are people speaking in code!? Must be our obsession with encryption
Sorry if I’m being dim.
It may be me being dim! I was aware of Angular JS being available for web browsers, both in 1.x form and 2.x beta versions, but I wasn’t aware that Electron could use these to create desktop apps.
I’d seen the source on the API pages and saw the Node.js examples, but I hadn’t connected the dots that Electron uses Angular JS and the sample code is pulled from the Launcher.
So, ignore my question - I understand where I was getting confused now!
I have created my own version of these JS files without the node dependencies, so they can run on a web browser. However, I could probably have cribbed some of the code (especially the factories). Still, it has meant learning more about the way the API (and Angular - not used it before!) works!
Electron is nodejs + web browser. This is why I was trying to tell everyone in the other thread you don’t have to use your existing web browser and have the open security hole to make web apps.
This is what I have been playing with in my minutes off code when I can.
Me too! GitHub - cretz/safe-poc-browser: Simple Proof-of-Concept Browser for SAFE Network was my first go at learning electron and what not (it registers the app but doesn’t do anything with the key/API other than that). Now I’m trying to move towards typescript…but I realize there is a need for a JS client lib too.
I forked this, great start. I did play around with some of this but experimenting only. I found a couple of libs that were worth looking at. USed gulp and electron-mocha tests and standard
for lint etc. so I will see if I can get any time at all and shove some code your way.
I don’t know javascript at all so a good experiment. I also wanted to try outwith the front end guys in house. They are great but I kinda want to see if there are options they have missed before they tell me how I should do it (which they will I am sure). so perhaps this will help.
Time is the killer though so no promises at all and of course you are free to ignore or push for high quality PR’s don’t accept mine for sure blindly. I would be delighted and not offended in any way.
Well, kind of. The difference is that the user already has a browser and can run a web app just by pointing it at a URL. With electron they have to download the app (for their platform) so it isn’t equivalent.
EDIT: I guess a halfway house will be to have electron (and other) apps in a directory for each OS, that can be mounted locally and run them from there.
You and I are both learning. I will say I have abandoned the POC basically, it was just a test. I have moved on to GitHub - cretz/shrewd-old but even that is on hold until I make a JS client library for safe (basically following the template I did for the go-safeclient) which I’m toying with now. I too have limited time (I have a day job), so it may be a bit.