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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
{
fpGUI - Free Pascal GUI Toolkit
Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Description:
This program is kindly supplied by Henry Vermaak. It uses the new
fpmake build system introduced in FPC 2.2.2. fpmake is supposed to
replace the Makefile build system.
Usage:
- Compile fpmake.pas as follows:
fpc fpmake.pas
- To find out more about what fpmake can do and see some help
fpmake --help
- Build and install fpGUI
fpmake install
Note that if you installed FPC in a non-standard location on you
system you need to tell fpmake which compiler and units to use. The
following is all in one line:
fpmake.exe -r c:\fpc\2.2.3\bin\i386-win32\ppc386.exe
-UG c:\fpc\2.2.3\units\i386-win32
or
./fpmake -v build -UG /opt/fpc/lib/fpc/2.2.3/units/i386-linux/
}
program fpmake;
{$mode objfpc}
{$h+}
uses sysutils, fpmkunit;
const
{$I VERSION_FILE.inc}
var
T: TTarget;
P: TPackage;
begin
with Installer do begin
P := AddPackage('fpgui');
P.Version := FPGUI_VERSION;
P.Author := 'Graeme Geldenhuys';
P.Email := 'graemeg@gmail.com';
P.License := 'Modified LGPL';
P.Description := 'fpGUI Toolkit - a custom written GUI toolkit for Free Pascal.';
// P.Dependencies.Add('fcl');
{ Fill in more package details here }
{ This shouldn't really be here. fpmake will install to the local
fpc installation, i.e. /usr/[local]/lib/fpc/<version>/units/<cpu-os>/fpgui
if we set the package name to fpgui as above. This base install dir
can be overridden by passing -B to fpmake. The line below will cause
the units to be output in ../lib/<cpu-os>/fpgui }
// Defaults.UnitInstallDir := Format('../lib/%s-%s/', [CurrentCPU, CurrentOS]);
{ If you installed FPC to a non-standard location, you need to specify
where fpmake can find the compiler and RTL units. You can pass that
information via the command line to fpmake, or specify it here in code. }
// if Defaults.OS in AllUnixOSes then
// Defaults.GlobalUnitDir := Format('/opt/fpc/lib/fpc/2.2.3/units/%s-%s/', [CurrentCPU, CurrentOS])
// else
// Defaults.GlobalUnitDir := Format('c:\fpc\2.2.3\units\%s-%s', [CurrentCPU, CurrentOS]);
if Defaults.OS in AllUnixOSes then
Defaults.Options.Add('-dX11')
else
Defaults.Options.Add('-dGDI');
P.SourcePath.Add('corelib');
P.SourcePath.Add('corelib/x11', AllUnixOSes);
P.SourcePath.Add('corelib/gdi', AllWindowsOSes);
P.SourcePath.Add('gui');
P.SourcePath.Add('gui/db');
P.UnitPath.Add('corelib');
P.UnitPath.Add('corelib/x11', AllUnixOSes);
P.UnitPath.Add('corelib/gdi', AllWindowsOSes);
P.UnitPath.Add('gui');
P.UnitPath.Add('gui/db');
P.IncludePath.Add('.');
P.IncludePath.Add('corelib');
P.IncludePath.Add('corelib/x11', AllUnixOSes);
P.IncludePath.Add('corelib/gdi', AllWindowsOSes);
P.IncludePath.Add('gui');
{ todo: add unit and include dependency for all }
{
P.Sources.AddSrcFiles('corelib/*.pas');
P.Sources.AddSrcFiles('gui/*.pas');
if Defaults.OS in AllUnixOSes then
P.Sources.AddSrcFiles('corelib/x11/*.pas')
else
P.Sources.AddSrcFiles('corelib/gdi/*.pas');
}
{ corelib }
T := P.Targets.AddUnit('fpg_base.pas');
T.Dependencies.AddInclude('keys.inc');
T.Dependencies.AddInclude('predefinedcolors.inc');
T := P.Targets.AddUnit('fpg_imagelist.pas');
T := P.Targets.AddUnit('fpg_popupwindow.pas');
T := P.Targets.AddUnit('fpg_translations.pas');
T := P.Targets.AddUnit('fpg_cmdlineparams.pas');
T := P.Targets.AddUnit('fpg_imgfmt_bmp.pas');
T := P.Targets.AddUnit('fpg_imgfmt_jpg.pas');
T := P.Targets.AddUnit('fpg_stdimages.pas');
T.Dependencies.AddInclude('stdimages.inc');
T := P.Targets.AddUnit('fpg_utils.pas');
T.Dependencies.AddInclude('fpg_utils_impl.inc', AllUnixOSes);
T.Dependencies.AddInclude('fpg_utils_impl.inc', AllWindowsOSes);
T := P.Targets.AddUnit('fpg_imgutils.pas');
T := P.Targets.AddUnit('fpg_command_intf.pas');
T := P.Targets.AddUnit('fpg_main.pas');
T.Dependencies.AddInclude('VERSION_FILE.inc');
T.Dependencies.AddInclude('fpg_msgqueue.inc');
T := P.Targets.AddUnit('fpg_stringhashlist.pas');
T := P.Targets.AddUnit('fpg_widget.pas');
T := P.Targets.AddUnit('fpg_constants.pas');
T.Dependencies.AddInclude('lang_en.inc');
T.Dependencies.AddInclude('lang_af.inc');
T.Dependencies.AddInclude('lang_de.inc');
T.Dependencies.AddInclude('lang_es.inc');
T.Dependencies.AddInclude('lang_fr.inc');
T.Dependencies.AddInclude('lang_it.inc');
T.Dependencies.AddInclude('lang_pt.inc');
T.Dependencies.AddInclude('lang_ru.inc');
T.ResourceStrings := True;
// T := P.Targets.AddUnit('fpg_strings.pas'); // this unit is not used in fpGUI
T := P.Targets.AddUnit('fpg_wuline.pas');
T := P.Targets.AddUnit('fpg_extinterpolation.pas');
T := P.Targets.AddUnit('fpg_pofiles.pas');
T := P.Targets.AddUnit('fpg_stringutils.pas');
T := P.Targets.AddUnit('fpg_extgraphics.pas');
{ corelib/x11 }
T := P.Targets.AddUnit('fpg_keyconv_x11.pas', AllUnixOSes);
T := P.Targets.AddUnit('fpg_netlayer_x11.pas', AllUnixOSes);
T := P.Targets.AddUnit('fpg_xft_x11.pas', AllUnixOSes);
T := P.Targets.AddUnit('fpg_impl.pas', AllUnixOSes);
T := P.Targets.AddUnit('fpg_x11.pas', AllUnixOSes);
T.Dependencies.AddUnit('fpg_xft_x11');
T.Dependencies.AddUnit('fpg_netlayer_x11');
T.Dependencies.AddUnit('fpg_base');
T.Dependencies.AddUnit('fpg_impl');
T := P.Targets.AddUnit('fpg_interface.pas', AllUnixOSes);
{ corelib/gdi }
T := P.Targets.AddUnit('fpg_impl.pas', AllWindowsOSes);
T := P.Targets.AddUnit('fpg_gdi.pas', AllWindowsOSes);
T.Dependencies.AddInclude('fpg_keys_gdi.inc', AllWindowsOSes);
T := P.Targets.AddUnit('fpg_interface.pas', AllWindowsOSes);
{ gui/db }
T := P.Targets.AddUnit('fpgui_db.pas');
{ gui }
T := P.Targets.AddUnit('fpg_animation.pas');
T := P.Targets.AddUnit('fpg_combobox.pas');
T := P.Targets.AddUnit('fpg_edit.pas');
T := P.Targets.AddUnit('fpg_hint.pas');
T := P.Targets.AddUnit('fpg_listbox.pas');
T := P.Targets.AddUnit('fpg_mru.pas');
T := P.Targets.AddUnit('fpg_radiobutton.pas');
T := P.Targets.AddUnit('fpg_tab.pas');
T := P.Targets.AddUnit('fpg_basegrid.pas');
T := P.Targets.AddUnit('fpg_customgrid.pas');
T := P.Targets.AddUnit('fpg_form.pas');
T := P.Targets.AddUnit('fpg_hyperlink.pas');
T := P.Targets.AddUnit('fpg_listview.pas');
T := P.Targets.AddUnit('fpg_panel.pas');
T := P.Targets.AddUnit('fpg_scrollbar.pas');
T := P.Targets.AddUnit('fpg_trackbar.pas');
T := P.Targets.AddUnit('fpg_button.pas');
T := P.Targets.AddUnit('fpg_dialogs.pas');
T.Dependencies.AddInclude('charmapdialog.inc');
T.Dependencies.AddInclude('colordialog.inc');
T.Dependencies.AddInclude('inputquerydialog.inc');
T.Dependencies.AddInclude('messagedialog.inc');
T.Dependencies.AddInclude('newdirdialog.inc');
T.Dependencies.AddInclude('promptuserdialog.inc');
T.Dependencies.AddInclude('selectdirdialog.inc');
T.Dependencies.AddInclude('logo.inc');
T := P.Targets.AddUnit('fpg_gauge.pas');
T := P.Targets.AddUnit('fpg_iniutils.pas');
T := P.Targets.AddUnit('fpg_memo.pas');
T := P.Targets.AddUnit('fpg_popupcalendar.pas');
T := P.Targets.AddUnit('fpg_splitter.pas');
T := P.Targets.AddUnit('fpg_tree.pas');
T := P.Targets.AddUnit('fpg_checkbox.pas');
T := P.Targets.AddUnit('fpg_editcombo.pas');
T := P.Targets.AddUnit('fpg_grid.pas');
T := P.Targets.AddUnit('fpg_label.pas');
T := P.Targets.AddUnit('fpg_menu.pas');
T := P.Targets.AddUnit('fpg_progressbar.pas');
T := P.Targets.AddUnit('fpg_style.pas');
T := P.Targets.AddUnit('fpg_spinedit.pas');
T := P.Targets.AddUnit('fpg_colorwheel.pas');
T := P.Targets.AddUnit('fpg_colormapping.pas');
T := P.Targets.AddUnit('fpg_editbtn.pas');
Run;
end;
end.
|