aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/switches.inc
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-24 12:47:09 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-24 12:47:09 +0000
commit0d86a79ad303441af3080f1c744da0c556927425 (patch)
tree83943097249ee2bf37ac45a64b7db7f1006eb5ab /Game/Code/switches.inc
parentc0e68207b30e23265520b4bc1335d0bf9aea3b11 (diff)
downloadusdx-0d86a79ad303441af3080f1c744da0c556927425.tar.gz
usdx-0d86a79ad303441af3080f1c744da0c556927425.tar.xz
usdx-0d86a79ad303441af3080f1c744da0c556927425.zip
- reverted some stuff that was erroneously commited by one of the last commits.
- moved DEBUG define from config-*.inc back to switches.inc - APPTYPE is needed by FPC (for Windows) too. Fixed some crashes with Writeln in FPC (Win) if no console is available. - Moved thread-safe ULog.SafeWriteln() to UCommon.ConsoleWriteln(), this is used by DebugWriteln() now, so this is thread-safe too - Added log-levels (sorted by severity): DEBUG, INFO, STATUS, WARN, ERROR, CRITICAL. Default log-level is LOG_LEVEL_ERROR, so warnings and less important logs are not printed by default. You can change this by LOG_LEVEL_DEFAULT or Log.SetLogLevel(Level). Please use Log.LogError/Warn/Status/Info/Debug/... instead of DebugWriteln() to avoid spamming the console. See ULog.pas for further info. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1036 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/switches.inc22
1 files changed, 15 insertions, 7 deletions
diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc
index c803b3f7..8bff4d0e 100644
--- a/Game/Code/switches.inc
+++ b/Game/Code/switches.inc
@@ -8,7 +8,6 @@
// compiler/IDE dependent config
{$IFDEF FPC}
- {$DEFINE CONSOLE}
{$IFDEF DARWIN}
{$H+} // enables usage of AnsiString as String-type
{$R-} // disables range-checks
@@ -20,11 +19,8 @@
{$DEFINE DEBUG}
{$ENDIF}
- {$DEFINE DLL_CDECL}
{$DEFINE HasInline}
{$ELSE}
- {$UNDEF CONSOLE} // Delphi requires a special app type... no thanks ! :)
- // {$DEFINE CONSOLE} // -- use for development only !
{$DEFINE Delphi}
// Delphi version numbers (ignore versions released before Delphi 6 as they miss the $IF directive):
@@ -43,10 +39,12 @@
// include defines but no constants
{$I config-win.inc}
+ // enable debug-mode. For development only!
+ {$DEFINE DEBUG}
{$IFDEF DEBUG}
- {$IFDEF CONSOLE}
- {$APPTYPE CONSOLE}
- {$ENDIF}
+ // windows apps are either GUI- or console-apps. Console-apps will open
+ // an additional console-window for output. For development only!
+ {$DEFINE CONSOLE}
{$ENDIF}
{$DEFINE HaveBASS}
@@ -55,10 +53,20 @@
{$ELSEIF Defined(LINUX)}
// include defines but no constants
{$I config-linux.inc}
+
+ // use "configure --enable-debug", "make debug" or
+ // the command-line parameter "-debug" instead of defining DEBUG directly
+ //{$DEFINE DEBUG}
+ // linux apps are always console-apps so leave this defined.
+ {$DEFINE CONSOLE}
{$ELSEIF Defined(DARWIN)}
// include defines but no constants
{$I config-macosx.inc}
+ // enable debug-mode. For development only!
+ //{$DEFINE DEBUG}
+ {$DEFINE CONSOLE}
+
{$DEFINE HaveBASS}
{$DEFINE DLL_CDECL}
{$DEFINE WIN32}