From 5f32d7a4f5dad689a977570737e63238e896671d Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 20 Apr 2012 10:02:36 -0700 Subject: [PATCH] Include more TagLib header material and reduce amalgamated size --- Builds/VisualStudio2010/Amalgams.sln | 18 +++- .../TagLibAmalgamTemplate.vcxproj | 2 + .../TagLibAmalgamTemplate.vcxproj.filters | 6 ++ TagLib/CreateAmalgam.sh | 3 +- TagLib/templates/TagLibAmalgamTemplate.cpp | 9 +- TagLib/templates/TagLibAmalgamTemplate.h | 6 +- .../TagLibAmalgamTemplateHeaderGlue.h | 2 + .../TagLibAmalgamTemplatePublicHeaders.h | 98 +++++++++++++++++++ 8 files changed, 131 insertions(+), 13 deletions(-) create mode 100644 TagLib/templates/TagLibAmalgamTemplateHeaderGlue.h create mode 100644 TagLib/templates/TagLibAmalgamTemplatePublicHeaders.h diff --git a/Builds/VisualStudio2010/Amalgams.sln b/Builds/VisualStudio2010/Amalgams.sln index e2a4c39..44b6466 100644 --- a/Builds/VisualStudio2010/Amalgams.sln +++ b/Builds/VisualStudio2010/Amalgams.sln @@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JUCE", "JUCE", "{CD819EE9-5 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TagLib", "TagLib", "{75503189-7721-4393-9A01-CD413A13BDA6}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Amalgamate", "..\..\..\Amalgamate\Builds\VisualStudio2010\Amalgamate.vcxproj", "{428181C9-E82A-451C-A4F2-332C220CE914}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug Multithreaded|Win32 = Debug Multithreaded|Win32 @@ -101,16 +103,28 @@ Global {1D4C9FD3-7B96-4022-97A3-9E38275426FF}.Release Singlethreaded|Win32.Build.0 = Release|Win32 {1D4C9FD3-7B96-4022-97A3-9E38275426FF}.Release|Win32.ActiveCfg = Release|Win32 {1D4C9FD3-7B96-4022-97A3-9E38275426FF}.Release|Win32.Build.0 = Release|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Debug Multithreaded|Win32.ActiveCfg = Debug|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Debug Multithreaded|Win32.Build.0 = Debug|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Debug Singlethreaded|Win32.ActiveCfg = Debug|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Debug Singlethreaded|Win32.Build.0 = Debug|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Debug|Win32.ActiveCfg = Debug|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Debug|Win32.Build.0 = Debug|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Release Multithreaded|Win32.ActiveCfg = Release|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Release Multithreaded|Win32.Build.0 = Release|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Release Singlethreaded|Win32.ActiveCfg = Release|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Release Singlethreaded|Win32.Build.0 = Release|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Release|Win32.ActiveCfg = Release|Win32 + {428181C9-E82A-451C-A4F2-332C220CE914}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {A80A166C-3FE8-40BD-86CC-14554D81C081} = {37B95B77-6075-4876-A0FA-473933DDEE1A} {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {37B95B77-6075-4876-A0FA-473933DDEE1A} + {A80A166C-3FE8-40BD-86CC-14554D81C081} = {37B95B77-6075-4876-A0FA-473933DDEE1A} {6C6FE871-80B5-5611-1C8D-17A6CCA9ADFA} = {CD819EE9-5465-496D-B0DC-A4476BAC022E} {2148A61D-5C84-4C87-AC0C-C0114AAD57D1} = {CD819EE9-5465-496D-B0DC-A4476BAC022E} - {4508DBCE-25C8-4D17-9284-821435644D1B} = {75503189-7721-4393-9A01-CD413A13BDA6} {1D4C9FD3-7B96-4022-97A3-9E38275426FF} = {75503189-7721-4393-9A01-CD413A13BDA6} + {4508DBCE-25C8-4D17-9284-821435644D1B} = {75503189-7721-4393-9A01-CD413A13BDA6} EndGlobalSection EndGlobal diff --git a/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj b/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj index 86baaca..2e2f121 100644 --- a/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj +++ b/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj @@ -26,6 +26,8 @@ + + {1D4C9FD3-7B96-4022-97A3-9E38275426FF} diff --git a/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj.filters b/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj.filters index 526d86f..68d3197 100644 --- a/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj.filters +++ b/TagLib/Builds/VisualStudio2010/TagLibAmalgamTemplate.vcxproj.filters @@ -31,5 +31,11 @@ TagLibAmalgam + + Templates + + + Templates + \ No newline at end of file diff --git a/TagLib/CreateAmalgam.sh b/TagLib/CreateAmalgam.sh index dc3483c..d054719 100644 --- a/TagLib/CreateAmalgam.sh +++ b/TagLib/CreateAmalgam.sh @@ -6,7 +6,8 @@ SRC=Taglib/taglib OPTS=( - -i "Taglib/taglib" -w "*.c;*.cpp;*.h;*.hpp;*.tcc" -s + -w "*.c;*.cpp;*.h;*.hpp;*.tcc" -s + -i "Taglib/taglib" -i "Taglib/taglib/toolkit" -i "Taglib/taglib/asf" -i "Taglib/taglib/mpeg" diff --git a/TagLib/templates/TagLibAmalgamTemplate.cpp b/TagLib/templates/TagLibAmalgamTemplate.cpp index 1da1040..62542bf 100644 --- a/TagLib/templates/TagLibAmalgamTemplate.cpp +++ b/TagLib/templates/TagLibAmalgamTemplate.cpp @@ -22,8 +22,9 @@ #define TAGLIB_NO_CONFIG #define MAKE_TAGLIB_LIB #define TAGLIB_STATIC -#define WITH_ASF -#define WITH_MP4 + +/*@remap "TagLibAmalgamTemplatePublicHeaders.h" "TagLibAmalgam.h" */ +#include "TagLibAmalgamTemplateHeaderGlue.h" // disable warnings about unsafe standard library calls #ifdef _MSC_VER @@ -46,8 +47,6 @@ #include "fileref.cpp" #include "audioproperties.cpp" -//#include "mp4/mp4atom.cpp" - #include "mpeg/mpegfile.cpp" #include "mpeg/mpegproperties.cpp" #include "mpeg/mpegheader.cpp" @@ -96,7 +95,7 @@ #include "mpc/mpcproperties.cpp" #include "mp4/mp4file.cpp" -#include "mp4/mp4atom.cpp" // Doesn't compile unless it comes early +#include "mp4/mp4atom.cpp" #include "mp4/mp4tag.cpp" #include "mp4/mp4item.cpp" #include "mp4/mp4properties.cpp" diff --git a/TagLib/templates/TagLibAmalgamTemplate.h b/TagLib/templates/TagLibAmalgamTemplate.h index 2b23ffb..3da69eb 100644 --- a/TagLib/templates/TagLibAmalgamTemplate.h +++ b/TagLib/templates/TagLibAmalgamTemplate.h @@ -22,9 +22,5 @@ #define TAGLIB_NO_CONFIG #define MAKE_TAGLIB_LIB #define TAGLIB_STATIC -#define WITH_ASF -#define WITH_MP4 -#include "tag.h" -#include "taglib.h" -#include "fileref.h" +#include "TagLibAmalgamTemplatePublicHeaders.h" diff --git a/TagLib/templates/TagLibAmalgamTemplateHeaderGlue.h b/TagLib/templates/TagLibAmalgamTemplateHeaderGlue.h new file mode 100644 index 0000000..eae7c5b --- /dev/null +++ b/TagLib/templates/TagLibAmalgamTemplateHeaderGlue.h @@ -0,0 +1,2 @@ +// This file provides an extra level of indirection for the @remap in the template +#include "TagLibAmalgamTemplatePublicHeaders.h" diff --git a/TagLib/templates/TagLibAmalgamTemplatePublicHeaders.h b/TagLib/templates/TagLibAmalgamTemplatePublicHeaders.h new file mode 100644 index 0000000..00ac535 --- /dev/null +++ b/TagLib/templates/TagLibAmalgamTemplatePublicHeaders.h @@ -0,0 +1,98 @@ +/* These should include the set of all public header files */ + +/* Extracted from CMakeLists.txt */ +#include "tag.h" +#include "fileref.h" +#include "audioproperties.h" +#include "taglib_export.h" +#ifndef TAGLIB_NO_CONFIG +//#include "${CMAKE_BINARY_DIR}/taglib_config.h" +#endif +#include "toolkit/taglib.h" +#include "toolkit/tstring.h" +#include "toolkit/tlist.h" +//#include "toolkit/tlist.tcc" // included by tlist.h +#include "toolkit/tstringlist.h" +#include "toolkit/tbytevector.h" +#include "toolkit/tbytevectorlist.h" +#include "toolkit/tbytevectorstream.h" +#include "toolkit/tiostream.h" +#include "toolkit/tfile.h" +#include "toolkit/tfilestream.h" +#include "toolkit/tmap.h" +// #include "toolkit/tmap.tcc" // included by tmap.h +#include "toolkit/tpropertymap.h" +#include "mpeg/mpegfile.h" +#include "mpeg/mpegproperties.h" +#include "mpeg/mpegheader.h" +#include "mpeg/xingheader.h" +#include "mpeg/id3v1/id3v1tag.h" +#include "mpeg/id3v1/id3v1genres.h" +#include "mpeg/id3v2/id3v2extendedheader.h" +#include "mpeg/id3v2/id3v2frame.h" +#include "mpeg/id3v2/id3v2header.h" +#include "mpeg/id3v2/id3v2synchdata.h" +#include "mpeg/id3v2/id3v2footer.h" +#include "mpeg/id3v2/id3v2framefactory.h" +#include "mpeg/id3v2/id3v2tag.h" +#include "mpeg/id3v2/frames/attachedpictureframe.h" +#include "mpeg/id3v2/frames/commentsframe.h" +#include "mpeg/id3v2/frames/generalencapsulatedobjectframe.h" +#include "mpeg/id3v2/frames/popularimeterframe.h" +#include "mpeg/id3v2/frames/privateframe.h" +#include "mpeg/id3v2/frames/relativevolumeframe.h" +#include "mpeg/id3v2/frames/textidentificationframe.h" +#include "mpeg/id3v2/frames/uniquefileidentifierframe.h" +#include "mpeg/id3v2/frames/unknownframe.h" +#include "mpeg/id3v2/frames/unsynchronizedlyricsframe.h" +#include "mpeg/id3v2/frames/urllinkframe.h" +#include "ogg/oggfile.h" +#include "ogg/oggpage.h" +#include "ogg/oggpageheader.h" +#include "ogg/xiphcomment.h" +#include "ogg/vorbis/vorbisfile.h" +#include "ogg/vorbis/vorbisproperties.h" +#include "ogg/flac/oggflacfile.h" +#include "ogg/speex/speexfile.h" +#include "ogg/speex/speexproperties.h" +#include "flac/flacfile.h" +#include "flac/flacpicture.h" +#include "flac/flacproperties.h" +#include "flac/flacmetadatablock.h" +#include "ape/apefile.h" +#include "ape/apeproperties.h" +#include "ape/apetag.h" +#include "ape/apefooter.h" +#include "ape/apeitem.h" +#include "mpc/mpcfile.h" +#include "mpc/mpcproperties.h" +#include "wavpack/wavpackfile.h" +#include "wavpack/wavpackproperties.h" +#include "trueaudio/trueaudiofile.h" +#include "trueaudio/trueaudioproperties.h" +#include "riff/rifffile.h" +#include "riff/aiff/aifffile.h" +#include "riff/aiff/aiffproperties.h" +#include "riff/wav/wavfile.h" +#include "riff/wav/wavproperties.h" +#include "asf/asffile.h" +#include "asf/asfproperties.h" +#include "asf/asftag.h" +#include "asf/asfattribute.h" +#include "asf/asfpicture.h" +#include "mp4/mp4file.h" +#include "mp4/mp4atom.h" +#include "mp4/mp4tag.h" +#include "mp4/mp4item.h" +#include "mp4/mp4properties.h" +#include "mp4/mp4coverart.h" +#include "mod/modfilebase.h" +#include "mod/modfile.h" +#include "mod/modtag.h" +#include "mod/modproperties.h" +#include "it/itfile.h" +#include "it/itproperties.h" +#include "s3m/s3mfile.h" +#include "s3m/s3mproperties.h" +#include "xm/xmfile.h" +#include "xm/xmproperties.h"