This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How can I share code in my InstallScript projects?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Mar 10, 2008
10:17 AM
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
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
(3) Replies
‎Mar 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.
-Al
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
‎Mar 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.
Cheers,
ME
#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