MCPcopy Create free account
hub / github.com/audacity/audacity / ExtendPath

Method ExtendPath

modules/import-export/mod-cl/ExportCL.cpp:78–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

ExistsMethod · 0.80
SetNameMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected