Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Electric Drummer for Linux #18

Open
scripting opened this issue Jan 10, 2022 · 20 comments
Open

Building Electric Drummer for Linux #18

scripting opened this issue Jan 10, 2022 · 20 comments

Comments

@scripting
Copy link
Owner

As long as @emk is here, let's figure out how this works.

I don't have a Linux with a GUI to test it on, so he'll have to do the testing.

I am using electron-package to build the Mac version.

https://github.com/electron/electron-packager

Now to figure out how to do a Linux build.

@scripting
Copy link
Owner Author

scripting commented Jan 10, 2022

This is the command I use to build E/D for the Mac.

sudo electron-packager . "Electric Drummer" --platform=darwin --arch=all --overwrite --icon=drummer.icns --electron-version=7.1.10

I assume I want to change the platform value. What to change it to? I am looking for a list of possible platforms and coming up empty.

Should I just try it replacing "darwin" with "linux"?

@scripting
Copy link
Owner Author

I did try it, and sheeeeet it seems to have worked! :-)

Here's what the app said.

Official Linux/ia32 support is deprecated.
For more info: https://electronjs.org/blog/linux-32bit-support
Packaging app for platform linux x64 using electron v7.1.10
Packaging app for platform linux arm64 using electron v7.1.10
Packaging app for platform linux armv7l using electron v7.1.10
Packaging app for platform linux ia32 using electron v7.1.10
Wrote new apps to:
/Users/davewiner/nodeEditor/scripting.com-code-electricdrummer/Electric Drummer-linux-ia32
/Users/davewiner/nodeEditor/scripting.com-code-electricdrummer/Electric Drummer-linux-x64
/Users/davewiner/nodeEditor/scripting.com-code-electricdrummer/Electric Drummer-linux-armv7l
/Users/davewiner/nodeEditor/scripting.com-code-electricdrummer/Electric Drummer-linux-arm64

@scripting
Copy link
Owner Author

@emk -- which version would you like to try?

In the meantime I'm going to try to get Ubuntu running under VM Ware again.

This is kind of exciting! :-)

@scotthansonde
Copy link

If you want another Linux tester, I can help. I've got a spare notebook running ubuntu somewhere... 😄

@scripting
Copy link
Owner Author

@scotthansonde -- that'd be great. which version should i provide for you?

@scotthansonde
Copy link

@scripting x64, thanks!

@kevinctofel
Copy link

I don't have a Linux with a GUI to test it on, so he'll have to do the testing.

Just a quick mention for anyone that has a Chromebook (I know Dave recently got one): Chromebooks can run a persistent Debian client instance with CLI. And any GUI apps you install to that instance will run on your Chromebook in their own window. You’ll find the option to enable this in your Settings, under Advanced, Developer. I’ve been covering this feature (and using it heavily!) for about 3 years.

@scripting
Copy link
Owner Author

@scotthansonde -- I've been trying to upload it for an hour and it's not working. I think my ISP is having problems. I'll post a link here when it's available. Oy. ;-)

@scripting
Copy link
Owner Author

@emk
Copy link

emk commented Jan 10, 2022

Thank you! This is great.

I downloaded it, set it as executable, and tried to run it.

❯ ~/bin/Electric\ Drummer
~/bin/Electric Drummer: error while loading shared libraries: libffmpeg.so: cannot open shared object file: No such file or directory

This looks like electron/electron#25440.

This looks like it's the only library error of this type, too:

❯ ldd ~/bin/Electric\ Drummer | grep "not found"
	libffmpeg.so => not found

So we're probably really close, because this is a known Electron packaging issue on Linux. I could maybe help dig into this later.

@scotthansonde
Copy link

scotthansonde commented Jan 11, 2022

I tried making a Hello World Electron app on my Mac for Linux. After some false starts, I remembered that for Linux that you can't just copy over the executable file, but also the shared libraries and other resources that are needed.

The electron-packager README mentions some Linux package creators at the bottom. I tried electron-installer-debian, since Ubuntu uses .deb packages. After a couple of tries I was able to create a deb package for my Hello World, which I copied over to my Linux instance, installed with with sudo apt install ./electron-quick-start_1.0.0_amd64.deb, and was able to run. But even for Hello World the .deb package included 111 files!

CleanShot 2022-01-11 at 14 31 47

@scotthansonde
Copy link

I've put my project at https://github.com/scotthansonde/sample-electron-app

@scripting
Copy link
Owner Author

@scotthansonde -- thank you for picking up the ball on this.

I want to work on a different project today, but after that I'll swing back around to this.

Here's a question, if I uploaded to a private github repo the contents of my electron folder, would you attempt to build Electric Drummer for Linux? That might be a sensible way to proceed since you're already dug in on this.

@scotthansonde
Copy link

@scripting Yes, I'm willing to try that.

@scripting
Copy link
Owner Author

@scotthansonde -- i've created the repo and added you as a collaborator.

@scripting
Copy link
Owner Author

@kevinctofel -- I'm using the Chromebook now, and looking in Settings/Advanced/Developer, but don't see anything about enabling GUI apps. Here's a screen shot.

image

@kevinctofel
Copy link

What this gets you is a newly installed Terminal app, where you have a standard Linux CLI. Open the Terminal app (it should be in your list of Chrome OS apps, possibly in a folder called “Linux apps”. Once Terminal is running you can use apt install to install any Linux package. (Or you can download a .deb package from the browser, right click the downloaded file in the Chrome OS Files app and select “Instal to Linux”). Once a Linux GUI app is installed, Chrome OS will have a launcher icon for the Linux app in the Chrome OS launcher. Or you can execute the app from the CLI.

Example: In the attached image, I’m running VS Code for Linux in its own window on my Chromebook. In my dock at the bottom, there are icons showing VS Code and Terminal, alongside the Chrome OS apps.
B9494C03-1522-4CF6-A447-E2FFD85951A4

Note that that’s an old screenshot, and the new Terminal icon looks slightly different.

@kevinctofel
Copy link

Another example where I explained how to install LibreOffice for Linux on a Chromebook: https://www.aboutchromebooks.com/news/how-to-install-libreoffice-for-linux-on-a-chromebook-after-downloading-it-as-a-tar-gz-file/

Once installed, the LibreOffice GUI app opens up automatically when run.

@scripting
Copy link
Owner Author

@kevinctofel -- aha -- yes I have been to the Terminal app. You didn't say that part. Your initial comment implied that turning on the GUI apps was done in the Advanced panel.

@kevinctofel
Copy link

@scripting apologies! Yeah, there's nothing to "enable" for Linux GUI apps. Just install 'em and run 'em. 😎 If you're curious about how this works under the hood, here's the Chromium dev documentation: https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md

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

No branches or pull requests

4 participants