1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 23:59:41 +02:00

Round 10 of wx3 changes

configure script now auto detects whether wxWidgets was built using
gtk2 or gtk3, so there's no longer a need to specify which one when
running configure.

VST support updated for wx3 under GTK.
This commit is contained in:
Leland Lucius 2015-07-18 01:22:05 -05:00
parent 47f8d10de3
commit ed419f1917
13 changed files with 307 additions and 237 deletions

170
configure vendored
View File

@ -939,7 +939,6 @@ with_lib_preference
enable_sse
enable_universal_binary
enable_dynamic_loading
enable_gtk3
with_wx_version
with_expat
with_ffmpeg
@ -1678,7 +1677,6 @@ Optional Features:
--enable-dynamic-loading
enable dynamic loading of lame and FFmpeg
[default=yes]
--enable-gtk3 enable use of GTK+-3.0 (default: use GTK+-2.0)
--enable-nyquist enable Nyquist plug-in support [default=yes]
--enable-audiounits enable audio unit plug-in support (Mac OS X only)
[default=auto]
@ -19157,14 +19155,6 @@ else
fi
# Check whether --enable-gtk3 was given.
if test "${enable_gtk3+set}" = set; then :
enableval=$enable_gtk3; enable_gtk3=$enableval
else
enable_gtk3=no
fi
# Check whether --with-wx-version was given.
if test "${with_wx_version+set}" = set; then :
@ -23488,145 +23478,38 @@ fi
as_fn_error $? "dlopen not found, required by Audacity" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk3 use in wxWidgets" >&5
$as_echo_n "checking for gtk3 use in wxWidgets... " >&6; }
CPPFLAGS="${WX_CXXFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wx/wx.h>
#if defined(__WXGTK3__)
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then :
enable_gtk3=yes
else
enable_gtk3=no
fi
rm -f conftest*
if [ "$enable_gtk3" = yes ]; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
$as_echo_n "checking for GTK... " >&6; }
if test -n "$GTK_CFLAGS"; then
pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GTK_LIBS"; then
pkg_cv_GTK_LIBS="$GTK_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-3.0" 2>&1`
else
GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-3.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GTK_PKG_ERRORS" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
have_gtk=no
elif test $pkg_failed = untried; then
have_gtk=no
else
GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
GTK_LIBS=$pkg_cv_GTK_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
gtk_version=gtk+-3.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
have_gtk=yes
fi
else
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
$as_echo_n "checking for GTK... " >&6; }
if test -n "$GTK_CFLAGS"; then
pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GTK_LIBS"; then
pkg_cv_GTK_LIBS="$GTK_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0" 2>&1`
else
GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GTK_PKG_ERRORS" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
gtk_version=gtk+-2.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
have_gtk=no
elif test $pkg_failed = untried; then
have_gtk=no
else
GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
GTK_LIBS=$pkg_cv_GTK_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
have_gtk=yes
fi
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
$as_echo_n "checking for GTK... " >&6; }
@ -23701,8 +23584,7 @@ $as_echo "#define HAVE_GTK 1" >>confdefs.h
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
fi
;;
;;
esac

View File

@ -184,8 +184,6 @@ AC_ARG_ENABLE(dynamic-loading,
[dynamic_loading="$enableval"],
[dynamic_loading="yes"])
AC_ARG_ENABLE(gtk3, [AS_HELP_STRING([--enable-gtk3],[enable use of GTK+-3.0 (default: use GTK+-2.0)])], enable_gtk3=$enableval, enable_gtk3=no)
AC_ARG_WITH(wx-version,
[AS_HELP_STRING([--with-wx-version],
[select wxWidgets version (if both installed) [3.0,]])],
@ -566,12 +564,24 @@ case "${host_os}" in
AC_MSG_ERROR([dlopen not found, required by Audacity])
fi
AC_SUBST(HAVE_GTK)
AC_MSG_CHECKING([for gtk3 use in wxWidgets])
CPPFLAGS="${WX_CXXFLAGS}"
AC_EGREP_CPP(yes,
[#include <wx/wx.h>
#if defined(__WXGTK3__)
yes
#endif
], enable_gtk3=yes, enable_gtk3=no)
if [[ "$enable_gtk3" = yes ]]; then
PKG_CHECK_MODULES(GTK, gtk+-3.0, have_gtk=yes, have_gtk=no)
gtk_version=gtk+-3.0
AC_MSG_RESULT([yes])
else
PKG_CHECK_MODULES(GTK, gtk+-2.0, have_gtk=yes, have_gtk=no)
gtk_version=gtk+-2.0
AC_MSG_RESULT([no])
fi
AC_SUBST(HAVE_GTK)
PKG_CHECK_MODULES(GTK, $gtk_version, have_gtk=yes, have_gtk=no)
if [[ "$have_gtk" = "yes" ]]
then
@ -579,10 +589,6 @@ case "${host_os}" in
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
fi
dnl VST support on platforms other than Mac OS and Windows not enabled for
dnl 2.0.6 release
dnl use_vst="no"
;;
esac

View File

@ -788,7 +788,6 @@ enable_libtool_lock
enable_static_wx
enable_unicode
enable_debug
enable_gtk3
with_wx_version
with_wx_config
'
@ -1445,7 +1444,6 @@ Optional Features:
--enable-static-wx link wx statically (default=no)
--enable-unicode enable unicode support (default=no)
--enable-debug enable debug support (default=none)
--enable-gtk3 enable use of GTK+-3.0 (default: use GTK+-2.0)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -1939,6 +1937,48 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
# ac_fn_cxx_try_run LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_cxx_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_run
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@ -2925,6 +2965,16 @@ fi
#
# We use C++
#
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
#
# Checks for programs.
#
@ -3429,11 +3479,11 @@ else
CXXFLAGS=
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@ -4497,11 +4547,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
@ -6112,6 +6162,7 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@ -6242,7 +6293,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_cxx_try_compile "$LINENO"; then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@ -8104,7 +8155,6 @@ done
func_stripname_cnf ()
{
case ${2} in
@ -12096,11 +12146,11 @@ $as_echo "$enable_static" >&6; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
CC="$lt_save_CC"
@ -12234,11 +12284,11 @@ as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
else
_lt_caught_CXX_error=yes
@ -15287,11 +15337,11 @@ fi
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
fi # test "$_lt_caught_CXX_error" != yes
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@ -15319,6 +15369,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#
# Checks for libraries.
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
@ -15339,7 +15390,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
@ -15412,7 +15463,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
if ac_fn_cxx_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
@ -15459,14 +15510,6 @@ else
fi
# Check whether --enable-gtk3 was given.
if test "${enable_gtk3+set}" = set; then :
enableval=$enable_gtk3; enable_gtk3=$enableval
else
enable_gtk3=no
fi
# Check whether --with-wx-version was given.
if test "${with_wx_version+set}" = set; then :
@ -15543,11 +15586,34 @@ WX_LIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk3 use in wxWidgets" >&5
$as_echo_n "checking for gtk3 use in wxWidgets... " >&6; }
CPPFLAGS="${WX_CXXFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wx/wx.h>
#if defined(__WXGTK3__)
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then :
enable_gtk3=yes
else
enable_gtk3=no
fi
rm -f conftest*
if [ "$enable_gtk3" = yes ]; then
gtk_version=gtk+-3.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
gtk_version=gtk+-2.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@ -15556,6 +15622,8 @@ fi
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.

View File

@ -10,6 +10,11 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 dist-xz foreign no-dist-gzip subdir-objects -Wall])
AM_MAINTAINER_MODE([disable])
#
# We use C++
#
AC_LANG_CPLUSPLUS
#
# Checks for programs.
#
@ -41,11 +46,6 @@ AC_ARG_ENABLE(debug,
debug_preference="--debug=$enableval",
debug_preference="")
AC_ARG_ENABLE(gtk3,
[AS_HELP_STRING([--enable-gtk3],[enable use of GTK+-3.0 (default: use GTK+-2.0)])],
enable_gtk3=$enableval,
enable_gtk3=no)
AC_ARG_WITH(wx-version,
[AS_HELP_STRING([--with-wx-version],[override default wxWidgets version [2.6,2.8]])],
wx_preference="--version=$withval",
@ -70,12 +70,24 @@ WX_LIBS=""
AC_SUBST([WX_CXXFLAGS])
AC_SUBST([WX_LIBS])
AC_SUBST(HAVE_GTK)
AC_MSG_CHECKING([for gtk3 use in wxWidgets])
CPPFLAGS="${WX_CXXFLAGS}"
AC_EGREP_CPP(yes,
[#include <wx/wx.h>
#if defined(__WXGTK3__)
yes
#endif
], enable_gtk3=yes, enable_gtk3=no)
if [[ "$enable_gtk3" = yes ]]; then
gtk_version=gtk+-3.0
AC_MSG_RESULT([yes])
else
gtk_version=gtk+-2.0
AC_MSG_RESULT([no])
fi
AC_SUBST(HAVE_GTK)
PKG_CHECK_MODULES(GTK, $gtk_version, have_gtk="yes", have_gtk="no")
dnl OS-specific configuration

View File

@ -9,13 +9,13 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include <gtk/gtk.h>
#include "../FileDialog.h"
#include "wx/intl.h"
#include "wx/msgdlg.h"
#include <gtk/gtk.h>
#ifdef __UNIX__
#include <unistd.h> // chdir
#endif

View File

@ -701,6 +701,8 @@ audacity_SOURCES += \
effects/VST/aeffectx.h \
effects/VST/VSTEffect.cpp \
effects/VST/VSTEffect.h \
effects/VST/VSTControlVST.cpp \
effects/VST/VSTControlVST.h \
$(NULL)
endif

View File

@ -193,6 +193,8 @@ bin_PROGRAMS = audacity$(EXEEXT)
@USE_VST_TRUE@ effects/VST/aeffectx.h \
@USE_VST_TRUE@ effects/VST/VSTEffect.cpp \
@USE_VST_TRUE@ effects/VST/VSTEffect.h \
@USE_VST_TRUE@ effects/VST/VSTControlVST.cpp \
@USE_VST_TRUE@ effects/VST/VSTControlVST.h \
@USE_VST_TRUE@ $(NULL)
subdir = src
@ -478,7 +480,8 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
effects/vamp/LoadVamp.cpp effects/vamp/LoadVamp.h \
effects/vamp/VampEffect.cpp effects/vamp/VampEffect.h \
effects/VST/aeffectx.h effects/VST/VSTEffect.cpp \
effects/VST/VSTEffect.h
effects/VST/VSTEffect.h effects/VST/VSTControlVST.cpp \
effects/VST/VSTControlVST.h
am__objects_1 = audacity-BlockFile.$(OBJEXT) \
audacity-DirManager.$(OBJEXT) audacity-Dither.$(OBJEXT) \
audacity-FileFormats.$(OBJEXT) audacity-Internat.$(OBJEXT) \
@ -513,7 +516,8 @@ am__objects_1 = audacity-BlockFile.$(OBJEXT) \
@USE_VAMP_TRUE@ effects/vamp/audacity-LoadVamp.$(OBJEXT) \
@USE_VAMP_TRUE@ effects/vamp/audacity-VampEffect.$(OBJEXT)
@USE_VST_TRUE@am__objects_12 = \
@USE_VST_TRUE@ effects/VST/audacity-VSTEffect.$(OBJEXT)
@USE_VST_TRUE@ effects/VST/audacity-VSTEffect.$(OBJEXT) \
@USE_VST_TRUE@ effects/VST/audacity-VSTControlVST.$(OBJEXT)
am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
audacity-AColor.$(OBJEXT) audacity-AudacityApp.$(OBJEXT) \
audacity-AudacityLogger.$(OBJEXT) audacity-AudioIO.$(OBJEXT) \
@ -1931,6 +1935,9 @@ effects/VST/$(DEPDIR)/$(am__dirstamp):
@: > effects/VST/$(DEPDIR)/$(am__dirstamp)
effects/VST/audacity-VSTEffect.$(OBJEXT): effects/VST/$(am__dirstamp) \
effects/VST/$(DEPDIR)/$(am__dirstamp)
effects/VST/audacity-VSTControlVST.$(OBJEXT): \
effects/VST/$(am__dirstamp) \
effects/VST/$(DEPDIR)/$(am__dirstamp)
audacity$(EXEEXT): $(audacity_OBJECTS) $(audacity_DEPENDENCIES) $(EXTRA_audacity_DEPENDENCIES)
@rm -f audacity$(EXEEXT)
@ -2133,6 +2140,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/audacity-TruncSilence.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/audacity-TwoPassSimpleMono.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/audacity-Wahwah.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@effects/VST/$(DEPDIR)/audacity-VSTControlVST.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@effects/VST/$(DEPDIR)/audacity-VSTEffect.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@effects/audiounits/$(DEPDIR)/audacity-AudioUnitEffect.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@effects/ladspa/$(DEPDIR)/audacity-LadspaEffect.Po@am__quote@
@ -5968,6 +5976,20 @@ effects/VST/audacity-VSTEffect.obj: effects/VST/VSTEffect.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o effects/VST/audacity-VSTEffect.obj `if test -f 'effects/VST/VSTEffect.cpp'; then $(CYGPATH_W) 'effects/VST/VSTEffect.cpp'; else $(CYGPATH_W) '$(srcdir)/effects/VST/VSTEffect.cpp'; fi`
effects/VST/audacity-VSTControlVST.o: effects/VST/VSTControlVST.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT effects/VST/audacity-VSTControlVST.o -MD -MP -MF effects/VST/$(DEPDIR)/audacity-VSTControlVST.Tpo -c -o effects/VST/audacity-VSTControlVST.o `test -f 'effects/VST/VSTControlVST.cpp' || echo '$(srcdir)/'`effects/VST/VSTControlVST.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) effects/VST/$(DEPDIR)/audacity-VSTControlVST.Tpo effects/VST/$(DEPDIR)/audacity-VSTControlVST.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='effects/VST/VSTControlVST.cpp' object='effects/VST/audacity-VSTControlVST.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o effects/VST/audacity-VSTControlVST.o `test -f 'effects/VST/VSTControlVST.cpp' || echo '$(srcdir)/'`effects/VST/VSTControlVST.cpp
effects/VST/audacity-VSTControlVST.obj: effects/VST/VSTControlVST.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT effects/VST/audacity-VSTControlVST.obj -MD -MP -MF effects/VST/$(DEPDIR)/audacity-VSTControlVST.Tpo -c -o effects/VST/audacity-VSTControlVST.obj `if test -f 'effects/VST/VSTControlVST.cpp'; then $(CYGPATH_W) 'effects/VST/VSTControlVST.cpp'; else $(CYGPATH_W) '$(srcdir)/effects/VST/VSTControlVST.cpp'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) effects/VST/$(DEPDIR)/audacity-VSTControlVST.Tpo effects/VST/$(DEPDIR)/audacity-VSTControlVST.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='effects/VST/VSTControlVST.cpp' object='effects/VST/audacity-VSTControlVST.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o effects/VST/audacity-VSTControlVST.obj `if test -f 'effects/VST/VSTControlVST.cpp'; then $(CYGPATH_W) 'effects/VST/VSTControlVST.cpp'; else $(CYGPATH_W) '$(srcdir)/effects/VST/VSTControlVST.cpp'; fi`
mostlyclean-libtool:
-rm -f *.lo

View File

@ -0,0 +1,73 @@
/**********************************************************************
Audacity: A Digital Audio Editor
VSTControlGTK.cpp
Leland Lucius
**********************************************************************/
#include <wx/dynlib.h>
#include <wx/sizer.h>
#include "VSTControl.h"
static int trappedErrorCode = 0;
static int X11TrapHandler(Display *, XErrorEvent *err)
{
return 0;
}
VSTControl::VSTControl()
: VSTControlBase()
{
mXdisp = 0;
mXwin = 0;
}
VSTControl::~VSTControl()
{
if (mXwin)
{
mLink->callDispatcher(effEditClose, 0, (intptr_t)mXdisp, (void *)mXwin, 0.0);
mXdisp = 0;
mXwin = 0;
}
}
bool VSTControl::Create(wxWindow *parent, VSTEffectLink *link)
{
if (!VSTControlBase::Create(parent, link))
{
return false;
}
VstRect *rect;
// Some effects like to have us get their rect before opening them.
mLink->callDispatcher(effEditGetRect, 0, 0, &rect, 0.0);
// Make sure the parent has a window
if (!gtk_widget_get_realized(GTK_WIDGET(m_wxwindow)))
{
gtk_widget_realize(GTK_WIDGET(m_wxwindow));
}
GdkWindow *gwin = gtk_widget_get_window(GTK_WIDGET(m_wxwindow));
mXdisp = GDK_WINDOW_XDISPLAY(gwin);
mXwin = GDK_WINDOW_XID(gwin);
mLink->callDispatcher(effEditOpen, 0, (intptr_t)mXdisp, (void *)mXwin, 0.0);
// Get the final bounds of the effect GUI
mLink->callDispatcher(effEditGetRect, 0, 0, &rect, 0.0);
// Add the effect host window to the layout
SetMinSize(wxSize(rect->right - rect->left, rect->bottom - rect->top));
// Must get the size again since SetPeer() could cause it to change
SetInitialSize(GetMinSize());
return true;
}

View File

@ -0,0 +1,37 @@
/**********************************************************************
Audacity: A Digital Audio Editor
VSTControlGTK.h
Leland Lucius
**********************************************************************/
#ifndef AUDACITY_VSTCONTROLGTK_H
#define AUDACITY_VSTCONTROLGTK_H
// Must include after ours since we have a lot of name collisions
#define Region XRegion // Conflicts with Audacity's Region structure
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#undef Region
#include <wx/control.h>
#include "aeffectx.h"
class VSTControl : public VSTControlBase
{
public:
VSTControl();
~VSTControl();
bool Create(wxWindow *parent, VSTEffectLink *link);
private:
Display *mXdisp;
Window mXwin;
};
#endif

View File

@ -2,7 +2,7 @@
Audacity: A Digital Audio Editor
VSTControlMSW.mm
VSTControlMSW.cpp
Leland Lucius
@ -13,10 +13,6 @@
#include "VSTControl.h"
BEGIN_EVENT_TABLE(VSTControl, VSTControlBase)
EVT_SIZE(VSTControl::OnSize)
END_EVENT_TABLE()
VSTControl::VSTControl()
: VSTControlBase()
{
@ -55,15 +51,3 @@ bool VSTControl::Create(wxWindow *parent, VSTEffectLink *link)
return true;
}
void VSTControl::OnSize(wxSizeEvent & evt)
{
evt.Skip();
wxSize sz = GetSize();
wxSize s1 = evt.GetSize();
evt.Skip();
return;
}

View File

@ -25,15 +25,8 @@ public:
bool Create(wxWindow *parent, VSTEffectLink *link);
void OnSize(wxSizeEvent & evt);
private:
HANDLE mHwnd;
wxSize mLastMin;
bool mSettingSize;
DECLARE_EVENT_TABLE();
};
#endif

View File

@ -39,15 +39,13 @@
#include <limits.h>
#include <stdio.h>
#if defined(__WXMAC__)
#include <dlfcn.h>
#elif defined(__WXMSW__)
#if defined(__WXMSW__)
#include <wx/dynlib.h>
#include <wx/msw/seh.h>
#include <shlwapi.h>
#pragma comment(lib, "shlwapi")
#else
// Includes for GTK are later since they cause conflicts with our class names
#include <dlfcn.h>
#endif
#include <wx/app.h>

View File

@ -317,13 +317,6 @@ private:
long mXMLVersion;
VstPatchChunkInfo mXMLInfo;
#if defined(__WXGTK__)
Display *mXdisp;
Window mXwin;
#endif
DECLARE_EVENT_TABLE();
friend class VSTEffectsModule;