wrye-bash
wrye-bash copied to clipboard
Headless mode
<Hijacked by Utumno feel free to edit @Infernio>
A headless mode for Bash seems a laudable goal:
- people are interested in using bash record libraries (fi https://discord.com/channels/537706885965676554/537710082755133460/895557710400094208 )
- internally it will guide/finalize the separation of the UI and business logic code
- naming idea for the issue from 9a87ddadd1cd9435fb0bfee7300df83d64703ed0, although I should probably call this Boot :P
Codewise this is about boot (bash.py, initialization.py, bosh.initBosh, etc). There is already a lot of ground covered and as of 170ad99fbdfd72fbaf4e03ff8ed0754c1b7269b3 we have the tools to complete this. What's involved is:
- [x] decouple bosh from gui/balt - finally done in d5673f44b0a9e35360746984efc2ed4daa8fcf6f
- [ ] clean up initialization
- [x] tooldirs is absorbed in inisettings in 170ad99fbdfd72fbaf4e03ff8ed0754c1b7269b3 - see d5673f44b0a9e35360746984efc2ed4daa8fcf6f
- once #570 is done we will move these to bass.settings centralizing even more
- [ ] init_dirs (permission checks? env?) - see 9f0da80ca2bdfd93b3f039f8b7cf57bd68c54950 for some initial cleanup, so we see the init patterns. and dependencies on previous boot stages
- [ ] initBosh and co - more boot stages - see 78f328c234b9111e7c1518ebf2dca6fc8c2a8915
- [ ] gui init centralize even more (colors, Resources)
- [ ] define fallbacks for images ?
- [ ] CI hack (9a87ddadd1cd9435fb0bfee7300df83d64703ed0) does not belong in. gui_globals (b3e46b4a3d96e2bff5e003bd81540604c18920fd) - we used to switch cwd (see around e3d62afe823e67cbe035b593f82bfb0789417ad0) but I would prefer some other solution that makes sure all dirs in init dirs are resolved correctly - or all needed dirs per scenario (normal boot, test boot, headless. boot aka importing as a library)
- [ ] clean up and minimize (but keep!) bash.ini functionality (see d5673f44b0a9e35360746984efc2ed4daa8fcf6f)
- #570: Tool Options section must be replaced by a settings page (or tab, but that's more complex)
- [ ] this will remove the need for a (mildly hacky)
get_path_from_iniin bass - [ ] then inisettings can be absorbed in the Settings API - #178
- [ ] this will remove the need for a (mildly hacky)
- #570: Tool Options section must be replaced by a settings page (or tab, but that's more complex)
- [ ] locale handling
- [ ] translations handling - for a library mode we won't need translations and indeed this step is one of the most subtle. We use the
_()function very loosely (and have to add a manual exception to the IDE otherwise it flags it unresolved). We should be more carefull about using it in module/class scope - basher is ok for instance, as translations is about the gui but bosh is so ok - [ ] TBC
Start from bash.py - see how early up we plug wx in ;)
Blocked by #190, #570 Blocks #554, #568, #250