Source: Engines/Wine/Verbs/Uplay/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. /**
  5. * Verb to install Uplay
  6. */
  7. class Uplay {
  8. constructor(wine) {
  9. this.wine = wine;
  10. }
  11. go() {
  12. const wizard = this.wine.wizard();
  13. const setupFile = new Resource()
  14. .wizard(wizard)
  15. .url("https://ubistatic3-a.akamaihd.net/orbit/launcher_installer/UplayInstaller.exe")
  16. .name("UplayInstaller.exe")
  17. .get();
  18. wizard.wait(
  19. tr(
  20. 'Please follow the steps of the Uplay setup.\n\nUncheck "Run Uplay" or close Uplay completely after the setup so that the installation can continue.'
  21. )
  22. );
  23. this.wine.run(setupFile, [], null, false, true);
  24. }
  25. static install(container) {
  26. const wine = new Wine();
  27. const wizard = SetupWizard(InstallationType.VERBS, "uplay", Optional.empty());
  28. wine.prefix(container);
  29. wine.wizard(wizard);
  30. new Uplay(wine).go();
  31. wizard.close();
  32. }
  33. }
  34. module.default = Uplay;