Various updates

This commit is contained in:
Norberto Lopez
2013-05-08 16:13:48 +00:00
parent 8e93fe673b
commit 5c467a7a12
6 changed files with 16 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ import javax.swing.SwingUtilities;
import distMaker.gui.PickReleasePanel;
import distMaker.node.Node;
import distMaker.platform.AppleFileUtil;
import distMaker.platform.AppleUtils;
public class DistMakerEngine
{
@@ -212,7 +212,7 @@ public class DistMakerEngine
* This method will be called via reflection.
*/
@SuppressWarnings("unused")
private void checkForUpdatesWorker(Task aTask)
private void checkForUpdatesWorker(FullTaskPanel aTask)
{
List<Release> fullList;
Release chosenItem;
@@ -236,6 +236,9 @@ public class DistMakerEngine
aTask.abort();
return;
}
// Hide the taskPanel
aTask.setVisible(false);
// Prompt the user for the Release
aTask.infoAppendln("Please select the release to install...");
@@ -259,6 +262,9 @@ public class DistMakerEngine
chosenItem = pickVersionPanel.getChosenItem();
if (chosenItem == null)
return;
// Reshow the taskPanel
aTask.setVisible(true);
// Log the user chosen action
aTask.infoAppendln("\tRelease chosen: " + chosenItem.getVersion());
@@ -498,7 +504,7 @@ public class DistMakerEngine
errMsg = null;
if (pFile.setWritable(true) == false)
errMsg = "Failure. No writable permmisions for file: " + pFile;
else if (AppleFileUtil.updateVersion(pFile, aRelease.getVersion()) == false)
else if (AppleUtils.updateVersion(pFile, aRelease.getVersion()) == false)
errMsg = "Failure. Failed to update file: " + pFile;
if (errMsg != null)

View File

@@ -177,7 +177,7 @@ public class PickReleasePanel extends GlassPanel implements ActionListener, ZioR
JPanel tmpPanel;
// Form the layout
setLayout(new MigLayout("", "[left][grow][]", "[]40[][][]3[grow]10[]"));
setLayout(new MigLayout("", "[left][grow][]", "[]25[][][]3[grow]10[]"));
// Title Area
titleL = new JLabel("Please select an update", JLabel.CENTER); // this text gets replaced once the curent version status is known
@@ -275,7 +275,7 @@ public class PickReleasePanel extends GlassPanel implements ActionListener, ZioR
if (pickItem == null)
warnMsg = "Select the version you want to switch to.";
else if (pickItem.equals(installedItem) == true)
warnMsg = "You cannot update to the same version you are running. You can dwitch to a different version.";
warnMsg = "You cannot update to the same version you are running. You can switch to a different version.";
else if (pickItem.getBuildTime() < installedItem.getBuildTime())
warnMsg = "Please note that your current selection will revert back to an older version than the currently installed version.";

View File

@@ -16,7 +16,7 @@ import org.w3c.dom.*;
/**
* Utility class which contains a set of methods to interact with an Apple Info.plist file.
*/
public class AppleFileUtil
public class AppleUtils
{
/**
* Utility method to update the specified max memory (-Xmx) value in the plist file (aFile) to the specified

View File

@@ -7,7 +7,7 @@ import java.util.List;
import com.google.common.collect.Lists;
public class LinuxFileUtil
public class LinuxUtils
{
/**

View File

@@ -78,7 +78,7 @@ public class MemUtils
errMsg = null;
if (pFile.setWritable(true) == false)
errMsg = "Failure. No writable permmisions for file: " + pFile;
else if (AppleFileUtil.updateMaxMem(pFile, maxMemSize) == false)
else if (AppleUtils.updateMaxMem(pFile, maxMemSize) == false)
errMsg = "Failure. Failed to update file: " + pFile;
if (errMsg != null)
@@ -99,7 +99,7 @@ public class MemUtils
errMsg = null;
if (scriptFile.setWritable(true) == false)
errMsg = "Failure. No writable permmisions for file: " + scriptFile;
else if (LinuxFileUtil.updateMaxMem(scriptFile, maxMemSize) == false)
else if (LinuxUtils.updateMaxMem(scriptFile, maxMemSize) == false)
errMsg = "Failure. Failed to update file: " + scriptFile;
if (errMsg != null)

View File

@@ -10,7 +10,7 @@ import time
# Globals
# The version of DistMaker
version = '0.35'
version = '0.36'
def logAndPrint(message="", indent=0, showTime=False):