summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b40cfe)
raw | patch | inline | side by side (parent: 6b40cfe)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 12 Oct 2019 23:11:41 +0000 (02:11 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 13 Oct 2019 14:19:20 +0000 (17:19 +0300) |
src/game/Doom2DF.lpr | patch | blob | history | |
src/shared/a_modes.inc | patch | blob | history |
diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 758c4f9eb4fa2abc003b363db081ee87fa2f2fa1..b5b7bae947b82277e1c9dd8a34eddf758cfac026 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
*)
{$INCLUDE ../shared/a_modes.inc}
{$IFDEF ANDROID}library{$ELSE}program{$ENDIF} Doom2DF;
+
{$IFNDEF HEADLESS}
{$IFDEF WINDOWS}
{$APPTYPE GUI}
{$ENDIF}
{$HINTS OFF}
-{$IF DEFINED(USE_SYSSTUB)}
- {$IF DEFINED(USE_SDL) OR DEFINED(USE_SDL2)}
- {$ERROR Only one system driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_SDL)}
- {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL2)}
- {$ERROR Only one system driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_SDL2)}
- {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)}
- {$ERROR Only one system driver must be selected!}
- {$ENDIF}
-{$ELSE}
- {$ERROR System driver not selected. Use -dUSE_SYSSTUB or -dUSE_SDL or -dUSE_SDL2}
-{$ENDIF}
-
-{$IF DEFINED(USE_SOUNDSTUB)}
- {$IF DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_SDLMIXER)}
- {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_FMOD)}
- {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_OPENAL)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSEIF DEFINED(USE_OPENAL)}
- {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD)}
- {$ERROR Only one sound driver must be selected!}
- {$ENDIF}
-{$ELSE}
- {$ERROR Sound driver not selected. Use -dUSE_SOUNDSTUB or -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL}
-{$ENDIF}
-
-{$IFDEF HEADLESS}
- {$IFNDEF USE_SYSSTUB}
- {$ERROR Using system driver has no sense for headless build. Use -dUSE_SYSSTUB instead}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF ENABLE_HOLMES}
- {$IFDEF HEADLESS}
- {$ERROR Holmes in HEADLESS mode has no sense}
- {$ENDIF}
- {$IFNDEF USE_SDL2}
- {$ERROR Holmes supported only with SDL2}
- {$ENDIF}
- {$IFDEF USE_GLES1}
- {$ERROR Holmes not supported with GLES}
- {$ENDIF}
-{$ENDIF}
-
uses
{$IFDEF ANDROID}
ctypes,
diff --git a/src/shared/a_modes.inc b/src/shared/a_modes.inc
index fc8cc51c991dc635defab80fef4b0e2aacbc1f7e..733abb82e82d58ff9d11777541efe0924870758b 100644 (file)
--- a/src/shared/a_modes.inc
+++ b/src/shared/a_modes.inc
{$DEFINE WINDOWS}
{$ENDIF WINDOWS}
{$ENDIF}
+
+(* --------- Build options check --------- *)
+
+{$IFDEF HEADLESS}
+ {$DEFINE USE_SYSSTUB}
+ {$IF DEFINED(USE_SDL) OR DEFINED(USE_SDL2)}
+ {$WARNING System drivers not supported in headless mode. Force stub driver...}
+ {$UNDEF USE_SDL}
+ {$UNDEF USE_SDL2}
+ {$ENDIF}
+{$ENDIF}
+
+{$IF DEFINED(USE_SYSSTUB)}
+ {$IF DEFINED(USE_SDL) OR DEFINED(USE_SDL2)}
+ {$ERROR Only one system driver must be selected!}
+ {$ENDIF}
+{$ELSEIF DEFINED(USE_SDL)}
+ {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL2)}
+ {$ERROR Only one system driver must be selected!}
+ {$ENDIF}
+{$ELSEIF DEFINED(USE_SDL2)}
+ {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)}
+ {$ERROR Only one system driver must be selected!}
+ {$ENDIF}
+{$ELSE}
+ {$DEFINE USE_SDL2}
+ {.$ERROR System driver not selected. Use -dUSE_SYSSTUB or -dUSE_SDL or -dUSE_SDL2}
+{$ENDIF}
+
+{$IF DEFINED(USE_SOUNDSTUB)}
+ {$IF DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
+ {$ERROR Only one sound driver must be selected!}
+ {$ENDIF}
+{$ELSEIF DEFINED(USE_SDLMIXER)}
+ {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
+ {$ERROR Only one sound driver must be selected!}
+ {$ENDIF}
+{$ELSEIF DEFINED(USE_FMOD)}
+ {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_OPENAL)}
+ {$ERROR Only one sound driver must be selected!}
+ {$ENDIF}
+{$ELSEIF DEFINED(USE_OPENAL)}
+ {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD)}
+ {$ERROR Only one sound driver must be selected!}
+ {$ENDIF}
+{$ELSE}
+ {$ERROR Sound driver not selected. Use -dUSE_SOUNDSTUB or -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL}
+{$ENDIF}
+
+{$IFDEF ENABLE_HOLMES}
+ {$IFDEF HEADLESS}
+ {$ERROR Holmes in HEADLESS mode has no sense}
+ {$ENDIF}
+ {$IFNDEF USE_SDL2}
+ {$ERROR Holmes supported only with SDL2}
+ {$ENDIF}
+ {$IFDEF USE_GLES1}
+ {$ERROR Holmes not supported with GLES}
+ {$ENDIF}
+{$ENDIF}