/[pkg-java]/trunk/azureus/debian/patches/fix-platform-code.patch
ViewVC logotype

Contents of /trunk/azureus/debian/patches/fix-platform-code.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9427 - (show annotations) (download)
Fri Jul 31 19:20:55 2009 UTC (3 years, 9 months ago) by adrianperez-guest
File size: 5039 byte(s)
* Import into SVN repository.
1 #
2 # Author: Adrian Perez <adrianperez.deb@gmail.com>
3 # Last-Update: 2009-07-29
4 # Description: Avoid the FTBFS caused by the use Win32 and
5 # MacOS-X platforms logic and imports.
6 #
7
8 Index: azureus-4.2.0.4/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java
9 ===================================================================
10 --- azureus-4.2.0.4.orig/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java 2009-07-29 13:28:31.000000000 -0400
11 +++ azureus-4.2.0.4/com/aelitis/azureus/core/update/impl/AzureusRestarterImpl.java 2009-07-29 13:28:33.000000000 -0400
12 @@ -30,8 +30,10 @@
13 import org.gudy.azureus2.platform.PlatformManager;
14 import org.gudy.azureus2.platform.PlatformManagerFactory;
15 import org.gudy.azureus2.platform.unix.ScriptAfterShutdown;
16 +/* --- Adrian Perez: Don't import this when building for Linux.
17 import org.gudy.azureus2.platform.win32.access.AEWin32Access;
18 import org.gudy.azureus2.platform.win32.access.AEWin32Manager;
19 +*/
20 import org.gudy.azureus2.plugins.PluginInterface;
21 import org.gudy.azureus2.plugins.platform.PlatformManagerException;
22 import org.gudy.azureus2.pluginsimpl.local.PluginInitializer;
23 @@ -306,7 +308,8 @@
24 }
25
26 try {
27 - int result;
28 + int result = -123; // Adrian Perez: Evade Win32 logic, key: "nowin32"
29 +/*
30 AEWin32Access accessor = AEWin32Manager.getAccessor(true);
31 if (accessor == null) {
32 result = -123;
33 @@ -345,6 +348,7 @@
34 SystemProperties.getApplicationPath(), AEWin32Access.SW_NORMAL);
35 }
36 }
37 +*/
38
39 /*
40 * Some results:
41 Index: azureus-4.2.0.4/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java
42 ===================================================================
43 --- azureus-4.2.0.4.orig/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java 2009-07-29 13:28:31.000000000 -0400
44 +++ azureus-4.2.0.4/com/aelitis/azureus/ui/swt/views/skin/TorrentListViewsUtils.java 2009-07-29 13:28:33.000000000 -0400
45 @@ -78,8 +78,9 @@
46 import com.aelitis.azureus.util.DataSourceUtils;
47 import com.aelitis.azureus.util.PlayUtils;
48 import com.aelitis.azureus.util.PublishUtils;
49 +/* --- Adrian Perez: Don't import this when building for Linux.
50 import com.aelitis.azureus.util.win32.Win32Utils;
51 -
52 +*/
53 /**
54 * @author TuxPaper
55 * @created Oct 12, 2006
56 @@ -640,7 +641,7 @@
57 private static boolean runInMediaPlayer(String mediaFile) {
58
59 debugDCAD("enter - runInMediaPlayer");
60 -
61 +/* --- Adrian Perez: Don't use Win32 media player. Always return false.
62 if (Constants.isWindows) {
63 String wmpEXE = Win32Utils.getWMP();
64 if (new File(wmpEXE).exists()) {
65 @@ -652,6 +653,7 @@
66 }
67 }
68 }
69 +*/
70 return false;
71 }
72
73 Index: azureus-4.2.0.4/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java
74 ===================================================================
75 --- azureus-4.2.0.4.orig/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java 2009-07-29 13:28:31.000000000 -0400
76 +++ azureus-4.2.0.4/org/gudy/azureus2/platform/PlatformManagerPluginDelegate.java 2009-07-29 13:28:33.000000000 -0400
77 @@ -23,8 +23,9 @@
78 import java.util.Properties;
79
80 import org.gudy.azureus2.platform.unix.PlatformManagerUnixPlugin;
81 +/* --- Adrian Perez: Don't use Win32 UpdateChecker in Linux.
82 import org.gudy.azureus2.platform.win32.PlatformManagerUpdateChecker;
83 -
84 +*/
85 import org.gudy.azureus2.plugins.Plugin;
86 import org.gudy.azureus2.plugins.PluginException;
87 import org.gudy.azureus2.plugins.PluginInterface;
88 @@ -45,10 +46,13 @@
89 PlatformManager platform = PlatformManagerFactory.getPlatformManager();
90
91 int platformType = platform.getPlatformType();
92 +/* --- Adrian Perez: We're not in Windows.
93 if (platformType == PlatformManager.PT_WINDOWS) {
94 PlatformManagerUpdateChecker plugin = new PlatformManagerUpdateChecker();
95 plugin.initialize(pluginInterface);
96 - } else if (platformType == PlatformManager.PT_UNIX) {
97 +*/
98 + if (platformType == PlatformManager.PT_UNIX) {
99 +
100 PlatformManagerUnixPlugin plugin = new PlatformManagerUnixPlugin();
101 plugin.initialize(pluginInterface);
102 } else {
103 Index: azureus-4.2.0.4/org/gudy/azureus2/platform/PlatformManagerFactory.java
104 ===================================================================
105 --- azureus-4.2.0.4.orig/org/gudy/azureus2/platform/PlatformManagerFactory.java 2009-07-29 13:28:31.000000000 -0400
106 +++ azureus-4.2.0.4/org/gudy/azureus2/platform/PlatformManagerFactory.java 2009-07-29 13:28:33.000000000 -0400
107 @@ -51,11 +51,11 @@
108 if ( getPlatformType() == PlatformManager.PT_WINDOWS ){
109
110 platform_manager = org.gudy.azureus2.platform.win32.PlatformManagerImpl.getSingleton();
111 -
112 +/* --- Adrian Perez: Don't use MacOS-X's PlatformManagerImpl
113 }else if( getPlatformType() == PlatformManager.PT_MACOSX ){
114
115 platform_manager = org.gudy.azureus2.platform.macosx.PlatformManagerImpl.getSingleton();
116 -
117 +*/
118 }else if( getPlatformType() == PlatformManager.PT_UNIX ){
119
120 platform_manager = org.gudy.azureus2.platform.unix.PlatformManagerImpl.getSingleton();

  ViewVC Help
Powered by ViewVC 1.1.5