autopkg / hansen-m-recipes

My recipes for Autopkg - https://github.com/autopkg
27 stars 50 forks source link

Path to msiinfo differs on Apple Silicon #208

Closed patgmac closed 1 year ago

patgmac commented 2 years ago

https://github.com/autopkg/hansen-m-recipes/blob/0c0dca0074ba59352d400bf3da48c0a4ca3bfdbd/SharedProcessors/MSIInfoVersionProvider.py#L42

On Apple Silicon, the path to msiinfo needs to be: MSIINFO = os.path.abspath("/opt/homebrew/bin/msiinfo")

jgstew commented 2 years ago

Ideally the path to msiinfo should be an input variable with a default value that can be overridden.

I have a shared processor called FileGetExecutable that you provide an array of paths and it will return the first item it finds that is a real file that is marked executable. I use this to allow many of the processors within this repo to work on Windows and Linux in addition to MacOS by providing many alternative paths including the default ones.

See example usage here:

rustymyers commented 2 years ago

Latest commit includes input variable for msiinfo path. Please test and report!

rustymyers commented 2 years ago

d8c5836d25f4b50a8f854546d28de3a32baa65e7