1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Add some useful path definitions for Nyquist

This commit is contained in:
Steve Daulton 2018-10-29 15:20:36 +00:00
parent c79d65cdeb
commit 46a3f91d59
2 changed files with 15 additions and 1 deletions

View File

@ -67,3 +67,12 @@
(error (format nil "(aud-get-info ~a) failed.~%" str)))
(let ((info-string (first info)))
(eval-string (quote-string info-string)))))
;;; Path to Nyquist .lsp files.
(setf *NYQ-PATH* (current-path))
;;; Load wrapper functions for aud-do commands.
;;; If commented out, "aud-do-support.lsp" may be loaded by a plug-in.
;;; Example: (lisp-loader (strcat *NYQ-PATH* "aud-do-support.lsp"))
(load "aud-do-support.lsp")

View File

@ -42,6 +42,7 @@ effects from this one class.
#include <wx/valgen.h>
#include <wx/wfstream.h>
#include <wx/numformatter.h>
#include <wx/stdpaths.h>
#include "../../AudacityApp.h"
#include "../../FileException.h"
@ -673,6 +674,9 @@ bool NyquistEffect::Process()
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'DATA)\n"), EscapeString(FileNames::DataDir()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'HELP)\n"), EscapeString(FileNames::HtmlHelpDir().RemoveLast()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'TEMP)\n"), EscapeString(FileNames::TempDir()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'SYS-TEMP)\n"), EscapeString(wxStandardPaths::Get().GetTempDir()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'DOCUMENTS)\n"), EscapeString(wxStandardPaths::Get().GetDocumentsDir()));
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'HOME)\n"), EscapeString(wxGetHomeDir()));
wxArrayString paths = NyquistEffect::GetNyquistSearchPath();
wxString list;
@ -684,7 +688,8 @@ bool NyquistEffect::Process()
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* (list %s) 'PLUGIN)\n"), list);
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* (list %s) 'PLUG-IN)\n"), list);
mProps += wxString::Format(wxT("(putprop '*SYSTEM-DIR* \"%s\" 'USER-PLUG-IN)\n"),
EscapeString(FileNames::PlugInDir()));
// Date and time:
wxDateTime now = wxDateTime::Now();