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

[WIP] GH-4874: Build the electron app from the source. #4896

Closed
wants to merge 1 commit into from

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Apr 12, 2019

Closes #4874.

Signed-off-by: Akos Kitta kittaakos@typefox.io


Steps to build:

  • Clone Theia and run yarn to install the dependencies.
  • Run yarn --cwd ./examples/electron/ package to build the bundled electron application from the source.
  • Run open ./examples/electron/dist/mac/Theia.app/ (on macOS) to start the application.

The bundled application will be under theia/examples/electron/dist.
By default, the electron-builder builds an application based on your OS.

Closes #4874.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos kittaakos requested a review from akosyakov April 12, 2019 14:12
@kittaakos
Copy link
Contributor Author

After installing it to the /Applications/ I can see the following error:

messages.js:46 Uncaught (in promise) Error: Error: Failed to spawn node
Perhaps it is not on the PATH.
    at new ResponseError (messages.js:46)
    at handleResponse (main.js:430)
    at processMessageQueue (main.js:258)
    at Immediate.<anonymous> (main.js:242)
    at runCallback (timers.js:696)
    at tryOnImmediate (timers.js:667)
    at processImmediate (timers.js:649)
main.js:825 Uncaught (in promise) Error: Connection got disposed.
    at Object.dispose (main.js:825)
    at TypeScriptClientContribution.<anonymous> (language-client-contribution.ts:158)
    at step (language-client-contribution.ts:15)
    at Object.throw (language-client-contribution.ts:15)
    at rejected (language-client-contribution.ts:15)
DevTools failed to parse SourceMap: file:///Applications/Theia.app/Contents/Resources/app/lib/9.bundle.js.map

It works when running from theia/examples/electron/dist, this must be a PATH issue although we call fix-path from the electron maim module. I will work on this a bit.

@kittaakos kittaakos changed the title GH-4874: Build the electron app from the source. [WIP] GH-4874: Build the electron app from the source. Apr 12, 2019
@akosyakov
Copy link
Member

I wonder do you need email and homepage? It was failing for me without.
If I run yarn package i get:

Error: Please specify author 'email' in the application package.json

@akosyakov
Copy link
Member

I can verify that preview command works, nice!

Screen Shot 2019-04-15 at 07 36 20

Maybe we don't need package command. I don't think our example app is good example, it has so many unnecessary extensions for the simple app.

@kittaakos
Copy link
Contributor Author

If I run yarn package i get:

Error: Please specify author 'email' in the application package.json

No, it was not failing to me, but this PR is wrong as is, sorry for the noise. Incorrect versions are picked up due to the way the electron-builder collects the hoisted dependencies.

@kittaakos kittaakos closed this Apr 15, 2019
@kittaakos kittaakos deleted the GH-4874 branch April 15, 2019 06:55
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.

[electron] As a developer I want to build a bundled electron application from the source
2 participants