View Full Version : How can I share code in my InstallScript projects?

03-10-2008, 10:17 AM
Hi everybody,
I have many InstallScripts projects, and the scripts are the same, when I change something in one project I need to change the other projects too. How can I use only one code for all projects and change only one code?

03-10-2008, 10:50 AM
Although not necessarily what you're looking for, I'll tell you what I've done in the past...

If your source code control system allows sharing, simply share the setup.rul file (or whatever your file is called) among the locations. You'll need to be sure to do a re-get each time you check in a change.

Its not perfect, but it works.

Another more elegant approach, if you're using InstallScript type projects, is to put your code into an InstallShield Object that you include in your projects. You instantiate the object in your projects, then access the code as methods of that object.


03-10-2008, 12:26 PM
A third option is to place the .rul and .h file in a folder all the projects can get to and reference it in the #include statements.

#include "..\..\SharedFolder\Shared.h"
#include "..\..\SharedFolder\Shared.rul"

It works but is more difficult to debug. The most practical solution would be the second option alegerlotz suggested.



03-10-2008, 03:06 PM
Thanks everybody for yor help.