From 72614f44ae8684318f04bf15b88cd09ac2a7eafb Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 12:23:19 +0000 Subject: [PATCH 01/10] Fix Qt discovery path logic for packaging --- deploy/macos/deploy-and-package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/macos/deploy-and-package.sh b/deploy/macos/deploy-and-package.sh index 367153f..c962537 100755 --- a/deploy/macos/deploy-and-package.sh +++ b/deploy/macos/deploy-and-package.sh @@ -70,7 +70,7 @@ for builddir in $builddirs; do grep -i 'found' | head -1 | sed 's/Found qmake: //' | - sed 's/qmake found: YES (//' | + sed 's/qmake[0-9]* found: YES (//' | sed 's,/bin/qmake.*,,') if [ -z "$qtdir" ]; then echo "Unable to discover QTDIR from build dir $builddir" From 97d39e56a1afbf899d22dc84c404dcaeb1b543e0 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 13:21:36 +0000 Subject: [PATCH 02/10] Looks like 5.15 uses this one as well, for some reason --- deploy/macos/copy-qt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/macos/copy-qt.sh b/deploy/macos/copy-qt.sh index 339d37f..61056cd 100755 --- a/deploy/macos/copy-qt.sh +++ b/deploy/macos/copy-qt.sh @@ -9,7 +9,7 @@ if [ -z "$app" ]; then exit 2 fi -frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtPdf QtWidgets QtPrintSupport QtDBus" +frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtTest QtPdf QtWidgets QtPrintSupport QtDBus" plugins="gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen macstyle" From f516d33a850d312111dc3fbc8ae4b8a26c862da6 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 13:38:08 +0000 Subject: [PATCH 03/10] Need this here too --- deploy/macos/paths.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/macos/paths.sh b/deploy/macos/paths.sh index 9618282..76f19bd 100755 --- a/deploy/macos/paths.sh +++ b/deploy/macos/paths.sh @@ -11,7 +11,7 @@ fi set -u -frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtPdf QtWidgets QtPrintSupport QtDBus" +frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtTest QtPdf QtWidgets QtPrintSupport QtDBus" echo echo "I expect you to have already copied these frameworks from the Qt installation to" From b8561b9924c093e7988587c6fcb77e91e0b359a3 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 13:54:00 +0000 Subject: [PATCH 04/10] Correct icon name --- deploy/macos/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/macos/Info.plist b/deploy/macos/Info.plist index e86cdb6..3fbac0d 100644 --- a/deploy/macos/Info.plist +++ b/deploy/macos/Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable @NAME@ CFBundleIconFile - sv-macicon.icns + piano-precision-macicon.icns CFBundleIdentifier @IDENT@ CFBundleShortVersionString From e208d469afb75d31dbb2f4d6f45b35a998f7f1ee Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 14:10:49 +0000 Subject: [PATCH 05/10] Further icon name updates --- deploy/win64/wxs.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/win64/wxs.in b/deploy/win64/wxs.in index 07dee22..1568719 100644 --- a/deploy/win64/wxs.in +++ b/deploy/win64/wxs.in @@ -91,8 +91,8 @@ + Name="piano-precision-winicon.ico" + Source="icons\piano-precision-winicon.ico"/> - + From 0e275df5d81469fa78bd178e7032ed6bf7fa50cc Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 14:39:46 +0000 Subject: [PATCH 06/10] Update WXS generation script to accommodate recordings that have different names from their scores --- deploy/win64/generate-wxs.ps1 | 4 ++-- deploy/win64/package.ps1 | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deploy/win64/generate-wxs.ps1 b/deploy/win64/generate-wxs.ps1 index 6a313c2..0220fbf 100644 --- a/deploy/win64/generate-wxs.ps1 +++ b/deploy/win64/generate-wxs.ps1 @@ -100,7 +100,7 @@ $recordingspec = $recordings.foreach{ $did = "RECD_$id" $cid = "RECC_$id" $fid = "RECF_$id" - $fname = $recording.Name + ".opus" + $fname = $(Get-ChildItem -Path "$recordingdir\$recording\*" -File -Include "*.opus")[0].Name $dxml.Directory.Id = $did $dxml.Directory.Name = $recording.Name $dxml.Directory.Component.Id = $cid @@ -109,7 +109,7 @@ $recordingspec = $recordings.foreach{ $dxml.Directory.Component.File.Name = $fname $fsrc = $recording.FullName + "\" + $fname if (!(Test-Path -Path $fsrc -PathType Leaf)) { - echo "ERROR: Recording $fsrc not found" + "ERROR: Recording $fsrc not found" | Out-Host exit 1 } $dxml.Directory.Component.File.Source = $fsrc diff --git a/deploy/win64/package.ps1 b/deploy/win64/package.ps1 index 2f6b64e..d0d2c62 100644 --- a/deploy/win64/package.ps1 +++ b/deploy/win64/package.ps1 @@ -26,7 +26,10 @@ if (! (Test-Path -Path $wixdir -PathType Container)) { exit 2 } -& "deploy\win64\generate-wxs.ps1" +if (! (& "deploy\win64\generate-wxs.ps1")) { + "ERROR: WiX file generation failed" + exit 2 +} $name = "Christopher Cannam" From 9dd6fa5bf1453a4f91b38ab00429bfa2d29d3e6a Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 14:52:22 +0000 Subject: [PATCH 07/10] Fix regex for ID generation for files with parens in their names --- deploy/win64/generate-wxs.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/win64/generate-wxs.ps1 b/deploy/win64/generate-wxs.ps1 index 0220fbf..0a6b333 100644 --- a/deploy/win64/generate-wxs.ps1 +++ b/deploy/win64/generate-wxs.ps1 @@ -56,12 +56,12 @@ $scorespec = $scores.foreach{ $score = $_ if (!($score.Name -match $suppress_re)) { $score.Name | Out-Host - $id = $score.Name -Replace "[ .,-]", "" + $id = $score.Name -Replace "[ .,()-]", "" $files = Get-ChildItem -path "$scoredir\$score\*" -File -Include "$score*" $xfrags = $files.foreach{ $file = $_ $fxml = [xml] '' - $fxml.File.Id = $file.Name -Replace "[ .,-]","" + $fxml.File.Id = $file.Name -Replace "[ .,()-]","" $fxml.File.Name = $file.Name $fxml.File.Source = $file.FullName $fxml.OuterXml @@ -96,7 +96,7 @@ $recordingspec = $recordings.foreach{ "@ - $id = $recording.Name -Replace "[ .,-]", "" + $id = $recording.Name -Replace "[ .,()-]", "" $did = "RECD_$id" $cid = "RECC_$id" $fid = "RECF_$id" From f06f961229c5f4b55b4a163cb359a59545f4991e Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 21 Dec 2023 17:07:15 +0000 Subject: [PATCH 08/10] The user score directory is not necessarily where the score lives - use ScoreFinder --- main/MainWindow.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/main/MainWindow.cpp b/main/MainWindow.cpp index b13ec0f..48b60d3 100644 --- a/main/MainWindow.cpp +++ b/main/MainWindow.cpp @@ -2427,15 +2427,23 @@ MainWindow::chooseScore() // Added by YJ Oct 5, 2021 m_score = Score(); // Creating score structure - string scorePath = ScoreFinder::getUserScoreDirectory() + "/" + scoreName.toStdString() + "/" + scoreName.toStdString(); - bool success = m_score.initialize(scorePath + ".solo"); - if (success) success = m_score.readTempo(scorePath + ".tempo"); - if (success) success = m_score.readMeter(scorePath + ".meter"); - if (success) m_score.calculateTicks(); - if (!success) { - SVCERR<<"ERROR: In MainWindow::chooseScore, failed to create score structure"< Date: Thu, 21 Dec 2023 17:35:05 +0000 Subject: [PATCH 10/10] Be careful not to notify the user of new Sonic Visualiser releases! --- main/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/MainWindow.cpp b/main/MainWindow.cpp index 48b60d3..e800d1b 100644 --- a/main/MainWindow.cpp +++ b/main/MainWindow.cpp @@ -499,7 +499,7 @@ MainWindow::MainWindow(AudioMode audioMode, MIDIMode midiMode, bool withOSCSuppo SVDEBUG << "MainWindow: Creating version tester" << endl; m_versionTester = new VersionTester - ("sonicvisualiser.org", "latest-version.txt", SV_VERSION); + ("sonicvisualiser.org", "latest-pp-version.txt", SV_VERSION); connect(m_versionTester, SIGNAL(newerVersionAvailable(QString)), this, SLOT(newerVersionAvailable(QString))); } else {