forked from bLightZP/marsGameServices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameServicesServerApacheModule.dpr
54 lines (47 loc) · 1.4 KB
/
GameServicesServerApacheModule.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(*
Copyright 2016, MARS-Curiosity - REST Library
Home: https://github.com/andrea-magni/MARS
*)
library GameServicesServerApacheModule;
uses
{$IFDEF MSWINDOWS}
Winapi.ActiveX, System.Win.ComObj,
{$ENDIF }
Web.WebBroker,
Web.ApacheApp,
Web.HTTPD24Impl,
Server.WebModule in 'Server.WebModule.pas' {ServerWebModule: TWebModule},
Server.Ignition in 'Server.Ignition.pas',
Server.Resources in 'Server.Resources.pas';
{$R *.res}
// httpd.conf entries:
//
(*
LoadModule marstemplate_module modules/mod_marstemplate.dll
<Location /xyz>
SetHandler mod_marstemplate-handler
</Location>
*)
//
// These entries assume that the output directory for this project is the apache/modules directory.
//
// httpd.conf entries should be different if the project is changed in these ways:
// 1. The TApacheModuleData variable name is changed.
// 2. The project is renamed.
// 3. The output directory is not the apache/modules directory.
// 4. The dynamic library extension depends on a platform. Use .dll on Windows and .so on Linux.
//
// Declare exported variable so that Apache can access this module.
var
GModuleData: TApacheModuleData;
exports
GModuleData name 'marstemplate_module';
begin
{$IFDEF MSWINDOWS}
CoInitFlags := COINIT_MULTITHREADED;
{$ENDIF}
Web.ApacheApp.InitApplication(@GModuleData);
Application.Initialize;
Application.WebModuleClass := WebModuleClass;
Application.Run;
end.