pschillinger / flexbe_chrome_app

Contains the source code of the FlexBE Chrome App.
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

[Feature] Read configuration from file #3

Open achim-k opened 8 years ago

achim-k commented 8 years ago

Would be great if FlexBE could read the configuration (State folders, behavior folders, etc.) from a file. That would allow fast switching between different workspaces or fast initial setup.

pschillinger commented 8 years ago

Agree, this makes sense. I will add it when I find time.

achim-k commented 8 years ago

:+1: Maybe I'll also have a look into it and create a PR. It's not a urgent thing though.

pschillinger commented 8 years ago

Sure, feel free to do so. :) If you do, let me know if you have any questions.

pschillinger commented 8 years ago

Can you try to export configuration on one PC and import it on another?

Chrome gives unique IDs to file entries. I'm not sure if they are unique wrt to the App ID or completely unique.

achim-k commented 8 years ago

I tried it on another PC but it does not work. Even when having the workspace folder under the same path as on the other PC, the app throws the following exceptions:

Unchecked runtime.lastError while running fileSystem.restoreEntry: Unknown id
...
Error in response to fileSystem.restoreEntry: TypeError: Cannot read property 'getDirectory' of undefined
...

It seems that the file IDs are indeed completely unique, since I'm using the same app version on both PCs.

achim-k commented 8 years ago

Just a thought: If the chrome extension environment is somewhat too limiting, maybe it's worth a try with electron (http://electron.atom.io/)

pschillinger commented 8 years ago

Thanks for testing! I guess this makes sense because otherwise, it would be possible to circumvent Chrome's security policy.

Electron looks interesting, will have a closer look when I find some time. However, a change like this would definitely be a long-term thing.

spmaniato commented 8 years ago

Philipp, for when you look into Electron apps: https://github.com/sindresorhus/awesome-electron 😁

achim-k commented 8 years ago

or that one: https://github.com/electron/electron-api-demos