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
//
#ifndef NO_SPELLCHECKER
///////////
//Includes
#include ".\aspell_wrap.h"
#include "setup.h"
#if USE_ASPELL == 1
#include "aspell_wrap.h"
//////////////////////

View File

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

View File

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

View File

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

View File

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

View File

@ -39,6 +39,8 @@
///////////
// Headers
#include "setup.h"
#if USE_DIRECTSOUND == 1
#include "audio_player.h"
#include <dsound.h>
@ -109,3 +111,5 @@ public:
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 "main.h"
#include "dialog_spellcheck.h"

View File

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

View File

@ -36,6 +36,7 @@
///////////////////
// Include headers
#include "setup.h"
#include <wx/wxprec.h>
#include <wx/mimetype.h>
#include <wx/filename.h>
@ -73,7 +74,7 @@
#include "toggle_bitmap.h"
#include "dialog_hotkeys.h"
#include "dialog_timing_processor.h"
#ifndef NO_FEX
#if USE_FEXTRACKER == 1
#include "../FexTrackerSource/FexTracker.h"
#include "../FexTrackerSource/FexTrackingFeature.h"
#include "../FexTrackerSource/FexMovement.h"
@ -95,7 +96,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
EVT_BUTTON(Video_Stop, FrameMain::OnVideoStop)
EVT_TOGGLEBUTTON(Video_Auto_Scroll, FrameMain::OnVideoToggleScroll)
#ifndef NO_FEX
#if USE_FEXTRACKER == 1
EVT_BUTTON(Video_Tracker_Menu, FrameMain::OnVideoTrackerMenu)
EVT_MENU(Video_Track_Points, FrameMain::OnVideoTrackPoints)
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
#include "setup.h"
#include "subtitle_format.h"
#include "subtitle_format_ass.h"
#include "subtitle_format_srt.h"
#include "subtitle_format_txt.h"
#if USE_PRS == 1
#include "subtitle_format_prs.h"
#endif
#include "subtitle_format_mkv.h"
#include "ass_file.h"
@ -125,7 +128,7 @@ void SubtitleFormat::LoadFormats () {
new SRTSubtitleFormat();
new TXTSubtitleFormat();
new MKVSubtitleFormat();
#ifndef NO_PRS
#if USE_PRS == 1
new PRSSubtitleFormat();
#endif
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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