Make libass a hard dependency

There's really no point in letting people build Aegisub without any
subtitle renderers.
This commit is contained in:
Thomas Goyne 2013-06-11 16:53:17 -07:00
parent f5ee5ca740
commit 9735397a93
14 changed files with 4 additions and 82 deletions

View file

@ -8,7 +8,6 @@ HAVE_OSS = @with_oss@
HAVE_PORTAUDIO = @with_portaudio@
HAVE_FFMS2 = @with_ffms2@
HAVE_LIBPULSE = @with_libpulse@
HAVE_LIBASS = @with_libass@
###################
# PLATFORM SETTINGS

View file

@ -76,30 +76,6 @@
</Link>
</ItemDefinitionGroup>
<!-- libass support -->
<ItemDefinitionGroup Condition="'$(AegisubUseLibass)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_LIBASS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>fribidi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Freetype 2 support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFreetype2)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_FREETYPE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Fontconfig support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFontconfig)'=='true'">
<ClCompile>
<PreprocessorDefinitions>WITH_FONTCONFIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- FFmpegSource support -->
<ItemDefinitionGroup Condition="'$(AegisubUseFfms)'=='true'">
<ClCompile>

View file

@ -125,20 +125,6 @@
Description="A high-speed fourier transformation library which improves the spectograph speed and quality. Requires a copy of the FFTW 3.2 source."
/>
<BoolProperty
Name="AegisubUseFontconfig"
Category="Features"
DisplayName="Fontconfig"
Description="Required for the font collector and libass. Requires Freetype 2 and a copy of the Fontconfig source."
/>
<BoolProperty
Name="AegisubUseLibass"
Category="Features"
DisplayName="libass"
Description="An alternative subtitle renderer which is often faster than VSFilter. Requires Fontconfig, Freetype 2, Fribidi, and a copy of the libass source."
/>
<!-- Library Paths -->
<StringProperty
Subtype="folder"

View file

@ -19,6 +19,7 @@
sicuin.lib;
sicutu.lib;
sicuuc.lib;
fribidi.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</Link>

View file

@ -42,9 +42,6 @@
<AegisubUseDSound>true</AegisubUseDSound>
<AegisubUseFfms>true</AegisubUseFfms>
<AegisubUseFftw>true</AegisubUseFftw>
<AegisubUseFontconfig>true</AegisubUseFontconfig>
<AegisubUseFreetype2>true</AegisubUseFreetype2>
<AegisubUseLibass>true</AegisubUseLibass>
<AegisubUseUpdateChecker>true</AegisubUseUpdateChecker>
<CsriLibraryName>vsfilter.lib</CsriLibraryName>
<DirectXSDKPath>$(DXSDK_DIR)</DirectXSDKPath>

View file

@ -238,13 +238,9 @@ AS_IF([test x$no_gl = xyes], [AC_MSG_FAILURE([Aegisub requires GL support.])])
AC_SUBST(GL_CFLAGS)
AC_SUBST(GL_LIBS)
PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version,
AC_DEFINE(WITH_FREETYPE2, 1, [Enable FreeType 2 support.]),
[AC_MSG_FAILURE([Aegisub requires >= FreeType2 freetype_required_version])])
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version,
[AC_DEFINE(WITH_FONTCONFIG, 1, [Enable FontConfig support.])],
[AC_MSG_FAILURE([Aegisub requires fontconfig >= fontconfig_required_version])])
PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version)
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version)
AX_BOOST_BASE([boost_required_version])
AX_BOOST_ASIO
@ -391,8 +387,6 @@ AGI_OPT_PKG(portaudio-2.0, [build without PortAudio v19 audio player [auto]], [E
AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 support])
AGI_OPT_PKG(libass, [build without libass subtitle provider [auto]], [Enable libass support])
AGI_OPT_PKG(fftw3, [build without fftw support [auto]], [Enable fftw support])
AGI_OPT_PKG(hunspell, [build without hunspell spell-checking [auto]], [Enable Hunspell support])
@ -719,9 +713,6 @@ Audio Players
A/V Providers
FFMS2: $with_ffms2 $ffms2_disabled
Subtitle Providers:
libass $with_libass $libass_disabled
Misc Packages
Hunspell: $with_hunspell $hunspell_disabled
FFTW3: $with_fftw3 $fftw3_disabled

View file

@ -78,14 +78,10 @@ endif
###########
# SUBTITLES
###########
ifeq (yes, $(HAVE_LIBASS))
subtitles_provider_libass.o: CXXFLAGS += $(CFLAGS_LIBASS) -Wno-c++11-narrowing
subtitles_provider.o: CXXFLAGS += $(CFLAGS_LIBASS)
LIBS += $(LIBS_LIBASS)
SRC += subtitles_provider_libass.cpp
else
EXTRA_DIST += subtitles_provider_libass.cpp
endif
##############
# MISCELLANOUS

View file

@ -75,15 +75,11 @@ AboutScreen::AboutScreen(wxWindow *parent)
libString += " vsfilter - Copyright (c) Gabest;\n";
# endif
#endif
#ifdef WITH_LIBASS
libString += " libass - Copyright (c) Evgeniy Stepanov, Grigori Goronzy;\n";
#endif
#ifdef __WINDOWS__
libString += " Matroska Parser - Copyright (c) Mike Matsnev;\n";
#endif
#ifdef WITH_FREETYPE2
libString += " Freetype - Copyright (c) David Turner, Robert Wilhelm, Werner Lemberg;\n";
#endif
#ifdef WITH_FFTW3
libString += " FFTW - Copyright (c) Matteo Frigo, Massachusetts Institute of Technology;\n";
#endif

View file

@ -75,14 +75,7 @@ void FontsCollectorThread(AssFile *subs, agi::fs::path const& destination, FcMod
collector->AddPendingEvent(event);
};
#ifdef WITH_FONTCONFIG
FontConfigFontFileLister lister(AppendText);
#else
AppendText(_("Aegisub was built without any font file listers enabled"), 2);
struct DummyLister : public FontFileLister {
CollectionResult GetFontPaths(std::string const&, int, bool, std::set<wxUniChar> const&) { return CollectionResult(); }
} lister;
#endif
auto paths = FontCollector(AppendText, lister).GetFontPaths(subs);
if (paths.empty()) {
collector->AddPendingEvent(wxThreadEvent(EVT_COLLECTION_DONE));

View file

@ -21,7 +21,6 @@
#include "config.h"
#ifdef WITH_FONTCONFIG
#include "font_file_lister_fontconfig.h"
#include <fontconfig/fontconfig.h>
@ -141,4 +140,3 @@ FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(std::str
ret.paths.emplace_back((const char *)file);
return ret;
}
#endif

View file

@ -19,8 +19,6 @@
/// @ingroup font_collector
///
#ifdef WITH_FONTCONFIG
#include "font_file_lister.h"
#include <libaegisub/scoped_ptr.h>
@ -46,5 +44,3 @@ public:
CollectionResult GetFontPaths(std::string const& facename, int bold, bool italic, std::set<wxUniChar> const& characters);
};
#endif

View file

@ -66,8 +66,6 @@ void SubtitlesProviderFactory::RegisterProviders() {
if (!csri_providers.empty())
Register<CSRISubtitlesProvider>("CSRI", false, csri_providers);
#endif
#ifdef WITH_LIBASS
Register<LibassSubtitlesProvider>("libass");
LibassSubtitlesProvider::CacheFonts();
#endif
}

View file

@ -34,7 +34,6 @@
#include "config.h"
#ifdef WITH_LIBASS
#include "subtitles_provider_libass.h"
#ifdef __APPLE__
@ -197,5 +196,3 @@ void LibassSubtitlesProvider::CacheFonts() {
ass_renderer_done(ass_renderer);
});
}
#endif // WITH_LIBASS

View file

@ -32,7 +32,6 @@
/// @ingroup subtitle_rendering
///
#ifdef WITH_LIBASS
#include "include/aegisub/subtitles_provider.h"
extern "C" {
@ -52,4 +51,3 @@ public:
static void CacheFonts();
};
#endif