PhoenicisOrg / scripts

Phoenicis scripts
GNU Lesser General Public License v3.0
64 stars 49 forks source link

Update Installer Script (run postInstall before shortcut creation) #1170

Closed Zemogiter closed 4 years ago

Zemogiter commented 4 years ago

Description

Thanks to #1144 we have discovered that scripts will fail if .executable() points to a file that only exist after postInstall step is done. Since @plata mentioned something about Installer Script working this way for a reason (though I was unable to find that reason in closed PRs and issues) this is a WIP draft untill me or someone else test this with other scripts that use postInstall.

What works

Heroes of Might & Magic IV no longer crash due to non-existing .executable()

What was not tested

Other scripts with postInstall

Test

Ready for review

plata commented 4 years ago

@qparis can you remember if there was a reason to use this order?

madoar commented 4 years ago

I don't see a reason why we should not be able to change the order. We should only face an issue with this if inside postInstall the created shortcut is accessed or the internal values of QuickScript are changed, which should not be the case anyway.

plata commented 4 years ago

For me it's fine to try it. Could you take a look at the postInstall calls to see if there's something which might get broken?

madoar commented 4 years ago

This is interesting. It seems like some installers use a different order:

https://github.com/PhoenicisOrg/scripts/blob/5fe4e1f8a9e0f1003e1e9c523c4afb61d15042f7/Engines/Wine/QuickScript/Origin%20Script/script.js#L48-L65

madoar commented 4 years ago

ZipScript as well

plata commented 4 years ago

Ok, then let's merge this.