Heres how to keep config files: https://wyday.com/wybuild/help/faq.php#config-files
Our project is updated with wyUpdate. This decision was made by the previous programming team and we know almost nothing about wyBuild.
When our application is installed, a configuration file is created from the install files, then updated. wyUpdate is run, finds an update and applies it. In Production, the configuration file is preserved despite being changed. My understanding from https://wyday.com/wybuild/help/faq.php#how-it-works is that any installed file that gets changed between updates would cause the "catchall" install to be performed. Server analysis shows that the catchall file is *not* requested.
I have modified our application slightly to work in a Test environment and rebuilt it. When the Test version runs wyUpdate, the configuration file is reset to its initial unconfigured state, and server analysis shows that the catchall file *is* requested.
How did the previous programmers (who are only contactable when they want to be) achieve this? When I asked them they just said "they never had a problem with it", and haven't yet replied to requests to clarify.
I just had a nasty thought as I was about to click "Submit" on this question. Git sometimes decides to play around with line endings. Could this explain the different behaviour? It appears there was only a single programmer who worked on the app before it got handed over to us. If they never checked out the code but only ever committed code from a single computer, then it's possible my code is not exactly the same as theirs. I haven't yet tried to build a Production version, as I need to get all changes approved in Test first.
Heres how to keep config files: https://wyday.com/wybuild/help/faq.php#config-files
Wyatt wrote:> Heres how to keep config files:> https://wyday.com/wybuild/help/faq.php#config-files
That's definitely what I'll do going forward, but that's not how it's been done at the moment. I've tried looking in the wyUpdate source code to see how it decides whether a file has changed or not, and whether it can install an incremental patch or if it has to install the "all" patch, but I've been unable to find it so far.
The problem is that if I remove the configuration file from wyBuild, wyUpdate deletes it from the clients' computers, rendering the app inoperative. We would then have to spend days, if not weeks, manually reconfiguring each client's computer.
Can you give me a pointer where to look in the wyUpdate code?1. Where does it check to see if the existing files are correct?2. Where does it download the catchall patch?
Remove the config file from all versions in wyBuild. This way the file is neither patched nor removed. If you keep the config file in the old versions then wyBuild will see your intended action as trying to delete the file. See: https://wyday.com/wybuild/help/faq.php#how-it-works
To see why a patch fails to apply, again, see our FAQ: https://wyday.com/wybuild/help/faq.php#catch-all
Thank you for your reply, especially considering it's New Year's Eve/Day.
I've read everything on the FAQ page which is why I'm confused and still asking questions. The project built by the previous programmers doesn't behave the way your FAQ says it should, and if I make a mistake when updating the app that then takes weeks or months to fix, our company could cease trading or suffer irreparable reputation damage. Obviously, I want to do everything in my power to prevent this!
I can't currently remove the config file as all new installations will fail. I've been asked to fix bugs before I start redesigning the app, and being able to work without a config file initially would be a fairly big redesign. The previous programmers even managed to change the config file in wyBuild without it destroying the already installed apps when wyUpdate was run!
This is why I'd like to see exactly where in wyUpdate it performs its checks. Since it's an open source product, there should be no problem with me reading the code. I just currently have no idea where it is!
I found the method that's failing. It's InstallUpdate.bw_DoWorkUnzip(). It thinks the original .exe file doesn't match, which is why it's trying to do the catchall update. Why would it think that since I updated both the original .exe and the update .exe before generating the patch with wyBuild?
OK, it turns out the .exe file was a red herring. It's now detecting a change in the config file and attempting to do a catchall update.
If version 1 and version 2 have the same config file, but that file is changed during installation, will the updater pick that up as a change? Does it only look for changes in the installed software if the source files have changed?
It seems this is the case. I just managed to open their patch file, and it does not contain a difference for the config file. If I rebuild the project from what they committed to Git, it does include the config file.
And, finally, here is the solution!
Remove the config file from ALL previous versions (wyBuild => Files & Folders, select each tab in turn, select the config file, press X Delete, => Build wyUpdate & Updates => Build updates! Done!
Now, no config file will even be looked at when an update it performed!