Source: Engines/Wine/Verbs/vcrun2013/script.js

  1. const Wine = include("engines.wine.engine.object");
  2. const Resource = include("utils.functions.net.resource");
  3. const Optional = Java.type("java.util.Optional");
  4. const OverrideDLL = include("engines.wine.plugins.override_dll");
  5. /**
  6. * Verb to install vcrun2013
  7. */
  8. class Vcrun2013 {
  9. constructor(wine) {
  10. this.wine = wine;
  11. }
  12. go() {
  13. const wizard = this.wine.wizard();
  14. const setupFile32 = new Resource()
  15. .wizard(wizard)
  16. .url("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe")
  17. .checksum("df7f0a73bfa077e483e51bfb97f5e2eceedfb6a3")
  18. .name("vcredist_x86.exe")
  19. .get();
  20. wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2013 Redistributable (x86)"));
  21. this.wine.run(setupFile32, "/q", null, false, true);
  22. if (this.wine.architecture() == "amd64") {
  23. const setupFile64 = new Resource()
  24. .wizard(wizard)
  25. .url(
  26. "http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe"
  27. )
  28. .checksum("8bf41ba9eef02d30635a10433817dbb6886da5a2")
  29. .name("vcredist_x64.exe")
  30. .get();
  31. wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2013 Redistributable (x64)"));
  32. this.wine.run(setupFile64, "/q", null, false, true);
  33. }
  34. new OverrideDLL(this.wine).withMode("native, builtin", ["atl120", "msvcp120", "msvcr120", "vcomp120"]).go();
  35. }
  36. install(container) {
  37. const wine = new Wine();
  38. const wizard = SetupWizard(InstallationType.VERBS, "vcrun2013", Optional.empty());
  39. wine.prefix(container);
  40. wine.wizard(wizard);
  41. new Vcrun2013(wine).go();
  42. wizard.close();
  43. }
  44. }
  45. module.default = Vcrun2013;