Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH.
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java Wed Dec 16 15:26:14 2009 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java Wed Dec 16 15:27:05 2009 -0600
@@ -14,6 +14,7 @@
import java.io.File;
import java.io.FileFilter;
+import java.text.MessageFormat;
import java.util.*;
import javax.xml.parsers.DocumentBuilder;
@@ -319,14 +320,21 @@
// do some basic checks
sbsHome = System.getenv(SBS_HOME);
if (sbsHome == null) {
- return "Please define the SBS_HOME environment (e.g. /path/to/raptor) and add $SBS_HOME/bin to your PATH before running Carbide.";
+ return Messages.getString("SBSv2Utils.DefineSBS_HOMEMessage"); //$NON-NLS-1$
}
- sbsPath = HostOS.findProgramOnPath(sbsScriptName, null);
- if (sbsPath == null) {
- return "Please add $SBS_HOME/bin to your PATH before running Carbide.";
+ IPath expectedPath = new Path(sbsHome).append("bin").append(sbsScriptName);
+ if (expectedPath.toFile().exists()) {
+ sbsPath = expectedPath;
+ } else {
+ sbsPath = HostOS.findProgramOnPath(sbsScriptName, null);
+ if (sbsPath == null) {
+ return MessageFormat.format(
+ Messages.getString("SBSv2Utils.CannotFindSBSScriptError"), //$NON-NLS-1$
+ sbsScriptName);
+ }
}
-
+
return null;
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/messages.properties Wed Dec 16 15:26:14 2009 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/messages.properties Wed Dec 16 15:27:05 2009 -0600
@@ -2,5 +2,7 @@
BSFCatalog.BSFLoadError=Error loading/parsing BSF file: {0}
BSFCatalog.MissingCustomizedPlatform=BSF platform ''{0}'' customizes platform ''{1}'' which cannot be located or parsed.
+SBSv2Utils.CannotFindSBSScriptError=Cannot find {0} on the PATH or under $SBS_HOME/bin. Please verify your SBSv2 installation.
+SBSv2Utils.DefineSBS_HOMEMessage=Please define the SBS_HOME environment (e.g. /path/to/raptor) and add $SBS_HOME/bin to your PATH before running Carbide.
SBVCatalog.SBVLoadError=Error loading/parsing VAR file: {0}
SBVCatalog.MissingCustomizedPlatform=Variant platform ''{0}'' customizes platform ''{1}'' which cannot be located or parsed.