Skip to content

add linux support - #2300

Closed
gengjiawen wants to merge 3 commits into
desktop:masterfrom
gengjiawen:feature/linux
Closed

gengjiawen wants to merge 3 commits into
desktop:masterfrom
gengjiawen:feature/linux

Conversation

@gengjiawen

@gengjiawen gengjiawen commented Jul 22, 2017 •

Copy link
Copy Markdown
Contributor

Mainly switch to electron-builder. Related binary: https://github.com/gengjiawen/desktop/releases.

Things need to do:

If you want me to make some change, please let me know.

@gengjiawen
gengjiawen force-pushed the feature/linux branch 2 times, most recently from 264a1e8 to e41ed5b Compare July 22, 2017 08:13
@probonopd

Copy link
Copy Markdown

Would be awesome to see an AppImage build from this PR.

@gengjiawen

Copy link
Copy Markdown
Contributor Author

This pr include binary for AppImage and deb.

@probonopd

Copy link
Copy Markdown

Unfortunately the build currently fails...

@gengjiawen

Copy link
Copy Markdown
Contributor Author

On Mac and Windows, it seems like some test taking too much time. On linux, it seems test failed.

Comment thread app/src/lib/open-shell.ts Outdated

This comment was marked as spam.

This comment was marked as spam.

@probonopd

Copy link
Copy Markdown

Now that they merged #2271, what does this mean for this PR? How can we get AppImages given that #2271 was merged?

@gengjiawen

Copy link
Copy Markdown
Contributor Author

This pr replace electron-packager with electron-builder. You can directly build linux binary with npm task.

@probonopd

Copy link
Copy Markdown

I know but if they have merged the other PR then it seems like they want to use electron-packager rather than electron-builder.

@shiftkey

shiftkey commented Jul 24, 2017 •

Copy link
Copy Markdown
Member

@gengjiawen please let me know when you'd like me to look at this.

I'd like to see if we can leverage the electron-packager output and one of the existing installer projects (electron-installer-debian, electron-installer-redhat and electron-installer-flatpak are mentioned in the docs) before we consider switching over to electron-builder - we've invested a lot here, and I'd hate to break existing things unnecessarily.

Also, please have a look at shiftkey#1 which is a working build and test setup for Desktop Linux on Travis - I'd like to get those incorporated sooner rather than later, so I might put together a PR for that this week on top of this discussion.

@shiftkey shiftkey self-assigned this Jul 24, 2017
@gengjiawen

Copy link
Copy Markdown
Contributor Author

My main consideration switch to electron-builder is that:

  • It is simple to config multi-platform build.
  • Use appveyor and travis-ci to automatically upload binary to Github Release.
  • Very convenient to include static files.

I am not that familar with electron-packager, if we can do the linux build with electron-packager without much change, I am open to it :)

@danimesq

Copy link
Copy Markdown

Can you also create a snap?

@gengjiawen

Copy link
Copy Markdown
Contributor Author

@shiftkey I am not familiar with the source code, for now I still can't let npm run test:unit get passed. Any idea why ?

@gengjiawen

Copy link
Copy Markdown
Contributor Author

@Plasmmer I already made three linux binary type, do you have a strong reason why snap need supported ?

@danimesq

Copy link
Copy Markdown

Snap is the future of Ubuntu packages.

@shiftkey

Copy link
Copy Markdown
Member

I still can't let npm run test:unit get passed. Any idea why ?

@gengjiawen it looks like npm run test:unit completes, but the next step npm run test:integration doesn't complete, and I think this is because of the changes to packaging.

For example, the launch test is trying to use the contents of the out directory which probably doesn't exist now. It's probably the same for the other environments.

@gengjiawen

Copy link
Copy Markdown
Contributor Author

But i fix the path in recent commit, maybe it's something else. I need to setup a linux environment in my local machine.

@shiftkey

Copy link
Copy Markdown
Member

But i fix the path in recent commit, maybe it's something else.

Yes, you've updated the path. But if electron-packager is outputting installers rather than the loose files that were previously living in out then the integration tests are still going to fail.

@probonopd

Copy link
Copy Markdown

@gengjiawen it is possible to use electron-builder together with electron-packager to generate e.g., the AppImage: https://github.com/electron-userland/electron-builder#pack-only-in-a-distributable-format

@gengjiawen

gengjiawen commented Jul 29, 2017 •

Copy link
Copy Markdown
Contributor Author

I think maybe it missing the git directory, but I am wrong. There is something still missing.

@gengjiawen

gengjiawen commented Jul 29, 2017 •

Copy link
Copy Markdown
Contributor Author

I find it, I missed the package.json.

But I still get no clue why appveyor hanged after test:unit.

@ghost

ghost commented Sep 9, 2017

Copy link
Copy Markdown

Is there any status on this pull request?

@shiftkey

shiftkey commented Oct 2, 2017

Copy link
Copy Markdown
Member

@gengjiawen apologies for the delay in reviewing this. I'm worried about all of the changes underway here and how they affect the other platforms (currently Appveyor fails on linting, the latest Circle build fails on a unit test, and the Travis integration test fails).

Now that we have first-class Travis support for Linux working in #2808, I've been throwing some spare cycles at how easily we can add packaging for whatever platforms we need. I know you are a fan of electron-builder, and I still don't like how much we have to depend on electron-builder, but you can see my progress over here: shiftkey#2

Here's the package we can generate currently on Travis:

I'll outline why I want to continue down this path over this migration to electron-builder:

  • it doesn't currently require any changes to the contents under the app directory to support it. This might need to occur in the future as we uncover things that are platform-specific, and that's okay. But for now, we can keep things clean.
  • It keeps the build, test and package steps composable, rather than the unified approach of electron-builder
  • It integrates nicely with our how we package things for macOS and Windows, and gives us hooks to customize things if we need to.

I can see there's a number of merge conflicts in this PR due to the pace of changes with packages and environment changes, so I want an approach that makes it easier for forks like yours to keep up while we figure out what our official support looks like. If I get these changes reviewed and merged, would they help with the heavy lifting of maintaining your fork of Desktop?

@gengjiawen

Copy link
Copy Markdown
Contributor Author

If you have any doubt, just leave this be. I will maintain this when I got time :)

@shiftkey shiftkey mentioned this pull request Oct 9, 2017
2 tasks done
@shiftkey

shiftkey commented Oct 9, 2017

Copy link
Copy Markdown
Member

Closing in favour of #2993

@shiftkey shiftkey closed this Oct 9, 2017
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

Successfully merging this pull request may close these issues.

5 participants