Last change
on this file was 77, checked in by chronos, 6 months ago |
- Modified: Compiler targets moved into modules.
|
File size:
957 bytes
|
Line | |
---|
1 | unit ModuleDynamicC;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, ModularSystem, TargetDynamicC, CompilerAPI;
|
---|
7 |
|
---|
8 | type
|
---|
9 |
|
---|
10 | { TModuleDynamicC }
|
---|
11 |
|
---|
12 | TModuleDynamicC = class(TModule)
|
---|
13 | public
|
---|
14 | Target: TTargetDynamicC;
|
---|
15 | constructor Create(AOwner: TComponent); override;
|
---|
16 | destructor Destroy; override;
|
---|
17 | procedure DoInstall; override;
|
---|
18 | procedure DoUninstall; override;
|
---|
19 | end;
|
---|
20 |
|
---|
21 |
|
---|
22 | implementation
|
---|
23 |
|
---|
24 | resourcestring
|
---|
25 | SDynamicC = 'Dynamic C';
|
---|
26 |
|
---|
27 | { TModuleDynamicC }
|
---|
28 |
|
---|
29 | constructor TModuleDynamicC.Create;
|
---|
30 | begin
|
---|
31 | inherited;
|
---|
32 | Identification := 'DynamicC';
|
---|
33 | Title := SDynamicC;
|
---|
34 | end;
|
---|
35 |
|
---|
36 | destructor TModuleDynamicC.Destroy;
|
---|
37 | begin
|
---|
38 | inherited;
|
---|
39 | end;
|
---|
40 |
|
---|
41 | procedure TModuleDynamicC.DoInstall;
|
---|
42 | begin
|
---|
43 | Target := TTargetDynamicC.Create;
|
---|
44 | with TCompilerAPI(API) do begin
|
---|
45 | RegisterTarget(TTargetDynamicC);
|
---|
46 | end;
|
---|
47 | inherited;
|
---|
48 | end;
|
---|
49 |
|
---|
50 | procedure TModuleDynamicC.DoUninstall;
|
---|
51 | begin
|
---|
52 | with TCompilerAPI(API) do begin
|
---|
53 | UnregisterTarget(TTargetDynamicC);
|
---|
54 | end;
|
---|
55 | inherited;
|
---|
56 | end;
|
---|
57 |
|
---|
58 | end.
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.