How do I direct the installer to perform actions before installation starts?

Author: BitRock Support       Date: October 30, 2007 09:33       Tags: Action list

You can direct the installer to perform actions before installation starts by using the <preInstallationActionList> section. For example, the following code will set a different installation directory depending on the platform the installer is running on.

     <preInstallationActionList>
       <setInstallerVariable>
         <name>installdir</name>
         <value>${env(SYSTEMDRIVE)}/${product_shortname}</value>
         <ruleList>
           <compareText>
            <text>${platform_name}</text>
            <logic>equals</logic>
            <value>windows</value>
           </compareText>
         </ruleList>
       </setInstallerVariable>
       <setInstallerVariable>
         <name>installdir</name>
         <value>/usr/local/${product_shortname}</value>
         <ruleList>
           <compareText>
            <text>${platform_name}</text>
            <logic>equals</logic>
            <value>linux</value>
           </compareText>
         </ruleList>
       </setInstallerVariable>
     </preInstallationActionList>
Click here to download a sample project.xml file that integrates this functionality.

 

 

Back You should login to comment

 

You are
currently not
logged in.

 Log in 

or

Sign up