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
- :
- InstallAnywhere
- :
- InstallAnywhere Knowledge Base
- :
- Project Automation API InstallDirectory
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Project Automation API InstallDirectory
Project Automation API InstallDirectory
Summary
This article discusses about using the Project Automation API InstallDirectorySynopsis
This article discusses using the Project Automation API InstallDirectory Java class.Discussion
The InstallDirectory Java class adds the given directory to the installer project to be later installed by the installer. It is similar to adding a directory using the Add File... or adding a Create Folder action button via InstallAnywhere IDE. It also allows the definition of some file attributes, like UNIX permissions and destination name.
Constructor for Install Directory
public InstallDirectory()
Method Summary for InstallDirectory
Modifier and Type | Method and Description |
---|---|
Vector<OSHostable> | getChildren() The children files to be installed. |
boolean | getRemoveRecursively() Whether to recursively delete all contents of this folder during uninstall. |
void | setRemoveRecursively(boolean removeRecursively) Whether to recursively delete all contents of this folder during uninstall. |
Methods inherited from class com.zerog.ia.auto.project.actions.FileAction |
---|
getDestinationName, getFileOverwriteBehavior, getOverrideUnixPermissions, getShouldUninstall, getSourceFile, getUnixPermissions, setDestinationName, setFileOverwriteBehavior, setOverrideUnixPermissions, setShouldUninstall, setSourceFile, setUnixPermissions |
Methods inherited from class com.zerog.ia.auto.project.InstallableObject |
---|
getBelongsToUninstallPhase, getRollbackEnabledCancel, getRollbackEnabledError, getRuleExpression, getRules, getRulesLogicalOperation, getTagsInInstallPiece, setBelongsToUninstallPhase, setRollbackEnabledCancel, setRollbackEnabledError, setRuleExpression, setRulesLogicalOperation, setTagsInInstallPiece |
Methods inherited from class com.zerog.ia.auto.project.ProjectObject |
---|
equals, getReferenceID, hashCode, setReferenceID |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Sample custom code
The following is an example of Java code that adds an install directory to the first directory in the Install Sequence. When this sample code is executed on the attached sample project a new folder is created under User Install Folder in the Install Sequence.
package com.company.ProjectAuto; import com.zerog.ia.auto.project.actions.InstallDirectory; import com.zerog.ia.auto.project.*; public class ProjectInstallAuto { public static void main(String[] args ) { ProjectAutomation.setIALocation("Path it InstallAnywhere installation directory"); // change to point to your project file Project iap = ProjectAutomation.loadProject("Path to project file"); //Get the First Installation Folder in the tree in install-sequence OSHostDestinationFolder destinationFolder = iap.getOSHost().getFolders().get(0); //Add a new directory to the Installation Folder InstallDirectory InstDirect = new InstallDirectory(); destinationFolder.getChildren().add(InstDirect); //save and close the project ProjectAutomation.saveProject(iap); System.exit(0); } }
Additional Information
For more information on the Project Automation API, click here.
No ratings