Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Consider switching to Electron #101

Closed
7 of 9 tasks
salomvary opened this issue Mar 25, 2016 · 20 comments
Closed
7 of 9 tasks

Consider switching to Electron #101

salomvary opened this issue Mar 25, 2016 · 20 comments

Comments

@salomvary
Copy link
Owner

salomvary commented Mar 25, 2016

Because:

  • The whole apple-xcode-cocoa-objective-c business is #horror and none of my main skills (I usually have no idea what I'm doing in objective-c
  • Electron is cross platform
  • Electron has a modern browser engine

Inventory list of Electron features needed to port SoundCleod:

Deal breakers so far: automatic updates.

@joelekstrom
Copy link
Contributor

😱 But Objective-C is the most beautiful language out there!

@CNLambda
Copy link

Objective-C isn't the most beautiful language out there. It's Python (3) and/or Golang. ^^

@davcamer
Copy link

davcamer commented Jun 1, 2016

Swift?

@CNLambda
Copy link

CNLambda commented Jun 7, 2016

Isn't that bad, but I do like Python a lot more. I think the reason for that is that I started with python, and I can now just create the language constructs other people find so great about their language within python. But it isn't compilable (at least not with the full feature set, as it is a very dynamic), so...

But I would like to have a language having all possibilities like __add__ and so on, that it is headache-free and compilable.

@jbergstroem
Copy link
Contributor

Additional pluses:

  • lower barrier of entry for collaborators (javascript)
  • webkit -> v8 means we git bug fixes to engines quicker (not sure if that's relevant to Soundcloud, but yeah)
  • probably easier to implement configuration for things like injecting stylesheets/greasemonkey for people that wants to modify the experience

Regarding autoupdates and Squirrel, electron suggests nuts -- that should be able to fit on a free heroku (or most other cloud vm's) plan?

@salomvary
Copy link
Owner Author

Started playing around with Electron on a branch. First impressions are promising.

@jbergstroem
Copy link
Contributor

That's awesome. I'll check it out after work and see if I can contribute.

@jbergstroem
Copy link
Contributor

jbergstroem commented Sep 17, 2016

@salomvary: not sure why (just yet), but svg2png segfaults for me with soundcleod{-lo}.svg with a segfault (nodejs 6.6.0 on macOS Sierra).

Edit: installed a newer version of phantomjs(-prebuilt) - works fine.

@jbergstroem
Copy link
Contributor

jbergstroem commented Sep 17, 2016

Ok, did a quick sample of both processes. WKWebView and Electron performs similarly; both at <1% cpu when streaming. Measuring stack and active threads Electron seems to perform slightly better, but the difference is negligible. Great job so far! Found a few nits (and CMD + L crashes the view) but I would prefer actually forking and fixing.

Edit: Actually, strike that. Didn't sample long enough. It seems like Electron is more expensive. I'll do some proper testing and report my findings. Regardless, I think moving to Electron is promising.

@salomvary
Copy link
Owner Author

So I'm done with porting the basic functionality to Electron. As expected switching to Squirrel updater was the most pain in the ass part...

The release candidate / 1.0.0-beta.1 is available here, I'd appreciate feedback before tagging it final and enabling automatic updates from 0.x:
https://github.com/salomvary/soundcleod/releases/tag/v1.0.0-beta.1

@jbergstroem
Copy link
Contributor

@salomvary: tbh it works great for me. I've been running the branch on and off over the week and by looking at your RC notes I feel you have a pretty good insight into what's not working (at the moment). What I haven't tried at all is the updater stuff, nor have I run it in the debugger to see what's going on. I wouldn't call it final (1.0.0) until more feedback lands though. I still haven't had time to dig into sampling but I reckon it's not really needed.

@jbergstroem
Copy link
Contributor

@salomvary perhaps mention the soundcleod helper before prompting for admin permissions?

@salomvary
Copy link
Owner Author

Hmm, what exatly promts for admin? Does it happen on install or later? What does the dialog say?

(I'm not seeing it but my setup might be different. I also installed a million times, might only prompt once?)

On 26 Sep 2016, at 15:09, Johan Bergström [email protected] wrote:

@salomvary perhaps mention the soundcleod helper before prompting for admin permissions?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@jbergstroem
Copy link
Contributor

it said "Soundcleod wants to install a helper" -- happened when I opened the last packaged version of the electron soundcleod version. Can't find anything useful in console :/

@salomvary
Copy link
Owner Author

Ok, I will look into it. Definitely scary (at least without explanation)...

@salomvary
Copy link
Owner Author

@jbergstroem where did you run SoundCleod from? Did you copy it to /Applications? Or somewhere else? Or simply from the .dmg file?

@salomvary
Copy link
Owner Author

..also, are you maybe running it with a user with no admin rights at all?

@jbergstroem
Copy link
Contributor

Ran it from downloads folder. "Normal" macOS user.

@salomvary
Copy link
Owner Author

Fixed in 1.0.0-beta.2 (fb79433). The problem was trying to install updates on the read-only file system of the dmg image.

It will still present the same prompt when SoundCleod is installed as admin user but run as non-admin and the non-admin user has no write access to the app. If the admin user can escalate rights to admin, automatic updates will be attempted on every new run of SoundCleod. Handling this properly will require some minimal automatic updater UI where users can temporarily/permanently disable automatic updates.

@salomvary
Copy link
Owner Author

1.0.0 is 100% Electron.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants