The present code includes querying the registry as well as looking in "standard" places. Thus, non-"standard" places should work too, if the installer was used.
However, it is of course always possible that the MinGW installer is changed and we don't know