View Full Version : Wait for files hangs if files aren't there
pclancey
04-08-2014, 09:20 AM
Part of my build involves waiting for the executables and dlls to appear in an Output directory after code signing. I'm using Wait Until... Files(s) are created or modified, but this step continues to wait even after the files appear.
If I simply stop the script, and re-execute the step, then I get the message:
"All file(s) already exist, continuing without waiting", and the script continues on. This tells me my file list is correct.
I am using v8.6 under Win7, this script was imported from v6.7 (WinXP), where it used to work.
Any ideas?
kinook
04-08-2014, 10:32 AM
Not sure. It's working as expected here. I tested with the attached scripts, starting wait.bld, and then when create.bld is built, the wait.bld project completes.
http://www.kinook.com/Forum/showthread.php?t=3044
pclancey
04-08-2014, 12:52 PM
You're correct, your test files do work.
Please see post below for the results of further testing...
pclancey
04-08-2014, 01:55 PM
I have now determined that when:
1. VBP is Waiting for the files to be created in the networked folder
2. CodeSigning moves the desired files in - Wait does not trigger
3. Any change to the networked folder will trigger the Wait to see the code signed files and complete - for example, if I drop in a random, unrelated file, or even if I delete the files it is waiting for
It would seem that the way that the corporate CodeSigning program moves the files into the directory does not trigger the Wait, but any other change to the directory does.
Again, this used to work in VBP 6.7 / WinXP, with the same corporate CodeSigning mechanism.
kinook
04-08-2014, 11:02 PM
The FindFirstChangeNotification API (used by the Wait action in all versions of Visual Build) can have problems with network shares (see http://support.microsoft.com/kb/188321). Perhaps it was more reliable in Win XP?
You could always roll your own -- create a Loop step that waits forever, and in the loop an Exit step to exit the loop, configured to pause for a few seconds and a build rule to execute only if the file you're looking for exists ([vbld_FSO.FileExists("%FILENAME%)].
pclancey
04-09-2014, 10:13 AM
That is what I will do - thanks very much for your help.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.