PackageManager pm = PackageManager.getInstance();
String targetDir = getTargetDir();
-// Registry.sdkWorkSpacePath = getSDKDataPath();
-// Config.USER_CONFIG_HOME_PATH = getSDKDataPath();
+ Registry.sdkWorkSpacePath = getSDKDataPath();
+ Config.USER_CONFIG_HOME_PATH = getSDKDataPath();
if (packageNames.contains("all")) {
if (checkAvailableSize(getAllPackages(), targetDir)) {
Log.log("All files moved properly.");
}
- executeInstallScript(pack, monitor, tempDir);
+ if (!executeInstallScript(pack, monitor, tempDir)) {
+ Log.err("Fail to execute install script.");
+ throw new IMFatalException(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR);
+ }
if (!moveRemoveScript(tempDir, pack)) {
return false;
// check exit code
if (exitCode == 0) {
return true;
- } else if (exitCode > 0 && exitCode < 10) {
+ } else if (exitCode == 1) {
Log.err("Exit code => " + Integer.toString(exitCode));
return false;
} else if (exitCode == 99) {
ErrorController.setInfoCode(InfoCode.RESTART_THE_COMPUTER);
Log.log("Set restart message.");
return true;
- } else {
+ } else {
Log.err("Installer.executeScript() install script error => "
+ scriptFile.getAbsolutePath());
Log.err("Exit code => " + Integer.toString(exitCode));
- throw new IMFatalException(ErrorCode.INSTALL_SCRIPT_FATAL_ERROR);
+ throw new IMFatalException(ErrorCode.SCRIPT_FATAL_ERROR);
}
}
}
PACKAGE_NOT_EXIST_TO_INSTALL_OR_UNINSTALL("Install or uninstall package not found."),
INSTALL_SCRIPT_NOT_EXISTS("Install script files not found."),
INSTALL_SCRIPT_FATAL_ERROR("Fatal error occurred while installing the Tizen SDK."),
+ SCRIPT_FATAL_ERROR("Fatal error occurred while executing post script."),
// Network error
INTERNET_CONNECTION_ERROR("Server connection failed. Check the network status or set InstallManager settings."),