# HG changeset patch # User timkelly # Date 1273704248 18000 # Node ID 2953a4d4c5d90fa023e1b29a610c3a0fe44f4bae # Parent 70a635f54f936789b5cb7ba30ea91b39303e90d0 Add SDKCorePlugin.SUPPORTS_SBSV1_BUILDER to enable/disable SBSv1 builder support diff -r 70a635f54f93 -r 2953a4d4c5d9 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Wed May 12 14:31:16 2010 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Wed May 12 17:44:08 2010 -0500 @@ -78,8 +78,10 @@ import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter; import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils; import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin; +import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManager; import com.nokia.carbide.cpp.internal.x86build.X86BuildPlugin; import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; +import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.EPKGLanguage; import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGEmbeddedSISFile; import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGHeader; @@ -130,14 +132,17 @@ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)) { return v2Builder; } else { - // TODO: Temporary work to remove ABLD support - PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { - public void run() { - MessageDialog.openError(WorkbenchUtils.getSafeShell(), "Unsupported", "ABLD is not supported in this version of Carbide. Please enusre you are using Symbian^3 or greater and SBS is installed, then re-import your project."); - } - }); + if (SDKCorePlugin.SUPPORTS_SBSV1_BUILDER){ + return v1Builder; + } else { + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + MessageDialog.openError(WorkbenchUtils.getSafeShell(), "Unsupported", "ABLD is not supported in this version of Carbide. Please enusre you are using Symbian^3 or greater and SBS is installed, then re-import your project."); + } + }); + return null; + } - return null; } } diff -r 70a635f54f93 -r 2953a4d4c5d9 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java Wed May 12 14:31:16 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java Wed May 12 17:44:08 2010 -0500 @@ -276,13 +276,18 @@ * Whether or not to display SBSv1 builder UI * @return true if SBSv1 is available, false otherwise */ + + @SuppressWarnings("unused") public static boolean enableSBSv1Support() { - // TODO: Working on removing ABLD support. -// if (!enableSBSv2Support()) -// return true; -// -// if (isSBSv1Supported()) -// return true; + + if (!SDKCorePlugin.SUPPORTS_SBSV1_BUILDER) + return false; + + else if (!enableSBSv2Support()) + return true; + + else if (isSBSv1Supported()) + return true; return false; } diff -r 70a635f54f93 -r 2953a4d4c5d9 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Wed May 12 14:31:16 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Wed May 12 17:44:08 2010 -0500 @@ -184,9 +184,9 @@ } public boolean isEnabled() { - // TODO: Temporary work to remove ABLD support - if (getOSVersion().getMajor() < 9 || - (getOSVersion().getMajor() == 9 && getOSVersion().getMinor() <=4 )){ + if (!SDKCorePlugin.SUPPORTS_SBSV1_BUILDER && + (getOSVersion().getMajor() < 9 || + (getOSVersion().getMajor() == 9 && getOSVersion().getMinor() <= 4))){ return false; } return enabled; diff -r 70a635f54f93 -r 2953a4d4c5d9 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SDKCorePlugin.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SDKCorePlugin.java Wed May 12 14:31:16 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SDKCorePlugin.java Wed May 12 17:44:08 2010 -0500 @@ -26,7 +26,8 @@ */ public class SDKCorePlugin extends Plugin { - + public static final boolean SUPPORTS_SBSV1_BUILDER = false; + // The plug-in ID public static final String PLUGIN_ID = "com.nokia.carbide.cpp.sdk.core"; //$NON-NLS-1$ @@ -78,10 +79,11 @@ */ public static ISDKManager getSDKManager() { if (sdkManager == null) { - if (HostOS.IS_WIN32) + // TODO: SDKManagerRaptorOnly, currently only works on Linux +// if (HostOS.IS_WIN32 && SUPPORTS_SBSV1_BUILDER) sdkManager = new SDKManager(); - else - sdkManager = new SDKManagerRaptorOnly(); +// else +// sdkManager = new SDKManagerRaptorOnly(); } return sdkManager; } diff -r 70a635f54f93 -r 2953a4d4c5d9 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Wed May 12 14:31:16 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Wed May 12 17:44:08 2010 -0500 @@ -496,9 +496,9 @@ osVersionLabel.setForeground(RED); osVersionLabel.setBackground(GRAY); } - else if (sdk.getOSVersion().getMajor() < 9 || - (sdk.getOSVersion().getMajor() == 9 && sdk.getOSVersion().getMinor() <= 4)){ - // TODO: Temporary work to remove ABLD support + else if (!SDKCorePlugin.SUPPORTS_SBSV1_BUILDER && + (sdk.getOSVersion().getMajor() < 9 || + (sdk.getOSVersion().getMajor() == 9 && sdk.getOSVersion().getMinor() <= 4))){ sdkHasError = true; osVersionLabel.setText(OS_VERSION_LABEL + "This OS version is not supported: " + sdk.getOSVersion()); osVersionLabel.setForeground(RED);