--- org/gudy/azureus2/platform/PlatformManagerFactory.java.orig 2007-01-12 12:39:23.000000000 -0800
+++ org/gudy/azureus2/platform/PlatformManagerFactory.java 2007-03-29 12:39:21.000000000 -0700
@@ -43,36 +43,7 @@
try{
class_mon.enter();
- if ( platform_manager == null ){
-
- try{
- if ( getPlatformType() == PlatformManager.PT_WINDOWS ){
-
- platform_manager = org.gudy.azureus2.platform.win32.PlatformManagerImpl.getSingleton();
-
- }else if( getPlatformType() == PlatformManager.PT_MACOSX ){
-
- platform_manager = org.gudy.azureus2.platform.macosx.PlatformManagerImpl.getSingleton();
-
- }else if( getPlatformType() == PlatformManager.PT_UNIX ){
-
- platform_manager = org.gudy.azureus2.platform.unix.PlatformManagerImpl.getSingleton();
-
- }
- }catch( PlatformManagerException e ){
-
- // exception will already have been logged
-
- }catch( Throwable e ){
-
- Debug.printStackTrace(e);
- }
- }
-
- if ( platform_manager == null ){
-
- platform_manager = org.gudy.azureus2.platform.dummy.PlatformManagerImpl.getSingleton();
- }
+ platform_manager = org.gudy.azureus2.platform.dummy.PlatformManagerImpl.getSingleton();
return( platform_manager );
--- om/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java 2007-12-03 10:07:10.000000000 -0500
+++ com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java 2007-12-03 11:07:16.000000000 -0500
@@ -30,8 +30,6 @@
import org.gudy.azureus2.platform.PlatformManager;
import org.gudy.azureus2.platform.PlatformManagerFactory;
import org.gudy.azureus2.platform.unix.ScriptAfterShutdown;
-import org.gudy.azureus2.platform.win32.access.AEWin32Access;
-import org.gudy.azureus2.platform.win32.access.AEWin32Manager;
import org.gudy.azureus2.update.UpdaterUtils;
import com.aelitis.azureus.core.AzureusCore;
@@ -214,28 +212,6 @@
}
- private boolean
- win32NativeRestart(
- PrintWriter log,
- String exec )
- {
- try{
- // we need to spawn without inheriting handles
-
- PlatformManager pm = PlatformManagerFactory.getPlatformManager();
-
- pm.createProcess( exec, false );
-
- return( true );
-
- }catch(Throwable e) {
- e.printStackTrace(log);
-
- return( false );
- }
- }
-
-
private String getExeUpdater(PrintWriter log) {
try {
boolean isVistaOrHigher = false;
@@ -317,44 +293,7 @@
try {
int result;
- AEWin32Access accessor = AEWin32Manager.getAccessor(true);
- if (accessor == null) {
result = -123;
- } else {
- if (azRunner != null) {
- // create a batch file to run the updater, then to restart azureus
- // bceause the updater would restart azureus as administrator user
- // and confuse the user
- fileRestart = FileUtil.getUserFile("restart.bat");
- String s = "title Azureus Updater Runner\r\n";
- s += exeUpdater + " \"updateonly\"";
- for (int i = 1; i < parameters.length; i++) {
- s += " \"" + parameters[i].replaceAll("\\\"", "") + "\"";
- }
- s += "\r\n";
- s += "start \"\" \"" + azRunner + "\"";
- FileUtil.writeBytesAsFile(fileRestart.getAbsolutePath(), s.getBytes());
-
- result = accessor.shellExecute(null, fileRestart.getAbsolutePath(),
- null, SystemProperties.getApplicationPath(),
- AEWin32Access.SW_SHOWMINIMIZED);
- } else {
- String execEXE = "\"-J" + getClassPath().replaceAll("\\\"", "")
- + "\" ";
-
- for (int i = 0; i < properties.length; i++) {
- execEXE += "\"-J" + properties[i].replaceAll("\\\"", "") + "\" ";
- }
-
- for (int i = 0; i < parameters.length; i++) {
- execEXE += " \"" + parameters[i].replaceAll("\\\"", "") + "\"";
- }
-
- log.println("Launch via " + exeUpdater + " params " + execEXE);
- result = accessor.shellExecute(null, exeUpdater, execEXE,
- SystemProperties.getApplicationPath(), AEWin32Access.SW_NORMAL);
- }
- }
/*
* Some results:
@@ -446,59 +385,9 @@
String[] parameters,
boolean update_only)
{
- if(Constants.isOSX){
-
- restartAzureus_OSX(log,mainClass,properties,parameters);
-
- }else if( Constants.isUnix ){
-
restartAzureus_Unix(log,mainClass,properties,parameters);
-
- }else{
-
- restartAzureus_win32(log,mainClass,properties,parameters,update_only);
- }
}
- private void
- restartAzureus_win32(
- PrintWriter log,
- String mainClass,
- String[] properties,
- String[] parameters,
- boolean update_only)
- {
- String exeUpdater = getExeUpdater(log); // Not for Updater.java
-
- String exec;
-
- //Classic restart way using Runtime.exec directly on java(w)
- exec = "\"" + JAVA_EXEC_DIR + "javaw\" " + getClassPath() + getLibraryPath();
-
- for (int i = 0; i < properties.length; i++) {
- exec += properties[i] + " ";
- }
-
- exec += mainClass;
-
- for (int i = 0; i < parameters.length; i++) {
- exec += " \"" + parameters[i] + "\"";
- }
-
- if (exeUpdater != null) {
- restartViaEXE(log, exeUpdater, properties, parameters, exec, update_only);
- } else {
- if (log != null) {
- log.println(" " + exec);
- }
-
- if (!win32NativeRestart(log, exec)) {
- javaSpawn(log, exec);
- }
- }
- }
-
-
private boolean
javaSpawn(
PrintWriter log,
--- om/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java 2007-12-03 10:07:11.000000000 -0500
+++ com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java 2007-12-03 11:12:15.000000000 -0500
@@ -64,7 +64,6 @@
import com.aelitis.azureus.ui.swt.views.TorrentListViewListener;
import com.aelitis.azureus.util.AdManager;
import com.aelitis.azureus.util.Constants;
-import com.aelitis.azureus.util.win32.Win32Utils;
import org.gudy.azureus2.plugins.PluginInterface;
import org.gudy.azureus2.plugins.PluginManager;
@@ -602,17 +601,6 @@
* @param string
*/
private static boolean runInMediaPlayer(String mediaFile) {
- if (Constants.isWindows) {
- String wmpEXE = Win32Utils.getWMP();
- if (new File(wmpEXE).exists()) {
- try {
- Runtime.getRuntime().exec(wmpEXE + " \"" + mediaFile + "\"");
- return true;
- } catch (IOException e) {
- Debug.out("error playing " + mediaFile + " via WMP " + mediaFile, e);
- }
- }
- }
return false;
}
--- rg/gudy/azureus2/platform/PlatformManagerPluginDelegate.java 2007-12-03 10:07:11.000000000 -0500
+++ org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java 2007-12-03 11:19:38.000000000 -0500
@@ -23,7 +23,6 @@
import java.util.Properties;
import org.gudy.azureus2.platform.unix.PlatformManagerUnixPlugin;
-import org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker;
import org.gudy.azureus2.plugins.Plugin;
import org.gudy.azureus2.plugins.PluginException;
@@ -42,22 +41,8 @@
// @see org.gudy.azureus2.plugins.Plugin#initialize(org.gudy.azureus2.plugins.PluginInterface)
public void initialize(PluginInterface pluginInterface)
throws PluginException {
- PlatformManager platform = PlatformManagerFactory.getPlatformManager();
-
- int platformType = platform.getPlatformType();
- if (platformType == PlatformManager.PT_WINDOWS) {
- PlatformManagerUpdateChecker plugin = new PlatformManagerUpdateChecker();
- plugin.initialize(pluginInterface);
- } else if (platformType == PlatformManager.PT_UNIX) {
PlatformManagerUnixPlugin plugin = new PlatformManagerUnixPlugin();
plugin.initialize(pluginInterface);
- } else {
- Properties pluginProperties = pluginInterface.getPluginProperties();
- pluginProperties.setProperty("plugin.name", "Platform-Specific Support");
- pluginProperties.setProperty("plugin.version", "1.0");
- pluginProperties.setProperty("plugin.version.info",
- "Not required for this platform");
- }
}
public String