[Bug 1379] Remove duplication of code between winesetup and wineconf/wineinstall.