Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Run all backend processed even if the IDE package is run with --no-wi…
Browse files Browse the repository at this point in the history
…ndow (#1353)
  • Loading branch information
MichaelMauderer authored Mar 22, 2021
1 parent 145153b commit 3381bb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
a project contain syntax errors.
- [Users can opt out of anonymous data gathering.][1328] This can be done with
the `--no-data-gathering` command-line flag during the startup of the IDE.
- [You can now start the IDE service without window again.][1353] The command
line arguyment `--no-window` now starts all the required backend services
again, and prints the port on the command line, allowing you to open the IDE
with a browser of your choice.

#### EnsoGL (rendering engine)

Expand All @@ -62,6 +66,7 @@ you can find their release notes
[1064]: https://github.com/enso-org/ide/pull/1064
[1316]: https://github.com/enso-org/ide/pull/1316
[1318]: https://github.com/enso-org/ide/pull/1318
[1353]: https://github.com/enso-org/ide/pull/1353

<br/>

Expand Down
25 changes: 13 additions & 12 deletions src/js/lib/client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,23 +369,26 @@ let server = null
let mainWindow = null
let origin = null

async function main() {
async function main(args) {
runBackend()
console.log("Starting the IDE.")
console.log("Starting the IDE service.")
if(args.server !== false) {
let serverCfg = Object.assign({},args)
serverCfg.dir = root
serverCfg.fallback = '/assets/index.html'
server = await Server.create(serverCfg)
origin = `http://localhost:${server.port}`
}
mainWindow = createWindow()
mainWindow.on("close", (evt) => {
if (hideInsteadOfQuit) {
evt.preventDefault()
mainWindow.hide()
}
})
if(args.window !== false) {
console.log("Starting the IDE client.")
mainWindow = createWindow()
mainWindow.on("close", (evt) => {
if (hideInsteadOfQuit) {
evt.preventDefault()
mainWindow.hide()
}
})
}
}

function urlParamsFromObject(obj) {
Expand Down Expand Up @@ -515,9 +518,7 @@ Electron.app.on('ready', () => {
} else if (args.info) {
printDebugInfo()
} else {
if(args.window !== false) {
main()
}
main(args)
}
})

Expand Down

0 comments on commit 3381bb4

Please sign in to comment.