aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-07-29 13:15:28 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-07-29 13:15:28 +0000
commit17c04c9149b1cb263e1e8d6211e393ee0c0b1b7d (patch)
tree7af8b975cf9ab60be68f3526682881f1d28b7835
parentb8556338b9612677ee4b4d91a9c2d2bf59f5ecce (diff)
downloadusdx-17c04c9149b1cb263e1e8d6211e393ee0c0b1b7d.tar.gz
usdx-17c04c9149b1cb263e1e8d6211e393ee0c0b1b7d.tar.xz
usdx-17c04c9149b1cb263e1e8d6211e393ee0c0b1b7d.zip
another try to fix Delphi compilation. Ugly andless elegant, but hopefully closer to working.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2923 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--src/config-darwin.inc27
-rw-r--r--src/config-win.inc53
-rw-r--r--src/config.inc.in18
-rw-r--r--src/ultrastardx.dpr28
4 files changed, 48 insertions, 78 deletions
diff --git a/src/config-darwin.inc b/src/config-darwin.inc
index 888464f5..67a4c242 100644
--- a/src/config-darwin.inc
+++ b/src/config-darwin.inc
@@ -18,23 +18,22 @@
{$ELSE}
{$DEFINE FFMPEG_DIR := 'ffmpeg'}
{$IFEND}
- {$IFEND}
+ {$ENDIF}
{$IF Defined(IncludeConstants)}
- av__codec = 'libavcodec';
- LIBAVCODEC_VERSION_MAJOR = 53;
- LIBAVCODEC_VERSION_MINOR = 8;
- LIBAVCODEC_VERSION_RELEASE = 0;
+ av__codec = 'libavcodec';
+ LIBAVCODEC_VERSION_MAJOR = 53;
+ LIBAVCODEC_VERSION_MINOR = 8;
+ LIBAVCODEC_VERSION_RELEASE = 0;
- av__format = 'libavformat';
- LIBAVFORMAT_VERSION_MAJOR = 53;
- LIBAVFORMAT_VERSION_MINOR = 5;
- LIBAVFORMAT_VERSION_RELEASE = 0;
+ av__format = 'libavformat';
+ LIBAVFORMAT_VERSION_MAJOR = 53;
+ LIBAVFORMAT_VERSION_MINOR = 5;
+ LIBAVFORMAT_VERSION_RELEASE = 0;
- av__util = 'libavutil';
- LIBAVUTIL_VERSION_MAJOR = 51;
- LIBAVUTIL_VERSION_MINOR = 9;
- LIBAVUTIL_VERSION_RELEASE = 1;
-
+ av__util = 'libavutil';
+ LIBAVUTIL_VERSION_MAJOR = 51;
+ LIBAVUTIL_VERSION_MINOR = 9;
+ LIBAVUTIL_VERSION_RELEASE = 1;
{$IFEND}
{$IFEND}
diff --git a/src/config-win.inc b/src/config-win.inc
index 0359038d..46e1f336 100644
--- a/src/config-win.inc
+++ b/src/config-win.inc
@@ -6,44 +6,21 @@
{$DEFINE HaveFFmpeg}
-{$IF Defined(HaveFFmpeg)}
- {$IFNDEF FFMPEG_DIR}
- {$DEFINE FFMPEG_DIR := 'ffmpeg-0.10'}
- {$ENDIF}
- {$IFNDEF AVCODEC_PATH}
- {$DEFINE AVCODEC_PATH := 'lib\ffmpeg-0.10\avcodec.pas'}
- {$ENDIF}
- {$IFNDEF AVFORMAT_PATH}
- {$DEFINE AVFORMAT_PATH := 'lib\ffmpeg-0.10\avformat.pas'}
- {$ENDIF}
- {$IFNDEF AVUTIL_PATH}
- {$DEFINE AVUTIL_PATH := 'lib\ffmpeg-0.10\avutil.pas'}
- {$ENDIF}
- {$IFNDEF RATIONAL_PATH}
- {$DEFINE RATIONAL_PATH := 'lib\ffmpeg-0.10\rational.pas'}
- {$ENDIF}
- {$IFNDEF AVIO_PATH}
- {$DEFINE AVIO_PATH := 'lib\ffmpeg-0.10\avio.pas'}
- {$ENDIF}
- {$IFNDEF SWSCALE_PATH}
- {$DEFINE SWSCALE_PATH := 'lib\ffmpeg-0.10\swscale.pas'}
- {$ENDIF}
- {$IF Defined(IncludeConstants)}
- av__codec = 'avcodec-52';
- LIBAVCODEC_VERSION_MAJOR = 52;
- LIBAVCODEC_VERSION_MINOR = 67;
- LIBAVCODEC_VERSION_RELEASE = 2;
-
- av__format = 'avformat-52';
- LIBAVFORMAT_VERSION_MAJOR = 52;
- LIBAVFORMAT_VERSION_MINOR = 62;
- LIBAVFORMAT_VERSION_RELEASE = 0;
-
- av__util = 'avutil-50';
- LIBAVUTIL_VERSION_MAJOR = 50;
- LIBAVUTIL_VERSION_MINOR = 15;
- LIBAVUTIL_VERSION_RELEASE = 2;
- {$IFEND}
+{$IF Defined(HaveFFmpeg) and Defined(IncludeConstants)}
+ av__codec = 'avcodec-52';
+ LIBAVCODEC_VERSION_MAJOR = 52;
+ LIBAVCODEC_VERSION_MINOR = 67;
+ LIBAVCODEC_VERSION_RELEASE = 2;
+
+ av__format = 'avformat-52';
+ LIBAVFORMAT_VERSION_MAJOR = 52;
+ LIBAVFORMAT_VERSION_MINOR = 62;
+ LIBAVFORMAT_VERSION_RELEASE = 0;
+
+ av__util = 'avutil-50';
+ LIBAVUTIL_VERSION_MAJOR = 50;
+ LIBAVUTIL_VERSION_MINOR = 15;
+ LIBAVUTIL_VERSION_RELEASE = 2;
{$IFEND}
{$DEFINE HaveSWScale}
diff --git a/src/config.inc.in b/src/config.inc.in
index 349d05c2..168a1ced 100644
--- a/src/config.inc.in
+++ b/src/config.inc.in
@@ -19,24 +19,6 @@
{$DEFINE FFMPEG_DIR := 'ffmpeg'}
{$IFEND}
{$ENDIF}
- {$IFNDEF AVCODEC_PATH}
- {$DEFINE AVCODEC_PATH := 'lib\' + FFMPEG_DIR + '\avcodec.pas'}
- {$ENDIF}
- {$IFNDEF AVFORMAT_PATH}
- {$DEFINE AVFORMAT_PATH := 'lib\' + FFMPEG_DIR + '\avformat.pas'}
- {$ENDIF}
- {$IFNDEF AVUTIL_PATH}
- {$DEFINE AVUTIL_PATH := 'lib\' + FFMPEG_DIR + '\avutil.pas'}
- {$ENDIF}
- {$IFNDEF RATIONAL_PATH}
- {$DEFINE RATIONAL_PATH := 'lib\' + FFMPEG_DIR + '\rational.pas'}
- {$ENDIF}
- {$IFNDEF AVIO_PATH}
- {$DEFINE AVIO_PATH := 'lib\' + FFMPEG_DIR + '\avio.pas'}
- {$ENDIF}
- {$IFNDEF SWSCALE_PATH}
- {$DEFINE SWSCALE_PATH := 'lib\' + FFMPEG_DIR + '\swscale.pas'}
- {$ENDIF}
{$IF Defined(IncludeConstants)}
av__codec = 'libavcodec';
LIBAVCODEC_VERSION_MAJOR = @libavcodec_VERSION_MAJOR@;
diff --git a/src/ultrastardx.dpr b/src/ultrastardx.dpr
index 682c3cd7..0c899632 100644
--- a/src/ultrastardx.dpr
+++ b/src/ultrastardx.dpr
@@ -85,17 +85,29 @@ uses
{$IFDEF UsePortmixer}
portmixer in 'lib\portmixer\portmixer.pas',
{$ENDIF}
+
{$IFDEF UseFFmpeg}
- avcodec in AVCODEC_PATH,
- avformat in AVFORMAT_PATH,
- avutil in AVUTIL_PATH,
- rational in RATIONAL_PATH,
- avio in AVIO_PATH,
+ {$IFDEF FPC} // This solution is not very elegant, but working
+ avcodec in 'lib\' + FFMPEG_DIR + '\avcodec.pas',
+ avformat in 'lib\' + FFMPEG_DIR + '\avformat.pas',
+ avutil in 'lib\' + FFMPEG_DIR + '\avutil.pas',
+ rational in 'lib\' + FFMPEG_DIR + '\rational.pas',
+ avio in 'lib\' + FFMPEG_DIR + '\avio.pas',
{$IFDEF UseSWScale}
- swscale in SWSCALE_PATH,
+ swscale in 'lib\' + FFMPEG_DIR + '\swscale.pas',
{$ENDIF}
- UMediaCore_FFmpeg in 'media\UMediaCore_FFmpeg.pas',
- {$ENDIF}
+ {$ELSE} // speak: This is for Delphi. Change version as needed!
+ avcodec in 'lib\ffmpeg-0.10\avcodec.pas',
+ avformat in 'lib\ffmpeg-0.10\avformat.pas',
+ avutil in 'lib\ffmpeg-0.10\avutil.pas',
+ rational in 'lib\ffmpeg-0.10\rational.pas',
+ avio in 'lib\ffmpeg-0.10\avio.pas',
+ {$IFDEF UseSWScale}
+ swscale in 'lib\ffmpeg-0.10\swscale.pas',
+ {$ENDIF}
+ {$ENDIF}
+ UMediaCore_FFmpeg in 'media\UMediaCore_FFmpeg.pas',
+ {$ENDIF} // UseFFmpeg
{$IFDEF UseSRCResample}
samplerate in 'lib\samplerate\samplerate.pas',