Skip to content

Conversation

@gengjiawen
Copy link
Contributor

@gengjiawen gengjiawen commented Jul 22, 2017

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

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

@gengjiawen
Copy link
Contributor Author

This pr include binary for AppImage and deb.

@probonopd
Copy link

Unfortunately the build currently fails...

@gengjiawen
Copy link
Contributor Author

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

This comment was marked as spam.

This comment was marked as spam.

@probonopd
Copy link

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
Contributor Author

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

@probonopd
Copy link

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
Copy link
Member

shiftkey commented Jul 24, 2017

@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
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

Can you also create a snap?

@gengjiawen
Copy link
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
Contributor Author

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

@danimesq
Copy link

Snap is the future of Ubuntu packages.

@shiftkey
Copy link
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
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
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

@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
Copy link
Contributor Author

gengjiawen commented Jul 29, 2017

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

@gengjiawen
Copy link
Contributor Author

gengjiawen commented Jul 29, 2017

I find it, I missed the package.json.

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

@ghost
Copy link

ghost commented Sep 9, 2017

Is there any status on this pull request?

@shiftkey
Copy link
Member

shiftkey commented Oct 2, 2017

@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
Contributor Author

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

@shiftkey
Copy link
Member

shiftkey commented Oct 9, 2017

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