aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UConfig.pas19
-rw-r--r--Game/Code/UltraStar.dpr2
-rw-r--r--Game/Code/switches.inc14
3 files changed, 24 insertions, 11 deletions
diff --git a/Game/Code/Classes/UConfig.pas b/Game/Code/Classes/UConfig.pas
index 51e9348e..a7b0f328 100644
--- a/Game/Code/Classes/UConfig.pas
+++ b/Game/Code/Classes/UConfig.pas
@@ -67,8 +67,19 @@ uses
Sysutils;
const
- // include config-file
+ // IMPORTANT:
+ // If IncludeConstants is defined, the const-sections
+ // of the config-file will be included too.
+ // This switch is necessary because it is not possible to
+ // include the const-sections in the switches.inc.
+ // switches.inc is always included before the first uses-
+ // section but at that place no const-section is allowed.
+ // So we have to include the config-file in switches.inc
+ // with IncludeConstants undefined and in UConfig.pas with
+ // IncludeConstants defined (see the note above).
{$DEFINE IncludeConstants}
+
+ // include config-file (defines + constants)
{$IF Defined(MSWindows)}
{$I ../config-win.inc}
{$ELSEIF Defined(Linux)}
@@ -139,14 +150,14 @@ const
(LIBAVUTIL_VERSION_MINOR * VERSION_MINOR) +
(LIBAVUTIL_VERSION_RELEASE * VERSION_RELEASE);
- {$ENDIF}
-
{$IFDEF HaveSWScale}
LIBSWSCALE_VERSION = (LIBSWSCALE_VERSION_MAJOR * VERSION_MAJOR) +
(LIBSWSCALE_VERSION_MINOR * VERSION_MINOR) +
(LIBSWSCALE_VERSION_RELEASE * VERSION_RELEASE);
{$ENDIF}
-
+
+ {$ENDIF}
+
{$IFDEF HaveProjectM}
PROJECTM_VERSION = (PROJECTM_VERSION_MAJOR * VERSION_MAJOR) +
(PROJECTM_VERSION_MINOR * VERSION_MINOR) +
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index 5c26180e..d624e809 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -53,10 +53,10 @@ uses
opt in 'lib\ffmpeg\opt.pas',
avio in 'lib\ffmpeg\avio.pas',
mathematics in 'lib\ffmpeg\mathematics.pas',
- {$ENDIF}
{$IFDEF UseSWScale}
swscale in 'lib\ffmpeg\swscale.pas',
{$ENDIF}
+ {$ENDIF}
{$IFDEF UseProjectM_0_9}
projectM in 'lib\projectM\0.9\projectM.pas',
diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc
index a50c759b..66a8ad07 100644
--- a/Game/Code/switches.inc
+++ b/Game/Code/switches.inc
@@ -34,6 +34,7 @@
{$IF Defined(win32)}
+ // include defines but no constants
{$I config-win.inc}
// audio config
@@ -53,9 +54,9 @@
// video config
{$IFDEF HaveFFMpeg}
{$DEFINE UseFFMpegVideo}
- {$ENDIF}
- {$IFDEF HaveSWScale}
- {$DEFINE UseSWScale}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$ENDIF}
{$ENDIF}
// misc defines
@@ -72,6 +73,7 @@
{$ENDIF}
{$ENDIF}
{$ELSEIF Defined(Linux)}
+ // include defines but no constants
{$I config-linux.inc}
// audio config
@@ -86,9 +88,9 @@
// video config
{$IFDEF HaveFFMpeg}
{$DEFINE UseFFMpegVideo}
- {$ENDIF}
- {$IFDEF HaveSWScale}
- {$DEFINE UseSWScale}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$ENDIF}
{$ENDIF}
// misc defines