@@ -60,85 +60,93 @@ fn main() {
6060 // Add source files that are common to all platforms
6161 base_config. include ( src_path ( "/common" ) ) ;
6262
63- base_config. file ( src_path ( "common/attribute.c" ) ) ;
64- base_config. file ( src_path ( "common/attrlist.c" ) ) ;
65- base_config. file ( src_path ( "common/attrstr.c" ) ) ;
66- base_config. file ( src_path ( "common/areaevents.c" ) ) ;
67- base_config. file ( src_path ( "common/control.c" ) ) ;
68- base_config. file ( src_path ( "common/debug.c" ) ) ;
69- base_config. file ( src_path ( "common/matrix.c" ) ) ;
70- base_config. file ( src_path ( "common/opentype.c" ) ) ;
71- base_config. file ( src_path ( "common/shouldquit.c" ) ) ;
72- base_config. file ( src_path ( "common/tablemodel.c" ) ) ;
73- base_config. file ( src_path ( "common/tablevalue.c" ) ) ;
74- base_config. file ( src_path ( "common/userbugs.c" ) ) ;
75- base_config. file ( src_path ( "common/utf.c" ) ) ;
63+ for filename in [
64+ "common/attribute.c" ,
65+ "common/attrlist.c" ,
66+ "common/attrstr.c" ,
67+ "common/areaevents.c" ,
68+ "common/control.c" ,
69+ "common/debug.c" ,
70+ "common/matrix.c" ,
71+ "common/opentype.c" ,
72+ "common/shouldquit.c" ,
73+ "common/tablemodel.c" ,
74+ "common/tablevalue.c" ,
75+ "common/userbugs.c" ,
76+ "common/utf.c" ,
77+ ] . iter ( ) {
78+ base_config. file ( src_path ( filename) ) ;
79+ }
7680
7781 if target_os == "windows" {
7882 base_config. cpp ( true ) ;
7983 base_config. include ( src_path ( "/windows" ) ) ;
8084
81- base_config. file ( src_path ( "windows/alloc.cpp" ) ) ;
82- base_config. file ( src_path ( "windows/area.cpp" ) ) ;
83- base_config. file ( src_path ( "windows/areadraw.cpp" ) ) ;
84- base_config. file ( src_path ( "windows/areaevents.cpp" ) ) ;
85- base_config. file ( src_path ( "windows/areascroll.cpp" ) ) ;
86- base_config. file ( src_path ( "windows/areautil.cpp" ) ) ;
87- base_config. file ( src_path ( "windows/attrstr.cpp" ) ) ;
88- base_config. file ( src_path ( "windows/box.cpp" ) ) ;
89- base_config. file ( src_path ( "windows/button.cpp" ) ) ;
90- base_config. file ( src_path ( "windows/checkbox.cpp" ) ) ;
91- base_config. file ( src_path ( "windows/colorbutton.cpp" ) ) ;
92- base_config. file ( src_path ( "windows/colordialog.cpp" ) ) ;
93- base_config. file ( src_path ( "windows/combobox.cpp" ) ) ;
94- base_config. file ( src_path ( "windows/container.cpp" ) ) ;
95- base_config. file ( src_path ( "windows/control.cpp" ) ) ;
96- base_config. file ( src_path ( "windows/d2dscratch.cpp" ) ) ;
97- base_config. file ( src_path ( "windows/datetimepicker.cpp" ) ) ;
98- base_config. file ( src_path ( "windows/debug.cpp" ) ) ;
99- base_config. file ( src_path ( "windows/draw.cpp" ) ) ;
100- base_config. file ( src_path ( "windows/drawmatrix.cpp" ) ) ;
101- base_config. file ( src_path ( "windows/drawpath.cpp" ) ) ;
102- base_config. file ( src_path ( "windows/drawtext.cpp" ) ) ;
103- base_config. file ( src_path ( "windows/dwrite.cpp" ) ) ;
104- base_config. file ( src_path ( "windows/editablecombo.cpp" ) ) ;
105- base_config. file ( src_path ( "windows/entry.cpp" ) ) ;
106- base_config. file ( src_path ( "windows/events.cpp" ) ) ;
107- base_config. file ( src_path ( "windows/fontbutton.cpp" ) ) ;
108- base_config. file ( src_path ( "windows/fontdialog.cpp" ) ) ;
109- base_config. file ( src_path ( "windows/fontmatch.cpp" ) ) ;
110- base_config. file ( src_path ( "windows/form.cpp" ) ) ;
111- base_config. file ( src_path ( "windows/graphemes.cpp" ) ) ;
112- base_config. file ( src_path ( "windows/grid.cpp" ) ) ;
113- base_config. file ( src_path ( "windows/group.cpp" ) ) ;
114- base_config. file ( src_path ( "windows/image.cpp" ) ) ;
115- base_config. file ( src_path ( "windows/init.cpp" ) ) ;
116- base_config. file ( src_path ( "windows/label.cpp" ) ) ;
117- base_config. file ( src_path ( "windows/main.cpp" ) ) ;
118- base_config. file ( src_path ( "windows/menu.cpp" ) ) ;
119- base_config. file ( src_path ( "windows/multilineentry.cpp" ) ) ;
120- base_config. file ( src_path ( "windows/opentype.cpp" ) ) ;
121- base_config. file ( src_path ( "windows/parent.cpp" ) ) ;
122- base_config. file ( src_path ( "windows/progressbar.cpp" ) ) ;
123- base_config. file ( src_path ( "windows/radiobuttons.cpp" ) ) ;
124- base_config. file ( src_path ( "windows/separator.cpp" ) ) ;
125- base_config. file ( src_path ( "windows/sizing.cpp" ) ) ;
126- base_config. file ( src_path ( "windows/slider.cpp" ) ) ;
127- base_config. file ( src_path ( "windows/spinbox.cpp" ) ) ;
128- base_config. file ( src_path ( "windows/stddialogs.cpp" ) ) ;
129- base_config. file ( src_path ( "windows/tab.cpp" ) ) ;
130- base_config. file ( src_path ( "windows/table.cpp" ) ) ;
131- base_config. file ( src_path ( "windows/tabledispinfo.cpp" ) ) ;
132- base_config. file ( src_path ( "windows/tabledraw.cpp" ) ) ;
133- base_config. file ( src_path ( "windows/tableediting.cpp" ) ) ;
134- base_config. file ( src_path ( "windows/tablemetrics.cpp" ) ) ;
135- base_config. file ( src_path ( "windows/tabpage.cpp" ) ) ;
136- base_config. file ( src_path ( "windows/text.cpp" ) ) ;
137- base_config. file ( src_path ( "windows/utf16.cpp" ) ) ;
138- base_config. file ( src_path ( "windows/utilwin.cpp" ) ) ;
139- base_config. file ( src_path ( "windows/window.cpp" ) ) ;
140- base_config. file ( src_path ( "windows/winpublic.cpp" ) ) ;
141- base_config. file ( src_path ( "windows/winutil.cpp" ) ) ;
85+ for filename in [
86+ "windows/alloc.cpp" ,
87+ "windows/area.cpp" ,
88+ "windows/areadraw.cpp" ,
89+ "windows/areaevents.cpp" ,
90+ "windows/areascroll.cpp" ,
91+ "windows/areautil.cpp" ,
92+ "windows/attrstr.cpp" ,
93+ "windows/box.cpp" ,
94+ "windows/button.cpp" ,
95+ "windows/checkbox.cpp" ,
96+ "windows/colorbutton.cpp" ,
97+ "windows/colordialog.cpp" ,
98+ "windows/combobox.cpp" ,
99+ "windows/container.cpp" ,
100+ "windows/control.cpp" ,
101+ "windows/d2dscratch.cpp" ,
102+ "windows/datetimepicker.cpp" ,
103+ "windows/debug.cpp" ,
104+ "windows/draw.cpp" ,
105+ "windows/drawmatrix.cpp" ,
106+ "windows/drawpath.cpp" ,
107+ "windows/drawtext.cpp" ,
108+ "windows/dwrite.cpp" ,
109+ "windows/editablecombo.cpp" ,
110+ "windows/entry.cpp" ,
111+ "windows/events.cpp" ,
112+ "windows/fontbutton.cpp" ,
113+ "windows/fontdialog.cpp" ,
114+ "windows/fontmatch.cpp" ,
115+ "windows/form.cpp" ,
116+ "windows/graphemes.cpp" ,
117+ "windows/grid.cpp" ,
118+ "windows/group.cpp" ,
119+ "windows/image.cpp" ,
120+ "windows/init.cpp" ,
121+ "windows/label.cpp" ,
122+ "windows/main.cpp" ,
123+ "windows/menu.cpp" ,
124+ "windows/multilineentry.cpp" ,
125+ "windows/opentype.cpp" ,
126+ "windows/parent.cpp" ,
127+ "windows/progressbar.cpp" ,
128+ "windows/radiobuttons.cpp" ,
129+ "windows/separator.cpp" ,
130+ "windows/sizing.cpp" ,
131+ "windows/slider.cpp" ,
132+ "windows/spinbox.cpp" ,
133+ "windows/stddialogs.cpp" ,
134+ "windows/tab.cpp" ,
135+ "windows/table.cpp" ,
136+ "windows/tabledispinfo.cpp" ,
137+ "windows/tabledraw.cpp" ,
138+ "windows/tableediting.cpp" ,
139+ "windows/tablemetrics.cpp" ,
140+ "windows/tabpage.cpp" ,
141+ "windows/text.cpp" ,
142+ "windows/utf16.cpp" ,
143+ "windows/utilwin.cpp" ,
144+ "windows/window.cpp" ,
145+ "windows/winpublic.cpp" ,
146+ "windows/winutil.cpp" ,
147+ ] . iter ( ) {
148+ base_config. file ( src_path ( filename) ) ;
149+ }
142150
143151 // See https://github.com/nabijaczleweli/rust-embed-resource/issues/11
144152 let target = env:: var ( "TARGET" ) . unwrap ( ) ;
@@ -171,101 +179,110 @@ fn main() {
171179 base_config. include ( inc) ;
172180 }
173181
174- base_config. file ( src_path ( "unix/alloc.c" ) ) ;
175- base_config. file ( src_path ( "unix/area.c" ) ) ;
176- base_config. file ( src_path ( "unix/attrstr.c" ) ) ;
177- base_config. file ( src_path ( "unix/box.c" ) ) ;
178- base_config. file ( src_path ( "unix/button.c" ) ) ;
179- base_config. file ( src_path ( "unix/cellrendererbutton.c" ) ) ;
180- base_config. file ( src_path ( "unix/checkbox.c" ) ) ;
181- base_config. file ( src_path ( "unix/child.c" ) ) ;
182- base_config. file ( src_path ( "unix/colorbutton.c" ) ) ;
183- base_config. file ( src_path ( "unix/combobox.c" ) ) ;
184- base_config. file ( src_path ( "unix/control.c" ) ) ;
185- base_config. file ( src_path ( "unix/datetimepicker.c" ) ) ;
186- base_config. file ( src_path ( "unix/debug.c" ) ) ;
187- base_config. file ( src_path ( "unix/draw.c" ) ) ;
188- base_config. file ( src_path ( "unix/drawmatrix.c" ) ) ;
189- base_config. file ( src_path ( "unix/drawpath.c" ) ) ;
190- base_config. file ( src_path ( "unix/drawtext.c" ) ) ;
191- base_config. file ( src_path ( "unix/editablecombo.c" ) ) ;
192- base_config. file ( src_path ( "unix/entry.c" ) ) ;
193- base_config. file ( src_path ( "unix/fontbutton.c" ) ) ;
194- base_config. file ( src_path ( "unix/fontmatch.c" ) ) ;
195- base_config. file ( src_path ( "unix/form.c" ) ) ;
196- base_config. file ( src_path ( "unix/future.c" ) ) ;
197- base_config. file ( src_path ( "unix/graphemes.c" ) ) ;
198- base_config. file ( src_path ( "unix/grid.c" ) ) ;
199- base_config. file ( src_path ( "unix/group.c" ) ) ;
200- base_config. file ( src_path ( "unix/image.c" ) ) ;
201- base_config. file ( src_path ( "unix/label.c" ) ) ;
202- base_config. file ( src_path ( "unix/main.c" ) ) ;
203- base_config. file ( src_path ( "unix/menu.c" ) ) ;
204- base_config. file ( src_path ( "unix/multilineentry.c" ) ) ;
205- base_config. file ( src_path ( "unix/opentype.c" ) ) ;
206- base_config. file ( src_path ( "unix/progressbar.c" ) ) ;
207- base_config. file ( src_path ( "unix/radiobuttons.c" ) ) ;
208- base_config. file ( src_path ( "unix/separator.c" ) ) ;
209- base_config. file ( src_path ( "unix/slider.c" ) ) ;
210- base_config. file ( src_path ( "unix/spinbox.c" ) ) ;
211- base_config. file ( src_path ( "unix/stddialogs.c" ) ) ;
212- base_config. file ( src_path ( "unix/tab.c" ) ) ;
213- base_config. file ( src_path ( "unix/table.c" ) ) ;
214- base_config. file ( src_path ( "unix/tablemodel.c" ) ) ;
215- base_config. file ( src_path ( "unix/text.c" ) ) ;
216- base_config. file ( src_path ( "unix/util.c" ) ) ;
217- base_config. file ( src_path ( "unix/window.c" ) ) ;
182+ for filename in [
183+ "unix/alloc.c" ,
184+ "unix/area.c" ,
185+ "unix/attrstr.c" ,
186+ "unix/box.c" ,
187+ "unix/button.c" ,
188+ "unix/cellrendererbutton.c" ,
189+ "unix/checkbox.c" ,
190+ "unix/child.c" ,
191+ "unix/colorbutton.c" ,
192+ "unix/combobox.c" ,
193+ "unix/control.c" ,
194+ "unix/datetimepicker.c" ,
195+ "unix/debug.c" ,
196+ "unix/draw.c" ,
197+ "unix/drawmatrix.c" ,
198+ "unix/drawpath.c" ,
199+ "unix/drawtext.c" ,
200+ "unix/editablecombo.c" ,
201+ "unix/entry.c" ,
202+ "unix/fontbutton.c" ,
203+ "unix/fontmatch.c" ,
204+ "unix/form.c" ,
205+ "unix/future.c" ,
206+ "unix/graphemes.c" ,
207+ "unix/grid.c" ,
208+ "unix/group.c" ,
209+ "unix/image.c" ,
210+ "unix/label.c" ,
211+ "unix/main.c" ,
212+ "unix/menu.c" ,
213+ "unix/multilineentry.c" ,
214+ "unix/opentype.c" ,
215+ "unix/progressbar.c" ,
216+ "unix/radiobuttons.c" ,
217+ "unix/separator.c" ,
218+ "unix/slider.c" ,
219+ "unix/spinbox.c" ,
220+ "unix/stddialogs.c" ,
221+ "unix/tab.c" ,
222+ "unix/table.c" ,
223+ "unix/tablemodel.c" ,
224+ "unix/text.c" ,
225+ "unix/util.c" ,
226+ "unix/window.c" ,
227+ ] . iter ( ) {
228+ base_config. file ( src_path ( filename) ) ;
229+ }
218230 } else if apple {
219231 base_config. include ( src_path ( "/darwin" ) ) ;
220- base_config. file ( src_path ( "darwin/aat.m" ) ) ;
221- base_config. file ( src_path ( "darwin/alloc.m" ) ) ;
222- base_config. file ( src_path ( "darwin/area.m" ) ) ;
223- base_config. file ( src_path ( "darwin/areaevents.m" ) ) ;
224- base_config. file ( src_path ( "darwin/attrstr.m" ) ) ;
225- base_config. file ( src_path ( "darwin/autolayout.m" ) ) ;
226- base_config. file ( src_path ( "darwin/box.m" ) ) ;
227- base_config. file ( src_path ( "darwin/button.m" ) ) ;
228- base_config. file ( src_path ( "darwin/checkbox.m" ) ) ;
229- base_config. file ( src_path ( "darwin/colorbutton.m" ) ) ;
230- base_config. file ( src_path ( "darwin/combobox.m" ) ) ;
231- base_config. file ( src_path ( "darwin/control.m" ) ) ;
232- base_config. file ( src_path ( "darwin/datetimepicker.m" ) ) ;
233- base_config. file ( src_path ( "darwin/debug.m" ) ) ;
234- base_config. file ( src_path ( "darwin/draw.m" ) ) ;
235- base_config. file ( src_path ( "darwin/drawtext.m" ) ) ;
236- base_config. file ( src_path ( "darwin/editablecombo.m" ) ) ;
237- base_config. file ( src_path ( "darwin/entry.m" ) ) ;
238- base_config. file ( src_path ( "darwin/fontbutton.m" ) ) ;
239- base_config. file ( src_path ( "darwin/fontmatch.m" ) ) ;
240- base_config. file ( src_path ( "darwin/fonttraits.m" ) ) ;
241- base_config. file ( src_path ( "darwin/fontvariation.m" ) ) ;
242- base_config. file ( src_path ( "darwin/form.m" ) ) ;
243- base_config. file ( src_path ( "darwin/future.m" ) ) ;
244- base_config. file ( src_path ( "darwin/graphemes.m" ) ) ;
245- base_config. file ( src_path ( "darwin/grid.m" ) ) ;
246- base_config. file ( src_path ( "darwin/group.m" ) ) ;
247- base_config. file ( src_path ( "darwin/image.m" ) ) ;
248- base_config. file ( src_path ( "darwin/label.m" ) ) ;
249- base_config. file ( src_path ( "darwin/main.m" ) ) ;
250- base_config. file ( src_path ( "darwin/map.m" ) ) ;
251- base_config. file ( src_path ( "darwin/menu.m" ) ) ;
252- base_config. file ( src_path ( "darwin/multilineentry.m" ) ) ;
253- base_config. file ( src_path ( "darwin/opentype.m" ) ) ;
254- base_config. file ( src_path ( "darwin/progressbar.m" ) ) ;
255- base_config. file ( src_path ( "darwin/radiobuttons.m" ) ) ;
256- base_config. file ( src_path ( "darwin/scrollview.m" ) ) ;
257- base_config. file ( src_path ( "darwin/separator.m" ) ) ;
258- base_config. file ( src_path ( "darwin/slider.m" ) ) ;
259- base_config. file ( src_path ( "darwin/spinbox.m" ) ) ;
260- base_config. file ( src_path ( "darwin/stddialogs.m" ) ) ;
261- base_config. file ( src_path ( "darwin/tab.m" ) ) ;
262- base_config. file ( src_path ( "darwin/table.m" ) ) ;
263- base_config. file ( src_path ( "darwin/tablecolumn.m" ) ) ;
264- base_config. file ( src_path ( "darwin/text.m" ) ) ;
265- base_config. file ( src_path ( "darwin/undocumented.m" ) ) ;
266- base_config. file ( src_path ( "darwin/util.m" ) ) ;
267- base_config. file ( src_path ( "darwin/window.m" ) ) ;
268- base_config. file ( src_path ( "darwin/winmoveresize.m" ) ) ;
232+
233+ for filename in [
234+ "darwin/aat.m" ,
235+ "darwin/alloc.m" ,
236+ "darwin/area.m" ,
237+ "darwin/areaevents.m" ,
238+ "darwin/attrstr.m" ,
239+ "darwin/autolayout.m" ,
240+ "darwin/box.m" ,
241+ "darwin/button.m" ,
242+ "darwin/checkbox.m" ,
243+ "darwin/colorbutton.m" ,
244+ "darwin/combobox.m" ,
245+ "darwin/control.m" ,
246+ "darwin/datetimepicker.m" ,
247+ "darwin/debug.m" ,
248+ "darwin/draw.m" ,
249+ "darwin/drawtext.m" ,
250+ "darwin/editablecombo.m" ,
251+ "darwin/entry.m" ,
252+ "darwin/fontbutton.m" ,
253+ "darwin/fontmatch.m" ,
254+ "darwin/fonttraits.m" ,
255+ "darwin/fontvariation.m" ,
256+ "darwin/form.m" ,
257+ "darwin/future.m" ,
258+ "darwin/graphemes.m" ,
259+ "darwin/grid.m" ,
260+ "darwin/group.m" ,
261+ "darwin/image.m" ,
262+ "darwin/label.m" ,
263+ "darwin/main.m" ,
264+ "darwin/map.m" ,
265+ "darwin/menu.m" ,
266+ "darwin/multilineentry.m" ,
267+ "darwin/opentype.m" ,
268+ "darwin/progressbar.m" ,
269+ "darwin/radiobuttons.m" ,
270+ "darwin/scrollview.m" ,
271+ "darwin/separator.m" ,
272+ "darwin/slider.m" ,
273+ "darwin/spinbox.m" ,
274+ "darwin/stddialogs.m" ,
275+ "darwin/tab.m" ,
276+ "darwin/table.m" ,
277+ "darwin/tablecolumn.m" ,
278+ "darwin/text.m" ,
279+ "darwin/undocumented.m" ,
280+ "darwin/util.m" ,
281+ "darwin/window.m" ,
282+ "darwin/winmoveresize.m" ,
283+ ] . iter ( ) {
284+ base_config. file ( src_path ( filename) ) ;
285+ }
269286 println ! ( "cargo:rustc-link-lib=framework=AppKit" ) ;
270287 } else {
271288 panic ! ( "unrecognized platform! cannot build libui from source" ) ;
0 commit comments