Page 1 of 1

reload OXPs during development

Posted: Tue Feb 07, 2017 11:38 am
by MCO
it's me - again.
after messing around with some OXPs code and thinking about making one myself, i realized that i have to perform the following steps every time i test my code: go to main menu - manage expansion packs - install or remove a dummy pack - return to menu - load my commander - launch. especially the (de)installation is incredibly annoying, because i tend to work offline and therefor need to cheer up my connection to actually connect every second time.
now, is there any simpler way to do this? possibly from the main menu, or even within the game? how do oxp coders not fall to madness like this? :(
or maybe a good soul is willing to implement such a button with an oxp?
any help is appreciated!

Re: reload OXPs during development

Posted: Tue Feb 07, 2017 11:44 am
by Cody
Work from an OXP/OXZ in your AddOns folder - no need for online stuff. Or have I misunderstood?
You can add or remove OXZs manually from your ManagedAddOns folder too.

Re: reload OXPs during development

Posted: Tue Feb 07, 2017 12:17 pm
by another_commander
Press the Shift key while starting the game and hold it till the rotating Cobra appears; this will flush the game cache and reload all OXPs from scratch, including any changes you have made.

If you find this too cumbersome, add the always-flush-cache key to your .GNUstepDefaults and set it to YES. Pasting from the wiki:
Key: always-flush-cache
Type: boolean
Default: NO
Introduced: 1.73
If set to YES, the data cache will be rebuilt each time Oolite runs. This is roughly equivalent to placing a brick on your shift key.

Re: reload OXPs during development

Posted: Tue Feb 07, 2017 1:55 pm
by Stormrider
I like to use cim's build scripts, they require a little set up but once they are they will repackage an oxp as an oxz and replace the old oxz in your AddOns folder with the new one. They work out of the box on linux but require some modification to work on Windows or Mac.
https://github.com/cim--/oxp-build-scripts