Nyquist plug-in installer added

Ran "autoreconf --force --no-recursive" for Linux build.

Add nyquist-plug-in-installer.ny to Windows build

Add Nyquist Plug-in Installer to mac build

Fix translation strings in plug-in installer
This commit is contained in:
Steve Daulton 2019-03-20 12:33:06 +00:00
parent 069e34df77
commit 6e6148604d
9 changed files with 157 additions and 2 deletions

View File

@ -70,6 +70,7 @@ nobase_dist_pkgdata_DATA = \
plug-ins/limiter.ny \
plug-ins/lowpass.ny \
plug-ins/notch.ny \
plug-ins/nyquist-plug-in-installer.ny \
plug-ins/pluck.ny \
plug-ins/rhythmtrack.ny \
plug-ins/rissetdrum.ny \

View File

@ -588,6 +588,7 @@ nobase_dist_pkgdata_DATA = \
plug-ins/limiter.ny \
plug-ins/lowpass.ny \
plug-ins/notch.ny \
plug-ins/nyquist-plug-in-installer.ny \
plug-ins/pluck.ny \
plug-ins/rhythmtrack.ny \
plug-ins/rissetdrum.ny \

4
configure vendored
View File

@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='audacity'
PACKAGE_TARNAME='audacity'
PACKAGE_VERSION='2.3.2'
PACKAGE_STRING='audacity 2.3.2'
PACKAGE_VERSION='2.3.0'
PACKAGE_STRING='audacity 2.3.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

View File

@ -1317,6 +1317,7 @@
AA6B5BB02061EC58008B5B26 /* soxr.c in Sources */ = {isa = PBXBuildFile; fileRef = ED15215F163C244200451B5F /* soxr.c */; };
AA6B5BB12061EC58008B5B26 /* vr32.c in Sources */ = {isa = PBXBuildFile; fileRef = EDE325FF168243EF00C19E60 /* vr32.c */; };
AAA15DB72195F26B000ECCD8 /* aud-do-support.lsp in Resources */ = {isa = PBXBuildFile; fileRef = AAA15DB62195F26B000ECCD8 /* aud-do-support.lsp */; };
AAA677852243BA4400D42A28 /* nyquist-plug-in-installer.ny in Resources */ = {isa = PBXBuildFile; fileRef = AAA677842243BA4400D42A28 /* nyquist-plug-in-installer.ny */; };
AAB5D42F216A9764006136B4 /* rms.ny in Resources */ = {isa = PBXBuildFile; fileRef = AAB5D42E216A9764006136B4 /* rms.ny */; };
ED1521EB163C2B9000451B5F /* libsoxr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED152130163C227C00451B5F /* libsoxr.a */; };
ED19449A1733F92800F4F5CA /* Reverb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED1944981733F92800F4F5CA /* Reverb.cpp */; };
@ -3254,6 +3255,7 @@
AA6B5B8D2061E20A008B5B26 /* fifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fifo.h; sourceTree = "<group>"; };
AA6B5B8F2061E6A8008B5B26 /* std-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "std-types.h"; sourceTree = "<group>"; };
AAA15DB62195F26B000ECCD8 /* aud-do-support.lsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "aud-do-support.lsp"; path = "../nyquist/aud-do-support.lsp"; sourceTree = "<group>"; };
AAA677842243BA4400D42A28 /* nyquist-plug-in-installer.ny */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "nyquist-plug-in-installer.ny"; path = "../plug-ins/nyquist-plug-in-installer.ny"; sourceTree = "<group>"; };
AAB5D42E216A9764006136B4 /* rms.ny */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rms.ny; path = "../plug-ins/rms.ny"; sourceTree = "<group>"; };
AAC1F49C1DE653A70038BB3A /* sample-data-import.ny */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "sample-data-import.ny"; path = "../../Audacity/plug-ins/sample-data-import.ny"; sourceTree = "<group>"; };
ED05D1020E50AD5700CC4BD3 /* audioreader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = audioreader.cpp; sourceTree = "<group>"; tabWidth = 3; };
@ -5593,6 +5595,7 @@
2860736B1B1ED77100850872 /* limiter.ny */,
28AA281B0F267A2D008AED9E /* lowpass.ny */,
28ED7B701A1C77B0008A01D9 /* notch.ny */,
AAA677842243BA4400D42A28 /* nyquist-plug-in-installer.ny */,
28AA281C0F267A2D008AED9E /* pluck.ny */,
28D34C7F1D9F52E200D4FB61 /* rhythmtrack.ny */,
28AA281D0F267A2D008AED9E /* rissetdrum.ny */,
@ -7233,6 +7236,7 @@
174F73D1098D516D009CD6E0 /* AudacityAIFF.icns in Resources */,
174F73D2098D516D009CD6E0 /* AudacityAU.icns in Resources */,
174F73D3098D516D009CD6E0 /* AudacityMP3.icns in Resources */,
AAA677852243BA4400D42A28 /* nyquist-plug-in-installer.ny in Resources */,
AAB5D42F216A9764006136B4 /* rms.ny in Resources */,
174F73D4098D516D009CD6E0 /* AudacityOGG.icns in Resources */,
174F73D5098D516D009CD6E0 /* AudacityProject.icns in Resources */,

View File

@ -15,6 +15,7 @@ plug-ins/highpass.ny
plug-ins/limiter.ny
plug-ins/lowpass.ny
plug-ins/notch.ny
plug-ins/nyquist-plug-in-installer.ny
plug-ins/pluck.ny
plug-ins/rhythmtrack.ny
plug-ins/rissetdrum.ny

View File

@ -0,0 +1,143 @@
$nyquist plug-in
$version 4
$type tool
$name (_ "Nyquist Plug-in Installer")
$manpage "Nyquist_Plug-in_Installer"
;$debugbutton false
$preview disabled
$author "Steve Daulton"
$release 2.3.1
$copyright (_ "Released under terms of the GNU General Public License version 2")
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
;;
;; For information about writing and modifying Nyquist plug-ins:
;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
$control plug-in (_ "Select plug-in file") file (_ "File Browser") "~/Desktop/" "Plug-in|*.ny;*.NY|Text file|*.txt;*.TXT|All files|*.*;*" "open,exists"
;; As this plug-in is intended primarily to help novice users, it is unsafe to allow overwriting.
;$control overwrite (_ "If plug-in is already installed") choice ((_ "Keep original") (_ "Overwrite")) 0
(if (not (boundp 'overwrite))
(setf overwrite 0))
(defun audacity-version-ok (min-version)
(cond
((get '*audacity* 'version)
(mapc (lambda (x y)
(cond
((boundp 'isok))
((> x y) (setf isok t))
((< x y) (setf isok nil))))
(get '*audacity* 'version)
min-version)
(or (not (boundp 'isok)) isok))
(t nil)))
;; Extract file name and extension from fully qualified file name.
(defun get-file-name (fqname &aux (fname ""))
(dotimes (i (length fqname) fname)
(if (char= (char fqname i) *file-separator*)
(setf fname "")
(setf fname (format nil "~a~a" fname (char fqname i))))))
;; Predicate, is file name
(defun isfilename (fname)
(let ((ln (length fname)))
(cond
((= ln 0) nil)
((char= (char fname (- ln 1)) *file-separator*) nil)
(t t))))
;; Predicate, file exists.
(defun existsp (fname)
(let ((fp (open fname)))
(cond
(fp (close fp) t)
(t nil))))
;Predicate, file is writeable.
(defun writeablep (fname)
(let ((fp (open fname :direction :output)))
(cond
(fp (close fp) t)
(t nil))))
;; Copy from input file to output file.
(defun copy-file (input output)
(let ((ifp (open input :direction :input))
(ofp (open output :direction :output)))
(do ((line (read-line ifp)(read-line ifp)))
((not line))
(format ofp "~a~%" line))
(close ifp)
(close ofp)))
;;Predicate, looks like a Nyquist plug-in.
(defun isplugin (fname)
(let ((fp (open fname))
(teststring "nyquist plug-in"))
;First char may be #\; or #\$
(setf b (read-byte fp))
(cond
((and (/= b (char-code #\;))(/= b (char-code #\$)))
(close fp)
nil)
((do* ((i 0 (1+ i))
(b (read-byte fp) (read-byte fp))
(test (char-code (char teststring i))
(char-code (char teststring i))))
((= i (1- (length teststring))) t)
(when (/= b test)
(return)))
(close fp)
t)
(t
(close fp)
nil))))
;If string ends in ".ny.txt", replace with ".ny"
(defun fix-ext (fname)
(setf ln (length fname))
(if (and (> ln 7)
(string-equal (subseq fname (- ln 7) ln) ".ny.txt"))
(subseq fname 0 (- ln 4))
fname))
(defun install (fname)
(setf out-path (get '*system-dir* 'user-plug-in))
(setf short-name (get-file-name fname))
(cond
((not (existsp fname))
(format nil (_ "Error.~%~s not found or cannot be read.~%") short-name))
((not (isplugin fname))
(format nil (_ "Error.~%~s is not a supported plug-in.~%") short-name))
(t
(setf short-name (fix-ext short-name))
(setf out-fname
(format nil "~a~a~a" out-path *file-separator* short-name))
(cond
((string-not-equal short-name ".ny" :start1 (- (length short-name) 3))
(format nil (_ "Error.~%~s is not a valid Nyquist plug-in.~%") short-name))
((and (existsp out-fname) (= overwrite 0))
(format nil (_ "Error.~%~s is already installed.~%") short-name))
((not (writeablep out-fname))
(format nil (_ "Error.~%~s cannot be written.~%") out-fname))
(t
(copy-file fname out-fname)
(format nil (_ "~s installed to:~%~s~%~%~
Use the Plug-in Manager to enable the effect.")
short-name out-fname))))))
(cond
((or (not (boundp 'plug-in))(not (audacity-version-ok '(2 3 1))))
(_ "This plug-in requires Audacity 2.3.1 or later."))
((not (isfilename plug-in))
(_ "Error.\nNo file selected."))
(t (install plug-in)))

View File

@ -33,6 +33,7 @@ const static wxChar *kShippedEffects[] =
wxT("limiter.ny"),
wxT("lowpass.ny"),
wxT("notch.ny"),
wxT("nyquist-plug-in-installer.ny"),
wxT("pluck.ny"),
wxT("rhythmtrack.ny"),
wxT("rissetdrum.ny"),

View File

@ -838,6 +838,7 @@
<ItemGroup>
<copy Include="..\..\..\plug-ins\adjustable-fade.ny" />
<copy Include="..\..\..\plug-ins\beat.ny" />
<copy Include="..\..\..\plug-ins\nyquist-plug-in-installer.ny" />
<copy Include="..\..\..\plug-ins\rhythmtrack.ny" />
<copy Include="..\..\..\plug-ins\clipfix.ny" />
<copy Include="..\..\..\plug-ins\crossfadeclips.ny" />

View File

@ -2443,6 +2443,9 @@
<copy Include="..\..\..\plug-ins\rms.ny">
<Filter>plug-ins</Filter>
</copy>
<copy Include="..\..\..\plug-ins\nyquist-plug-in-installer.ny">
<Filter>plug-ins</Filter>
</copy>
</ItemGroup>
<ItemGroup>
<Manifest Include="..\..\Audacity.exe.manifest">