salomvary / soundcleod

SoundCloud for macOS and Windows
https://soundcleod.com
MIT License
960 stars 105 forks source link

Consider switching to Electron #101

Closed salomvary closed 8 years ago

salomvary commented 8 years ago

Because:

Inventory list of Electron features needed to port SoundCleod:

Deal breakers so far: automatic updates.

joelekstrom commented 8 years ago

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

CNLambda commented 8 years ago

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

davcamer commented 8 years ago

Swift?

CNLambda commented 8 years ago

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 commented 8 years ago

Additional pluses:

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 commented 8 years ago

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

jbergstroem commented 8 years ago

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

jbergstroem commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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

salomvary commented 8 years ago

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 notifications@github.com 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 commented 8 years ago

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 commented 8 years ago

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

salomvary commented 8 years ago

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

salomvary commented 8 years ago

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

jbergstroem commented 8 years ago

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

salomvary commented 8 years ago

Fixed in 1.0.0-beta.2 (fb79433effafdfd34b9b9ff6351076154dea204d). 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 commented 8 years ago

1.0.0 is 100% Electron.