I may be able to help as I already build on msys2 for my hobby project https://github.com/giuspen/cherrytree via the script https://github.com/giuspen/cherrytree/blob/master/scripts/msys2_prepare_stan... ( and package via inno setup script https://github.com/giuspen/cherrytree/blob/master/scripts/cherrytree.iss )