home *** CD-ROM | disk | FTP | other *** search
Wrap
package com.zerog.ia.download; import com.apple.mrj.MRJFileUtils; import com.apple.mrj.MRJOSType; import com.zerog.ia.download.dialogs.ProgressDialog; import com.zerog.ia.download.downloaders.BrowserDownloader; import com.zerog.ia.download.downloaders.FileDownloader; import com.zerog.ia.download.outputListeners.ContextListener; import com.zerog.ia.download.outputListeners.GUIContextListener; import com.zerog.ia.download.outputListeners.StdErrContextListener; import com.zerog.ia.download.shared.DownloadContext; import com.zerog.ia.download.shared.Platform; import com.zerog.ia.download.shared.PlatformList; import com.zerog.ia.download.utility.AppletResourceBundle; import com.zerog.ia.download.utility.DiskSpaceCheckForDownload; import com.zerog.ia.download.utility.Gestalt; import com.zerog.ia.download.utility.GridBagUtilImpl; import com.zerog.ia.download.utility.Util; import com.zerog.ia.download.utility.nativelib.unix.Environment; import java.applet.Applet; import java.awt.Button; import java.awt.Checkbox; import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Event; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.Image; import java.awt.Insets; import java.awt.Label; import java.awt.Panel; import java.io.File; import java.io.FileNotFoundException; import java.net.MalformedURLException; import java.net.URL; import java.util.Enumeration; import java.util.Locale; import java.util.Vector; import netscape.security.PrivilegeManager; public class WebInstallerApplet extends Applet implements DownloadContext { public static AppletResourceBundle resourceBundle; public PlatformList platforms; private boolean wantingToDownloadInstallerWithVM; private boolean allowingEmailToBeSent; private String productName; private Frame parentFrame; private Vector contextListenerList = new Vector(3, 1); private FileDownloader downloadProcess; private Button btnAction; private Checkbox chkIncludeVM; private Image creditImage; private Panel pnlNormalGui; private Panel pnlExceptionGui; private Panel pnlNoInstallerGui; private String troubleEmailAddress; private Vector filesToBeDeleted = new Vector(1, 1); private boolean immediateInstall = false; private boolean optionToDownloadEitherInstaller = true; private int timeoutLength = 30000; private Label lblRecommended = null; private Font currentFont = null; private Font boldFont = null; private String buttonTextDownload = null; private String buttonTextInstall = null; private String vmCheckboxText = null; public static final String DOWNLOAD_BUTTON = ".Button.Download"; public static final String INSTALL_BUTTON = ".Button.Install"; public static final String OK_BUTTON = ".Button.OK"; public static final String CANCEL_BUTTON = ".Button.Cancel"; public static final String VM_CHECKBOX = ".CheckBox.VM"; public static final String RECOMMENDED_INSTALLER = ".RecommendedInstaller"; public static final String NONE_AVAILABLE = ".NoInstallerAvailable.Label"; public static final String SELECT_FROM_LIST = ".SelectFromList.Label"; public static final String INSTRUCTIONS = ".Instructions.Label"; public static final String ERROR_DETAIL_TITLE = ".Error.Detail.Title"; public static final String OG_EXCEPTION_INSTRUCTIONS = ".Exception.InstructionsLabel"; public static final String FAILURE_UNKNOWN = ".Failure.Unknown"; private final String otherPlatforms = "Other Platforms"; // $FF: synthetic field static Class class$com$zerog$ia$download$WebInstallerApplet; // $FF: synthetic field static Class class$com$zerog$ia$download$dialogs$EmailProgressDialog; // $FF: synthetic field static Class class$com$zerog$ia$download$dialogs$ErrorDetailDialog; // $FF: synthetic field static Class class$com$zerog$ia$download$dialogs$ErrorDialog; // $FF: synthetic field static Class class$com$zerog$ia$download$dialogs$ProgressDialog; // $FF: synthetic field static Class class$com$zerog$ia$download$dialogs$ProgressBar; public void init() { try { super.init(); System.err.println("Platform : " + Gestalt.getPlatform()); System.err.println("VM Vendor: " + Gestalt.getVMVendor()); System.err.println("VM Version: " + Gestalt.getVMVersion()); System.err.println("IsSupportedVM: " + Gestalt.isSupportedVM()); System.err.println("-----------------------"); this.addContextListener(new GUIContextListener(this)); this.addContextListener(new StdErrContextListener(this)); this.notifySetFriendlyErrorMessage(AppletResourceBundle.getLocalizedString(this, ".Failure.Unknown")); this.notifyOutputDiagnosticMessage("Java Vendor: " + System.getProperty("java.vendor")); this.notifyOutputDiagnosticMessage("URL: " + System.getProperty("java.vendor.url")); this.notifyOutputDiagnosticMessage("Java Version: " + System.getProperty("java.version")); this.notifyOutputDiagnosticMessage("Java Class Version: " + System.getProperty("java.class.version")); this.notifyOutputDiagnosticMessage("OS Name: " + System.getProperty("os.name")); this.notifyOutputDiagnosticMessage("OS Architecture: " + System.getProperty("os.arch")); this.notifyOutputDiagnosticMessage("OS Version: " + System.getProperty("os.version")); this.notifyOutputDiagnosticMessage("---------------------------------"); if (!Gestalt.isSupportedVM()) { this.createAppletGui(); this.handleError(); ((Component)this).repaint(); return; } this.loadPlatformData(); this.platforms.computeRunningOnPlatform(); if (this.platforms.getRunningOnPlatform() == null) { this.createAppletGui(); this.handleNoInstallerError(); ((Component)this).repaint(); return; } this.optionToDownloadEitherInstaller = true; this.setWantingToDownloadInstallerWithVM(true); if (this.platforms.getRunningOnPlatform().installerNameVM == null) { this.setWantingToDownloadInstallerWithVM(false); this.optionToDownloadEitherInstaller = false; } else if (this.platforms.getRunningOnPlatform().installerNameNoVM == null) { this.setWantingToDownloadInstallerWithVM(true); this.optionToDownloadEitherInstaller = false; } if (this.troubleEmailAddress != null) { if (this.troubleEmailAddress.indexOf(64) >= 0) { this.setAllowingEmailToBeSent(true); } else { this.setAllowingEmailToBeSent(false); } } else { this.setAllowingEmailToBeSent(false); } if (this.immediateInstall) { this.notifyOutputDiagnosticMessage("init: startDownloadProcess called from init"); this.startDownloadProcess(); } else { this.loadCustomLocale(); this.createAppletGui(); this.addNormalAppletGui(); } } catch (Throwable var4) { this.notifyErrorOccured(var4); try { this.createAppletGui(); } catch (Exception var3) { } this.handleError(); ((Component)this).repaint(); } } void createAppletGui() throws Exception { ((Component)this).setBackground(Color.white); this.pnlExceptionGui = new Panel(); this.pnlExceptionGui.setLayout(new FlowLayout()); String var1 = AppletResourceBundle.getLocalizedString(this, ".SelectFromList.Label"); this.pnlExceptionGui.add(new Label(var1, 1)); this.pnlNormalGui = new Panel(); this.pnlNoInstallerGui = new Panel(); this.pnlNoInstallerGui.setLayout(new GridLayout(2, 1)); var1 = AppletResourceBundle.getLocalizedString(this, ".NoInstallerAvailable.Label"); this.pnlNoInstallerGui.add(new Label(var1, 1)); var1 = AppletResourceBundle.getLocalizedString(this, ".Instructions.Label"); this.pnlNoInstallerGui.add(new Label(var1, 1)); GridBagLayout var2; this.pnlNormalGui.setLayout(var2 = new GridBagLayout()); GridBagUtilImpl.setLayoutManager(var2); var1 = AppletResourceBundle.getLocalizedString(this, ".RecommendedInstaller"); this.lblRecommended = new Label(var1, 1); this.currentFont = ((Component)this).getFont(); this.boldFont = new Font(this.currentFont.getName(), 1, this.currentFont.getSize() + 2); if (!Gestalt.getVMVendor().equals(Gestalt.APPLE_VM)) { this.lblRecommended.setFont(this.boldFont); } GridBagUtilImpl.add(this.pnlNormalGui, this.lblRecommended, 0, 0, 3, 1, 2, 10, (double)1.0F, (double)0.0F); GridBagUtilImpl.add(this.pnlNormalGui, this.btnAction = new Button(), 0, 1, 2, 1, 2, 11, (double)2.0F, (double)1.0F); var1 = AppletResourceBundle.getLocalizedString(this, ".CheckBox.VM"); this.chkIncludeVM = new Checkbox(var1); if (this.optionToDownloadEitherInstaller) { if (Gestalt.isThisPlatformUnix()) { GridBagUtilImpl.add(this.pnlNormalGui, this.chkIncludeVM, 2, 1, 1, 1, 2, new Insets(0, 2, 0, 0), 11, (double)1.0F, (double)1.0F); } else { GridBagUtilImpl.add(this.pnlNormalGui, this.chkIncludeVM, 2, 1, 1, 1, 2, new Insets(0, 5, 0, 0), 11, (double)1.0F, (double)1.0F); } } } public void addNormalAppletGui() { ((Container)this).add(this.pnlNormalGui); this.chkIncludeVM.setState(this.isWantingToDownloadInstallerWithVM()); Font var1 = new Font("Dialog", 0, 12); this.btnAction.setFont(var1); if (Gestalt.isThisPlatformUnix()) { this.lblRecommended.setFont(new Font(this.currentFont.getName(), 1, this.currentFont.getSize())); this.chkIncludeVM.setFont(new Font("Dialog", 0, 9)); this.btnAction.setFont(new Font("Dialog", 0, 9)); } try { this.creditImage = ((Applet)this).getImage(new URL(this.getCodeBase() + "/images/credit.gif")); } catch (Throwable var3) { this.notifyOutputDiagnosticMessage("init: Credits gif couldn't be loaded."); this.creditImage = null; } this.updateActionButtonText(); ((Component)this).repaint(); } void handleError() { try { ((Container)this).remove(this.pnlNormalGui); } catch (Throwable var3) { System.err.println("WebInstallerApplet: Unable to remove pnlNormalGui."); } try { ((Container)this).add(this.pnlExceptionGui); } catch (Throwable var2) { System.err.println("WebInstallerApplet: Unable to add pnlExceptionGui."); var2.printStackTrace(); } ((Component)this).repaint(); } void handleNoInstallerError() { try { ((Container)this).remove(this.pnlNormalGui); } catch (Throwable var3) { System.err.println("WebInstallerApplet: Unable to remove pnlNormalGui."); } try { ((Container)this).add(this.pnlNoInstallerGui); } catch (Throwable var2) { System.err.println("WebInstallerApplet: Unable to add pnlNoInstallerGui."); var2.printStackTrace(); } ((Component)this).repaint(); } public void start() { try { super.start(); } catch (Throwable var2) { this.notifyErrorOccured(var2); } } public void addNotify() { try { super.addNotify(); for(Object var1 = this; var1 != null; var1 = ((Component)var1).getParent()) { System.err.println(var1); if (var1 instanceof Frame) { this.parentFrame = (Frame)var1; } } } catch (Throwable var2) { this.notifyErrorOccured(var2); } } public synchronized boolean isWantingToDownloadInstallerWithVM() { return this.wantingToDownloadInstallerWithVM; } public synchronized void setWantingToDownloadInstallerWithVM(boolean var1) { this.wantingToDownloadInstallerWithVM = var1; this.updateActionButtonText(); } public String getTroubleEmailAddress() { return this.troubleEmailAddress; } public PlatformList getPlatforms() { return this.platforms; } public void loadPlatformData() throws Exception { this.productName = ((Applet)this).getParameter("ProductName"); String var1 = ((Applet)this).getParameter("ImmediateInstall"); String var2 = ((Applet)this).getParameter("Timeout"); if (var2 != null && !var2.equals("")) { this.timeoutLength = new Integer(((Applet)this).getParameter("Timeout")); this.notifyOutputDiagnosticMessage("Timeout set to :" + this.timeoutLength); } else { this.timeoutLength = 30000; this.notifyOutputDiagnosticMessage("Timeout set to :" + this.timeoutLength); } try { this.immediateInstall = var1.trim().equalsIgnoreCase("yes") || var1.trim().equalsIgnoreCase("true"); } catch (Exception var7) { this.immediateInstall = false; } this.notifyOutputDiagnosticMessage("immediateInstall: " + this.immediateInstall); this.troubleEmailAddress = ((Applet)this).getParameter("SendTroubleEmailTo"); this.notifyOutputDiagnosticMessage("Trouble e-mail address: " + this.troubleEmailAddress); this.platforms = new PlatformList(); byte var3 = 20; for(int var4 = 1; var4 <= var3; ++var4) { try { Platform var5 = new Platform(this, var4); this.platforms.add(var5); this.notifyOutputDiagnosticMessage("Reading applet parameters: Reading in data for platform #" + var4 + "; platform name = " + var5.platformName); } catch (Throwable var6) { this.notifyOutputDiagnosticMessage("Reading applet parameters: Platform #" + var4 + " not found."); } } Platform var8 = this.platforms.getRunningOnPlatform(); if (var8 == null) { } } public boolean handleEvent(Event var1) { try { if (var1.target == this.btnAction && var1.id == 1001) { this.pnlNormalGui.disable(); this.notifyOutputDiagnosticMessage("handleEvent: startDownloadProcess called from handleEvent"); this.startDownloadProcess(); } else if (var1.target == this.chkIncludeVM && var1.id == 1001) { this.setWantingToDownloadInstallerWithVM(this.chkIncludeVM.getState()); } else { if (var1.id == 505) { ((Applet)this).getAppletContext().showStatus(""); return super.handleEvent(var1); } if (this.creditImage == null) { ((Applet)this).getAppletContext().showStatus(""); return super.handleEvent(var1); } if (var1.id == 501 && var1.y >= ((Component)this).size().height - this.creditImage.getHeight(this)) { try { ((Applet)this).getAppletContext().showDocument(new URL("http://www.ZeroG.com")); } catch (Throwable var3) { this.notifyOutputDiagnosticMessage("HandleEvent: User clicked on credit GIF; applet couldn't open www.ZeroG.com."); } } else if (var1.y >= ((Component)this).size().height - this.creditImage.getHeight(this)) { ((Applet)this).getAppletContext().showStatus("http://www.ZeroG.com"); return super.handleEvent(var1); } } return true; } catch (Throwable var4) { this.notifyErrorOccured(var4); return false; } } void updateActionButtonText() { if (this.btnAction != null) { String var1 = this.platforms.getRunningOnPlatform().platformName; boolean var2 = true; if (this.isWantingToDownloadInstallerWithVM()) { var2 = !this.platforms.getRunningOnPlatform().isNotRunnableVM; } else { var2 = !this.platforms.getRunningOnPlatform().isNotRunnableNoVM; if (Gestalt.isThisPlatformUnix() && !Gestalt.checkPathForVM()) { var2 = false; } } if (var1.equals("Other Platforms")) { this.wantingToDownloadInstallerWithVM = false; var2 = false; } this.notifyOutputDiagnosticMessage(""); this.notifyOutputDiagnosticMessage("Does Installer with VM exist: " + (this.platforms.getRunningOnPlatform().installerNameVM != null)); this.notifyOutputDiagnosticMessage("Does Installer no VM exist: " + (this.platforms.getRunningOnPlatform().installerNameNoVM != null)); this.notifyOutputDiagnosticMessage("Is this Platform Unix: " + Gestalt.isThisPlatformUnix()); if (Gestalt.isThisPlatformUnix()) { this.notifyOutputDiagnosticMessage("Is Java on the PATH: " + Gestalt.checkPathForVM()); try { this.notifyOutputDiagnosticMessage("** PATH = " + Environment.getInstance().getValue("PATH")); } catch (Exception var4) { this.notifyOutputDiagnosticMessage("IE: I'm being checked to see if I am unix "); ((Throwable)var4).printStackTrace(); } } this.notifyOutputDiagnosticMessage(""); if (Gestalt.isAbleToExecuteFiles() && var2) { this.notifyOutputDiagnosticMessage("able to execute and runnable " + var2); String var6 = AppletResourceBundle.getLocalizedString(this, ".Button.Install") + " " + var1; this.btnAction.setLabel(var6 + "... "); } else { if (!var2) { this.notifyOutputDiagnosticMessage("Installer is not runnable by default, due to platform"); } if (!Gestalt.isAbleToExecuteFiles()) { this.notifyOutputDiagnosticMessage("Is unable to execute files because of permissions"); } String var3 = AppletResourceBundle.getLocalizedString(this, ".Button.Download") + " " + var1; this.btnAction.setLabel(var3 + "... "); } } } public void paint(Graphics var1) { super.paint(var1); try { if (this.creditImage != null) { Dimension var2 = ((Component)this).size(); var1.drawImage(this.creditImage, var2.width - this.creditImage.getWidth(this) >> 1, var2.height - 1 - this.creditImage.getHeight(this), this); } } catch (Throwable var3) { this.notifyErrorOccured(var3); } } public void startDownloadProcess() throws Exception { Object var2 = null; String var1; if (this.isWantingToDownloadInstallerWithVM()) { var1 = this.getCodeBase().toString() + this.platforms.getRunningOnPlatform().installerNameVM; } else { var1 = this.getCodeBase().toString() + this.platforms.getRunningOnPlatform().installerNameNoVM; } boolean var3; if (this.isWantingToDownloadInstallerWithVM()) { var3 = !this.platforms.getRunningOnPlatform().isNotRunnableVM; } else { var3 = !this.platforms.getRunningOnPlatform().isNotRunnableNoVM; if (Gestalt.isThisPlatformUnix() && !Gestalt.checkPathForVM()) { var3 = false; } } String var4 = this.platforms.getRunningOnPlatform().platformName; if (var4.equals("Other Platforms")) { this.wantingToDownloadInstallerWithVM = false; var3 = false; String var5 = this.getCodeBase().toString().substring(0, this.getCodeBase().toString().indexOf("InstData")); var1 = var5 + this.platforms.getRunningOnPlatform().installerNameVM; } try { var7 = new URL(var1); } catch (MalformedURLException var6) { this.notifySetFriendlyErrorMessage("Installer '" + var1 + "' not found."); throw var6; } this.notifyOutputDiagnosticMessage("Handle Event: File to copy is '" + var1 + "'."); if (!var3) { this.doBrowserDownload(var7); } else if (var3 && Gestalt.isAbleToExecuteFiles()) { this.doZGDownload(var7); } else { this.doBrowserDownload(var7); } } public void doZGDownload(URL var1) { if (Gestalt.isNetscapeSecurityModelAvailable()) { PrivilegeManager.enablePrivilege(Gestalt.NETSCAPE_PROPERTY_READ); } String var2 = this.getIALogFileDirectory(); System.err.println("logDir" + var2); String var3; if (this.isWantingToDownloadInstallerWithVM()) { var3 = this.platforms.getRunningOnPlatform().installerNameVM; System.err.println("platforms.getRunningOnPlatform()" + this.platforms.getRunningOnPlatform()); } else { var3 = this.platforms.getRunningOnPlatform().installerNameNoVM; System.err.println("platforms.getRunningOnPlatform()" + this.platforms.getRunningOnPlatform()); } var3 = var3.substring(var3.lastIndexOf(47) + 1); System.err.println("WIA.doZGDownload(): initial installer name: '" + var3 + "'"); if (Gestalt.getPlatform() == Gestalt.MAC_OS_PLATFORM) { int var4 = Math.min(var3.length(), 26); String var5 = var3.toLowerCase(); if (var5.endsWith(".bin")) { var4 = var5.lastIndexOf(".bin"); } var3 = var3.substring(0, Math.min(26, var4)).trim(); var3 = var3 + ".bin"; } var3 = var3.trim(); var3 = var3.replace(' ', '_'); this.notifyOutputDiagnosticMessage("handleEvent: installer name is" + var3); String var14 = this.getProductName().substring(0, Math.min(30, this.getProductName().length())).trim(); var14 = var14.replace(' ', '_'); File var16 = new File(Util.prepFileName(var2 + var14 + "/" + var3)); System.err.println("WIA.doZGDownload(): logDir = '" + var2 + "'"); System.err.println("WIA.doZGDownload(): productNameDir (final) = '" + var14 + "'"); System.err.println("WIA.doZGDownload(): installerName (final) = '" + var3 + "'"); this.notifyOutputDiagnosticMessage("The temp file has been created: " + var16.toString()); this.notifyOutputDiagnosticMessage("Creating the ProgressDialog for the disk space check"); ProgressDialog var6 = new ProgressDialog(this); var6.setProgressDialogText(2, (String)null, var16.toString()); this.notifyOutputDiagnosticMessage("Creating the class to check for disk space"); this.notifyOutputDiagnosticMessage("Source location: " + var1); DiskSpaceCheckForDownload var7 = new DiskSpaceCheckForDownload(var1, var16, var6, this); var6.addObserver(var7); Thread var8 = new Thread(var6); var8.setPriority(10); var8.start(); Thread var9 = new Thread(var7); var9.start(); this.notifyOutputDiagnosticMessage("Disk space checking has started"); } public void doBrowserDownload(URL var1) { this.notifyOutputDiagnosticMessage("Preparing browser download object."); this.downloadProcess = new BrowserDownloader(this); this.downloadProcess.setFileToDownload(var1); this.notifyOutputDiagnosticMessage("Starting the download process from doBrowserDownload"); this.downloadProcess.start(); } public Frame getParentFrame() { return this.parentFrame; } public String getProductName() { return this.productName; } public URL getCodeBase() { String var1 = super.getCodeBase().toString(); if (var1.substring(var1.length() - 2).equals("/.")) { var1 = var1.substring(0, var1.length() - 1); } try { return new URL(var1); } catch (MalformedURLException var3) { this.notifyOutputDiagnosticMessage("getCodeBase: Unable to retrieve code base (currently showing up as '" + var1 + "'."); return null; } } public void loadCustomLocale() { Locale var1 = ((Applet)this).getLocale(); this.notifyOutputDiagnosticMessage("Locale from System. Language: " + var1.getDisplayLanguage()); this.notifyOutputDiagnosticMessage("Locale from System. Country: " + var1.getDisplayCountry()); this.loadLocalizedStringResource("CustomOKButtonLabel", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.OK"); this.loadLocalizedStringResource("CustomCancelButtonLabel", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.Cancel"); this.loadLocalizedStringResource("CustomRecommendedText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".RecommendedInstaller"); this.loadLocalizedStringResource("CustomDownloadButtonText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.Download"); this.loadLocalizedStringResource("CustomInstallButtonText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.Install"); this.loadLocalizedStringResource("CustomVMCheckboxText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".CheckBox.VM"); this.loadLocalizedStringResource("CustomNoInstallersAvailableText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".NoInstallerAvailable.Label"); this.loadLocalizedStringResource("CustomSelectInstallerFromListText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".SelectFromList.Label"); this.loadLocalizedStringResource("CustomSelectInstructionsText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Instructions.Label"); this.loadLocalizedStringResource("CustomUnknownFailureText", class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Failure.Unknown"); this.loadLocalizedStringResource("CustomEmailDialogTitle", class$com$zerog$ia$download$dialogs$EmailProgressDialog == null ? (class$com$zerog$ia$download$dialogs$EmailProgressDialog = class$("com.zerog.ia.download.dialogs.EmailProgressDialog")) : class$com$zerog$ia$download$dialogs$EmailProgressDialog, ".Title"); this.loadLocalizedStringResource("CustomErrorDetailDialogTitle", class$com$zerog$ia$download$dialogs$ErrorDetailDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDetailDialog = class$("com.zerog.ia.download.dialogs.ErrorDetailDialog")) : class$com$zerog$ia$download$dialogs$ErrorDetailDialog, ".Title"); this.loadLocalizedStringResource("CustomErrorDetailDialogHeading", class$com$zerog$ia$download$dialogs$ErrorDetailDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDetailDialog = class$("com.zerog.ia.download.dialogs.ErrorDetailDialog")) : class$com$zerog$ia$download$dialogs$ErrorDetailDialog, ".Heading"); this.loadLocalizedStringResource("CustomErrorDialogTitle", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Title"); this.loadLocalizedStringResource("CustomErrorDialogHeading", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Heading"); this.loadLocalizedStringResource("CustomErrorDialogShowDetail", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Show.Detail"); this.loadLocalizedStringResource("CustomErrorDialogSendTo", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Send.To"); this.loadLocalizedStringResource("CustomErrorDialogSendToAbout", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Send.To.About"); this.loadLocalizedStringResource("CustomErrorDialogEnterEmail", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Enter.Email"); this.loadLocalizedStringResource("CustomErrorDialogInvalidEmail", class$com$zerog$ia$download$dialogs$ErrorDialog == null ? (class$com$zerog$ia$download$dialogs$ErrorDialog = class$("com.zerog.ia.download.dialogs.ErrorDialog")) : class$com$zerog$ia$download$dialogs$ErrorDialog, ".Invalid.Email"); this.loadLocalizedStringResource("CustomProgressDialogCheckDiskSpaceTitle", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".CheckDiskSpace.Title"); this.loadLocalizedStringResource("CustomProgressDialogDownloadTitle", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".Download.Title"); this.loadLocalizedStringResource("CustomProgressDialogStartInstallerTitle", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".StartInstaller.Title"); this.loadLocalizedStringResource("CustomProgressDialogCheckDiskSpaceHeading", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".CheckDiskSpace.Heading"); this.loadLocalizedStringResource("CustomProgressDialogDownloadHeading", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".Download.Heading"); this.loadLocalizedStringResource("CustomProgressDialogStartInstallerHeading", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".StartInstaller.Heading"); this.loadLocalizedStringResource("CustomProgressDialogCheckDiskSpaceLabel", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".CheckDiskSpace.Label"); this.loadLocalizedStringResource("CustomProgressDialogDownloadLabel", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".Download.Label"); this.loadLocalizedStringResource("CustomProgressDialogStartInstallerLabel", class$com$zerog$ia$download$dialogs$ProgressDialog == null ? (class$com$zerog$ia$download$dialogs$ProgressDialog = class$("com.zerog.ia.download.dialogs.ProgressDialog")) : class$com$zerog$ia$download$dialogs$ProgressDialog, ".StartInstaller.Label"); this.loadLocalizedStringResource("CustomProgressBarPercentDoneText", class$com$zerog$ia$download$dialogs$ProgressBar == null ? (class$com$zerog$ia$download$dialogs$ProgressBar = class$("com.zerog.ia.download.dialogs.ProgressBar")) : class$com$zerog$ia$download$dialogs$ProgressBar, ".PercentDone"); this.loadLocalizedStringResource("CustomProgressBarAboutPrependText", class$com$zerog$ia$download$dialogs$ProgressBar == null ? (class$com$zerog$ia$download$dialogs$ProgressBar = class$("com.zerog.ia.download.dialogs.ProgressBar")) : class$com$zerog$ia$download$dialogs$ProgressBar, ".About.Prepend"); this.loadLocalizedStringResource("CustomProgressBarAboutPostpendText", class$com$zerog$ia$download$dialogs$ProgressBar == null ? (class$com$zerog$ia$download$dialogs$ProgressBar = class$("com.zerog.ia.download.dialogs.ProgressBar")) : class$com$zerog$ia$download$dialogs$ProgressBar, ".About.Postpend"); this.loadLocalizedStringResource("CustomProgressBarAboutAMinuteRemainingText", class$com$zerog$ia$download$dialogs$ProgressBar == null ? (class$com$zerog$ia$download$dialogs$ProgressBar = class$("com.zerog.ia.download.dialogs.ProgressBar")) : class$com$zerog$ia$download$dialogs$ProgressBar, ".AboutAMinute"); this.loadLocalizedStringResource("CustomProgressBarLessThanAMinuteRemainingText", class$com$zerog$ia$download$dialogs$ProgressBar == null ? (class$com$zerog$ia$download$dialogs$ProgressBar = class$("com.zerog.ia.download.dialogs.ProgressBar")) : class$com$zerog$ia$download$dialogs$ProgressBar, ".AboutLessMinute"); } public void loadLocalizedStringResource(String var1, Class var2, String var3) { Locale var4 = ((Applet)this).getLocale(); String var5 = ((Applet)this).getParameter(var1 + "_" + var4.getLanguage()); if (var5 == null) { this.notifyOutputDiagnosticMessage(var1 + "_" + var4.getLanguage() + " not found"); } else { AppletResourceBundle.setLocalizedString(var2, var3, var5); } } public void addContextListener(ContextListener var1) { this.contextListenerList.addElement(var1); } public void removeContextListener(ContextListener var1) { this.contextListenerList.removeElement(var1); } public void notifyErrorOccured(Throwable var1) { Enumeration var2 = this.contextListenerList.elements(); while(var2.hasMoreElements()) { ((ContextListener)var2.nextElement()).errorOccured(var1); } this.notifySetFriendlyErrorMessage(AppletResourceBundle.getLocalizedString(this, ".Failure.Unknown")); } public void notifyOutputDiagnosticMessage(String var1) { Enumeration var2 = this.contextListenerList.elements(); while(var2.hasMoreElements()) { ((ContextListener)var2.nextElement()).outputDiagnosticMessage(var1); } } public void notifySetFriendlyErrorMessage(String var1) { Enumeration var2 = this.contextListenerList.elements(); while(var2.hasMoreElements()) { ((ContextListener)var2.nextElement()).setFriendlyErrorMessage(var1); } } public FileDownloader getDownloadProcess() { return this.downloadProcess; } public boolean isAllowingEmailToBeSent() { return this.allowingEmailToBeSent; } public void setAllowingEmailToBeSent(boolean var1) { this.allowingEmailToBeSent = var1; } public Vector getContextListenerList() { return this.contextListenerList; } public void downloadStopped() { if (this.pnlNormalGui != null) { this.pnlNormalGui.enable(); } } public String getIALogFileDirectory() { String var1; if (Gestalt.getPlatform().equals(Gestalt.WINDOWS_PLATFORM)) { String var2 = Util.prepFileName(System.getProperty("user.home")); var1 = var2.substring(0, var2.indexOf(47)); } else { if (Gestalt.getPlatform().equals(Gestalt.MAC_OS_PLATFORM)) { Object var10 = null; String var3 = null; try { this.notifyOutputDiagnosticMessage("Finding download location for Mac"); File var11 = MRJFileUtils.findFolder(new MRJOSType("desk")); var3 = Util.prepFileName(var11.getPath()); } catch (FileNotFoundException var6) { this.notifyOutputDiagnosticMessage("Error: Unable to find temporary items folder. Defaulting to /Mac_OS_9/"); var3 = System.getProperty("user.home"); ((Throwable)var6).printStackTrace(); } catch (Throwable var7) { this.notifyOutputDiagnosticMessage("Exception found"); var7.printStackTrace(); } var1 = new String(var3); this.notifyOutputDiagnosticMessage("handleEvent: rootDir = '" + var1 + "'."); return var1; } var1 = System.getProperty("user.home"); int var9 = var1.toLowerCase().lastIndexOf(".netscape"); if (var9 >= 0) { var1 = var1.substring(0, var9 - 1); } } this.notifyOutputDiagnosticMessage("handleEvent: rootDir = '" + var1 + "'."); return var1 + "/IA_Installers/"; } // $FF: synthetic method static Class class$(String var0) { try { return Class.forName(var0); } catch (ClassNotFoundException var2) { throw new NoClassDefFoundError(((Throwable)var2).getMessage()); } } static { AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.OK", "OK"); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.Cancel", "Cancel"); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.Download", "Download Installer for"); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Button.Install", " Start Installer for"); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".CheckBox.VM", "Include VM in download"); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".RecommendedInstaller", "Recommended Installation for Your Platform:"); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".NoInstallerAvailable.Label", "There is no installer available for your platform."); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".SelectFromList.Label", "Please select an installer to download from the list below."); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Instructions.Label", "You can download an installer for another platform from the list below."); AppletResourceBundle.setDefaultLocalizedString(class$com$zerog$ia$download$WebInstallerApplet == null ? (class$com$zerog$ia$download$WebInstallerApplet = class$("com.zerog.ia.download.WebInstallerApplet")) : class$com$zerog$ia$download$WebInstallerApplet, ".Failure.Unknown", "The applet has failed for an unknown reason, possibly because of an incompatibility between this applet and your browser."); } }