}else{
args = new String[0];
}
UIFunctions uif = UIFunctionsManager.getUIFunctions();
if ( uif == null ){
throw( new Exception( "Update can't proceed - UI functions unavailable" ));
}
checker.getCheckInstance().setProperty( UpdateCheckInstance.PT_CLOSE_OR_RESTART_ALREADY_IN_PROGRESS, true );
final File f_update_file = update_file;
boolean silent = update_properties.getProperty( "launch.silent", "false" ).equals( "true" );
if ( silent ){
// problem on OSX if they have renamed their app and we're running silently as it
// installs to Vuze.app regardless
if ( Constants.isOSX ){
String app_name = SystemProperties.getApplicationName();
if ( !( app_name.equals( "Vuze" ) || app_name.equals( "Azureus" ))){
UIManager ui_manager = StaticUtilities.getUIManager( 120*1000 );
String details = MessageText.getString(
"update.fail.app.changed",
new String[]{ app_name });
ui_manager.showMessageBox(
"update.fail.app.changed.title",
"!" + details + "!",
UIManagerEvent.MT_OK );
return;
}
}
uif.performAction(
UIFunctions.ACTION_UPDATE_RESTART_REQUEST,
!FileUtil.canReallyWriteToAppDirectory(),
new UIFunctions.actionListener()
{
public void
actionComplete(
Object result )
{
if ((Boolean)result){
launchUpdate( f_update_file, args );
}
}
});
}else{
uif.performAction(
UIFunctions.ACTION_FULL_UPDATE,
info_url,
new UIFunctions.actionListener()
{
public void