01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.installer.action;
05:
06: import com.zerog.ia.api.pub.CustomCodeAction;
07: import com.zerog.ia.api.pub.InstallerProxy;
08: import com.zerog.ia.api.pub.UninstallerProxy;
09:
10: public class SetHomeDir extends CustomCodeAction {
11:
12: public void install(InstallerProxy ip) {
13: String homeDir = ip.getVariable("USER_INSTALL_DIR").toString();
14: if (homeDir.endsWith("\\"))
15: homeDir = homeDir.substring(0, homeDir.length() - 1);
16: else if (homeDir.endsWith("/"))
17: homeDir = homeDir.substring(0, homeDir.length() - 1);
18: ip.setVariable("USR_HOME", ip.substitute(homeDir));
19: }
20:
21: public void uninstall(UninstallerProxy up) {
22: // not implemented
23: }
24:
25: public String getInstallStatusMessage() {
26: return "";
27: }
28:
29: public String getUninstallStatusMessage() {
30: return "";
31: }
32: }
|