private static String launcherNameForOS ( ) { // TODO(andreastt): It would be nice for OperaLaunchers and OperaDriver to both use Platform switch ( Platform . getCurrent ( ) ) { case LINUX : case UNIX : // TODO(andreastt): It would be _really nice_ if OperaLaunchers and OperaDriver could both use Architecture: //return String.format("launcher-linux-%s", Architecture.getCurrent()); Architecture architecture = Architecture . getCurrent ( ) ; String launcherPrefix = "launcher-linux-%s" ; switch ( architecture ) { case X86 : return String . format ( launcherPrefix , "i386" ) ; case X64 : return String . format ( launcherPrefix , "amd64" ) ; case ARM : return String . format ( launcherPrefix , "arm" ) ; default : throw new WebDriverException ( "Unsupported processor architecture: " + architecture ) ; } case MAC : return "launcher-mac" ; case WINDOWS : case VISTA : case XP : return "launcher-win32-i86pc.exe" ; default : throw new WebDriverException ( "Could not find a platform that supports bundled launchers, please set it manually" ) ; } }
Get the launcher s binary file name based on what flavour of operating system and what kind of architecture the user is using .