MPDN is a really powerful player that provides its extension through GitHub. In fact, those extension are what make this player so great, since it contains most of the Render Script made to improve the upscaling/downscaling of your video. Those script are using different Shader that can be easily modified by the end-user. To help people install the extension without the need to clone the repository, we created with Zach an installer.
Problem
By default the installer was removing the whole Extensions folder containing the Extension for the Player. This was perfectly fine if the user didn’t make any change to the shader. However on the forum some super-user started to complain about the deletion of their modification after an update of the Extension. They wanted the installer to keep their change with the possibility to update the core of the Extensions.
Solution
Since we were already using NSIS as installer creator, I went on the old winamp forum to find a solution for this. After a lot of searching I found a small script that generate an executable to generate the installer code.
Steps
Compile the unLister
Give the unLister the correct parameter, it will browser the wanted folder (what you want to install)
It will generate the list of instructions for the uninstaller using comparison of timestamp of the file
Include the generated file in the Uninstaller section
Good Start
But not enough, the first version of the script was only taking into account the timestamp, which can be quite unreliable since some program can easily change it by accessing the file even if no change were made. I continued my search for an improvement and found an md5dll plugin that generate an hash for a string or a file. This was perfect, and easy way to check if the file was modified.
Modification
You can find here the modification of the unLister script that use MD5 hash. I’m also attaching a zip containing the script and the md5 plugin needed for it to work.
Download
unLister for NSIS
This is the zip archive containing the unLister script (compiled version also) and it’s md5 plugin. Feel free to recompile it with NSIS.
Disclaimer
Antoine Aflalo is furnishing this item “as is”. Antoine Aflalo does not provide any warranty of the item whatsoever, whether express, implied, or statutory, including, but not limited to, any warranty of merchantability or fitness for a particular purpose or any warranty that the contents of the item will be error-free.
In no respect shall Antoine Aflalo incur any liability for any damages, including, but limited to, direct, indirect, special, or consequential damages arising out of, resulting from, or any way connected to the use of the item, whether or not based upon warranty, contract, tort, or otherwise; whether or not injury was sustained by persons or property or otherwise; and whether or not loss was sustained from, or arose out of, the results of, the item, or any services that may be provided by Antoine Aflalo.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behaviour or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions. Cookies are used for ads personalisation.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Leave a Reply