Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Heroes of Might and Magic IV #1144

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
254649c
Merge pull request #1 from PhoenicisOrg/master
Zemogiter Mar 27, 2018
63f898c
Merge pull request #3 from PhoenicisOrg/master
Zemogiter Mar 29, 2018
71cd3d8
Merge pull request #4 from PhoenicisOrg/master
Zemogiter Apr 1, 2018
60c3cb5
Merge pull request #5 from PhoenicisOrg/master
Zemogiter Apr 10, 2018
69e7bf2
Merge pull request #6 from PhoenicisOrg/master
Zemogiter Apr 23, 2018
5bf56fe
Merge pull request #7 from PhoenicisOrg/master
Zemogiter May 16, 2018
1c4fe31
Merge pull request #8 from PhoenicisOrg/master
Zemogiter Jun 1, 2018
66bd276
Merge pull request #9 from PhoenicisOrg/master
Zemogiter Jul 11, 2018
1791c28
Add files via upload
Zemogiter May 1, 2019
9d473d3
Merge pull request #22 from PhoenicisOrg/master
Zemogiter Jun 11, 2019
afeb994
Merge pull request #23 from PhoenicisOrg/master
Zemogiter Aug 18, 2019
25b45d5
Update script.js
Zemogiter Aug 18, 2019
43932a3
Update script.js
Zemogiter Aug 18, 2019
8db0264
Update script.js
Zemogiter Aug 18, 2019
2cfd676
Update script.js
Zemogiter Aug 18, 2019
8b7a82a
Update script.js
Zemogiter Aug 18, 2019
b1b30ac
Update script.js
Zemogiter Aug 18, 2019
c21fb41
Update script.js
Zemogiter Aug 18, 2019
923f809
Merge pull request #24 from PhoenicisOrg/master
Zemogiter Aug 24, 2019
d3b3b61
Merge pull request #30 from PhoenicisOrg/master
Zemogiter Dec 1, 2019
dc204af
Add files via upload
Zemogiter Dec 1, 2019
5bc1ecc
Update script.js
Zemogiter Dec 1, 2019
968f5fb
Update script.js
Zemogiter Dec 1, 2019
102486e
Update script.json
Zemogiter Dec 1, 2019
3d800f6
Update application.json
Zemogiter Dec 1, 2019
cdb5c19
Update script.json
Zemogiter Dec 1, 2019
63006a6
Update application.json
Zemogiter Dec 1, 2019
65de732
Update script.json
Zemogiter Dec 1, 2019
f14a61f
Update script.js
Zemogiter Dec 17, 2019
a728085
Update script.js
Zemogiter Dec 19, 2019
fbbfdb8
Update script.js
Zemogiter Dec 29, 2019
84af7b0
Update script.js
Zemogiter Jan 2, 2020
9e64476
Update script.js
Zemogiter Jan 3, 2020
9254cf1
Update script.js
Zemogiter Jan 3, 2020
ed10422
Update script.js
Zemogiter Jan 4, 2020
b5dabbe
Update script.js
Zemogiter Jan 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this folder really correct? Heroes of Might & Magic IV - Złota Edycja looks to me like a localized (translated) string and nothing a publisher would normally use

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a default install location of my cd disc. I've set it in GOG local installer and it is correct.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@madoar is correct. This will very likely not work in other countries. Maybe you can solve it with a regular expression. So: ls for the "Ubisoft" folder and then find the "Heroes of Might & Magic IV" folder.
Could even be enough to use startsWith.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plata the "Ubisoft" part is only there when you install from the disc. GOG installer uses "GOG.com" instead

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have different installers then?


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);

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);

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);
});
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.