Thanks, Ed.
Edgar wrote:Here is what I propose for a preliminary design specification, the external app should:
Code: Select all
1) search in ITS containing folder for Audacity.exe
A) if Audacity.exe is found write resetPrefs.txt in said containing folder and exit happily
2) search for the Audacity configuration file using the existing logic which allows Audacity to be created using those never-changing values
A) if said configuration file is found open it and search for a path value ("PathToExecutable=…")
i) if said path is found to be valid and contain Audacity.exe write resetPrefs.txt in said containing folder and exit happily
3) exit unhappily giving the user some error handling suggestions
A) install a newer version of Audacity*
B) move this external app into the folder containing Audacity.exe
*This presupposes that the currently available Audacity installation actually writes that path value to audacity.cfg. This would require adding one line of code to the Audacity source.
Or it could be simpler. The app dialogue says at the outset that this app must be run from the folder containing the Audacity version you want to reset.
If it can't find audacity.exe in the folder it's in, it just exits telling user to move this external app into the folder containing the Audacity executable. That should be a fairly rare occurrence given the idea is to ship the reset app with the executable.
If it encounters a write error it will have to suggest running the app as administrator.
I don't think it's a bad idea to write the path to Audacity to audacity.cfg but I wonder how much trouble it will save the user in practice. If user renames or moves Audacity after quitting does the wrong path to Audacity in .cfg cause any problems for normal Audacity operation?
Probably our app should search for audacity* in case user renames the app.
For Mac, there will have to be conditional code (that still compiles on Windows) that tells the app to write resetPrefs.txt to the known relative path "/Audacity.app/Contents/Resources/"
Edgar wrote:Before we go any further we need a Developer on board who can & will compile on Mac.
Leland was interested enough to suggest your internal app should instead write "resetPrefs.txt" in the current directory and not make user quit. I have slight reservations but if it helps acceptance I think it's OK
http://bugzilla.audacityteam.org/show_bug.cgi?id=363#c9.
When you have digested / argued with my comments about the external app, you could expand
http://wiki.audacityteam.org/wiki/Propo ... rnal_reset with your suggestions and I could update bug 363 linking to the concrete proposal.
Frankly I expect people already assume the patch for the internal reset is your work. Alternatively you could work with Steve on the external app and and say that's his patch.
Gale