# HG changeset patch # User Ed Swartz # Date 1260998825 21600 # Node ID 2d475d296af479d69631d083ddd67110b65c16f9 # Parent f0300fd915286e090706203b59bd3335551766de Look for sbs or sbs.bat under SBS_HOME/bin first, instead of only looking at the PATH. diff -r f0300fd91528 -r 2d475d296af4 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 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; } diff -r f0300fd91528 -r 2d475d296af4 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/messages.properties --- 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.