Пример #1
0
 @Override
 public void addToDebugPath(
     ConsoleManager cm, AHost host, PhpBuild build, Collection<String> debug_path) {
   if (this.set_dll != null) {
     debug_path.add(set_dll.getDebugPath());
   } else {
     try {
       switch (build.getVersionBranch(cm, host)) {
         case PHP_5_3:
           debug_path.add(
               host.getPfttCacheDir()
                   + "/dep/wincache/wincache-1.3.4-5.3-nts-vc11-x86/php_wincache.pdb");
           break;
         case PHP_5_4:
           debug_path.add(
               host.getPfttCacheDir()
                   + "/dep/wincache/wincache-1.3.4-5.4-nts-vc11-x86/php_wincache.pdb");
           break;
         case PHP_5_5:
         default:
           debug_path.add(
               host.getPfttCacheDir()
                   + "/dep/wincache/wincache-1.3.5-5.5-nts-vc11-x86/php_wincache.pdb");
           break;
       }
     } catch (Exception ex) {
       ex.printStackTrace();
     }
   }
 }
Пример #2
0
  public IScenarioSetup setup(
      ConsoleManager cm,
      Host host,
      PhpBuild build,
      ScenarioSet scenario_set,
      EScenarioSetPermutationLayer layer) {
    if (!host.isWindows() || !build.isNTS(host)) return SETUP_FAILED;

    String dll_path;
    EBuildBranch branch;
    try {
      branch = build.getVersionBranch(cm, host);
    } catch (Exception ex) {
      ex.printStackTrace();
      return SETUP_FAILED;
    }
    if (set_dll != null) {
      dll_path = set_dll.getPath();
    } else {
      switch (branch) {
        case PHP_5_3:
          dll_path = getDllPath53(host);
          break;
        case PHP_5_4:
          dll_path = getDllPath54(host);
          break;
        default:
          dll_path = getDllPath55Plus(host);
          break;
      }
    }
    // install wincache
    try {
      host.copy(dll_path, build.getDefaultExtensionDir() + "/php_wincache.dll");
    } catch (Exception ex) {
      ex.printStackTrace();
      return SETUP_FAILED;
    }

    cm.println(EPrintType.CLUE, getClass(), "Found WinCache in: " + dll_path);

    return new WinCacheUScenarioSetup();
  }