Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction in VS solution(unable to compile from source) and invalid error handling in NonContainer.StarTag.ReadTag #10

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -13,7 +13,6 @@ configure
*.config *.config
install-sh install-sh
missing missing
src/AssemblyInfo.cs
*.pc *.pc
*.zip *.zip
tests/samples/tmp* tests/samples/tmp*
Expand All @@ -29,3 +28,7 @@ tests/*.dll
tests/*.xml tests/*.xml
test-results test-results
.*.swp .*.swp
[oO]bj
*.user
*.pdb
*.suo
35 changes: 35 additions & 0 deletions src/AssemblyInfo.cs
@@ -0,0 +1,35 @@
//
// AssemblyInfo.cs.in: Contains flags to use for the assembly.
//
// Author:
// Brian Nickel (brian.nickel@gmail.com)
//
// Copyright (C) 2006-2007 Brian Nickel
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version
// 2.1 as published by the Free Software Foundation.
//
// 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
//

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly:AssemblyVersion("2.0.4.0")]
[assembly:AssemblyTitle ("TagLib#")]
[assembly:AssemblyDescription ("A library for reading and writing audio metatags.")]
[assembly:AssemblyCopyright ("Copyright (c) 2006-2007 Brian Nickel. Copyright (c) 2009-2010 Other contributors")]
[assembly:AssemblyCompany ("")]
[assembly:AssemblyDelaySign(false)]
[assembly:CLSCompliant(false)]
1 change: 0 additions & 1 deletion src/AssemblyInfo.cs.in
Expand Up @@ -32,5 +32,4 @@ using System.Runtime.InteropServices;
[assembly:AssemblyCopyright ("Copyright (c) 2006-2007 Brian Nickel. Copyright (c) 2009-2010 Other contributors")] [assembly:AssemblyCopyright ("Copyright (c) 2006-2007 Brian Nickel. Copyright (c) 2009-2010 Other contributors")]
[assembly:AssemblyCompany ("")] [assembly:AssemblyCompany ("")]
[assembly:AssemblyDelaySign(false)] [assembly:AssemblyDelaySign(false)]
[assembly:AssemblyKeyFile("taglib-sharp.snk")]
[assembly:CLSCompliant(false)] [assembly:CLSCompliant(false)]
22 changes: 9 additions & 13 deletions src/TagLib/NonContainer/StartTag.cs
Expand Up @@ -264,19 +264,15 @@ private TagLib.Tag ReadTag (ref long start)
long end = start; long end = start;
TagTypes type = ReadTagInfo (ref end); TagTypes type = ReadTagInfo (ref end);
TagLib.Tag tag = null; TagLib.Tag tag = null;


try { switch (type)
switch (type) {
{ case TagTypes.Ape:
case TagTypes.Ape: tag = new TagLib.Ape.Tag (file, start);
tag = new TagLib.Ape.Tag (file, start); break;
break; case TagTypes.Id3v2:
case TagTypes.Id3v2: tag = new TagLib.Id3v2.Tag (file, start);
tag = new TagLib.Id3v2.Tag (file, start); break;
break;
}
} catch (CorruptFileException e) {
Console.Error.WriteLine ("taglib-sharp caught exception creating tag: {0}", e);
} }


start = end; start = end;
Expand Down
57 changes: 44 additions & 13 deletions src/taglib-sharp.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -8,10 +8,30 @@
<ProjectGuid>{6B143A39-C7B2-4743-9917-92262C60E9A6}</ProjectGuid> <ProjectGuid>{6B143A39-C7B2-4743-9917-92262C60E9A6}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>TagLib</RootNamespace> <RootNamespace>TagLib</RootNamespace>
<ApplicationIcon>.</ApplicationIcon> <ApplicationIcon>
</ApplicationIcon>
<AssemblyName>taglib-sharp</AssemblyName> <AssemblyName>taglib-sharp</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<ReleaseVersion>2.0.4.0</ReleaseVersion> <ReleaseVersion>2.0.4.0</ReleaseVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
Expand All @@ -26,7 +46,8 @@
<Execution> <Execution>
<Execution clr-version="Net_2_0" /> <Execution clr-version="Net_2_0" />
</Execution> </Execution>
<DefineConstants>HAVE_SHARPZIPLIB</DefineConstants> <DefineConstants>
</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType> <DebugType>none</DebugType>
Expand Down Expand Up @@ -270,24 +291,34 @@
<Compile Include="TagLib\Xmp\XmpTag.cs" /> <Compile Include="TagLib\Xmp\XmpTag.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="TagLib\NonContainer\" /> <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Folder Include="TagLib\Ogg\Codecs\" /> <Visible>False</Visible>
<Folder Include="TagLib\Riff\" /> <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Folder Include="TagLib\Id3v2\" /> <Install>false</Install>
<Folder Include="TagLib\Mpeg4\" /> </BootstrapperPackage>
<Folder Include="TagLib\Ogg\" /> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="ICSharpCode.SharpZipLib" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>
<None Include="..\taglib-sharp.snk">
<Link>taglib-sharp.snk</Link>
</None>
<None Include="AssemblyInfo.cs.in" /> <None Include="AssemblyInfo.cs.in" />
<None Include="policy.2.0.taglib-sharp.config.in" /> <None Include="policy.2.0.taglib-sharp.config.in" />
<None Include="taglib-sharp.snk" />
<None Include="TagLib\TagLib.sources" /> <None Include="TagLib\TagLib.sources" />
</ItemGroup> </ItemGroup>
</Project> </Project>
53 changes: 28 additions & 25 deletions taglib-sharp.sln
@@ -1,37 +1,40 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008 # Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taglib-sharp", "src\taglib-sharp.csproj", "{6B143A39-C7B2-4743-9917-92262C60E9A6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taglib-sharp", "src\taglib-sharp.csproj", "{6B143A39-C7B2-4743-9917-92262C60E9A6}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests\tests.csproj", "{4D1C6110-D6F2-496E-BD7E-E45B7217D458}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests\tests.csproj", "{4D1C6110-D6F2-496E-BD7E-E45B7217D458}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6B143A39-C7B2-4743-9917-92262C60E9A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B143A39-C7B2-4743-9917-92262C60E9A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B143A39-C7B2-4743-9917-92262C60E9A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {6B143A39-C7B2-4743-9917-92262C60E9A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B143A39-C7B2-4743-9917-92262C60E9A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {6B143A39-C7B2-4743-9917-92262C60E9A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B143A39-C7B2-4743-9917-92262C60E9A6}.Release|Any CPU.Build.0 = Release|Any CPU {6B143A39-C7B2-4743-9917-92262C60E9A6}.Release|Any CPU.Build.0 = Release|Any CPU
{4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Debug|Any CPU.Build.0 = Debug|Any CPU {4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Release|Any CPU.ActiveCfg = Release|Any CPU {4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Release|Any CPU.Build.0 = Release|Any CPU {4D1C6110-D6F2-496E-BD7E-E45B7217D458}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = tests\tests.csproj StartupItem = tests\tests.csproj
Policies = $0 Policies = $0
$0.TextStylePolicy = $1 $0.TextStylePolicy = $1
$1.inheritsSet = null $1.inheritsSet = null
$1.scope = application/x-mdp $1.scope = application/x-mdp
$0.StandardHeader = $2 $0.StandardHeader = $2
$2.inheritsSet = LGPLv2License $2.inheritsSet = LGPLv2License
$0.DotNetNamingPolicy = $3 $0.DotNetNamingPolicy = $3
$3.DirectoryNamespaceAssociation = None $3.DirectoryNamespaceAssociation = None
$3.ResourceNamePolicy = FileFormatDefault $3.ResourceNamePolicy = FileFormatDefault
version = 2.0.4.0 version = 2.0.4.0
outputpath = build outputpath = build
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal
13 changes: 9 additions & 4 deletions tests/tests.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,6 +10,11 @@
<RootNamespace>tests</RootNamespace> <RootNamespace>tests</RootNamespace>
<AssemblyName>tests</AssemblyName> <AssemblyName>tests</AssemblyName>
<ReleaseVersion>2.0.3.5</ReleaseVersion> <ReleaseVersion>2.0.3.5</ReleaseVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -50,7 +55,7 @@
<Compile Include="fixtures\TagLib.Tests.FileFormats\IFormatTest.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\IFormatTest.cs" />
<Compile Include="fixtures\TagLib.Tests.FileFormats\JpegFormatTest.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\JpegFormatTest.cs" />
<Compile Include="fixtures\TagLib.Tests.FileFormats\M4aFormatTest.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\M4aFormatTest.cs" />
<Compile Include="fixtures\TagLib.Tests.FileFormats\M4vFormatTest.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\M4vFormatTest.cs" />
<Compile Include="fixtures\TagLib.Tests.FileFormats\MpcFormatTest.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\MpcFormatTest.cs" />
<Compile Include="fixtures\TagLib.Tests.FileFormats\OggFormatTest.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\OggFormatTest.cs" />
<Compile Include="fixtures\TagLib.Tests.FileFormats\StandardTests.cs" /> <Compile Include="fixtures\TagLib.Tests.FileFormats\StandardTests.cs" />
Expand Down Expand Up @@ -118,4 +123,4 @@
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
</Project> </Project>