HELP! -add not working like I thought it should! :(Solved

I am attempting to -add and overwrite an existing version from my scripts so that the first time through, only an empty shell is uploaded to the server, but on the second build, the proper delta is uploaded.

First time through it runs the following:

"C:\Program Files (x86)\wyBuild\wybuild.cmd.exe" "%wyBuild\%wyProject.wyp" /bu /bwu -catchall="false" -add="T:\Temp\wyBuild.xml"

Where T:\Temp\wyBuild.xml is:<?xml version="1.0" encoding="utf-8"?><Versions> <AddVersion overwrite="true"> <Version>TARGET_VERSION</Version> <Changes>CHANGE_TEXT</Changes> <InheritPrevRegistry /> <InheritPrevActions /> </AddVersion> <RemoveVersion ver="1.0" /></Versions>

TARGET_VERSION and CHANGE_TEXT are replaced with the correct initial version number and change text before wyBuild processes it.

This works. I get a 1K .wyc, .wys and .wyu files.

I upload these files to my server, and copy wyUpdate.exe and client.wyc to my distribution media (install CD folder). I've even installed and run this version, and it correctly indicates no updates at this time.

Immediately after doing the above, I do almost the same thing, but I don't do the /bu but I add in the files that should be part of that version (essentially emulating the walk-through):

"C:\Program Files (x86)\wyBuild\wybuild.cmd.exe" "%wyBuild\%wyProject.wyp" /bwu -add="T:\Temp\wyBuild.xml"

Where this time T:\Temp\wyBuild.xml has been changed to:<?xml version="1.0" encoding="utf-8"?><Versions> <AddVersion overwrite="true"> <Version>TARGET_VERSION</Version> <Changes>CHANGE_TEXT</Changes> <InheritPrevRegistry /> <InheritPrevActions /> <Files dir="basedir"> <Folder source="INSTALL_PROGRAM_FILES" insideonly="true" /> </Files> </AddVersion> <RemoveVersion ver="1.0" /></Versions>

You'll note that I'm overwriting the same version (TARGET_VERSION is replaced by the target version string, as before, and INSTALL_PROGRAM_FILES is the path to our files as they appear installed on a user's PC).

The main difference is that this time I'm fully defining the files that should compose this version, so that next version, the delta will be relative to the first version's files.

BUG / Derailment point:

When the second wybuild.cmd.exe is executed, it does NOT overwrite the existing version definition in the .wyp file. Instead, if I open the .wyp, I can see the initial version there (correct) but missing any files & folders (incorrect).

Any ideas why this might be?

EDIT: BTW, the only reason I issue the /bwu on the second call to wybuild.com.exe is that it refuses to do the -add without one of /bu, /bwu, /upload. I absolutely don't want to generate /bu, and /upload. I don't really want to redo wyUpdate, but it shouldn't hurt either.

I just did a test: If I use /bu instead of /bwu then -add does the right thing.

It would be nice to not need to do any of /bu, /bwu, or /upload for -add, but just be able to -add alone (update the .wyp but have no further consequence)

Ok, we'll change that for the next version.

Great!

For now, I worked around it by renaming the Updates\ folder, doing the /bu (which generates a bogus Updates), then delete the bogus Updates\, and rename the original Updates folder back.

Inelegant, but works until there is a newer version of wybuild.com.exe.

Thanks again. 😀

Hi,Also have found one BUG, in case wyBuild project have new THEME it's not included by command line compile.. by GUI compile works fine. wybuild.cmd.exe <.wyp filename> /bu /bwu -add <xml filename> will create client.wyc wich have no assigned new project theme(it always create with Theme "Simple Blue").

Sorry for not answering this sooner.

I take it you're using a build server, correct? Did you add the theme on the build server (the theme is not embedded in the *.wyp file)?