diff --git a/.github/workflows/build-test-installer-release.yml b/.github/workflows/build-test-installer-release.yml index be990ae06..8f2ae3079 100644 --- a/.github/workflows/build-test-installer-release.yml +++ b/.github/workflows/build-test-installer-release.yml @@ -84,7 +84,7 @@ jobs: with: name: saymore-test-results if-no-files-found: warn - path: output/${{ env.Configuration }}/TestResults.xml + path: output/x64/${{ env.Configuration }}/net48/TestResults.xml - name: Copy CHM file into DistFiles run: copy "docs\SayMore.chm" "DistFiles\SayMore.chm" diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 000000000..8eb8d2268 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,6 @@ + + + latest + false + + \ No newline at end of file diff --git a/DistFiles/.guidsForInstaller.xml b/DistFiles/.guidsForInstaller.xml index f7f56d1a8..3070e86b5 100644 --- a/DistFiles/.guidsForInstaller.xml +++ b/DistFiles/.guidsForInstaller.xml @@ -45,4 +45,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DistFiles/aboutBox.htm b/DistFiles/aboutBox.htm index c117622da..718f90340 100644 --- a/DistFiles/aboutBox.htm +++ b/DistFiles/aboutBox.htm @@ -34,8 +34,7 @@

Thanks

Payap University Linguistics Institute, Chiang Mai, Thailand

Steven Bird (University of Melbourne)

-

Tim Gaved, Cambell Prince, Michael Cochran, Gary Simons, John Wickberg, Will Reiman (SIL International)

-

Sarah Moeller (Graduate Institute of Applied Linguistics)

+

Sarah Moeller, Tim Gaved, Cambell Prince, Michael Cochran, Gary Simons, John Wickberg, Will Reiman (SIL Global)

JetBrains for Resharper, which helps keep our C# code clean and agile, and TeamCity, which we use for continuous integration and builds.

Microsoft for Github, the repository where our open-source code is hosted for free, and also for free use of Visual Studio Community, our preferred IDE.

Atlassian, for a free open-source license for Jira, where we keep bug reports.

@@ -50,11 +49,11 @@

Open Source Components/Libraries

FFprobe © 2007-2022 The FFmpeg Developers (GPL)

This product uses MediaInfo library, Copyright (c) 2002-2023 MediaArea.net SARL. (BSD-style license)

MPlayer © 2000-2022 MPlayer Team (GPL) (SayMore does not "link" to MediaPlayer)

-

Moq Copyright (c) 2007. Clarius Consulting, Manas Technology Solutions (license

+

Moq Copyright © 2007. Clarius Consulting, Manas Technology Solutions (license

NAudio Mark Heath (Copyright unknown) (MS-PL)

-

NUnit Copyright © 2019 Charlie Poole, Rob Prouse (https://www.nuget.org/packages/NUnit/3.12.0/license">Nunit License)

+

NUnit Copyright © 2023 Charlie Poole, Rob Prouse (https://www.nuget.org/packages/NUnit/3.14.0/license">Nunit License)

Newtonsoft.Json Copyright © 2008 James Newton-King (MIT)

-

Palaso Library © SIL International (MIT)

-

L10N Sharp Localization library: © SIL International (MIT)

+

Palaso Library © SIL Global (MIT)

+

L10N Sharp Localization library: © SIL Global (MIT)

diff --git a/DistFiles/releaseNotes.md b/DistFiles/releaseNotes.md index 09f5abe2e..f396df431 100644 --- a/DistFiles/releaseNotes.md +++ b/DistFiles/releaseNotes.md @@ -1,4 +1,6 @@ ## _VERSION_ (_DATE_) +* SayMore is now a 64-bit application, so it will make better use of available memory and avoid out-of-memory errors. +* SayMore now targets .Net Framework 4.8, which is the latest version supported on Windows 7 through Windows 11. It will not run on Windows versions earlier than 7. ## 3.7.4 (30 July 2025) * Small improvement in the logic to guess at the correct initial writing system for translations when exporting FLEx Interlinear files (flextext). diff --git a/README.md b/README.md index 283efb074..beba68280 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SayMore� +# SayMore™ SayMore provides an intuitive and enjoyable way to manage language documentation tasks. @@ -18,6 +18,10 @@ Please see [Tips for Testing Palaso Software](https://docs.google.com/document/d 1. Ensure you have Nuget 1. Building the solution should automatically pull down the nuget dependencies. +### Local Installer Build +The process of building a SayMore installer involves some build steps that are defined in build/SayMore.proj, so it must be built using MSBuild. This involves multiple steps, so the easiest way is to run build/TestInstallerBuild.bat. This batch file should be maintained to keep it in sync with any changes to the overall build process. Note that during the Installer build, a few source files are updated (stamped with the version number and/or date), so these should be reverted after a test build of the installer. Committing and pushing these changes will break the ability of the CI build to correctly set the version number! + + ### Bug Reports Reports can be entered in https://jira.sil.org/projects/SP/issues. They can be entered there via email by sending to saymore_issues@sil.org. @@ -32,4 +36,4 @@ To release a new version, just tag a commit on the main branch e.g. v3.7.5 This will trigger Github Actions to produce a Release with the signed installer attached # Release TODO -Implement the "publish" process on TeamCity, which builds SayMore, makes and installer, rsyncs it to the distribution server, and writes out a little bit of html which the [SayMore download page](https://software.sil.org/saymore/download/) then displays to the user. It also creates a build artifact that enables the SayMore program to check to see whether a newer version is available. \ No newline at end of file +Implement the "publish" process in GHA (currently working only on TeamCity), which builds SayMore, makes and installer, rsyncs it to the distribution server, and writes out a little bit of html which the [SayMore download page](https://software.sil.org/saymore/download/) then displays to the user. It also creates a build artifact that enables the SayMore program to check to see whether a newer version is available. \ No newline at end of file diff --git a/SayMore.sln b/SayMore.sln index 7a538d8ce..e992019e1 100644 --- a/SayMore.sln +++ b/SayMore.sln @@ -1,6 +1,7 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36623.8 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SayMore", "src\SayMore\SayMore.csproj", "{A61F5E06-CACD-40FA-BBAD-8744212AF14E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SayMoreTests", "src\SayMoreTests\SayMoreTests.csproj", "{B534A7B9-FF0D-46C7-A845-C00845B223BC}" @@ -14,60 +15,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{ABC132 EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - DebugMono|Any CPU = DebugMono|Any CPU - DebugMono|Mixed Platforms = DebugMono|Mixed Platforms - DebugMono|x86 = DebugMono|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - ReleaseMono|Any CPU = ReleaseMono|Any CPU - ReleaseMono|Mixed Platforms = ReleaseMono|Mixed Platforms - ReleaseMono|x86 = ReleaseMono|x86 + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|x86.ActiveCfg = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.DebugMono|Any CPU.ActiveCfg = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.DebugMono|Any CPU.Build.0 = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.DebugMono|Mixed Platforms.ActiveCfg = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.DebugMono|Mixed Platforms.Build.0 = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.DebugMono|x86.ActiveCfg = Debug|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|Any CPU.Build.0 = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|x86.ActiveCfg = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.ReleaseMono|Any CPU.ActiveCfg = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.ReleaseMono|Any CPU.Build.0 = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.ReleaseMono|Mixed Platforms.ActiveCfg = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.ReleaseMono|Mixed Platforms.Build.0 = Release|Any CPU - {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.ReleaseMono|x86.ActiveCfg = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|x86.ActiveCfg = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.DebugMono|Any CPU.ActiveCfg = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.DebugMono|Any CPU.Build.0 = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.DebugMono|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.DebugMono|Mixed Platforms.Build.0 = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.DebugMono|x86.ActiveCfg = Debug|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|Any CPU.Build.0 = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|x86.ActiveCfg = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.ReleaseMono|Any CPU.ActiveCfg = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.ReleaseMono|Any CPU.Build.0 = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.ReleaseMono|Mixed Platforms.ActiveCfg = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.ReleaseMono|Mixed Platforms.Build.0 = Release|Any CPU - {B534A7B9-FF0D-46C7-A845-C00845B223BC}.ReleaseMono|x86.ActiveCfg = Release|Any CPU + {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|x64.ActiveCfg = Debug|x64 + {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Debug|x64.Build.0 = Debug|x64 + {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|x64.ActiveCfg = Release|x64 + {A61F5E06-CACD-40FA-BBAD-8744212AF14E}.Release|x64.Build.0 = Release|x64 + {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|x64.ActiveCfg = Debug|x64 + {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Debug|x64.Build.0 = Debug|x64 + {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|x64.ActiveCfg = Release|x64 + {B534A7B9-FF0D-46C7-A845-C00845B223BC}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/SayMore.proj b/build/SayMore.proj index d2616f906..41f09ed1d 100644 --- a/build/SayMore.proj +++ b/build/SayMore.proj @@ -1,66 +1,86 @@ - $(MSBuildProjectDirectory)\.. - $(GITHUB_WORKSPACE) - $(RootDir)/packages/SIL.BuildTasks.3.1.1/tools/SIL.BuildTasks.dll - $(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll - $(RootDir)/packages/SIL.ReleaseTasks.3.1.1/build/SIL.ReleaseTasks.props - Release - true - false + false + true + $(MSBuildProjectDirectory)\.. + $(GITHUB_WORKSPACE) + + 1.0.0 + Release + $(RootDir)\output\ + $(OutputRootDir)installer\ + $(OutputRootDir)x64\$(Configuration)\net48\ + $(USERPROFILE)\.nuget\packages\ + $(RootDir)/packages/ + 16.2.0 + $(NuGetPackageRoot)SIL.libpalaso.l10ns/$(PalasoL10nsVersion)/ + $(NuGetPackageRoot)SIL.ReleaseTasks/3.1.1/build/SIL.ReleaseTasks.props + $(LocalPackagesRoot)SIL.BuildTasks/ + $(BuildTasksVersionFolder)tools/SIL.BuildTasks.dll + $(BuildTasksVersionFolder)build/SIL.BuildTasks.props - + - - - - + + + + + + + + + + + + + %(BuildTasksDir.Identity) + $(BuildTasksVersionFolder)tools/SIL.BuildTasks.dll + $(BuildTasksVersionFolder)build/SIL.BuildTasks.props + + + + + + + + + - - - - + + + - - - - - - + + + 1.0.0 + - - - - 1.0.0.0 - - - + - - - - - - - - + + + + + + - + - + - - - - - + + + + + - - + @@ -71,130 +91,132 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - - + + - - - - - - - - - - - - - - - $(RootDir)\output\installer\SayMoreInstaller.msi - $(RootDir)\src\Installer\bin\$(Configuration)\SayMoreInstaller.msi - $(RootDir)\src\Installer\bin\$(Configuration)\en-us\SayMoreInstaller.msi - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + $(InstallerOutputDir)SayMoreInstaller.msi + $(RootDir)\src\Installer\bin\$(Configuration)\SayMoreInstaller.msi + $(RootDir)\src\Installer\bin\$(Configuration)\en-us\SayMoreInstaller.msi + $(InstallerOutputDir)SayMoreInstaller.$(Version).msi + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + diff --git a/build/TestInstallerBuild.bat b/build/TestInstallerBuild.bat index dcaf59e44..e98a2facd 100644 --- a/build/TestInstallerBuild.bat +++ b/build/TestInstallerBuild.bat @@ -4,9 +4,10 @@ copy "..\..\SaymoreDocumentation\SayMore.chm" ..\DistFiles REM IF EXIST "\Program Files (x86)\MSBuild\14.0\Bin" SET msbuildpath="\Program Files (x86)\MSBuild\14.0\Bin\MSbuild" REM ELSE IF EXIST "\Program Files (x86)\MSBuild\12.0\Bin" SET msbuildpath="\Program Files (x86)\MSBuild\12.0\Bin\MSbuild" REM ELSE SET msbuildpath=MSbuild -REM %msbuildpath% /target:installer /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:teamcity_dotnet_nunitlauncher_msbuild_task="notthere" /property:BUILD_NUMBER="*.*.6.789" /property:Configuration=Release /property:Minor="1" -msbuild /target:Build /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:BUILD_NUMBER="*.*.6.789" /property:Minor="1" -msbuild /target:ConvertReleaseNotesToHtml;installer /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:BUILD_NUMBER="*.*.6.789" /property:Minor="1" +REM %msbuildpath% /target:installer /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:teamcity_dotnet_nunitlauncher_msbuild_task="notthere" /property:BUILD_NUMBER="*.*.6.789" /property:Configuration=Release" +dotnet restore ..\SayMore.sln +msbuild /target:Build /verbosity:detailed +msbuild /target:ConvertReleaseNotesToHtml;installer /property:Version=3.8.2000 /verbosity:detailed popd GOTO pauseforusertoseeoutput diff --git a/lib/MediaInfo.dll b/lib/MediaInfo.dll deleted file mode 100644 index a4a349957..000000000 Binary files a/lib/MediaInfo.dll and /dev/null differ diff --git a/src/Installer/Installer.sln b/src/Installer/Installer.sln new file mode 100644 index 000000000..cd49caf81 --- /dev/null +++ b/src/Installer/Installer.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36623.8 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "Installer.wixproj", "{BE2C52BC-6B66-4F8B-8B50-2CBA58A8027D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE2C52BC-6B66-4F8B-8B50-2CBA58A8027D}.Debug|x64.ActiveCfg = Debug|x64 + {BE2C52BC-6B66-4F8B-8B50-2CBA58A8027D}.Debug|x64.Build.0 = Debug|x64 + {BE2C52BC-6B66-4F8B-8B50-2CBA58A8027D}.Release|x64.ActiveCfg = Release|x64 + {BE2C52BC-6B66-4F8B-8B50-2CBA58A8027D}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5CCC64B8-A4EA-48AF-B4AA-9870668B32C8} + EndGlobalSection +EndGlobal diff --git a/src/Installer/Installer.wixproj b/src/Installer/Installer.wixproj index 8e2da7908..2c7381bac 100644 --- a/src/Installer/Installer.wixproj +++ b/src/Installer/Installer.wixproj @@ -1,6 +1,8 @@ - + - Debug + Release + ..\..\output\installer\ + output\wixobj\$(Configuration) 3.0 {be2c52bc-6b66-4f8b-8b50-2cba58a8027d} 2.0 @@ -9,8 +11,6 @@ false - ..\..\output\installer\ - output\wixobj\debug Debug False @@ -53,13 +53,6 @@ False False - - bin\Release\ - obj\Release\ - - - ..\..\output\installer\ - diff --git a/src/Installer/Installer.wxs b/src/Installer/Installer.wxs index b3f368702..01071197b 100644 --- a/src/Installer/Installer.wxs +++ b/src/Installer/Installer.wxs @@ -3,22 +3,22 @@ - - - + + - - + - + @@ -115,19 +115,18 @@ are trying to support, you're better off using non-advertised shortcuts. "--> - + - - - - + + + @@ -135,8 +134,12 @@ are trying to support, you're better off using non-advertised shortcuts. "--> - + @@ -145,486 +148,216 @@ are trying to support, you're better off using non-advertised shortcuts. "--> - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -647,12 +380,9 @@ are trying to support, you're better off using non-advertised shortcuts. "--> - - - @@ -668,132 +398,33 @@ are trying to support, you're better off using non-advertised shortcuts. "--> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/SayMore/MediaUtils/MediaFileInfo.cs b/src/SayMore/MediaUtils/MediaFileInfo.cs index d7c0f1a5d..b1c57508c 100644 --- a/src/SayMore/MediaUtils/MediaFileInfo.cs +++ b/src/SayMore/MediaUtils/MediaFileInfo.cs @@ -199,7 +199,7 @@ public static MediaFileInfo GetInfo(string mediaFile, out Exception error) /// The following was some debugging code written to evaluate the differences between the /// information gleaned using MediaInfo.DLL vs. FFprobe. I decided to keep it around in /// case at some point I get some more insight into the pros and/or cons of one or both - /// utlities and want to re-evaluate. + /// utilities and want to re-evaluate. /// private void CompareMediaInfoResults(MediaFileInfo mediaInfo, MediaFileInfo mediaInfoFromDll) { diff --git a/src/SayMore/MediaUtils/MediaInfoDLL.cs b/src/SayMore/MediaUtils/MediaInfoDLL.cs deleted file mode 100644 index cd8ed6ae4..000000000 --- a/src/SayMore/MediaUtils/MediaInfoDLL.cs +++ /dev/null @@ -1,294 +0,0 @@ -// MediaInfoDLL - All info about media files, for DLL -// Copyright (C) 2002-2009 Jerome Martinez, Zen@MediaArea.net -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// MediaInfoDLL - All info about media files, for DLL -// Copyright (C) 2002-2009 Jerome Martinez, Zen@MediaArea.net -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// -// Microsoft Visual C# wrapper for MediaInfo Library -// See MediaInfo.h for help -// -// To make it working, you must put MediaInfo.Dll -// in the executable folder -// -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -using System; -using System.Runtime.InteropServices; - -#pragma warning disable 1591 // Disable XML documentation warnings - -namespace MediaInfoLib -{ - public enum StreamKind - { - General, - Video, - Audio, - Text, - Chapters, - Image, - Menu, - } - - public enum InfoKind - { - Name, - Text, - Measure, - Options, - NameText, - MeasureText, - Info, - HowTo - } - - public enum InfoOptions - { - ShowInInform, - Support, - ShowInSupported, - TypeOfValue - } - - public enum InfoFileOptions - { - FileOption_Nothing = 0x00, - FileOption_NoRecursive = 0x01, - FileOption_CloseAll = 0x02, - FileOption_Max = 0x04 - }; - - - public class MediaInfo - { - //Import of DLL functions. DO NOT USE until you know what you do (MediaInfo DLL do NOT use CoTaskMemAlloc to allocate memory) - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_New(); - [DllImport("MediaInfo.dll")] - private static extern void MediaInfo_Delete(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Open(IntPtr Handle, [MarshalAs(UnmanagedType.LPWStr)] string FileName); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Open(IntPtr Handle, IntPtr FileName); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Open_Buffer_Init(IntPtr Handle, Int64 File_Size, Int64 File_Offset); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Open(IntPtr Handle, Int64 File_Size, Int64 File_Offset); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Open_Buffer_Continue(IntPtr Handle, IntPtr Buffer, IntPtr Buffer_Size); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Open_Buffer_Continue(IntPtr Handle, Int64 File_Size, byte[] Buffer, IntPtr Buffer_Size); - [DllImport("MediaInfo.dll")] - private static extern Int64 MediaInfo_Open_Buffer_Continue_GoTo_Get(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern Int64 MediaInfoA_Open_Buffer_Continue_GoTo_Get(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Open_Buffer_Finalize(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Open_Buffer_Finalize(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern void MediaInfo_Close(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Inform(IntPtr Handle, IntPtr Reserved); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Inform(IntPtr Handle, IntPtr Reserved); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_GetI(IntPtr Handle, IntPtr StreamKind, IntPtr StreamNumber, IntPtr Parameter, IntPtr KindOfInfo); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_GetI(IntPtr Handle, IntPtr StreamKind, IntPtr StreamNumber, IntPtr Parameter, IntPtr KindOfInfo); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Get(IntPtr Handle, IntPtr StreamKind, IntPtr StreamNumber, [MarshalAs(UnmanagedType.LPWStr)] string Parameter, IntPtr KindOfInfo, IntPtr KindOfSearch); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Get(IntPtr Handle, IntPtr StreamKind, IntPtr StreamNumber, IntPtr Parameter, IntPtr KindOfInfo, IntPtr KindOfSearch); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Option(IntPtr Handle, [MarshalAs(UnmanagedType.LPWStr)] string Option, [MarshalAs(UnmanagedType.LPWStr)] string Value); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoA_Option(IntPtr Handle, IntPtr Option, IntPtr Value); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_State_Get(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfo_Count_Get(IntPtr Handle, IntPtr StreamKind, IntPtr StreamNumber); - - //MediaInfo class - public MediaInfo() - { - Handle = MediaInfo_New(); - if (Environment.OSVersion.ToString().IndexOf("Windows")==-1) - MustUseAnsi=true; - else - MustUseAnsi=false; - } - ~MediaInfo() { MediaInfo_Delete(Handle); } - public int Open(String FileName) - { - if (MustUseAnsi) - { - IntPtr FileName_Ptr = Marshal.StringToHGlobalAnsi(FileName); - int ToReturn = (int)MediaInfoA_Open(Handle, FileName_Ptr); - Marshal.FreeHGlobal(FileName_Ptr); - return ToReturn; - } - else - return (int)MediaInfo_Open(Handle, FileName); - } - public int Open_Buffer_Init(Int64 File_Size, Int64 File_Offset) - { - return (int)MediaInfo_Open_Buffer_Init(Handle, File_Size, File_Offset); - } - public int Open_Buffer_Continue(IntPtr Buffer, IntPtr Buffer_Size) - { - return (int)MediaInfo_Open_Buffer_Continue(Handle, Buffer, Buffer_Size); - } - public Int64 Open_Buffer_Continue_GoTo_Get() - { - return MediaInfo_Open_Buffer_Continue_GoTo_Get(Handle); - } - public int Open_Buffer_Finalize() - { - return (int)MediaInfo_Open_Buffer_Finalize(Handle); - } - public void Close() { MediaInfo_Close(Handle); } - public String Inform() - { - if (MustUseAnsi) - return Marshal.PtrToStringAnsi(MediaInfoA_Inform(Handle, (IntPtr)0)); - else - return Marshal.PtrToStringUni(MediaInfo_Inform(Handle, (IntPtr)0)); - } - public String Get(StreamKind StreamKind, int StreamNumber, String Parameter, InfoKind KindOfInfo, InfoKind KindOfSearch) - { - if (MustUseAnsi) - { - IntPtr Parameter_Ptr=Marshal.StringToHGlobalAnsi(Parameter); - String ToReturn=Marshal.PtrToStringAnsi(MediaInfoA_Get(Handle, (IntPtr)StreamKind, (IntPtr)StreamNumber, Parameter_Ptr, (IntPtr)KindOfInfo, (IntPtr)KindOfSearch)); - Marshal.FreeHGlobal(Parameter_Ptr); - return ToReturn; - } - else - return Marshal.PtrToStringUni(MediaInfo_Get(Handle, (IntPtr)StreamKind, (IntPtr)StreamNumber, Parameter, (IntPtr)KindOfInfo, (IntPtr)KindOfSearch)); - } - public String Get(StreamKind StreamKind, int StreamNumber, int Parameter, InfoKind KindOfInfo) - { - if (MustUseAnsi) - return Marshal.PtrToStringAnsi(MediaInfoA_GetI(Handle, (IntPtr)StreamKind, (IntPtr)StreamNumber, (IntPtr)Parameter, (IntPtr)KindOfInfo)); - else - return Marshal.PtrToStringUni(MediaInfo_GetI(Handle, (IntPtr)StreamKind, (IntPtr)StreamNumber, (IntPtr)Parameter, (IntPtr)KindOfInfo)); - } - public String Option(String Option, String Value) - { - if (MustUseAnsi) - { - IntPtr Option_Ptr=Marshal.StringToHGlobalAnsi(Option); - IntPtr Value_Ptr=Marshal.StringToHGlobalAnsi(Value); - String ToReturn=Marshal.PtrToStringAnsi(MediaInfoA_Option(Handle, Option_Ptr, Value_Ptr)); - Marshal.FreeHGlobal(Option_Ptr); - Marshal.FreeHGlobal(Value_Ptr); - return ToReturn; - } - else - return Marshal.PtrToStringUni(MediaInfo_Option(Handle, Option, Value)); - } - public int State_Get() { return (int)MediaInfo_State_Get(Handle); } - public int Count_Get(StreamKind StreamKind, int StreamNumber) { return (int)MediaInfo_Count_Get(Handle, (IntPtr)StreamKind, (IntPtr)StreamNumber); } - private IntPtr Handle; - private bool MustUseAnsi; - - //Default values, if you know how to set default values in C#, say me - public String Get(StreamKind StreamKind, int StreamNumber, String Parameter, InfoKind KindOfInfo) { return Get(StreamKind, StreamNumber, Parameter, KindOfInfo, InfoKind.Name); } - public String Get(StreamKind StreamKind, int StreamNumber, String Parameter) { return Get(StreamKind, StreamNumber, Parameter, InfoKind.Text, InfoKind.Name); } - public String Get(StreamKind StreamKind, int StreamNumber, int Parameter) { return Get(StreamKind, StreamNumber, Parameter, InfoKind.Text); } - public String Option(String Option_) { return Option(Option_, ""); } - public int Count_Get(StreamKind StreamKind) { return Count_Get(StreamKind, -1); } - } - - - - - - - - - - - - - - - - - - public class MediaInfoList - { - //Import of DLL functions. DO NOT USE until you know what you do (MediaInfo DLL do NOT use CoTaskMemAlloc to allocate memory) - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_New(); - [DllImport("MediaInfo.dll")] - private static extern void MediaInfoList_Delete(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_Open(IntPtr Handle, [MarshalAs(UnmanagedType.LPWStr)] string FileName, IntPtr Options); - [DllImport("MediaInfo.dll")] - private static extern void MediaInfoList_Close(IntPtr Handle, IntPtr FilePos); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_Inform(IntPtr Handle, IntPtr FilePos, IntPtr Reserved); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_GetI(IntPtr Handle, IntPtr FilePos, IntPtr StreamKind, IntPtr StreamNumber, IntPtr Parameter, IntPtr KindOfInfo); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_Get(IntPtr Handle, IntPtr FilePos, IntPtr StreamKind, IntPtr StreamNumber, [MarshalAs(UnmanagedType.LPWStr)] string Parameter, IntPtr KindOfInfo, IntPtr KindOfSearch); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_Option(IntPtr Handle, [MarshalAs(UnmanagedType.LPWStr)] string Option, [MarshalAs(UnmanagedType.LPWStr)] string Value); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_State_Get(IntPtr Handle); - [DllImport("MediaInfo.dll")] - private static extern IntPtr MediaInfoList_Count_Get(IntPtr Handle, IntPtr FilePos, IntPtr StreamKind, IntPtr StreamNumber); - - //MediaInfo class - public MediaInfoList() { Handle = MediaInfoList_New(); } - ~MediaInfoList() { MediaInfoList_Delete(Handle); } - public int Open(String FileName, InfoFileOptions Options) { return (int)MediaInfoList_Open(Handle, FileName, (IntPtr)Options); } - public void Close(int FilePos) { MediaInfoList_Close(Handle, (IntPtr)FilePos); } - public String Inform(int FilePos) { return Marshal.PtrToStringUni(MediaInfoList_Inform(Handle, (IntPtr)FilePos, (IntPtr)0)); } - public String Get(int FilePos, StreamKind StreamKind, int StreamNumber, String Parameter, InfoKind KindOfInfo, InfoKind KindOfSearch) { return Marshal.PtrToStringUni(MediaInfoList_Get(Handle, (IntPtr)FilePos, (IntPtr)StreamKind, (IntPtr)StreamNumber, Parameter, (IntPtr)KindOfInfo, (IntPtr)KindOfSearch)); } - public String Get(int FilePos, StreamKind StreamKind, int StreamNumber, int Parameter, InfoKind KindOfInfo) { return Marshal.PtrToStringUni(MediaInfoList_GetI(Handle, (IntPtr)FilePos, (IntPtr)StreamKind, (IntPtr)StreamNumber, (IntPtr)Parameter, (IntPtr)KindOfInfo)); } - public String Option(String Option, String Value) { return Marshal.PtrToStringUni(MediaInfoList_Option(Handle, Option, Value)); } - public int State_Get() { return (int)MediaInfoList_State_Get(Handle); } - public int Count_Get(int FilePos, StreamKind StreamKind, int StreamNumber) { return (int)MediaInfoList_Count_Get(Handle, (IntPtr)FilePos, (IntPtr)StreamKind, (IntPtr)StreamNumber); } - private IntPtr Handle; - - //Default values, if you know how to set default values in C#, say me - public void Open(String FileName) { Open(FileName, 0); } - public void Close() { Close(-1); } - public String Get(int FilePos, StreamKind StreamKind, int StreamNumber, String Parameter, InfoKind KindOfInfo) { return Get(FilePos, StreamKind, StreamNumber, Parameter, KindOfInfo, InfoKind.Name); } - public String Get(int FilePos, StreamKind StreamKind, int StreamNumber, String Parameter) { return Get(FilePos, StreamKind, StreamNumber, Parameter, InfoKind.Text, InfoKind.Name); } - public String Get(int FilePos, StreamKind StreamKind, int StreamNumber, int Parameter) { return Get(FilePos, StreamKind, StreamNumber, Parameter, InfoKind.Text); } - public String Option(String Option_) { return Option(Option_, ""); } - public int Count_Get(int FilePos, StreamKind StreamKind) { return Count_Get(FilePos, StreamKind, -1); } - } - -} //NameSpace diff --git a/src/SayMore/Model/Files/FileType.cs b/src/SayMore/Model/Files/FileType.cs index 3a53e7cd7..ecb2b0a09 100644 --- a/src/SayMore/Model/Files/FileType.cs +++ b/src/SayMore/Model/Files/FileType.cs @@ -40,9 +40,8 @@ public class FileType public string Name { get; protected set; } public virtual string RootElementName => null; - public virtual string TypeDescription { get { return null; } } - public virtual Image SmallIcon { get { return null; } } - public virtual string FileSize { get { return null; } } + public virtual Image SmallIcon => null; + public virtual string FileSize => null; /// ------------------------------------------------------------------------------------ public static FileType Create(string name, string matchForEndOfFileName) @@ -70,16 +69,10 @@ public virtual bool IsMatch(string path) } /// ------------------------------------------------------------------------------------ - public virtual string FieldsGridSettingsName - { - get { return "UnknownFileFieldsGrid"; } - } + public virtual string FieldsGridSettingsName => "UnknownFileFieldsGrid"; /// ------------------------------------------------------------------------------------ - public virtual bool CanBeConverted - { - get { return false; } - } + public virtual bool CanBeConverted => false; /// ------------------------------------------------------------------------------------ public virtual string GetShowInFileExplorerMenuText() @@ -99,9 +92,8 @@ public virtual string GetOpenInAssociatedProgramMenuText() public virtual IEnumerable GetEditorProviders(int hashCode, ComponentFile file) { List editorList; - IEnumerable editors; - if (_editors.TryGetValue(hashCode, out editors)) + if (_editors.TryGetValue(hashCode, out var editors)) { editorList = editors.ToList(); foreach (var editor in editorList) @@ -133,28 +125,16 @@ public virtual IEnumerable GetCommands(string filePath) } /// ------------------------------------------------------------------------------------ - public virtual bool IsForUnknownFileTypes - { - get { return false; } - } + public virtual bool IsForUnknownFileTypes => false; /// ------------------------------------------------------------------------------------ - public virtual bool IsAudioOrVideo - { - get { return IsAudio || IsVideo; } - } + public virtual bool IsAudioOrVideo => IsAudio || IsVideo; /// ------------------------------------------------------------------------------------ - public virtual bool IsAudio - { - get { return false; } - } + public virtual bool IsAudio => false; /// ------------------------------------------------------------------------------------ - public virtual bool IsVideo - { - get { return false; } - } + public virtual bool IsVideo => false; /// ------------------------------------------------------------------------------------ public virtual IEnumerable FactoryFields @@ -382,13 +362,20 @@ public class SessionFileType : FileType public override string RootElementName => Name; - /// ------------------------------------------------------------------------------------ /// - /// + /// Initializes a new instance of the class with the specified + /// factories for creating session-related editors. /// - /// This is to get us around a circular - /// dependency error in autofac. - /// ------------------------------------------------------------------------------------ + /// + /// A lazy factory for creating instances of . This helps + /// resolve circular dependency issues in Autofac. + /// + /// + /// A lazy factory for creating instances of . + /// + /// + /// A lazy factory for creating instances of . + /// public SessionFileType(Lazy> sessionBasicEditorFactoryLazy, Lazy> statusAndStagesEditorFactoryLazy, Lazy> sessionContributorEditorFactoryLazy) @@ -1026,8 +1013,8 @@ public override IEnumerable FactoryFields { get { - foreach (var field in base.FactoryFields) - yield return field; + foreach (var fieldDef in base.FactoryFields) + yield return fieldDef; // Add video only fields yield return new FieldDefinition("Video_Bit_Rate") { ReadOnly = true }; @@ -1073,17 +1060,14 @@ public class ImageFileType : FileType public ImageFileType( Func basicFieldGridEditorFactoryLazy, Func contributorsEditorFactoryLazy) - : base("Image", p => SIL.IO.FileUtils.ImageFileExtensions.Cast().Any(ext => p.ToLower().EndsWith(ext.ToLower()))) + : base("Image", p => FileUtils.ImageFileExtensions.Cast().Any(ext => p.ToLower().EndsWith(ext.ToLower()))) { _basicFieldGridEditorFactoryLazy = basicFieldGridEditorFactoryLazy; _contributorsEditorFactoryLazy = contributorsEditorFactoryLazy; } /// ------------------------------------------------------------------------------------ - public override string FieldsGridSettingsName - { - get { return "ImageFileFieldsGrid"; } - } + public override string FieldsGridSettingsName => "ImageFileFieldsGrid"; /// ------------------------------------------------------------------------------------ protected override IEnumerable GetNewSetOfEditorProviders(ComponentFile file) @@ -1095,10 +1079,7 @@ protected override IEnumerable GetNewSetOfEditorProviders(Compo } /// ------------------------------------------------------------------------------------ - public override Image SmallIcon - { - get { return ResourceImageCache.ImageFileImage; } - } + public override Image SmallIcon => ResourceImageCache.ImageFileImage; } #endregion diff --git a/src/SayMore/Model/ProjectElement.cs b/src/SayMore/Model/ProjectElement.cs index 0e3d138de..36451e67c 100644 --- a/src/SayMore/Model/ProjectElement.cs +++ b/src/SayMore/Model/ProjectElement.cs @@ -47,9 +47,9 @@ public abstract class ProjectElement : IDisposable protected internal string ParentFolderPath { get; set; } protected abstract string ExtensionWithoutPeriod { get; } - private readonly object _componentFilesSync = new object(); + private readonly object _componentFilesSync = new(); protected HashSet _componentFiles; - private readonly object _fileWatcherSync = new object(); + private readonly object _fileWatcherSync = new(); FileSystemWatcher _watcher; /// ------------------------------------------------------------------------------------ @@ -131,17 +131,15 @@ public virtual ComponentFile[] GetComponentFiles() lock (_componentFilesSync) { if (MetaDataFile == null) // We are disposed - return new ComponentFile[0]; + return []; // Return a copy of the list to guard against changes // on another thread (i.e., from the FileSystemWatcher) if (_componentFiles != null) return _componentFiles.ToArray(); - _componentFiles = new HashSet(); - // This is the actual person or session data - _componentFiles.Add(MetaDataFile); + _componentFiles = [MetaDataFile]; // These are the other files we find in the folder var otherFiles = from f in Directory.GetFiles(FolderPath, "*.*") @@ -151,7 +149,7 @@ orderby f foreach (var filename in otherFiles) { - ComponentFile newComponentFile = null; + ComponentFile newComponentFile; try { newComponentFile = _componentFileFactory(this, filename); @@ -204,8 +202,8 @@ orderby f { file = _componentFiles.FirstOrDefault(f => f.PathToAnnotatedFile == e.FullPath); } - if (file != null) - file.Refresh(); + + file?.Refresh(); }; } @@ -251,8 +249,8 @@ public IEnumerable ExportFields get { yield return new FieldInstance("id", Id); - foreach (var field in MetaDataFile.MetaDataFieldValues) - yield return field; + foreach (var fieldInst in MetaDataFile.MetaDataFieldValues) + yield return fieldInst; } } @@ -297,7 +295,7 @@ public override string ToString() /// ------------------------------------------------------------------------------------ public bool AddComponentFile(string fileToAdd) { - return AddComponentFiles(new[] { fileToAdd }); + return AddComponentFiles([fileToAdd]); } /// ------------------------------------------------------------------------------------ @@ -518,7 +516,10 @@ private bool CanPerformRename() Directory.Move(FolderPath + "Renaming", FolderPath); return true; } - catch { } + catch + { + // Keep trying until timeout + } } return false; @@ -580,7 +581,7 @@ public virtual IEnumerable GetCompletedStages( return new List(0); } - //TODO: eventually, we need to differentiate between a file sitting there that + // TODO: eventually, we need to differentiate between a file sitting there that // is in progress, and one that is in fact marked as completed. For now, just // being there gets you the gold star. diff --git a/src/SayMore/Properties/Settings.Designer.cs b/src/SayMore/Properties/Settings.Designer.cs index 1f0d2491e..c0bd115a6 100644 --- a/src/SayMore/Properties/Settings.Designer.cs +++ b/src/SayMore/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace SayMore.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")] public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/src/SayMore/SayMore.csproj b/src/SayMore/SayMore.csproj index 6143bb07f..10bcf972f 100644 --- a/src/SayMore/SayMore.csproj +++ b/src/SayMore/SayMore.csproj @@ -1,1376 +1,79 @@ - - - - - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {A61F5E06-CACD-40FA-BBAD-8744212AF14E} WinExe - Properties - SayMore + net48 + true + true SayMore - v4.6.2 - 512 + SayMore + x64 + x64 + false SayMore.ico - - - 3.5 - - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - false - + false + true + true + latest + ..\..\output\ - + + + DEBUG;TRACE + false true full - false - ..\..\output\Debug\ - DEBUG;TRACE - prompt - 4 - x86 - AllRules.ruleset - 0114 - false - - pdbonly - true - ..\..\output\Release\ + + TRACE - prompt - 4 - x86 - AllRules.ruleset - false - - - true + true + pdbonly + + - - ..\..\packages\AtkSharp-signed.3.22.24.37\lib\netstandard2.0\AtkSharp.dll - - - ..\..\packages\Autofac.5.2.0\lib\net461\Autofac.dll - - - ..\..\packages\CairoSharp-signed.3.22.24.37\lib\netstandard2.0\CairoSharp.dll - - - ..\..\packages\Coroutine.NET.1.4.0\lib\netstandard2.0\Coroutine.NET.dll - - - ..\..\packages\SIL.DesktopAnalytics.6.0.2\lib\net462\DesktopAnalytics.dll - - - ..\..\packages\DialogAdapters.Gtk2.0.1.11\lib\net461\DialogAdapters.dll - - - ..\..\packages\Enchant.Net.1.4.2\lib\net461\Enchant.Net.dll - - - ..\..\packages\FFMpegCore.5.1.0\lib\netstandard2.0\FFMpegCore.dll - - - ..\..\packages\GdkSharp-signed.3.22.24.37\lib\netstandard2.0\GdkSharp.dll - - - ..\..\packages\GioSharp-signed.3.22.24.37\lib\netstandard2.0\GioSharp.dll - - - ..\..\packages\GLibSharp-signed.3.22.24.37\lib\netstandard2.0\GLibSharp.dll - - - ..\..\packages\GtkSharp-signed.3.22.24.37\lib\netstandard2.0\GtkSharp.dll - - - ..\..\packages\ibusdotnet.2.0.3\lib\net461\ibusdotnet.dll - - - ..\..\packages\icu.net.3.0.1\lib\net451\icu.net.dll - - - ..\..\packages\Instances.3.0.1\lib\netstandard2.0\Instances.dll - - - ..\..\packages\KeymanLegacyBundle.1.0.0\lib\Keyman10Interop.dll - True - - - ..\..\packages\KeymanLegacyBundle.1.0.0\lib\Keyman7Interop.dll - True - - - ..\..\packages\KeymanLegacyBundle.1.0.0\lib\KeymanLink.dll - - - ..\..\packages\L10NSharp.8.0.0\lib\net461\L10NSharp.dll - - - ..\..\packages\Markdig.Signed.0.37.0\lib\net462\Markdig.Signed.dll - - - ..\..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll - - - - - - - ..\..\packages\Microsoft.DotNet.PlatformAbstractions.3.1.6\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\..\packages\Microsoft.Extensions.DependencyModel.6.0.2\lib\net461\Microsoft.Extensions.DependencyModel.dll - - - - ..\..\packages\mixpanel-csharp.6.0.0\lib\net461\Mixpanel.dll - - - ..\..\packages\Mono.Unix.7.1.0-final.1.21458.1\lib\net45\Mono.Unix.dll - - - ..\..\packages\NAudio.1.10.0\lib\net35\NAudio.dll - - - ..\..\packages\NDesk.DBus.0.15.0\lib\NDesk.DBus.dll - - - ..\..\packages\NetSparkle.Net40.1.2.0\lib\net40\NetSparkle.Net40.dll - - - ..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\PangoSharp-signed.3.22.24.37\lib\netstandard2.0\PangoSharp.dll - - - - - ..\..\packages\Segment.Analytics.CSharp.2.4.2\lib\netstandard2.0\Segment.Analytics.CSharp.dll - - - ..\..\packages\Serialization.NET.1.4.1\lib\netstandard2.0\Serialization.NET.dll - - - ..\..\packages\SIL.Archiving.16.1.0\lib\net462\SIL.Archiving.dll - - - ..\..\packages\SIL.Core.16.1.0\lib\net462\SIL.Core.dll - - - ..\..\packages\SIL.Core.Desktop.16.1.0\lib\net462\SIL.Core.Desktop.dll - - - ..\..\packages\SIL.Media.16.1.0\lib\net462\SIL.Media.dll - - - ..\..\packages\SIL.Windows.Forms.16.1.0\lib\net462\SIL.Windows.Forms.dll - - - ..\..\packages\SIL.Windows.Forms.Archiving.16.1.0\lib\net462\SIL.Windows.Forms.Archiving.dll - - - ..\..\packages\SIL.Windows.Forms.Keyboarding.16.1.0\lib\net462\SIL.Windows.Forms.Keyboarding.dll - - - ..\..\packages\SIL.Windows.Forms.WritingSystems.16.1.0\lib\net462\SIL.Windows.Forms.WritingSystems.dll - - - ..\..\packages\SIL.WritingSystems.16.1.0\lib\net462\SIL.WritingSystems.dll - - - ..\..\packages\Sovran.NET.1.4.0\lib\netstandard2.0\Sovran.NET.dll - - - ..\..\packages\Spart.1.0.0\lib\net461\Spart.dll - - - - ..\..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll - - - - - ..\..\packages\System.Configuration.ConfigurationManager.6.0.2\lib\net461\System.Configuration.ConfigurationManager.dll - - - 3.5 - - - - ..\..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - - ..\..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll - - - ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - True - True - - - - ..\..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll - True - True - - - ..\..\packages\System.IO.FileSystem.AccessControl.5.0.0\lib\net461\System.IO.FileSystem.AccessControl.dll - - - ..\..\packages\System.IO.Pipelines.9.0.5\lib\net462\System.IO.Pipelines.dll - - - - ..\..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll - - - - ..\..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll - True - True - - - - ..\..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll - - - ..\..\packages\System.Resources.Extensions.6.0.0\lib\net461\System.Resources.Extensions.dll - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - True - - - - - ..\..\packages\System.Security.AccessControl.6.0.1\lib\net461\System.Security.AccessControl.dll - - - ..\..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll - True - True - - - ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - True - True - - - ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - True - True - - - ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll - True - True - - - ..\..\packages\System.Security.Permissions.6.0.1\lib\net461\System.Security.Permissions.dll - - - ..\..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - - - - ..\..\packages\System.Text.Encodings.Web.9.0.5\lib\net462\System.Text.Encodings.Web.dll - - - ..\..\packages\System.Text.Json.9.0.5\lib\net462\System.Text.Json.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll - - - - ..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll - - - - - 3.5 - - - 3.5 - - - - - - - - ..\..\packages\TagLibSharp.2.3.0\lib\net462\TagLibSharp.dll - - + + + + + + + + + + + + + + + + + + + + + + + All + + + + + + + + + + + + + + - - - Code - - - - - - - - - - - - - - - - - - UserControl - - - - UserControl - - - UserControl - - - UserControl - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resources.resx - - - Code - - - - - - - - - - - - - - - - - - - - - UserControl - - - ConvertToStandardAudioEditor.cs - - - UserControl - - - OralAnnotationEditor.cs - - - UserControl - - - StartAnnotatingEditor.cs - - - UserControl - - - TextAnnotationEditor.cs - - - Form - - - ExportToFieldWorksInterlinearDlg.cs - - - UserControl - - - OralAnnotationWaveViewer.cs - - - Form - - - CarefulSpeechRecorderDlg.cs - - - Form - - - ManualSegmenterDlg.cs - - - - Form - - - OralAnnotationRecorderDlgBase.cs - - - - Form - - - OralTranslationRecorderDlg.cs - - - Form - - - SegmenterDlgBase.cs - - - - - - - - - Component - - - - - - - - - UserControl - - - AudioComponentEditor.cs - - - UserControl - - - AudioVideoPlayer.cs - - - Component - - - UserControl - - - BasicFieldGridEditor.cs - - - Component - - - UserControl - - - BrowserEditor.cs - - - Component - - - UserControl - - - ContributorsEditor.cs - - - UserControl - - - MissingMediaFileEditor.cs - - - - UserControl - - - Component - - - - UserControl - - - ImageViewer.cs - - - - UserControl - - - MediaComponentEditor.cs - - - Form - - - MediaFileMoreInfoDlg.cs - - - UserControl - - - NotesEditor.cs - - - UserControl - - - PersonBasicEditor.cs - - - UserControl - - - DiagnosticsFileInfoControl.cs - - - UserControl - - - PersonContributionEditor.cs - - - UserControl - - - SessionBasicEditor.cs - - - Component - - - UserControl - - - StatusAndStagesEditor.cs - - - UserControl - - - VideoComponentEditor.cs - - - Form - - - ConvertMediaDlg.cs - - - - UserControl - - - ComponentFileGrid.cs - - - Form - - - ComponentFileRenamingDialog.cs - - - Component - - - Form - - - StagesControlToolTip.cs - - - Component - - - UserControl - - - PersonListScreen.cs - - - UserControl - - - ElementListScreen.cs - - - Component - - - - Form - - - FileLoadErrorsReportDlg.cs - - - - - Component - - - - Form - - - LanguageChooser.cs - - - UserControl - - - UserControl - - - UserControl - - - ProjectAccessScreen.cs - - - UserControl - - - ProjectDocsScreen.cs - - - UserControl - - - ProjectMetadataScreen.cs - - - UserControl - - - ProjectScreen.cs - - - Form - - - SessionRecorderDlg.cs - - - - Form - - - LoadingDlg.cs - - - Component - - - Component - - - Component - - - Form - - - UserControl - - - PopupControl.cs - - - UserControl - - - MultiValueDropDownBox.cs - - - UserControl - - - MultiValuePickerPopup.cs - - - Component - - - UserControl - - - ProgressControl.cs - - - Component - - - UserControl - - - UserControl - - - VolumePopup.cs - - - Component - - - UserControl - - - MediaPlayer.cs - - - - Form - - - MPlayerDebuggingOutputWindow.cs - - - - Component - - - Form - - - ProgressDlg.cs - - - - Form - - - DeleteMessageBox.cs - - - UserControl - - - - - - Form - - - NewSessionsFromFilesDlg.cs - - - UserControl - - - NewSessionsFromFilesDlgFolderNotFoundMsg.cs - - - UserControl - - - ProgressScreen.cs - - - UserControl - - - StatisticsView.cs - - - - Form - - - NewProjectDlg.cs - - - - - - UserControl - - - SessionsListScreen.cs - - - - Form - - - ProjectWindow.cs - - - - Form - - - WelcomeDialog.cs - - - - UserControl - - - ListPanel.cs - - - Component - - - - - Form - - - ShortFileNameWarningDlg.cs - - - - - - - ConvertToStandardAudioEditor.cs - - - OralAnnotationEditor.cs - - - StartAnnotatingEditor.cs - - - TextAnnotationEditor.cs - - - ExportToFieldWorksInterlinearDlg.cs - - - OralAnnotationWaveViewer.cs - - - CarefulSpeechRecorderDlg.cs - - - ManualSegmenterDlg.cs - - - OralAnnotationRecorderDlgBase.cs - - - OralTranslationRecorderDlg.cs - - - SegmenterDlgBase.cs - - - TextAnnotationEditorGrid.cs - - - AudioComponentEditor.cs - - - AudioVideoPlayer.cs - - - BrowserEditor.cs - - - ContributorsEditor.cs - - - MissingMediaFileEditor.cs - Designer - - - ImageViewer.cs - - - MediaFileMoreInfoDlg.cs - - - NotesEditor.cs - - - PersonBasicEditor.cs - - - DiagnosticsFileInfoControl.cs - - - PersonContributionEditor.cs - - - SessionBasicEditor.cs - - - StatusAndStagesEditor.cs - - - VideoComponentEditor.cs - - - ConvertMediaDlg.cs - - - ComponentFileGrid.cs - - - ComponentFileRenamingDialog.cs - - - PersonListScreen.cs - - - ElementListScreen.cs - - - FileLoadErrorsReportDlg.cs - - - LanguageChooser.cs - - - ProjectAccessScreen.cs - - - ProjectDocsScreen.cs - - - ProjectMetadataScreen.cs - - - ProjectScreen.cs - Designer - - - SessionRecorderDlg.cs - - - LoadingDlg.cs - - - ProgressControl.cs - - - MPlayerDebuggingOutputWindow.cs - - - NewSessionsFromFilesDlg.cs - - - NewSessionsFromFilesDlgFolderNotFoundMsg.cs - - - ProgressDlg.cs - - - NewProjectDlg.cs - Designer - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - SessionsListScreen.cs - - - ProjectWindow.cs - - - WelcomeDialog.cs - - - ListPanel.cs - Designer - - - ShortFileNameWarningDlg.cs - - - SplashScreenForm.cs - - - - - PublicSettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - Form - - - ShowHtmlDialog.cs - - - Form - - - UILanguageDlg.cs - - - Component - - - Component - - - - Form - - - SplashScreenForm.cs - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - BasicFieldGridEditor.cs - - - EditorBase.cs - - - MediaComponentEditor.cs - - - StagesControlToolTip.cs - - - PopupControl.cs - - - DeleteMessageBox.cs - - - MultiValueDropDownBox.cs - - - MultiValuePickerPopup.cs - - - VolumePopup.cs - - - MediaPlayer.cs - Designer - - - ProgressScreen.cs - Designer - - - StatisticsView.cs - Designer - - - ShowHtmlDialog.cs - - - UILanguageDlg.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - - - - - copy "$(SolutionDir)\lib\MediaInfo.dll" "$(OutDir)" - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + diff --git a/src/SayMore/UI/ComponentEditors/ImageViewerViewModel.cs b/src/SayMore/UI/ComponentEditors/ImageViewerViewModel.cs index 14173d96a..6b15d3305 100644 --- a/src/SayMore/UI/ComponentEditors/ImageViewerViewModel.cs +++ b/src/SayMore/UI/ComponentEditors/ImageViewerViewModel.cs @@ -14,8 +14,8 @@ public class ImageViewerViewModel : IDisposable private Image _image; public Image Image { - get { return _image; } - private set { _image = value; } + get => _image; + private set => _image = value; } public int[] ClickZoomPercentages { get; private set; } diff --git a/src/SayMore/app.config b/src/SayMore/app.config index 26ebb71ad..8d4bcfe77 100644 --- a/src/SayMore/app.config +++ b/src/SayMore/app.config @@ -329,125 +329,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/SayMore/packages.config b/src/SayMore/packages.config deleted file mode 100644 index 17552a6f1..000000000 --- a/src/SayMore/packages.config +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/SayMoreTests/MediaUtils/Audio/AudioFileHelperTests.cs b/src/SayMoreTests/MediaUtils/Audio/AudioFileHelperTests.cs index 3ce192757..3cc5cc307 100644 --- a/src/SayMoreTests/MediaUtils/Audio/AudioFileHelperTests.cs +++ b/src/SayMoreTests/MediaUtils/Audio/AudioFileHelperTests.cs @@ -2,9 +2,8 @@ using System.IO; using NUnit.Framework; using SayMore.Media.Audio; -using SayMoreTests.Model.Files; -namespace SayMoreTests.Media.Audio +namespace SayMoreTests.MediaUtils.Audio { [TestFixture] public class AudioFileHelperTests diff --git a/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs b/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs index 4a9b4b3b3..5f066a713 100644 --- a/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs +++ b/src/SayMoreTests/MediaUtils/MPlayer/MediaPlayerViewModelTests.cs @@ -2,25 +2,26 @@ using System.IO; using System.Text; using System.Threading; +using L10NSharp; using NUnit.Framework; -using SIL.TestUtilities; using SayMore.Media.MPlayer; -using SayMoreTests.Model.Files; using SIL.Reflection; +using SIL.TestUtilities; -namespace SayMoreTests.Media.MPlayer +namespace SayMoreTests.MediaUtils.MPlayer { /// ---------------------------------------------------------------------------------------- [TestFixture] public class MediaPlayerViewModelTests { - MediaPlayerViewModel _model; - MemoryStream _stream; + private MediaPlayerViewModel _model; + private MemoryStream _stream; /// ------------------------------------------------------------------------------------ [SetUp] public void Setup() { + LocalizationManager.StrictInitializationMode = false; _model = new MediaPlayerViewModel(); _stream = new MemoryStream(); _model.SetStdInForTest(new StreamWriter(_stream)); diff --git a/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs b/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs index 2098ee0ef..de5719ee2 100644 --- a/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs +++ b/src/SayMoreTests/MediaUtils/MediaFileInfoTests.cs @@ -1,13 +1,12 @@ using System; -using System.Linq; using System.Drawing; using System.IO; using System.Reflection; using NUnit.Framework; -using SIL.TestUtilities; using SayMore.Media; +using SIL.TestUtilities; -namespace SayMoreTests.Model.Files +namespace SayMoreTests.MediaUtils { [TestFixture] public class MediaFileInfoTests @@ -70,7 +69,7 @@ private static string GetMediaResourceFile(Stream stream, string mediaFileExtens File.Move(path, mediaFilePath); var buffer = new byte[stream.Length]; - stream.Read(buffer, 0, buffer.Length); + _ = stream.Read(buffer, 0, buffer.Length); stream.Close(); stream.Dispose(); @@ -87,9 +86,9 @@ private static string GetMediaResourceFile(Stream stream, string mediaFileExtens public static string CreateRecording(string folder) { var buf = new byte[Resources.shortSound.Length]; - Resources.shortSound.Read(buf, 0, buf.Length); + _ = Resources.shortSound.Read(buf, 0, buf.Length); string destination = folder; - string wavPath = Path.Combine(destination, Directory.GetFiles(destination).Count() + ".wav"); + string wavPath = Path.Combine(destination, Directory.GetFiles(destination).Length + ".wav"); var f = File.Create(wavPath); f.Write(buf, 0, buf.Length); f.Close(); @@ -105,8 +104,7 @@ public void Duration_Audio_Correct() { var recording = CreateRecording(folder.Path); var info = MediaFileInfo.GetInfo(recording); - // Depending on which utilit is used to get this information, it can very a - // little. + // Depending on which utility is used to get this information, it can vary a little. Assert.That(info.Duration.TotalMilliseconds, Is.GreaterThanOrEqualTo(1446d).And.LessThanOrEqualTo(1449d)); } diff --git a/src/SayMoreTests/SayMoreTests.csproj b/src/SayMoreTests/SayMoreTests.csproj index 515dd03d9..2799d699c 100644 --- a/src/SayMoreTests/SayMoreTests.csproj +++ b/src/SayMoreTests/SayMoreTests.csproj @@ -1,467 +1,117 @@ - - - - - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {B534A7B9-FF0D-46C7-A845-C00845B223BC} - Library - Properties - SayMoreTests + net48 SayMoreTests - v4.6.2 - 512 - - - 3.5 - - - - ..\..\ - true - - + SayMoreTests + Library + 7.3 + x64 + x64 + ..\..\output\ + false + true + true false + true - + + + DEBUG;TRACE true full - false - ..\..\output\Debug\ - DEBUG;TRACE - prompt - 4 - x86 AllRules.ruleset - false + false - + + + TRACE pdbonly true - ..\..\output\Release\ - TRACE - prompt - 4 AllRules.ruleset - x86 - false - - - true + - - ..\..\packages\AtkSharp-signed.3.22.24.37\lib\netstandard2.0\AtkSharp.dll - - - ..\..\packages\Autofac.5.2.0\lib\net461\Autofac.dll - - - ..\..\packages\CairoSharp-signed.3.22.24.37\lib\netstandard2.0\CairoSharp.dll - - - ..\..\packages\Castle.Core.5.2.1\lib\net462\Castle.Core.dll - - - False - ..\..\packages\DesktopAnalytics.1.1.2\lib\net40\DesktopAnalytics.dll - - - ..\..\packages\DialogAdapters.Gtk2.0.1.11\lib\net461\DialogAdapters.dll - - - ..\..\packages\Enchant.Net.1.4.2\lib\net461\Enchant.Net.dll - - - ..\..\packages\FFMpegCore.5.1.0\lib\netstandard2.0\FFMpegCore.dll - - - ..\..\packages\GdkSharp-signed.3.22.24.37\lib\netstandard2.0\GdkSharp.dll - - - ..\..\packages\GioSharp-signed.3.22.24.37\lib\netstandard2.0\GioSharp.dll - - - ..\..\packages\GLibSharp-signed.3.22.24.37\lib\netstandard2.0\GLibSharp.dll - - - ..\..\packages\GtkSharp-signed.3.22.24.37\lib\netstandard2.0\GtkSharp.dll - - - ..\..\packages\ibusdotnet.2.0.3\lib\net461\ibusdotnet.dll - - - ..\..\packages\icu.net.3.0.1\lib\net451\icu.net.dll - - - ..\..\packages\Instances.3.0.1\lib\netstandard2.0\Instances.dll - - - ..\..\packages\KeymanLegacyBundle.1.0.0\lib\Keyman10Interop.dll - True - - - ..\..\packages\KeymanLegacyBundle.1.0.0\lib\Keyman7Interop.dll - True - - - ..\..\packages\KeymanLegacyBundle.1.0.0\lib\KeymanLink.dll - - - ..\..\packages\L10NSharp.8.0.0\lib\net461\L10NSharp.dll - - - ..\..\packages\Markdig.Signed.0.37.0\lib\net462\Markdig.Signed.dll - - - ..\..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll - - - - ..\..\packages\Microsoft.DotNet.PlatformAbstractions.3.1.6\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll - - - ..\..\packages\Microsoft.Extensions.DependencyModel.6.0.2\lib\net461\Microsoft.Extensions.DependencyModel.dll - - - - ..\..\packages\Mono.Unix.7.1.0-final.1.21458.1\lib\net45\Mono.Unix.dll - - - ..\..\packages\Moq.4.20.72\lib\net462\Moq.dll - - - ..\..\packages\NAudio.1.10.0\lib\net35\NAudio.dll - - - ..\..\packages\NDesk.DBus.0.15.0\lib\NDesk.DBus.dll - - - ..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\NUnit.3.14.0\lib\net45\nunit.framework.dll - - - False - ..\..\lib\common\NUnitForms.dll - - - ..\..\packages\PangoSharp-signed.3.22.24.37\lib\netstandard2.0\PangoSharp.dll - - - ..\..\packages\SIL.Archiving.16.1.0\lib\net462\SIL.Archiving.dll - - - ..\..\packages\SIL.Core.16.1.0\lib\net462\SIL.Core.dll - - - ..\..\packages\SIL.Core.Desktop.16.1.0\lib\net462\SIL.Core.Desktop.dll - - - ..\..\packages\SIL.Media.16.1.0\lib\net462\SIL.Media.dll - - - ..\..\packages\SIL.TestUtilities.16.1.0\lib\net462\SIL.TestUtilities.dll - - - ..\..\packages\SIL.Windows.Forms.16.1.0\lib\net462\SIL.Windows.Forms.dll - - - ..\..\packages\SIL.Windows.Forms.Keyboarding.16.1.0\lib\net462\SIL.Windows.Forms.Keyboarding.dll - - - ..\..\packages\SIL.WritingSystems.16.1.0\lib\net462\SIL.WritingSystems.dll - - - ..\..\packages\Spart.1.0.0\lib\net461\Spart.dll - - - - ..\..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll - - - - - ..\..\packages\System.Configuration.ConfigurationManager.6.0.2\lib\net461\System.Configuration.ConfigurationManager.dll - - - 3.5 - - - - ..\..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - - ..\..\packages\System.Diagnostics.EventLog.6.0.0\lib\net461\System.Diagnostics.EventLog.dll - - - - ..\..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll - - - ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - True - True - - - - ..\..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll - True - True - - - ..\..\packages\System.IO.FileSystem.AccessControl.5.0.0\lib\net461\System.IO.FileSystem.AccessControl.dll - - - ..\..\packages\System.IO.Pipelines.9.0.5\lib\net462\System.IO.Pipelines.dll - - - - ..\..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll - - - - ..\..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll - True - True - - - - ..\..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll - - - ..\..\packages\System.Resources.Extensions.6.0.0\lib\net461\System.Resources.Extensions.dll - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - True - - - - ..\..\packages\System.Security.AccessControl.6.0.1\lib\net461\System.Security.AccessControl.dll - - - ..\..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll - True - True - - - ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - True - True - - - ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - True - True - - - ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll - True - True - - - ..\..\packages\System.Security.Permissions.6.0.1\lib\net461\System.Security.Permissions.dll - - - ..\..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - - - - ..\..\packages\System.Text.Encodings.Web.9.0.5\lib\net462\System.Text.Encodings.Web.dll - - - ..\..\packages\System.Text.Json.9.0.5\lib\net462\System.Text.Json.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll - - - - ..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll - - - - - 3.5 - - - 3.5 - - - - - ..\..\packages\TagLibSharp.2.3.0\lib\net462\TagLibSharp.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resources.resx - True - True - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - {A61F5E06-CACD-40FA-BBAD-8744212AF14E} - SayMore - - - - + + + + + + + - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + - + + - - Designer - + + ..\..\lib\common\NUnitForms.dll + - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + diff --git a/src/SayMoreTests/Transcription/Model/AnnotationFileHelperTests.cs b/src/SayMoreTests/Transcription/Model/AnnotationFileHelperTests.cs index d6c1ae393..09737515f 100644 --- a/src/SayMoreTests/Transcription/Model/AnnotationFileHelperTests.cs +++ b/src/SayMoreTests/Transcription/Model/AnnotationFileHelperTests.cs @@ -5,11 +5,12 @@ using System.Linq; using System.Reflection; using System.Xml.Linq; +using L10NSharp; using NUnit.Framework; using SIL.Reporting; using SIL.TestUtilities; using SayMore.Transcription.Model; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Transcription.Model { @@ -35,6 +36,7 @@ public class AnnotationFileHelperTests [SetUp] public void Setup() { + LocalizationManager.StrictInitializationMode = false; ErrorReport.IsOkToInteractWithUser = false; _folder = new TemporaryFolder("AnnotationFileHelperTests"); _basicEafFileName = _folder.Combine("basic.eaf"); diff --git a/src/SayMoreTests/Transcription/Model/FLExTextExporterTests.cs b/src/SayMoreTests/Transcription/Model/FLExTextExporterTests.cs index 79525742c..d8e625b0b 100644 --- a/src/SayMoreTests/Transcription/Model/FLExTextExporterTests.cs +++ b/src/SayMoreTests/Transcription/Model/FLExTextExporterTests.cs @@ -6,7 +6,7 @@ using SIL.TestUtilities; using SayMore.Transcription.Model; using SayMore.Transcription.Model.Exporters; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Transcription.Model { diff --git a/src/SayMoreTests/Transcription/Model/TierCollectionTests.cs b/src/SayMoreTests/Transcription/Model/TierCollectionTests.cs index 19410f2c6..912ec74ec 100644 --- a/src/SayMoreTests/Transcription/Model/TierCollectionTests.cs +++ b/src/SayMoreTests/Transcription/Model/TierCollectionTests.cs @@ -4,7 +4,7 @@ using NUnit.Framework; using SIL.TestUtilities; using SayMore.Transcription.Model; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Transcription.Model { diff --git a/src/SayMoreTests/Transcription/Model/TimeTierTests.cs b/src/SayMoreTests/Transcription/Model/TimeTierTests.cs index a236f1de0..12834dce3 100644 --- a/src/SayMoreTests/Transcription/Model/TimeTierTests.cs +++ b/src/SayMoreTests/Transcription/Model/TimeTierTests.cs @@ -5,7 +5,7 @@ using SIL.TestUtilities; using SayMore.Transcription.Model; using SayMore.Transcription.UI; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Transcription.Model { diff --git a/src/SayMoreTests/Transcription/UI/OralAnnotationRecorderDlgViewModelTests.cs b/src/SayMoreTests/Transcription/UI/OralAnnotationRecorderDlgViewModelTests.cs index 800dd1f44..ccda07a3c 100644 --- a/src/SayMoreTests/Transcription/UI/OralAnnotationRecorderDlgViewModelTests.cs +++ b/src/SayMoreTests/Transcription/UI/OralAnnotationRecorderDlgViewModelTests.cs @@ -5,7 +5,7 @@ using SayMore.Model.Files; using SayMore.Transcription.Model; using SayMore.Transcription.UI; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Transcription.UI { diff --git a/src/SayMoreTests/Transcription/UI/SegmenterDlgBaseViewModelTests.cs b/src/SayMoreTests/Transcription/UI/SegmenterDlgBaseViewModelTests.cs index 107365ef5..ce59d8951 100644 --- a/src/SayMoreTests/Transcription/UI/SegmenterDlgBaseViewModelTests.cs +++ b/src/SayMoreTests/Transcription/UI/SegmenterDlgBaseViewModelTests.cs @@ -8,7 +8,7 @@ using SayMore.Properties; using SayMore.Transcription.Model; using SayMore.Transcription.UI; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Transcription.UI { diff --git a/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs b/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs index e92aff141..e545c407f 100644 --- a/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs +++ b/src/SayMoreTests/UI/ConvertMediaDlgViewModelTests.cs @@ -5,7 +5,7 @@ using SayMore.Media; using SayMore.Media.FFmpeg; using SayMore.UI; -using SayMoreTests.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.UI { diff --git a/src/SayMoreTests/app.config b/src/SayMoreTests/app.config index 505f1b6b1..baa819747 100644 --- a/src/SayMoreTests/app.config +++ b/src/SayMoreTests/app.config @@ -13,146 +13,6 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SayMoreTests/model/Files/ComponentFileTests.cs b/src/SayMoreTests/model/Files/ComponentFileTests.cs index b4da3d417..b580a66c7 100644 --- a/src/SayMoreTests/model/Files/ComponentFileTests.cs +++ b/src/SayMoreTests/model/Files/ComponentFileTests.cs @@ -3,6 +3,7 @@ using System.Drawing; using System.IO; using System.Linq; +using L10NSharp; using NUnit.Framework; using SIL.TestUtilities; using SayMore.Model; @@ -23,6 +24,7 @@ public class ComponentFileTests [SetUp] public void Setup() { + LocalizationManager.StrictInitializationMode = false; _parentFolder = new TemporaryFolder("componentFileTest"); _fileTypes = new List { new AnnotationFileType(null, null) }; } diff --git a/src/SayMoreTests/model/Files/FileTypeTests.cs b/src/SayMoreTests/model/Files/FileTypeTests.cs index fb387f9a8..a309ec215 100644 --- a/src/SayMoreTests/model/Files/FileTypeTests.cs +++ b/src/SayMoreTests/model/Files/FileTypeTests.cs @@ -2,6 +2,7 @@ using NUnit.Framework; using SIL.TestUtilities; using SayMore.Model.Files; +using SayMoreTests.MediaUtils; namespace SayMoreTests.Model.Files { diff --git a/src/SayMoreTests/packages.config b/src/SayMoreTests/packages.config deleted file mode 100644 index 518f86cf0..000000000 --- a/src/SayMoreTests/packages.config +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file