Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How can I add some selective features/ subfeatures to a new release bu


6 replies to this topic

Sukrit

Sukrit
  • Full Members
  • 9 posts

Posted 27 January 2015 - 12:05

I am using Install Script in Install Shield 2013 on Windows 7, Lang Used C#.

I have a project and it has some features and sub features added to it. Now I want to build a new release using Automation Interface need to add some selective features/ subfeatures to this release so that the original features remains unaltered.

We can pass the New release name and features required in this release using Command Line.

How can I add selective features supplied as command line arguments to my release. Is there any predefined Object/function/Method for this. Please advise.

Need to achieve this in Install Script only.
 



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 January 2015 - 12:57

Maybe I'm misunderstanding your question, but is FeatureSelectItem what you are looking for?



Sukrit

Sukrit
  • Full Members
  • 9 posts

Posted 29 January 2015 - 05:27

Hi Stefan,

 

Thanks for the reply.

 

I guess FeatureSelectItem is called during we are installing the setup. Am I right?

 

I need a function which I can call during the build of the release through the Automation Interface. I have a script in C# through which I want to call a function of ISWiProject or ISWiFeature( or any such object...) with which I can select the features that I want to include in my this particular Release build.

 

I need a property something like IncludeInBuild. The problem with IncludeInBuild is that it alters the default behaviour of the Feature. I just want a similar property with which I can Select the features for a paricular new Relaease build only and default behaviour is not altered. Need to do the work in attched screen shot in Release Wizard through Scripting.

 

Need to do so to minimise the size of my installation setups.

 

Hope this time I was able to explain my Query.

 

Awaiting your response.

 

Attached Images

  • Untitled.png

Edited by Sukrit, 29 January 2015 - 05:51.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 January 2015 - 19:09

How does IncludeInBuild change the behaviour of the feature? If you set it to false, it won't be included in the build, so it shouldn't matter. And if you don't call IncludeInBuild for a feature (and it's included by default) there also shouldn't be a problem. Maybe I'm still misunderstanding you, sorry.



Sukrit

Sukrit
  • Full Members
  • 9 posts

Posted 02 February 2015 - 09:24

Let me try to explaoin it with the help of an example:

 

Let us suppose we have two features and their default includeinBuild is as follows:

 

Feature                     IncludeInBuild

Feature1                    Yes.

Feature2                   No.

 

Now I want to build a new release using Automation Interface (Script in C#) without Using Any GUI of IS.

 

Let Say I want to include Only Feature2 in this release. So, If I use IncludeInBuild I'll Do:

 

feature1.IncludeInBuild = false;

feature2.IncludeInBuild = true;

 

Now I'll Run build() and a release will be made.

 

Now next time when I again want to build a new release with the default features which were earlier set like below:

 

Feature                     IncludeInBuild

Feature1                    Yes.

Feature2                   No.

 

I call the build() , but the features included are :
 

Feature1                  No

Feature2                  Yes

 

because we have changed the includeinbuild property.

 

So I want to know is there any predefined alternate property with whose help I can achieve required functionality i.e. with which we can build a release without affecting the default IncludeInBuild of Feature.

 

 

I know that an alt way of achieving so is that I can Store the Current state of IncludeInBuild oif feature before altering them, then alter them, build release and then re apply the state from thye stored state.

 

But I am looking forward If I can get a direct inbuilt function for achieving so.

 

Hope now I am Clear. Please advise. Thanks in Advance.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 February 2015 - 15:45

Now I understand. So the problem si that the change is stroed in the project file.

I'm not aware of a method to temporarily chage this in an InstallScript project. So the best workaround may be to make a copy of the project file.



Sukrit

Sukrit
  • Full Members
  • 9 posts

Posted 03 February 2015 - 16:04

ok.. thanks for your time and info.