{ Program to run the game on desktop (standalone) platforms.
  Can be auto-generated by "castle-engine generate-program". }
program my_fantastic_game_standalone;

{$ifdef MSWINDOWS} {$apptype GUI} {$endif}

{ This adds icons and version info for Windows,
  automatically created by "castle-engine compile".
  Comment this out if you don't compile using our "castle-engine" build tool. }
{$ifdef MSWINDOWS} {$R automatic-windows-resources.res} {$endif MSWINDOWS}

uses CastleApplicationProperties, CastleLog, CastleWindow, Game;

begin
  { Optionally you can specify here your application version.
    It will appear e.g. in the log and in the --help output.
    Instead of updating this program file, you can also delete it (and remove
    "standalone_source" from the CastleEngineManifest.xml),
    and specify <version> inside CastleEngineManifest.xml.
    In this case, the program file, with appropriate version set,
    will be automatically generated and updated by the build tool. }
  ApplicationProperties.Version := '';
  Application.ParseStandardParameters;

  { On standalone, activate log only after parsing command-line options.
    This allows to handle --version and --help command-line parameters
    without any extra output on Unix. }
  InitializeLog;

  Application.MainWindow.OpenAndRun;
end.
