[Win v0.5.3b] Exporting behaves weirdly
Forecaster opened this issue · 6 comments
When I try exporting my application the export feature is acting strange.
Sometimes it doesn't output anything. If there is something in the output dir it will remove it first, and not output anything. Exporting a second time may produce something, but occasionally doesn't.
Clearing the directory manually first seems to improve the success rate but that might not be correct.
After clearing it and selecting every export option, and exporting, only mac-x64 and windows-x64 were output.
http://i.imgur.com/DoOTRaz.png
When used one by one, each option seems to work correctly.
This has to do with some weird permissions Windows has. I've been trying to figure it out forever because it doesn't happen on Mac or Linux exporting. Because the folder was in use at one time, Windows thinks it might still be in use and prevents deleting the path. Unfortunately, it's difficult to catch this error and report it when it happens, so Web2Exe silently fails. I'll try to look into it again.
Perhaps a potential "workaround" for this would be adding a "build counter".
Similar to how build systems such as Jenkins assign numbers to builds you could append a build number to the output. This number could be tracked in the project settings and automatically increment on each export. Thus it wont need to try to overwrite the existing directory.
It could be presented as a pattern variable, but then people might not use it and not know it exists to avoid this issue, so maybe it should be used by default? I'm not sure.
You're correct on the build number thing. That would work around the issue. I'm going to give this another look when I'm fixing the 0.6.0b build tonight and hopefully I can get it sorted.
Let me know if the latest release fixes your issue!
It does seem to be behaving correctly now, without having to do anything with the existing folders!
I'm going to close this, I'll re-open it should I find that the issue persists, but it appears to be solved.
Awesome :)