create an uninstaller for CPack package on MacOS

21 views Asked by At

My requirement is to create an installer for MacOS that includes an uninstaller. I am aware that a bundle generator can install apps into the Application folder and include an uninstaller, but I need to install a library or plugin in a custom folder, so a bundle does not meet my needs. Therefore, I believe I should use the productbuild generator, but I have found that it does not include an uninstaller.

My solution is to create a separate package with a bundle that will automatically install in the Application folder and uninstall the main files. However, I am facing two challenges. Firstly, I need to figure out how the main installer created with productbuild can execute the second installer with the bundle and install it. Secondly, I need to determine how the uninstaller can locate the main files in order to remove them effectively.

0

There are 0 answers