Page 1 of 1

License file problem when building patches

Posted: Wed Jan 17, 2007 5:52 am
by Christoph Schneegans
I'm currently developing a setup for a software that needs a license file to run. This file is created by an external tool for every customer, and I have learned that it would be wiser to rebuild the project instead of replacing the license file after building. According to this, every customer will receive a customized setup build, typically shipped on CD. I'm not totally satisfied with this situation, but on the other hand, our customers will experience a very convenient setup process, as they can run the program once it is installed and don't have to copy their license file manually.

Now I'm wondering what this means to binary patches. I don't want to keep a patch reference for every customer; it would be great if a single patch build could be safely applied by all customers. IMHO,

Code: Select all

[compiler if Variable BUILDMODE not Equals PATCH]
Install Files license.dat to $TARGETDIR$ (Never Overwrite)
[compiler end]

should be sufficient to avoid conflicts with differing license files. Is this correct?

Posted: Wed Jan 17, 2007 1:50 pm
by MichaelNesmith
That sounds good indeed!

About the other matter. There are other ways to address the issue. If you are installing just a single file, you can indeed ship it outside your setup.exe file (say, a zip containing the license and the setup.exe file).

And then you can use the Copy Local Files command, or directly the WinAPI call CopyFileA in kernel32.dll via Call DLL Function, to take care of installing the license. Simple! Just use $SFXPATH$ as the source directory (or $EXEDIR$ for uncompressed installs).

This would save you a separate build for each customer and still have the customers end up with a very convenient installation process.

Posted: Thu Jan 18, 2007 4:48 am
by Christoph Schneegans
"Copy/Move Local Files" works great, so I don't need to build the project again and again. Perfect!