cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jcardona
Level 2

How can I share code in my InstallScript projects?

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?
Thanks
Labels (1)
0 Kudos

(3) Replies
alegerlotz
Level 7

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.

-Al
0 Kudos
MarkEarle
Level 6

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.

Cheers,

ME
0 Kudos
jcardona
Level 2

Thanks everybody for yor help.
0 Kudos