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

  1. const Wine = include("engines.wine.engine.object");
  2. const Resource = include("utils.functions.net.resource");
  3. const { remove, fileExists } = include("utils.functions.filesystem.files");
  4. const Optional = Java.type("java.util.Optional");
  5. const OverrideDLL = include("engines.wine.plugins.override_dll");
  6. /**
  7. * Verb to install msxml6
  8. */
  9. class Msxml6 {
  10. constructor(wine) {
  11. this.wine = wine;
  12. }
  13. go() {
  14. const wizard = this.wine.wizard();
  15. const system32directory = this.wine.system32directory();
  16. if (fileExists(`${system32directory}/msxml6.dll`)) {
  17. remove(`${system32directory}/msxml6.dll`);
  18. }
  19. new OverrideDLL(this.wine).withMode("native,builtin", ["msxml6"]).go();
  20. if (this.wine.architecture() == "amd64") {
  21. const system64directory = this.wine.system64directory();
  22. if (fileExists(`${system64directory}/msxml6.dll`)) {
  23. remove(`${system64directory}/msxml6.dll`);
  24. }
  25. const setupFile64 = new Resource()
  26. .wizard(wizard)
  27. .url(
  28. "https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x64.msi"
  29. )
  30. .checksum("ca0c0814a9c7024583edb997296aad7cb0a3cbf7")
  31. .name("msxml6_x64.msi")
  32. .get();
  33. wizard.wait(tr("Please wait while {0} is installed...", "msxml6"));
  34. this.wine.run(setupFile64, ["/q:a", "/c:msxml6_x64.msi /q"], null, false, true);
  35. } else {
  36. const setupFile32 = new Resource()
  37. .wizard(wizard)
  38. .url(
  39. "https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x86.msi"
  40. )
  41. .checksum("5125220e985b33c946bbf9f60e2b222c7570bfa2")
  42. .name("msxml6_x86.msi")
  43. .get();
  44. wizard.wait(tr("Please wait while {0} is installed...", "msxml6"));
  45. this.wine.run(setupFile32, ["/q:a", "/c:msxml6_x86.msi /q"], null, false, true);
  46. }
  47. }
  48. static install(container) {
  49. const wine = new Wine();
  50. const wizard = SetupWizard(InstallationType.VERBS, "msxml6", Optional.empty());
  51. wine.prefix(container);
  52. wine.wizard(wizard);
  53. new Msxml6(wine).go();
  54. wizard.close();
  55. }
  56. }
  57. module.default = Msxml6;