| 76 | wxString opath; |
| 77 | |
| 78 | ExtendPath() |
| 79 | { |
| 80 | // Give Windows a chance at finding lame command in the default location. |
| 81 | wxString paths[] = {wxT("HKEY_LOCAL_MACHINE\\Software\\Lame for Audacity"), |
| 82 | wxT("HKEY_LOCAL_MACHINE\\Software\\FFmpeg for Audacity")}; |
| 83 | wxString npath; |
| 84 | wxRegKey reg; |
| 85 | |
| 86 | wxGetEnv(wxT("PATH"), &opath); |
| 87 | npath = opath; |
| 88 | |
| 89 | for (int i = 0; i < WXSIZEOF(paths); i++) { |
| 90 | reg.SetName(paths[i]); |
| 91 | |
| 92 | if (reg.Exists()) { |
| 93 | wxString ipath; |
| 94 | reg.QueryValue(wxT("InstallPath"), ipath); |
| 95 | if (!ipath.empty()) { |
| 96 | npath += wxPATH_SEP + ipath; |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | wxSetEnv(wxT("PATH"),npath); |
| 102 | }; |
| 103 | |
| 104 | ~ExtendPath() |
| 105 | { |