-
Notifications
You must be signed in to change notification settings - Fork 47
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
Zemogiter
wants to merge
36
commits into
PhoenicisOrg:master
Choose a base branch
from
Zemogiter:HeroesOfMight&Magic4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all 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 63f898c
Merge pull request #3 from PhoenicisOrg/master
Zemogiter 71cd3d8
Merge pull request #4 from PhoenicisOrg/master
Zemogiter 60c3cb5
Merge pull request #5 from PhoenicisOrg/master
Zemogiter 69e7bf2
Merge pull request #6 from PhoenicisOrg/master
Zemogiter 5bf56fe
Merge pull request #7 from PhoenicisOrg/master
Zemogiter 1c4fe31
Merge pull request #8 from PhoenicisOrg/master
Zemogiter 66bd276
Merge pull request #9 from PhoenicisOrg/master
Zemogiter 1791c28
Add files via upload
Zemogiter 9d473d3
Merge pull request #22 from PhoenicisOrg/master
Zemogiter afeb994
Merge pull request #23 from PhoenicisOrg/master
Zemogiter 25b45d5
Update script.js
Zemogiter 43932a3
Update script.js
Zemogiter 8db0264
Update script.js
Zemogiter 2cfd676
Update script.js
Zemogiter 8b7a82a
Update script.js
Zemogiter b1b30ac
Update script.js
Zemogiter c21fb41
Update script.js
Zemogiter 923f809
Merge pull request #24 from PhoenicisOrg/master
Zemogiter d3b3b61
Merge pull request #30 from PhoenicisOrg/master
Zemogiter dc204af
Add files via upload
Zemogiter 5bc1ecc
Update script.js
Zemogiter 968f5fb
Update script.js
Zemogiter 102486e
Update script.json
Zemogiter 3d800f6
Update application.json
Zemogiter cdb5c19
Update script.json
Zemogiter 63006a6
Update application.json
Zemogiter 65de732
Update script.json
Zemogiter f14a61f
Update script.js
Zemogiter a728085
Update script.js
Zemogiter fbbfdb8
Update script.js
Zemogiter 84af7b0
Update script.js
Zemogiter 9e64476
Update script.js
Zemogiter 9254cf1
Update script.js
Zemogiter ed10422
Update script.js
Zemogiter b5dabbe
Update script.js
Zemogiter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); |
14 changes: 14 additions & 0 deletions
14
Applications/Games/Heroes of Might & Magic IV/Local (Gold Edition)/script.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
5 changes: 5 additions & 0 deletions
5
Applications/Games/Heroes of Might & Magic IV/application.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 useThere was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?