当前位置: 首页>>代码示例>>Java>>正文


Java OsVersion.IS_OSX属性代码示例

本文整理汇总了Java中com.izforge.izpack.util.OsVersion.IS_OSX属性的典型用法代码示例。如果您正苦于以下问题:Java OsVersion.IS_OSX属性的具体用法?Java OsVersion.IS_OSX怎么用?Java OsVersion.IS_OSX使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.izforge.izpack.util.OsVersion的用法示例。


在下文中一共展示了OsVersion.IS_OSX属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDefaultPath

String getDefaultPath(AutomatedInstallData idata) {
	String chosenPath = "";
	if (idata.getVariable(getVariableName()) != null) {
		chosenPath = idata.getVariable(getVariableName());
	} else {
		if (OsVersion.IS_WINDOWS)	{
			chosenPath = idata.getVariable(getVariableName()+".windows");
		}
		if (OsVersion.IS_OSX)	{
			chosenPath = idata.getVariable(getVariableName()+".mac");
		} else {
			if (OsVersion.IS_UNIX)	{
				chosenPath = idata.getVariable(getVariableName()+".unix");
			}
		}
	}
	VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
	chosenPath = vs.substitute(chosenPath, null);
	return chosenPath;
}
 
开发者ID:kontalk,项目名称:tigase-server,代码行数:20,代码来源:DerbyPathPanel.java

示例2: itemRequiredForOs

/**
 * Verifies if an item is required for the operating system the installer executed. The
 * configuration for this feature is: <br/>
 * &lt;os family="unix"/&gt; <br>
 * <br>
 * <b>Note:</b><br>
 * If the list of the os is empty then <code>true</code> is always returnd.
 *
 * @param os The <code>Vector</code> of <code>String</code>s. containing the os names
 * @return <code>true</code> if the item is required for the os, otherwise returns
 * <code>false</code>.
 */
public boolean itemRequiredForOs(Vector<IXMLElement> os)
{
    if (os.size() == 0) { return true; }

    for (int i = 0; i < os.size(); i++)
    {
        String family = (os.elementAt(i)).getAttribute(FAMILY);
        boolean match = false;

        if ("windows".equals(family))
        {
            match = OsVersion.IS_WINDOWS;
        }
        else if ("mac".equals(family))
        {
            match = OsVersion.IS_OSX;
        }
        else if ("unix".equals(family))
        {
            match = OsVersion.IS_UNIX;
        }
        if (match) { return true; }
    }
    return false;
}
 
开发者ID:OpenNMS,项目名称:installer,代码行数:37,代码来源:UserInputPanelConsoleHelper.java

示例3: TigaseJDKPathPanel

/**
 * The constructor.
 *
 * @param parent The parent window.
 * @param idata  The installation data.
 */
public TigaseJDKPathPanel(InstallerFrame parent, InstallData idata)
{
    super(parent, TigaseInstallerCommon.init(idata));
    setMustExist(true);
    if (!OsVersion.IS_OSX)
    {
        setExistFiles(TigaseJDKPathPanel.testFiles);
    }
    setMinVersion(idata.getVariable("JDKPathPanel.minVersion"));
    setMaxVersion(idata.getVariable("JDKPathPanel.maxVersion"));
    setVariableName("JDKPath");

   
}
 
开发者ID:kontalk,项目名称:tigase-server,代码行数:20,代码来源:TigaseJDKPathPanel.java

示例4: getElevator

private List<String> getElevator(String javaCommand, String installer) throws IOException, InterruptedException
{
    List<String> elevator = new ArrayList<String>();

    if (OsVersion.IS_OSX)
    {
        elevator.add(extractMacElevator().getCanonicalPath());
        elevator.add(javaCommand);
        elevator.add("-jar");
        elevator.add(installer);
    }
    else if (OsVersion.IS_UNIX)
    {
        elevator.add("xterm");
        elevator.add("-title");
        elevator.add("Installer");
        elevator.add("-e");
        elevator.add("sudo");
        elevator.add(javaCommand);
        elevator.add("-jar");
        elevator.add(installer);
    }
    else if (OsVersion.IS_WINDOWS)
    {
        elevator.add("wscript");
        elevator.add(extractVistaElevator().getCanonicalPath());
        elevator.add(javaCommand);
        elevator.add("-Dizpack.mode=privileged");
        elevator.add("-jar");
        elevator.add(installer);
    }

    return elevator;
}
 
开发者ID:OpenNMS,项目名称:installer,代码行数:34,代码来源:PrivilegedRunner.java

示例5: JDKPathPanel

/**
 * The constructor.
 *
 * @param parent The parent window.
 * @param idata  The installation data.
 */
public JDKPathPanel(InstallerFrame parent, InstallData idata)
{
    super(parent, idata);
    setMustExist(true);
    if (!OsVersion.IS_OSX)
    {
        setExistFiles(JDKPathPanel.testFiles);
    }
    setMinVersion(idata.getVariable("JDKPathPanel.minVersion"));
    setMaxVersion(idata.getVariable("JDKPathPanel.maxVersion"));
    setVariableName("JDKPath");
}
 
开发者ID:OpenNMS,项目名称:installer,代码行数:18,代码来源:JDKPathPanel.java

示例6: panelActivate

/**
 * Called when the panel becomes active.
 */
public void panelActivate()
{
    // Resolve the default for chosenPath
    super.panelActivate();
    String chosenPath;
    // The variable will be exist if we enter this panel
    // second time. We would maintain the previos
    // selected path.
    if (idata.getVariable(getVariableName()) != null)
    {
        chosenPath = idata.getVariable(getVariableName());
    }
    else
    {
        if (OsVersion.IS_OSX)
        {
            chosenPath = OSX_JDK_HOME;
        }
        else
        {
            // Try the JAVA_HOME as child dir of the jdk path
            chosenPath = (new File(idata.getVariable("JAVA_HOME"))).getParent();
        }
    }
    // Set the path for method pathIsValid ...
    pathSelectionPanel.setPath(chosenPath);

    if (!pathIsValid() || !verifyVersion())
    {
        chosenPath = resolveInRegistry();
        if (!pathIsValid() || !verifyVersion())
        {
            chosenPath = "";
        }
    }
    // Set the default to the path selection panel.
    pathSelectionPanel.setPath(chosenPath);
    String var = idata.getVariable("JDKPathPanel.skipIfValid");
    // Should we skip this panel?
    if (chosenPath.length() > 0 && var != null && "yes".equalsIgnoreCase(var))
    {
        idata.setVariable(getVariableName(), chosenPath);
        parent.skipPanel();
    }

}
 
开发者ID:OpenNMS,项目名称:installer,代码行数:49,代码来源:JDKPathPanel.java


注:本文中的com.izforge.izpack.util.OsVersion.IS_OSX属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。