Mercurial > hg > tony
changeset 448:ea8743f3b549
merge
author | matthiasm |
---|---|
date | Tue, 31 Mar 2015 18:00:41 +0100 |
parents | 9b816a3dbacb (current diff) abd0dea16584 (diff) |
children | 652c03af0a0a |
files | |
diffstat | 4 files changed, 185 insertions(+), 132 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Tue Mar 31 18:00:18 2015 +0100 +++ b/.hgsubstate Tue Mar 31 18:00:41 2015 +0100 @@ -2,6 +2,6 @@ d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay 1629209f5bf21fc926bb6abd5ab786e78c5d7677 pyin 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds -c48bc6ddfe1762b63f1ea29475d59518fc13b281 svapp +da520a68595a983bd206c01463549858e3389286 svapp 24c48323c662a3631ba004f4701a328cbf753893 svcore fcbfc7fad1f2bb3af17de67d546ecff16dbdeef4 svgui
--- a/deploy/win32/tony.wxs Tue Mar 31 18:00:18 2015 +0100 +++ b/deploy/win32/tony.wxs Tue Mar 31 18:00:41 2015 +0100 @@ -28,7 +28,61 @@ <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder" Name="PFiles"> - <Directory Id="VampPlugins" Name="Vamp Plugins"> + <Directory Id="APPLICATIONFOLDER" Name="Tony"> + + <Component + Id="MainExecutable" + Guid="B0DA872A-E8B9-4C41-B0B0-7702A9EBBD51"> + + <File + Id="T" + Name="Tony.exe" + DiskId="1" + Source="release\Tony.exe" + KeyPath="yes"> + + <Shortcut + Id="TStartEntry" + Directory="ProgramMenuDir" + Name="Tony" + Icon="winicon.ico" + IconIndex="0" + WorkingDirectory="INSTALLDIR" + Advertise="yes"/> + + <Shortcut + Id="TDesktop" + Directory="DesktopFolder" + Name="Tony" + Icon="winicon.ico" + IconIndex="0" + WorkingDirectory="INSTALLDIR" + Advertise="yes"/> + </File> + + <File + Id="CHANGELOG" + Name="CHANGELOG.txt" + DiskId="1" + Source="CHANGELOG"/> + <File + Id="COPYING" + Name="COPYING.txt" + DiskId="1" + Source="COPYING"/> + <File + Id="README" + Name="README.txt" + DiskId="1" + Source="README"/> + + <File + Id="winicon.ico" + Name="tony-winicon.ico" + DiskId="1" + Source="icons/tony-winicon.ico"/> + </Component> + <Component Id="pYin" Guid="5C3B7285-B652-4FE5-8A1D-AC92376F8AD5"> @@ -57,137 +111,86 @@ DiskId="1" Source="chp\win32-build\release\chp.dll"/> </Component> + + <Component + Id="Qt5" + Guid="7DCE15D9-DB56-4ECC-A324-A9B74E30B872"> + <File + Id="QtCore" + Name="Qt5Core.dll" + DiskId="1" + Source="release\Qt5Core.dll" + KeyPath="yes"/> + <File + Id="QtGui" + Name="Qt5Gui.dll" + DiskId="1" + Source="release\Qt5Gui.dll"/> + <File + Id="QtNetwork" + Name="Qt5Network.dll" + DiskId="1" + Source="release\Qt5Network.dll"/> + <File + Id="QtWidgets" + Name="Qt5Widgets.dll" + DiskId="1" + Source="release\Qt5Widgets.dll"/> + <File + Id="QtXml" + Name="Qt5Xml.dll" + DiskId="1" + Source="release\Qt5Xml.dll"/> + <File + Id="icudt52" + Name="icudt52.dll" + DiskId="1" + Source="release\icudt52.dll"/> + <File + Id="icuin52" + Name="icuin52.dll" + DiskId="1" + Source="release\icuin52.dll"/> + <File + Id="icuuc52" + Name="icuuc52.dll" + DiskId="1" + Source="release\icuuc52.dll"/> + <File + Id="libgcc" + Name="libgcc_s_dw2-1.dll" + DiskId="1" + Source="release\libgcc_s_dw2-1.dll"/> + <File + Id="libstdcplusplus" + Name="libstdc++-6.dll" + DiskId="1" + Source="release\libstdc++-6.dll"/> + <File + Id="libwinpthread" + Name="libwinpthread-1.dll" + DiskId="1" + Source="release\libwinpthread-1.dll"/> + </Component> + + <Directory Id="Platforms" Name="platforms"> + <Component + Id="Qt5PlatformPlugins" + Guid="F3AAECAE-3B5E-4BA7-8F17-D20F608BE43A"> + <File + Id="qminimal" + Name="qminimal.dll" + DiskId="1" + Source="release\qminimal.dll"/> + <File + Id="qwindows" + Name="qwindows.dll" + DiskId="1" + Source="release\qwindows.dll"/> + </Component> + </Directory> </Directory> - - <Directory Id="APPLICATIONFOLDER" Name="Tony"> - - <Component - Id="MainExecutable" - Guid="B0DA872A-E8B9-4C41-B0B0-7702A9EBBD51"> - - <File - Id="T" - Name="Tony.exe" - DiskId="1" - Source="release\Tony.exe" - KeyPath="yes"> - - <Shortcut - Id="TStartEntry" - Directory="ProgramMenuDir" - Name="Tony" - Icon="winicon.ico" - IconIndex="0" - WorkingDirectory="INSTALLDIR" - Advertise="yes"/> - - <Shortcut - Id="TDesktop" - Directory="DesktopFolder" - Name="Tony" - Icon="winicon.ico" - IconIndex="0" - WorkingDirectory="INSTALLDIR" - Advertise="yes"/> - </File> - - <File - Id="COPYING" - Name="COPYING" - DiskId="1" - Source="COPYING"/> - <File - Id="README" - Name="README" - DiskId="1" - Source="README"/> - - <File - Id="winicon.ico" - Name="tony-winicon.ico" - DiskId="1" - Source="icons/tony-winicon.ico"/> - </Component> - - <Component - Id="Qt5" - Guid="7DCE15D9-DB56-4ECC-A324-A9B74E30B872"> - <File - Id="QtCore" - Name="Qt5Core.dll" - DiskId="1" - Source="release\Qt5Core.dll" - KeyPath="yes"/> - <File - Id="QtGui" - Name="Qt5Gui.dll" - DiskId="1" - Source="release\Qt5Gui.dll"/> - <File - Id="QtNetwork" - Name="Qt5Network.dll" - DiskId="1" - Source="release\Qt5Network.dll"/> - <File - Id="QtWidgets" - Name="Qt5Widgets.dll" - DiskId="1" - Source="release\Qt5Widgets.dll"/> - <File - Id="QtXml" - Name="Qt5Xml.dll" - DiskId="1" - Source="release\Qt5Xml.dll"/> - <File - Id="icudt52" - Name="icudt52.dll" - DiskId="1" - Source="release\icudt52.dll"/> - <File - Id="icuin52" - Name="icuin52.dll" - DiskId="1" - Source="release\icuin52.dll"/> - <File - Id="icuuc52" - Name="icuuc52.dll" - DiskId="1" - Source="release\icuuc52.dll"/> - <File - Id="libgcc" - Name="libgcc_s_dw2-1.dll" - DiskId="1" - Source="release\libgcc_s_dw2-1.dll"/> - <File - Id="libstdcplusplus" - Name="libstdc++-6.dll" - DiskId="1" - Source="release\libstdc++-6.dll"/> - <File - Id="libwinpthread" - Name="libwinpthread-1.dll" - DiskId="1" - Source="release\libwinpthread-1.dll"/> - </Component> - - <Directory Id="Platforms" Name="platforms"> - <Component - Id="Qt5PlatformPlugins" - Guid="F3AAECAE-3B5E-4BA7-8F17-D20F608BE43A"> - <File - Id="qminimal" - Name="qminimal.dll" - DiskId="1" - Source="release\qminimal.dll"/> - <File - Id="qwindows" - Name="qwindows.dll" - DiskId="1" - Source="release\qwindows.dll"/> - </Component> - </Directory> - </Directory> - + </Directory> <Directory Id="ProgramMenuFolder" Name="Programs">
--- a/src/Analyser.cpp Tue Mar 31 18:00:18 2015 +0100 +++ b/src/Analyser.cpp Tue Mar 31 18:00:41 2015 +0100 @@ -77,6 +77,8 @@ m_paneStack = paneStack; m_pane = pane; + if (!m_fileModel) return "Internal error: Analyser::newFileLoaded() called with no model present"; + connect(doc, SIGNAL(layerAboutToBeDeleted(Layer *)), this, SLOT(layerAboutToBeDeleted(Layer *))); @@ -95,6 +97,8 @@ if (!m_pane) return "Internal error: Analyser::analyseExistingFile() called with no pane present"; + if (!m_fileModel) return "Internal error: Analyser::analyseExistingFile() called with no model present"; + if (m_layers[PitchTrack]) { m_document->removeLayerFromView(m_pane, m_layers[PitchTrack]); m_layers[PitchTrack] = 0; @@ -225,6 +229,8 @@ QString Analyser::addVisualisations() { + if (!m_fileModel) return "Internal error: Analyser::addVisualisations() called with no model present"; + // A spectrogram, off by default. Must go at the back because it's // opaque
--- a/src/main.cpp Tue Mar 31 18:00:18 2015 +0100 +++ b/src/main.cpp Tue Mar 31 18:00:41 2015 +0100 @@ -40,6 +40,8 @@ #include <iostream> #include <signal.h> +#include <vamp-hostsdk/PluginHostAdapter.h> + static QMutex cleanupMutex; static bool cleanedUp = false; @@ -114,6 +116,46 @@ } } }; + +static void +setupTonyVampPath() +{ +#ifdef Q_OS_WIN32 + QChar sep(';'); + QString programFiles = getenv("ProgramFiles"); + if (programFiles == "") programFiles = "C:\\Program Files"; + QString defaultTonyPath(programFiles + "\\Tony"); +#else + QChar sep(':'); +#ifdef Q_OS_MAC + QString defaultTonyPath; +#else + QString defaultTonyPath("/usr/local/lib/tony:/usr/lib/tony"); +#endif +#endif + + QString tonyVampPath = getenv("TONY_VAMP_PATH"); + if (tonyVampPath == "") { + tonyVampPath = defaultTonyPath; + } + if (tonyVampPath == "") { + // just use the default Vamp path or VAMP_PATH environment + // variable -- leave it up to the Vamp SDK + return; + } + + std::vector<std::string> vampPathList = + Vamp::PluginHostAdapter::getPluginPath(); + + QStringList qVampPathList; + for (auto p: vampPathList) qVampPathList.push_back(p.c_str()); + QString vampPath = qVampPathList.join(sep); + QString newPath = tonyVampPath + sep + vampPath; + + cerr << "Setting VAMP_PATH to " << newPath << " for Tony plugins" << endl; + + setenv("VAMP_PATH", newPath.toLocal8Bit().data(), 1); +} int main(int argc, char **argv) @@ -127,6 +169,8 @@ } #endif + setupTonyVampPath(); + TonyApplication application(argc, argv); QStringList args = application.arguments();