diff --git a/Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.js b/Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.js new file mode 100644 index 0000000000..c6b31e598c --- /dev/null +++ b/Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.js @@ -0,0 +1,50 @@ +const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); +const Resource = include("utils.functions.net.resource"); +const { getLatestDevelopmentVersion } = include("engines.wine.engine.versions"); +const Downloader = include("utils.functions.net.download"); + +new LocalInstallerScript() + .name("Heroes of Might & Magic IV") + .editor("New World Computing, Inc.") + .author("Zemogiter") + .category("Games") + .wineDistribution("upstream") + .wineVersion(getLatestDevelopmentVersion) + .executable("H4mod.exe") + .postInstall((wine) => { + const dataDirectory = wine.prefixDirectory() + "drive_c/" + wine.programFiles() + "Ubisoft/Heroes of Might & Magic IV - Złota Edycja/Data"; + + const patchForGameExecutable = new Resource() + .wizard(wine.wizard()) + .url("https://equilibris.celestialheavens.com/downloads/heroes4_sfx.exe") + .checksum("373df5403ada0d2bb9285862efeca00415cb0915") + .name("heroes4_sfx.exe") + .get(); + wine.run(patchForGameExecutable, null, false, true); + wine.wait(); + + const patchForCampaignEditor = new Resource() + .wizard(wine.wizard()) + .url("https://equilibris.celestialheavens.com/downloads/camp_ed_sfx.exe") + .checksum("9d34c409a0358057b0c2d00b7d4c96ccd67c7214") + .name("camp_ed_sfx.exe") + .get(); + wine.run(patchForCampaignEditor, null, false, true); + wine.wait(); + + new Downloader() + .wizard(wine.wizard()) + .url("https://equilibris.celestialheavens.com/downloads/equi.aop") + .checksum("3a188a45017a1fd7cb38d6883428f6abc9b6e160") + .to(dataDirectory) + .get(); + + const mod = new Resource() + .wizard(wine.wizard()) + .url("https://equilibris.celestialheavens.com/downloads/install_equilibris_v.3.51.exe") + .checksum("3a188a45017a1fd7cb38d6883428f6abc9b6e160") + .name("install_equilibris_v.3.51.exe") + .get(); + wine.run(mod, null, false, true); + wine.wait(); + }); diff --git a/Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.json b/Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.json new file mode 100644 index 0000000000..643cc5c33e --- /dev/null +++ b/Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.json @@ -0,0 +1,14 @@ +{ + "scriptName" : "Local (Gold Edition)", + "id" : "applications.games.heroes_of_might_and_magic_4.local", + "compatibleOperatingSystems" : [ + "MACOSX", + "LINUX" + ], + "testingOperatingSystems" : [ + "MACOSX", + "LINUX" + ], + "free" : false, + "requiresPatch" : false +} diff --git a/Applications/Games/Heroes of Might & Magic IV/application.json b/Applications/Games/Heroes of Might & Magic IV/application.json new file mode 100644 index 0000000000..6cb3ad901d --- /dev/null +++ b/Applications/Games/Heroes of Might & Magic IV/application.json @@ -0,0 +1,5 @@ +{ + "name" : "Heroes of Might & Magic IV", + "id" : "applications.games.heroes_of_might_and_magic_4", + "description" : "A turn-based strategy game where you build up castles to equip your heroes with vast armies to give them the strength to conquer the enemy and develop themselves in the schools of might and magic" +} diff --git a/Applications/Games/Heroes of Might & Magic IV/miniatures/main.png b/Applications/Games/Heroes of Might & Magic IV/miniatures/main.png new file mode 100644 index 0000000000..071eda5814 Binary files /dev/null and b/Applications/Games/Heroes of Might & Magic IV/miniatures/main.png differ