@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(); } } }
@Override public boolean isSupported( ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, EScenarioSetPermutationLayer layer) { if (!host.isWindows()) { if (cm != null) { cm.println(EPrintType.CLUE, getClass(), "Scenario only supported on Windows."); } return false; } else if (!build.isX86()) { if (cm != null) { cm.println( EPrintType.CLUE, getClass(), "Must use X86 build for this scenario: " + build.getBuildPath()); } return false; } else if (!build.isNTS(host)) { if (cm != null) { cm.println( EPrintType.CLUE, getClass(), "Must use NTS build for this scenario: " + build.getBuildPath()); } return false; } else if (!( // LATER? Apache FastCGI support on Windows scenario_set.contains(CliScenario.class) || scenario_set.contains(IISScenario.class) // WinCacheU should support builtin web server b/c (low priority though): // web developers use wincache's user cache in their applications // web developers like to use the builtin web server to run/test their application || scenario_set.contains(BuiltinWebServerScenario.class))) { if (cm != null) { cm.println( EPrintType.CLUE, getClass(), "Must load CLI, IIS or Builtin Web scenario. Try adding `iis` to your -config."); } return false; } else { return true; } }
@Override public IScenarioSetup setup(ConsoleManager cm, Host host, PhpBuild build, PhpIni ini) { if (!host.isWindows() || !build.isNTS(host)) return SETUP_FAILED; configure(ini); return new WinCacheUScenarioSetup(); }
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(); }