Commited setup0.h. To build aegisub, copy it as setup.h and edit whatever options you want. DON'T COMMIT SETUP.H TO REPOSITORY.

Originally committed to SVN as r592.
This commit is contained in:
Rodrigo Braz Monteiro 2006-12-23 03:55:00 +00:00
parent b935075945
commit 97346bbc58
18 changed files with 155 additions and 30 deletions

View File

@ -33,12 +33,12 @@
// Contact: mailto:zeratul@cellosoft.com // Contact: mailto:zeratul@cellosoft.com
// //
#ifndef NO_SPELLCHECKER
/////////// ///////////
//Includes //Includes
#include ".\aspell_wrap.h" #include "setup.h"
#if USE_ASPELL == 1
#include "aspell_wrap.h"
////////////////////// //////////////////////

View File

@ -36,13 +36,14 @@
//////////// ////////////
// Includes // Includes
#include "setup.h"
#include "ass_dialogue.h" #include "ass_dialogue.h"
#include "ass_override.h" #include "ass_override.h"
#include "vfr.h" #include "vfr.h"
#include "utils.h" #include "utils.h"
#include <fstream> #include <fstream>
#include <wx/tokenzr.h> #include <wx/tokenzr.h>
#ifndef NO_FEX #if USE_FEXTRACKER == 1
#include "../FexTrackerSource/FexTracker.h" #include "../FexTrackerSource/FexTracker.h"
#include "../FexTrackerSource/FexMovement.h" #include "../FexTrackerSource/FexMovement.h"
#endif #endif
@ -51,7 +52,7 @@
////////////////////// AssDialogue ////////////////////// ////////////////////// AssDialogue //////////////////////
// Constructs AssDialogue // Constructs AssDialogue
AssDialogue::AssDialogue() { AssDialogue::AssDialogue() {
#ifndef NO_FEX #if USE_FEXTRACKER == 1
Tracker = 0; Tracker = 0;
Movement = 0; Movement = 0;
#endif #endif
@ -75,7 +76,7 @@ AssDialogue::AssDialogue() {
AssDialogue::AssDialogue(wxString _data,bool IsSSA) { AssDialogue::AssDialogue(wxString _data,bool IsSSA) {
#ifndef NO_FEX #if USE_FEXTRACKER == 1
Tracker = 0; Tracker = 0;
Movement = 0; Movement = 0;
#endif #endif
@ -100,7 +101,7 @@ AssDialogue::~AssDialogue () {
// Clear // Clear
void AssDialogue::Clear () { void AssDialogue::Clear () {
ClearBlocks(); ClearBlocks();
#ifndef NO_FEX #if USE_FEXTRACKER == 1
if( Tracker ) if( Tracker )
{ {
delete Tracker; delete Tracker;
@ -193,7 +194,7 @@ bool AssDialogue::Parse(wxString rawData, bool IsSSA) {
Effect.Trim(true); Effect.Trim(true);
Effect.Trim(false); Effect.Trim(false);
#ifndef NO_FEX #if USE_FEXTRACKER == 1
if( Effect.BeforeFirst(':')==_T("FexMovement") ) if( Effect.BeforeFirst(':')==_T("FexMovement") )
{ {
if( Movement ) DeleteMovement( Movement ); if( Movement ) DeleteMovement( Movement );

View File

@ -39,10 +39,11 @@
//////////// ////////////
// Includes // Includes
#include "setup.h"
#include <vector> #include <vector>
#include "ass_entry.h" #include "ass_entry.h"
#include "ass_time.h" #include "ass_time.h"
#ifndef NO_FEX #if USE_FEXTRACKER == 1
class FexTracker; class FexTracker;
class FexMovement; class FexMovement;
#endif #endif
@ -174,7 +175,7 @@ public:
wxString Actor; // Actor name wxString Actor; // Actor name
wxString Effect; // Effect name wxString Effect; // Effect name
wxString Text; // Raw text data wxString Text; // Raw text data
#ifndef NO_FEX #if USE_FEXTRACKER == 1
FexTracker *Tracker; // Point tracker FexTracker *Tracker; // Point tracker
FexMovement *Movement; // Point tracker generated movement FexMovement *Movement; // Point tracker generated movement
#endif #endif

View File

@ -37,8 +37,9 @@
/////////// ///////////
// Headers // Headers
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include "setup.h"
#include "audio_player_portaudio.h" #include "audio_player_portaudio.h"
#ifdef USE_DSOUND #if USE_DIRECTSOUND == 1
#include "audio_player_dsound.h" #include "audio_player_dsound.h"
#endif #endif
#include "audio_provider.h" #include "audio_provider.h"
@ -122,7 +123,7 @@ AudioPlayer* AudioPlayer::GetAudioPlayer() {
try { try {
// Get DirectSound player // Get DirectSound player
#ifdef USE_DSOUND #if USE_DIRECTSOUND == 1
player = new DirectSoundPlayer; player = new DirectSoundPlayer;
#endif #endif

View File

@ -39,6 +39,8 @@
/////////// ///////////
// Headers // Headers
#include "setup.h"
#if USE_DIRECTSOUND == 1
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include "audio_provider.h" #include "audio_provider.h"
#include "audio_player_dsound.h" #include "audio_player_dsound.h"
@ -372,3 +374,5 @@ wxThread::ExitCode DirectSoundPlayerThread::Entry() {
Delete(); Delete();
return 0; return 0;
} }
#endif

View File

@ -39,6 +39,8 @@
/////////// ///////////
// Headers // Headers
#include "setup.h"
#if USE_DIRECTSOUND == 1
#include "audio_player.h" #include "audio_player.h"
#include <dsound.h> #include <dsound.h>
@ -109,3 +111,5 @@ public:
wxMutex *GetMutex() { return &DSMutex; } wxMutex *GetMutex() { return &DSMutex; }
}; };
#endif

View File

@ -34,8 +34,8 @@
// //
#ifndef NO_SPELLCHECKER #include "setup.h"
#if USE_ASPELL == 1
#include "aspell_wrap.h" #include "aspell_wrap.h"
#include "main.h" #include "main.h"
#include "dialog_spellcheck.h" #include "dialog_spellcheck.h"

View File

@ -7,6 +7,8 @@
/////////////////// ///////////////////
// Include headers // Include headers
#include "setup.h"
#if USE_FEXTRACKER == 1
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include <wx/mimetype.h> #include <wx/mimetype.h>
#include <wx/filename.h> #include <wx/filename.h>
@ -287,4 +289,4 @@ void FrameMain::OnVideoTrackMovementMoveAfter(wxCommandEvent &event) {
videoBox->videoDisplay->bTrackerEditing = 0; videoBox->videoDisplay->bTrackerEditing = 0;
} }
#endif

View File

@ -36,6 +36,7 @@
/////////////////// ///////////////////
// Include headers // Include headers
#include "setup.h"
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include <wx/mimetype.h> #include <wx/mimetype.h>
#include <wx/filename.h> #include <wx/filename.h>
@ -73,7 +74,7 @@
#include "toggle_bitmap.h" #include "toggle_bitmap.h"
#include "dialog_hotkeys.h" #include "dialog_hotkeys.h"
#include "dialog_timing_processor.h" #include "dialog_timing_processor.h"
#ifndef NO_FEX #if USE_FEXTRACKER == 1
#include "../FexTrackerSource/FexTracker.h" #include "../FexTrackerSource/FexTracker.h"
#include "../FexTrackerSource/FexTrackingFeature.h" #include "../FexTrackerSource/FexTrackingFeature.h"
#include "../FexTrackerSource/FexMovement.h" #include "../FexTrackerSource/FexMovement.h"
@ -95,7 +96,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
EVT_BUTTON(Video_Stop, FrameMain::OnVideoStop) EVT_BUTTON(Video_Stop, FrameMain::OnVideoStop)
EVT_TOGGLEBUTTON(Video_Auto_Scroll, FrameMain::OnVideoToggleScroll) EVT_TOGGLEBUTTON(Video_Auto_Scroll, FrameMain::OnVideoToggleScroll)
#ifndef NO_FEX #if USE_FEXTRACKER == 1
EVT_BUTTON(Video_Tracker_Menu, FrameMain::OnVideoTrackerMenu) EVT_BUTTON(Video_Tracker_Menu, FrameMain::OnVideoTrackerMenu)
EVT_MENU(Video_Track_Points, FrameMain::OnVideoTrackPoints) EVT_MENU(Video_Track_Points, FrameMain::OnVideoTrackPoints)
EVT_MENU(Video_Track_Point_Add, FrameMain::OnVideoTrackPointAdd) EVT_MENU(Video_Track_Point_Add, FrameMain::OnVideoTrackPointAdd)

101
core/setup0.h Normal file
View File

@ -0,0 +1,101 @@
// Copyright (c) 2006, 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
//
//
// This is a configuration file for the Aegisub project
//
// In order to use it, copy it as setup.h and edit anything you might want there
// DO NOT commit your personal setup.h to the repository
//
////////////////////////////////////
// Enable DirectShow Video Provider
// Requires: Win32, DirectX SDK
#define USE_DIRECTSHOW 0
///////////////////////////////////
// Enable DirectSound Audio Player
// Requires: Win32, DirectX SDK
#define USE_DIRECTSOUND 1
/////////////////////////////////
// Enable PortAudio Audio Player
// Requires: PortAudio library
#define USE_PORTAUDIO 0
//////////////////////////////
// Enable ASpell spellchecker
// Requires: aspell ibrary
#define USE_ASPELL 0
//////////////////////////////
// Enable LAVC video provider
// Requires: FFMPEG library
#define USE_LAVC 0
////////////////////////
// Enable PRS Exporting
// Requires: wxPNG library
#define USE_PRS 1
/////////////////////
// Enable FexTracker
// Requires: Win32, FexTracker library
#define USE_FEXTRACKER 1
// The following two are Linux-specific, so it would involve changing the makefiles
// Therefore, I haven't changed the code to make them work, yet
/////////////////
// Enable LibASS
// Requires: libass library, GNU?
#define USE_LIBASS 0
//////////////
// Enable ASA
// Requires: asa library
#define USE_ASA 0

View File

@ -36,11 +36,14 @@
/////////// ///////////
// Headers // Headers
#include "setup.h"
#include "subtitle_format.h" #include "subtitle_format.h"
#include "subtitle_format_ass.h" #include "subtitle_format_ass.h"
#include "subtitle_format_srt.h" #include "subtitle_format_srt.h"
#include "subtitle_format_txt.h" #include "subtitle_format_txt.h"
#if USE_PRS == 1
#include "subtitle_format_prs.h" #include "subtitle_format_prs.h"
#endif
#include "subtitle_format_mkv.h" #include "subtitle_format_mkv.h"
#include "ass_file.h" #include "ass_file.h"
@ -125,7 +128,7 @@ void SubtitleFormat::LoadFormats () {
new SRTSubtitleFormat(); new SRTSubtitleFormat();
new TXTSubtitleFormat(); new TXTSubtitleFormat();
new MKVSubtitleFormat(); new MKVSubtitleFormat();
#ifndef NO_PRS #if USE_PRS == 1
new PRSSubtitleFormat(); new PRSSubtitleFormat();
#endif #endif
} }

View File

@ -34,10 +34,10 @@
// //
#ifndef NO_PRS
/////////// ///////////
// Headers // Headers
#include "setup.h"
#if USE_PRS == 1
#include <wx/image.h> #include <wx/image.h>
#include <wx/mstream.h> #include <wx/mstream.h>
#include <wx/filename.h> #include <wx/filename.h>
@ -779,4 +779,4 @@ wxImage PRSSubtitleFormat::SubImageWithAlpha (wxImage &source,const wxRect &rect
return image; return image;
} }
#endif /* NO_PRS */ #endif

View File

@ -39,6 +39,8 @@
/////////// ///////////
// Headers // Headers
#include "setup.h"
#if USE_PRS == 1
#include "subtitle_format.h" #include "subtitle_format.h"
#include <vector> #include <vector>
@ -69,3 +71,5 @@ public:
bool CanWriteFile(wxString filename); bool CanWriteFile(wxString filename);
void WriteFile(wxString filename,wxString encoding); void WriteFile(wxString filename,wxString encoding);
}; };
#endif

View File

@ -1,5 +1,5 @@
// -*- c-basic-offset: 8; indent-tabs-mode: t -*- // -*- c-basic-offset: 8; indent-tabs-mode: t -*-
// Copyright (c) 2006, David Lamparter // Copyright (c) 2006, Evgeniy Stepanov
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without

View File

@ -36,6 +36,7 @@
//////////// ////////////
// Includes // Includes
#include "setup.h"
#include "video_display.h" #include "video_display.h"
#include "video_provider.h" #include "video_provider.h"
#include "vfr.h" #include "vfr.h"
@ -55,7 +56,7 @@
#include <wx/clipbrd.h> #include <wx/clipbrd.h>
#include <wx/filename.h> #include <wx/filename.h>
#include <wx/config.h> #include <wx/config.h>
#ifndef NO_FEX #if USE_FEXTRACKER == 1
#include "../FexTrackerSource/FexTracker.h" #include "../FexTrackerSource/FexTracker.h"
#include "../FexTrackerSource/FexTrackingFeature.h" #include "../FexTrackerSource/FexTrackingFeature.h"
#include "../FexTrackerSource/FexMovement.h" #include "../FexTrackerSource/FexMovement.h"
@ -300,7 +301,7 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
int x = event.GetX(); int x = event.GetX();
int y = event.GetY(); int y = event.GetY();
#ifndef NO_FEX #if USE_FEXTRACKER == 1
if( event.ButtonDown(wxMOUSE_BTN_LEFT) ) if( event.ButtonDown(wxMOUSE_BTN_LEFT) )
{ {
MouseDownX = x; MouseDownX = x;
@ -672,7 +673,7 @@ void VideoDisplay::OnCopyCoords(wxCommandEvent &event) {
// Draw Tracking Overlay // Draw Tracking Overlay
void VideoDisplay::DrawTrackingOverlay( wxDC &dc ) void VideoDisplay::DrawTrackingOverlay( wxDC &dc )
{ {
#ifndef NO_FEX #if USE_FEXTRACKER == 1
if( IsPlaying ) return; if( IsPlaying ) return;
// Get line // Get line

View File

@ -40,6 +40,7 @@
#include "video_provider_lavc.h" #include "video_provider_lavc.h"
#include "video_provider_dshow.h" #include "video_provider_dshow.h"
#include "options.h" #include "options.h"
#include "setup.h"
//////////////// ////////////////
@ -65,7 +66,7 @@ VideoProvider *VideoProvider::GetProvider(wxString video,wxString subtitles) {
wxString preffered = Options.AsText(_T("Video provider")).Lower(); wxString preffered = Options.AsText(_T("Video provider")).Lower();
// See if it's OK to use LAVC // See if it's OK to use LAVC
#ifdef USE_LAVC #if USE_LAVC == 1
if (preffered == _T("ffmpeg") || (!avisynthAvailable && !dshowAvailable)) { if (preffered == _T("ffmpeg") || (!avisynthAvailable && !dshowAvailable)) {
// Load // Load
bool success = false; bool success = false;
@ -101,7 +102,7 @@ VideoProvider *VideoProvider::GetProvider(wxString video,wxString subtitles) {
#endif #endif
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#ifdef USE_DIRECTSHOW #if USE_DIRECTSHOW == 1
// Use DirectShow provider // Use DirectShow provider
if (!provider && (preffered == _T("dshow") || !avisynthAvailable)) { if (!provider && (preffered == _T("dshow") || !avisynthAvailable)) {
try { try {

View File

@ -37,8 +37,9 @@
/////////// ///////////
// Headers // Headers
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include "setup.h"
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#ifdef USE_DIRECTSHOW #if USE_DIRECTSHOW == 1
#pragma warning(disable: 4995) #pragma warning(disable: 4995)
#include <wx/image.h> #include <wx/image.h>
#include <windows.h> #include <windows.h>

View File

@ -40,9 +40,9 @@
/////////// ///////////
// Headers // Headers
#include <wx/wxprec.h> #include <wx/wxprec.h>
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#ifdef USE_DIRECTSHOW #include "setup.h"
#if USE_DIRECTSHOW == 1
#include "video_provider.h" #include "video_provider.h"
#pragma warning(disable: 4995) #pragma warning(disable: 4995)
#include <dshow.h> #include <dshow.h>