Two options to work around this issue:
1. Load everything you need in the beginning. When publishing the exe, you can just quit the process and everything is there.
2. Put everything you don't want to load at the beginning, but need later in your code in one folder (e.g. data) and include viz.res.addPublishDirectory('./data') at the beginning of your code.
I had to get used to the publishing system as well, but it's workable when you get the hang of it. Although I agree with you that there should be a more elegant solution for making sure everything you need is included in the executable.
|