mirror of https://github.com/odrling/Aegisub
Made almost all major components of Aegisub optional... this might be severely broken still.
Originally committed to SVN as r1660.
This commit is contained in:
parent
7d1d0fe46a
commit
75b4fb1437
aegisub
VideoSink.cppaudio_player_dsound.cppaudio_provider_lavc.cppauto4_auto3.cppauto4_base.cppauto4_lua.cppauto4_lua_assfile.cppauto4_lua_dialog.cppauto4_lua_scriptreader.cppauto4_ruby.cppauto4_ruby_assfile.cppauto4_ruby_dialog.cppdialog_automation.cppfont_file_lister.cppfont_file_lister_freetype.cppframe_main.cppframe_main.hframe_main_events.cpplavc_file.cppmain.cppmain.hres.rcsetup.cppspellchecker_hunspell.cppsubtitles_provider_csri.cppsubtitles_provider_libass.cppversion.cppvideo_provider_dshow.cppvideo_provider_lavc.cpp
win32
build
|
@ -5,6 +5,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_DIRECTSHOW
|
||||
#include <windows.h>
|
||||
#ifdef __WXDEBUG__
|
||||
#undef __WXDEBUG__
|
||||
|
@ -562,3 +564,5 @@ HRESULT CreateVideoSink(IBaseFilter **pVS) {
|
|||
*pVS = vs;
|
||||
return hr;
|
||||
}
|
||||
|
||||
#endif // WITH_DIRECTSHOW
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_DIRECTSOUND
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
#include "audio_player.h"
|
||||
#include "audio_provider.h"
|
||||
|
@ -50,12 +53,6 @@
|
|||
#include <dsound.h>
|
||||
|
||||
|
||||
/////////////
|
||||
// Libraries
|
||||
#pragma comment(lib, "dsound.lib")
|
||||
#pragma comment(lib, "dxguid.lib")
|
||||
|
||||
|
||||
//////////////
|
||||
// Prototypes
|
||||
class DirectSoundPlayer;
|
||||
|
@ -483,3 +480,5 @@ void DirectSoundPlayerThread::Stop() {
|
|||
// Increase the stopnotify by one, causing a wait for it to succeed
|
||||
SetEvent(stopnotify);
|
||||
}
|
||||
|
||||
#endif // WITH_DIRECTSOUND
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_FFMPEG
|
||||
|
||||
#ifdef WIN32
|
||||
#define EMULATE_INTTYPES
|
||||
#endif
|
||||
|
@ -224,3 +227,4 @@ void LAVCAudioProvider::GetAudio(void *buf, int64_t start, int64_t count)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
#ifdef WITH_AUTO3
|
||||
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include "auto4_auto3.h"
|
||||
|
@ -753,3 +757,6 @@ namespace Automation4 {
|
|||
Auto3ScriptFactory _auto3_script_factory;
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_AUTO3
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
|
||||
#include "auto4_base.h"
|
||||
#include "ass_style.h"
|
||||
#include "options.h"
|
||||
|
@ -782,3 +785,5 @@ namespace Automation4 {
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
|
||||
#include "auto4_lua.h"
|
||||
#include "auto4_lua_scriptreader.h"
|
||||
#include "ass_dialogue.h"
|
||||
|
@ -904,3 +907,5 @@ namespace Automation4 {
|
|||
LuaScriptFactory _lua_script_factory;
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
|
||||
#include "auto4_lua.h"
|
||||
#include "ass_dialogue.h"
|
||||
#include "ass_style.h"
|
||||
|
@ -955,3 +958,5 @@ namespace Automation4 {
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
|
||||
#include "auto4_lua.h"
|
||||
#include "../lua51/src/lualib.h"
|
||||
#include "../lua51/src/lauxlib.h"
|
||||
|
@ -749,3 +753,5 @@ badcontrol:
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
|
||||
#include "auto4_lua_scriptreader.h"
|
||||
|
||||
namespace Automation4 {
|
||||
|
@ -103,3 +106,5 @@ namespace Automation4 {
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
// Contact: mailto:pomyk@go2.pl
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_RUBY
|
||||
#include "auto4_ruby.h"
|
||||
#include "auto4_auto3.h"
|
||||
#include "ass_dialogue.h"
|
||||
|
@ -55,14 +57,6 @@
|
|||
#include <algorithm>
|
||||
|
||||
|
||||
///////////////////
|
||||
// Include library
|
||||
#if __VISUALC__ >= 1200
|
||||
#pragma comment(lib,"ws2_32.lib")
|
||||
#pragma comment(lib,"msvcr80-ruby19-static.lib")
|
||||
#endif
|
||||
|
||||
|
||||
namespace Automation4 {
|
||||
|
||||
RubyObjects *RubyObjects::inst = NULL;
|
||||
|
@ -721,3 +715,5 @@ namespace Automation4 {
|
|||
return backtr;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // WITH_RUBY
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
// Contact: mailto:pomyk@go2.pl
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_RUBY
|
||||
#include "auto4_ruby.h"
|
||||
#include "ass_dialogue.h"
|
||||
#include "ass_style.h"
|
||||
|
@ -426,3 +428,5 @@ namespace Automation4 {
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_RUBY
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
// Contact: mailto:pomyk@go2.pl
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_RUBY
|
||||
#include "auto4_ruby.h"
|
||||
#include <ruby.h>
|
||||
#include <wx/window.h>
|
||||
|
@ -588,3 +590,5 @@ namespace Automation4 {
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // WITH_RUBY
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
// Contact: mailto:jiifurusu@gmail.com
|
||||
//
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
|
||||
#include "main.h"
|
||||
#include "dialog_automation.h"
|
||||
#include "auto4_base.h"
|
||||
|
@ -319,3 +322,5 @@ void DialogAutomation::OnSelectionChange(wxListEvent &evt)
|
|||
{
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
#endif // WITH_AUTOMATION
|
||||
|
|
|
@ -36,14 +36,17 @@
|
|||
|
||||
////////////
|
||||
// Includes
|
||||
#include "config.h"
|
||||
#include <wx/tokenzr.h>
|
||||
#include "font_file_lister.h"
|
||||
#include "text_file_writer.h"
|
||||
#include "text_file_reader.h"
|
||||
#include "standard_paths.h"
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#ifdef WITH_FREETYPE2
|
||||
#include "font_file_lister_freetype.h"
|
||||
#define FontListerClass FreetypeFontFileLister
|
||||
#endif
|
||||
#else
|
||||
#include "font_file_lister_fontconfig.h"
|
||||
#define FontListerClass FontConfigFontFileLister
|
||||
|
@ -70,7 +73,9 @@ FontFileLister::~FontFileLister() {
|
|||
////////////////
|
||||
// Get instance
|
||||
void FontFileLister::GetInstance() {
|
||||
#ifdef FontListerClass
|
||||
if (!instance) instance = new FontListerClass();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
////////////
|
||||
// Includes
|
||||
#include "config.h"
|
||||
#ifdef WITH_FREETYPE2
|
||||
|
||||
#include "font_file_lister_freetype.h"
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
@ -110,3 +113,5 @@ void FreetypeFontFileLister::DoInitialize() {
|
|||
// Save cache
|
||||
SaveCache();
|
||||
}
|
||||
|
||||
#endif WITH_FREETYPE2
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include <wx/tokenzr.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/statline.h>
|
||||
#include "config.h"
|
||||
#include "subs_grid.h"
|
||||
#include "frame_main.h"
|
||||
#include "avisynth_wrap.h"
|
||||
|
@ -66,11 +67,13 @@
|
|||
#include "utils.h"
|
||||
#include "text_file_reader.h"
|
||||
#include "text_file_writer.h"
|
||||
#include "auto4_base.h"
|
||||
#include "dialog_version_check.h"
|
||||
#include "dialog_detached_video.h"
|
||||
#include "standard_paths.h"
|
||||
#include "keyframe.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
#include "auto4_base.h"
|
||||
#endif
|
||||
|
||||
|
||||
/////////////////////////
|
||||
|
@ -106,7 +109,9 @@ FrameMain::FrameMain (wxArrayString args)
|
|||
wxImage::AddHandler(png);
|
||||
|
||||
// Storage for subs-file-local scripts
|
||||
#ifdef WITH_AUTOMATION
|
||||
local_scripts = new Automation4::ScriptManager();
|
||||
#endif
|
||||
|
||||
// Create menu and tool bars
|
||||
if (Options.AsBool(_T("Maximized"))) Maximize(true);
|
||||
|
@ -183,7 +188,9 @@ FrameMain::FrameMain (wxArrayString args)
|
|||
// FrameMain destructor
|
||||
FrameMain::~FrameMain () {
|
||||
DeInitContents();
|
||||
#ifdef WITH_AUTOMATION
|
||||
delete local_scripts;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -232,8 +239,10 @@ void FrameMain::InitToolbar () {
|
|||
Toolbar->AddSeparator();
|
||||
|
||||
// Automation
|
||||
#ifdef WITH_AUTOMATION
|
||||
Toolbar->AddTool(Menu_Tools_Automation,_("Automation"),wxBITMAP(automation_toolbutton),_("Open Automation manager"));
|
||||
Toolbar->AddSeparator();
|
||||
#endif
|
||||
|
||||
// Tools
|
||||
Toolbar->AddTool(Menu_Edit_Shift,_("Shift Times"),wxBITMAP(shift_times_toolbutton),_("Open Shift Times Dialogue"));
|
||||
|
@ -449,10 +458,12 @@ void FrameMain::InitMenu() {
|
|||
MenuBar->Append(audioMenu, _("&Audio"));
|
||||
|
||||
// Create Automation menu
|
||||
#ifdef WITH_AUTOMATION
|
||||
automationMenu = new wxMenu();
|
||||
AppendBitmapMenuItem (automationMenu,Menu_Tools_Automation, _("&Automation..."),_("Open automation manager"), wxBITMAP(automation_toolbutton));
|
||||
automationMenu->AppendSeparator();
|
||||
MenuBar->Append(automationMenu, _("&Automation"));
|
||||
#endif
|
||||
|
||||
// Create view menu
|
||||
viewMenu = new wxMenu();
|
||||
|
@ -851,9 +862,11 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
|||
if (curSubsAudio != audioBox->audioName ||
|
||||
curSubsVFR != VFR_Output.GetFilename() ||
|
||||
curSubsVideo != VideoContext::Get()->videoName ||
|
||||
curSubsKeyframes != VideoContext::Get()->GetKeyFramesName() ||
|
||||
!AutoScriptString.IsEmpty() ||
|
||||
local_scripts->GetScripts().size() > 0) {
|
||||
curSubsKeyframes != VideoContext::Get()->GetKeyFramesName()
|
||||
#ifdef WITH_AUTOMATION
|
||||
|| !AutoScriptString.IsEmpty() || local_scripts->GetScripts().size() > 0
|
||||
#endif
|
||||
) {
|
||||
hasToLoad = true;
|
||||
}
|
||||
|
||||
|
@ -895,6 +908,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
|||
}
|
||||
|
||||
// Automation scripts
|
||||
#ifdef WITH_AUTOMATION
|
||||
local_scripts->RemoveAll();
|
||||
wxStringTokenizer tok(AutoScriptString, _T("|"), wxTOKEN_STRTOK);
|
||||
wxFileName subsfn(subs->filename);
|
||||
|
@ -925,6 +939,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
|||
sfnamel.c_str(), sfnames.c_str(), basepath.c_str(), sfname.GetFullPath().c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Display
|
||||
|
@ -963,6 +978,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
|||
// 2. Otherwise try making it relative to the subs filename
|
||||
// 3. If step 2 failed, or absolut path is shorter than path relative to subs, use absolute path ("/")
|
||||
// 4. Otherwise, use path relative to subs ("~")
|
||||
#ifdef WITH_AUTOMATION
|
||||
wxString scripts_string;
|
||||
wxString autobasefn(Options.AsText(_T("Automation Base Path")));
|
||||
|
||||
|
@ -989,6 +1005,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
|||
scripts_string += scriptfn;
|
||||
}
|
||||
subs->SetScriptInfo(_T("Automation Scripts"), scripts_string);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
#include <vector>
|
||||
#include "config.h"
|
||||
|
||||
|
||||
////////////////////
|
||||
|
@ -108,7 +109,9 @@ private:
|
|||
wxWindow *PreviousFocus;
|
||||
wxLogWindow *LogWindow;
|
||||
|
||||
#ifdef WITH_AUTOMATION
|
||||
Automation4::ScriptManager *local_scripts;
|
||||
#endif
|
||||
|
||||
std::vector<Automation4::FeatureMacro*> activeMacroItems;
|
||||
int AddMacroMenuItems(wxMenu *menu, const std::vector<Automation4::FeatureMacro*> ¯os);
|
||||
|
|
|
@ -75,7 +75,9 @@
|
|||
#include "dialog_progress.h"
|
||||
#include "dialog_options.h"
|
||||
#include "utils.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
#include "auto4_base.h"
|
||||
#endif
|
||||
#include "dialog_automation.h"
|
||||
#include "dialog_version_check.h"
|
||||
#include "dialog_detached_video.h"
|
||||
|
@ -424,6 +426,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
|||
}
|
||||
|
||||
// Automation menu
|
||||
#ifdef WITH_AUTOMATION
|
||||
else if (curMenu == automationMenu) {
|
||||
// Remove old macro items
|
||||
for (unsigned int i = 0; i < activeMacroItems.size(); i++) {
|
||||
|
@ -445,6 +448,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
|||
activeMacroItems.push_back(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
MenuBar->Thaw();
|
||||
}
|
||||
|
@ -453,6 +457,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
|||
//////////////////////////////
|
||||
// Macro menu creation helper
|
||||
int FrameMain::AddMacroMenuItems(wxMenu *menu, const std::vector<Automation4::FeatureMacro*> ¯os) {
|
||||
#ifdef WITH_AUTOMATION
|
||||
if (macros.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -466,6 +471,9 @@ int FrameMain::AddMacroMenuItems(wxMenu *menu, const std::vector<Automation4::Fe
|
|||
}
|
||||
|
||||
return macros.size();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -712,6 +720,7 @@ void FrameMain::OnNewSubtitles(wxCommandEvent& WXUNUSED(event)) {
|
|||
////////////////////
|
||||
// Export subtitles
|
||||
void FrameMain::OnExportSubtitles(wxCommandEvent & WXUNUSED(event)) {
|
||||
#ifdef WITH_AUTOMATION
|
||||
int autoreload = Options.AsInt(_T("Automation Autoreload Mode"));
|
||||
if (autoreload & 1) {
|
||||
// Local scripts
|
||||
|
@ -732,6 +741,7 @@ void FrameMain::OnExportSubtitles(wxCommandEvent & WXUNUSED(event)) {
|
|||
// Global scripts
|
||||
wxGetApp().global_scripts->Reload();
|
||||
}
|
||||
#endif
|
||||
|
||||
DialogExport exporter(this);
|
||||
exporter.ShowModal();
|
||||
|
@ -1006,6 +1016,7 @@ void FrameMain::OnOpenLog (wxCommandEvent &event) {
|
|||
///////////////////
|
||||
// Open Automation
|
||||
void FrameMain::OnOpenAutomation (wxCommandEvent &event) {
|
||||
#ifdef WITH_AUTOMATION
|
||||
#ifdef __APPLE__
|
||||
if (wxGetMouseState().CmdDown()) {
|
||||
#else
|
||||
|
@ -1037,12 +1048,14 @@ void FrameMain::OnOpenAutomation (wxCommandEvent &event) {
|
|||
DialogAutomation dlg(this, local_scripts);
|
||||
dlg.ShowModal();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// General handler for all Automation-generated menu items
|
||||
void FrameMain::OnAutomationMacro (wxCommandEvent &event) {
|
||||
#ifdef WITH_AUTOMATION
|
||||
SubsBox->BeginBatch();
|
||||
// First get selection data
|
||||
// This much be done before clearing the maps, since selection data are lost during that
|
||||
|
@ -1058,6 +1071,7 @@ void FrameMain::OnAutomationMacro (wxCommandEvent &event) {
|
|||
SubsBox->SetSelectionFromAbsolute(selected_lines);
|
||||
SubsBox->CommitChanges(true, false);
|
||||
SubsBox->EndBatch();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
//
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#ifdef WITH_FFMPEG
|
||||
#include <wx/wxprec.h>
|
||||
#include <wx/filename.h>
|
||||
#include "lavc_file.h"
|
||||
|
@ -73,3 +75,6 @@ LAVCFile::~LAVCFile()
|
|||
if (fctx)
|
||||
av_close_input_file(fctx);
|
||||
}
|
||||
|
||||
|
||||
#endif // WITH_FFMPEG
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <wx/utils.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/filefn.h>
|
||||
#include "config.h"
|
||||
#include "main.h"
|
||||
#include "frame_main.h"
|
||||
#include "options.h"
|
||||
|
@ -57,10 +58,12 @@
|
|||
#include "ass_time.h"
|
||||
#include "ass_dialogue.h"
|
||||
#include "subs_grid.h"
|
||||
#include "auto4_base.h"
|
||||
#include "subtitle_format.h"
|
||||
#include "video_context.h"
|
||||
#include "standard_paths.h"
|
||||
#ifdef WITH_AUTOMATION
|
||||
#include "auto4_base.h"
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////
|
||||
|
@ -156,8 +159,10 @@ bool AegisubApp::OnInit() {
|
|||
#endif
|
||||
|
||||
// Load Automation scripts
|
||||
#ifdef WITH_AUTOMATION
|
||||
StartupLog(_T("Load global Automation scripts"));
|
||||
global_scripts = new Automation4::AutoloadScriptManager(Options.AsText(_T("Automation Autoload Path")));
|
||||
#endif
|
||||
|
||||
// Load export filters
|
||||
StartupLog(_T("Prepare export filters"));
|
||||
|
@ -197,7 +202,9 @@ int AegisubApp::OnExit() {
|
|||
SubtitleFormat::DestroyFormats();
|
||||
VideoContext::Clear();
|
||||
Options.Clear();
|
||||
#ifdef WITH_AUTOMATION
|
||||
delete global_scripts;
|
||||
#endif
|
||||
return wxApp::OnExit();
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <wx/stackwalk.h>
|
||||
#include <fstream>
|
||||
#include "aegisublocale.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
//////////////
|
||||
|
@ -63,7 +64,9 @@ private:
|
|||
public:
|
||||
AegisubLocale locale;
|
||||
FrameMain *frame;
|
||||
#ifdef WITH_AUTOMATION
|
||||
Automation4::AutoloadScriptManager *global_scripts;
|
||||
#endif
|
||||
|
||||
static AegisubApp* Get() { return (AegisubApp*) wxTheApp; }
|
||||
static void OpenURL(wxString url);
|
||||
|
|
|
@ -164,4 +164,7 @@ eyedropper_cursor CURSOR "bitmaps/eyedropper.cur"
|
|||
|
||||
splash BITMAP "bitmaps/splash.bmp"
|
||||
|
||||
|
||||
// The following define is necessary for Visual Studio
|
||||
#define wxUSE_NO_MANIFEST 1
|
||||
#include "wx/msw/wx.rc"
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
///////////
|
||||
// Headers
|
||||
#include <wx/wxprec.h>
|
||||
#include "config.h"
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
|
@ -121,4 +122,69 @@
|
|||
#pragma comment(lib, "wsock32.lib")
|
||||
|
||||
|
||||
//////////////
|
||||
// DirectShow
|
||||
#ifdef WITH_DIRECTSHOW
|
||||
#ifdef __WXDEBUG__
|
||||
#pragma comment(lib, "strmbasdu.lib")
|
||||
#else
|
||||
#pragma comment(lib, "strmbaseu.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
////////////////
|
||||
// Direct Sound
|
||||
#ifdef WITH_DIRECTSOUND
|
||||
#pragma comment(lib, "dsound.lib")
|
||||
#pragma comment(lib, "dxguid.lib")
|
||||
#endif
|
||||
|
||||
|
||||
////////
|
||||
// Ruby
|
||||
#ifdef WITH_RUBY
|
||||
#pragma comment(lib,"ws2_32.lib")
|
||||
#pragma comment(lib,"msvcr80-ruby19-static.lib")
|
||||
#endif
|
||||
|
||||
|
||||
////////////
|
||||
// Hunspell
|
||||
#ifdef WITH_HUNSPELL
|
||||
#ifdef __WXDEBUG__
|
||||
#pragma comment(lib,"hunspelld.lib")
|
||||
#else
|
||||
#pragma comment(lib,"hunspell.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//////////
|
||||
// FFMPEG
|
||||
#ifdef WITH_FFMPEG
|
||||
#pragma comment(lib, "avcodec-51.lib")
|
||||
#pragma comment(lib, "avformat-51.lib")
|
||||
#pragma comment(lib, "avutil-49.lib")
|
||||
#endif
|
||||
|
||||
|
||||
/////////////
|
||||
// FreeType2
|
||||
#ifdef WITH_FREETYPE2
|
||||
#ifdef __WXDEBUG__
|
||||
#pragma comment(lib,"freetype233MT_D.lib")
|
||||
#else
|
||||
#pragma comment(lib,"freetype233MT.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
///////////////
|
||||
// Font Config
|
||||
#ifdef WITH_FONTCONFIG
|
||||
#pragma comment(lib,"libfontconfig.lib")
|
||||
#endif
|
||||
|
||||
|
||||
#endif // VisualC
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_HUNSPELL
|
||||
|
||||
#include "spellchecker.h"
|
||||
#include "standard_paths.h"
|
||||
#include "utils.h"
|
||||
|
@ -49,17 +52,6 @@
|
|||
#include <wx/txtstrm.h>
|
||||
|
||||
|
||||
/////////////
|
||||
// Libraries
|
||||
#if __VISUALC__ >= 1200
|
||||
#ifdef __WXDEBUG__
|
||||
#pragma comment(lib,"hunspelld.lib")
|
||||
#else
|
||||
#pragma comment(lib,"hunspell.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////
|
||||
// Hunspell class
|
||||
class HunspellSpellChecker : public SpellChecker {
|
||||
|
@ -280,3 +272,5 @@ void HunspellSpellChecker::SetLanguage(wxString language) {
|
|||
conv = NULL;
|
||||
if (hunspell) conv = new wxCSConv(wxString(hunspell->get_dic_encoding(),wxConvUTF8));
|
||||
}
|
||||
|
||||
#endif // WITH_HUNSPELL
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_CSRI
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
#include "subtitles_provider.h"
|
||||
#include "ass_file.h"
|
||||
|
@ -199,3 +202,5 @@ void CSRISubtitlesProvider::DrawSubtitles(AegiVideoFrame &dst,double time) {
|
|||
// Render
|
||||
csri_render(instance,&frame,time);
|
||||
}
|
||||
|
||||
#endif // WITH_CSRI
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_LIBASS
|
||||
|
||||
#include "subtitles_provider.h"
|
||||
#include "ass_file.h"
|
||||
#include "video_context.h"
|
||||
|
@ -47,20 +50,6 @@ extern "C" {
|
|||
}
|
||||
|
||||
|
||||
///////////
|
||||
// Library
|
||||
#ifdef __VISUALC__
|
||||
#ifdef __WXDEBUG__
|
||||
//#pragma comment(lib,"libassd.lib")
|
||||
#pragma comment(lib,"freetype233MT_D.lib")
|
||||
#else
|
||||
//#pragma comment(lib,"libass.lib")
|
||||
#pragma comment(lib,"freetype233MT.lib")
|
||||
#endif
|
||||
#pragma comment(lib,"libfontconfig.lib")
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////
|
||||
// libass provider
|
||||
class LibassSubtitlesProvider : public SubtitlesProvider {
|
||||
|
@ -194,3 +183,5 @@ void LibassSubtitlesProvider::DrawSubtitles(AegiVideoFrame &frame,double time) {
|
|||
img = img->next;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // WITH_LIBASS
|
||||
|
|
|
@ -38,15 +38,8 @@
|
|||
#include "version.h"
|
||||
|
||||
#if defined(__WINDOWS__) || defined(__APPLE__)
|
||||
// This include is generated by build/make-svn-rev-header.py
|
||||
// That script should be run before every build is initiated
|
||||
#include "build/svn-revision.h"
|
||||
|
||||
// Either create a build/build-credit.h file defining BUILD_CREDIT,
|
||||
// or define it during compilation of this file
|
||||
#ifndef BUILD_CREDIT
|
||||
#include "build/build-credit.h"
|
||||
#endif
|
||||
#include "../build/svn-revision.h"
|
||||
#include "../build/build-credit.h"
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_DIRECTSHOW
|
||||
|
||||
#pragma warning(disable: 4995)
|
||||
#include <wx/wxprec.h>
|
||||
#ifdef __WINDOWS__
|
||||
|
@ -56,15 +59,6 @@
|
|||
#include "options.h"
|
||||
|
||||
|
||||
///////////////////////
|
||||
// DirectShow library
|
||||
#ifdef __WXDEBUG__
|
||||
#pragma comment(lib, "strmbasdu.lib")
|
||||
#else
|
||||
#pragma comment(lib, "strmbaseu.lib")
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////
|
||||
// DirectShow Video Provider class
|
||||
class DirectShowVideoProvider: public VideoProvider {
|
||||
|
@ -591,3 +585,4 @@ void DirectShowVideoProvider::OverrideFrameTimeList(wxArrayInt list) {
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif // WITH_DIRECTSHOW
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include "config.h"
|
||||
#ifdef WITH_FFMPEG
|
||||
|
||||
#ifdef WIN32
|
||||
#define EMULATE_INTTYPES
|
||||
#endif
|
||||
|
@ -54,16 +57,6 @@ extern "C" {
|
|||
#include "ass_file.h"
|
||||
|
||||
|
||||
/////////////////////
|
||||
// Link to libraries
|
||||
#if __VISUALC__ >= 1200
|
||||
//#pragma comment(lib, "swscale-0.lib")
|
||||
#pragma comment(lib, "avcodec-51.lib")
|
||||
#pragma comment(lib, "avformat-51.lib")
|
||||
#pragma comment(lib, "avutil-49.lib")
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////
|
||||
// LibAVCodec provider
|
||||
class LAVCVideoProvider : public VideoProvider {
|
||||
|
@ -541,3 +534,5 @@ int LAVCVideoProvider::GetWidth() {
|
|||
int LAVCVideoProvider::GetHeight() {
|
||||
return codecContext->height;
|
||||
}
|
||||
|
||||
#endif // WITH_FFMPEG
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
// Copyright (c) 2007, Rodrigo Braz Monteiro
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of the Aegisub Group nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
// AEGISUB
|
||||
//
|
||||
// Website: http://aegisub.cellosoft.com
|
||||
// Contact: mailto:zeratul@cellosoft.com
|
||||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
// Enable Automation
|
||||
// Requires: Lua
|
||||
//#define WITH_AUTOMATION
|
||||
|
||||
|
||||
// Enable Automation 3
|
||||
// Requires: auto3 dll, Lua
|
||||
//#define WITH_AUTO3
|
||||
|
||||
|
||||
// Enable DirectShow video provider
|
||||
// Requires: DirectShow "baseclasses", Platform SDK?
|
||||
//#define WITH_DIRECTSHOW
|
||||
|
||||
|
||||
// Enable DirectSound audio player
|
||||
// Requires: PlatformSDK?
|
||||
//#define WITH_DIRECTSOUND
|
||||
|
||||
|
||||
// Enable FFmpeg video and audio decoders
|
||||
// Requires: libavcodec and libavformat
|
||||
//#define WITH_FFMPEG
|
||||
|
||||
|
||||
// Enable Ruby support for Automation
|
||||
// Requires: Ruby 1.9
|
||||
//#define WITH_RUBY
|
||||
|
||||
|
||||
// Enable FreeType2 font lister for the fonts collector
|
||||
// Requires: FreeType2
|
||||
//#define WITH_FREETYPE2
|
||||
|
||||
|
||||
// Enable Hunspell-based spellchecker
|
||||
// Requires: hunspell
|
||||
//#define WITH_HUNSPELL
|
||||
|
||||
|
||||
// Enable FontConfig
|
||||
// Requires: fontconfig
|
||||
//#define WITH_FONTCONFIG
|
||||
|
||||
|
||||
// Enable CSRI
|
||||
// Requires: csri
|
||||
//#define WITH_CSRI
|
||||
|
||||
|
||||
// Enable libass
|
||||
// Requires: libass
|
||||
//#define WITH_LIBASS
|
|
@ -24,6 +24,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="if not exist "..\..\aegisub\win32\config.h" (copy "..\..\aegisub\win32\config0.h" "..\..\aegisub\win32\config.h")
if not exist "..\build-credit.h" (copy "..\build-credit-base.h" "..\build-credit.h")
SubWCRev.exe "..\..\aegisub" "..\svn-revision-base.h" "..\svn-revision.h""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -40,6 +41,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../aegisub/win32"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
|
@ -62,7 +64,9 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="../../bin/aegisub_d.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
|
@ -102,6 +106,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="if not exist "..\..\aegisub\win32\config.h" (copy "..\..\aegisub\win32\config0.h" "..\..\aegisub\win32\config.h")
if not exist "..\build-credit.h" (copy "..\build-credit-base.h" "..\build-credit.h")
SubWCRev.exe "..\..\aegisub" "..\svn-revision-base.h" "..\svn-revision.h""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -117,9 +122,11 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../aegisub/win32"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdwx.h"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
|
@ -136,7 +143,9 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="../../bin/aegisub.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
|
@ -299,26 +308,10 @@
|
|||
RelativePath="..\..\aegisub\audio_player.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\audio_player_alsa.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\audio_player_dsound.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\audio_player_openal.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\audio_player_portaudio.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\audio_player_pulse.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\audio_provider.cpp"
|
||||
>
|
||||
|
@ -698,6 +691,14 @@
|
|||
<File
|
||||
RelativePath="..\..\aegisub\MatroskaParser.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\MatroskaParser.h"
|
||||
|
@ -706,6 +707,14 @@
|
|||
<File
|
||||
RelativePath="..\..\aegisub\md5.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\md5.h"
|
||||
|
@ -1071,6 +1080,14 @@
|
|||
<Filter
|
||||
Name="Core"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\win32\config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\win32\config0.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\frame_main.cpp"
|
||||
>
|
||||
|
@ -1199,14 +1216,6 @@
|
|||
RelativePath="..\..\aegisub\keyframe.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\lavc_keyframes.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\lavc_keyframes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\aegisub\video_box.cpp"
|
||||
>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
// This file determines the name of the person building the program
|
||||
|
||||
#define BUILD_CREDIT "Anonymous"
|
Loading…
Reference in New Issue