Add meson build definitions (#30)

This commit is contained in:
Thibault Saunier 2017-08-24 10:21:41 -03:00 committed by Mikkel Kruse Johnsen
parent 87d4d29dfd
commit 4f388c6ef7
20 changed files with 2878 additions and 2 deletions

2
.gitignore vendored
View file

@ -25,7 +25,7 @@ config.*
configure
depcomp
doc/gtk-sharp-3-docs.*
generated
generated/*/*.cs
generated.c
generated-stamp
install-sh

122
atk/generated/meson.build Normal file
View file

@ -0,0 +1,122 @@
generated_sources = [
'Atk_ActionAdapter.cs',
'Atk_AtkSharp.FocusHandlerNative.cs',
'Atk_NoOpObjectFactory.cs',
'Atk_TextRange.cs',
'Atk_TextBoundary.cs',
'Atk_GObjectAccessible.cs',
'Atk_IText.cs',
'Atk_AtkSharp.KeySnoopFuncNative.cs',
'Atk_ChildrenChangedHandler.cs',
'Atk_PropertyValues.cs',
'Atk_RealStateSet.cs',
'Atk_NoOpObject.cs',
'Atk_Object.cs',
'Atk_EventListener.cs',
'Atk_Layer.cs',
'Atk_IHyperlinkImpl.cs',
'Atk_FocusTracker.cs',
'Atk_Rectangle.cs',
'Atk_Global.cs',
'Atk_IValue.cs',
'Atk_ImageAdapter.cs',
'Atk_TextRectangle.cs',
'Atk_KeySnoopFunc.cs',
'Atk_WindowAdapter.cs',
'Atk_ColumnDeletedHandler.cs',
'Atk_Relation.cs',
'Atk_RelationType.cs',
'Atk_FocusHandler.cs',
'Atk_RowDeletedHandler.cs',
'Atk_StateSet.cs',
'Atk_StreamableContentAdapter.cs',
'Atk_StateType.cs',
'Atk_Range.cs',
'Atk_TextClipType.cs',
'Atk_IImplementor.cs',
'Atk_AtkSharp.EventListenerNative.cs',
'Atk_ITable.cs',
'Atk_LinkSelectedHandler.cs',
'Atk_IDocument.cs',
'Atk_TextAdapter.cs',
'Atk_AtkSharp.PropertyChangeHandlerNative.cs',
'Atk_ComponentAdapter.cs',
'Atk_EditableTextAdapter.cs',
'Atk_KeyEventType.cs',
'Atk_TableAdapter.cs',
'Atk_EventListenerInit.cs',
'Atk_ImplementorAdapter.cs',
'Atk_AtkSharp.FunctionNative.cs',
'Atk_ISelection.cs',
'Atk_Attribute.cs',
'Atk_SelectionAdapter.cs',
'Atk_TextChangedHandler.cs',
'Atk_FocusEventHandler.cs',
'Atk_TextCaretMovedHandler.cs',
'Atk_Role.cs',
'Atk_BoundsChangedHandler.cs',
'Atk_ColumnInsertedHandler.cs',
'Atk_IWindow.cs',
'Atk_TextInsertHandler.cs',
'Atk_PropertyChangeEventHandler.cs',
'Atk_ValueChangedHandler.cs',
'Atk_RelationSet.cs',
'Atk_TextGranularity.cs',
'Atk_Registry.cs',
'Atk_HyperlinkImplAdapter.cs',
'Atk_UtilListenerInfo.cs',
'Atk_Socket.cs',
'Atk_IEditableText.cs',
'Atk_ITableCell.cs',
'Atk_CoordType.cs',
'Atk_TableCellAdapter.cs',
'Atk_ValueType.cs',
'Atk_TextAttribute.cs',
'Atk_AtkSharp.EventListenerInitNative.cs',
'Atk_ValueAdapter.cs',
'Atk_Plug.cs',
'Atk_StateChangeHandler.cs',
'Atk_KeyEventStruct.cs',
'Atk_Function.cs',
'Atk_Misc.cs',
'Atk_PageChangedHandler.cs',
'Atk_IStreamableContent.cs',
'Atk_DocumentAdapter.cs',
'Atk_RowInsertedHandler.cs',
'Atk_IImage.cs',
'Atk_StateManager.cs',
'Atk_Focus.cs',
'Atk_HyperlinkStateFlags.cs',
'Atk_Util.cs',
'Atk_ObjectFactory.cs',
'Atk_HypertextAdapter.cs',
'Atk_Hyperlink.cs',
'Atk_ActiveDescendantChangedHandler.cs',
'Atk_IHypertext.cs',
'Atk_IComponent.cs',
'Atk_TextRemoveHandler.cs',
'Atk_PropertyChangeHandler.cs',
'Atk_IAction.cs',
]
source_gen = custom_target('atk_generated',
command: [
generate_api,
'--api-raw', raw_api_fname,
'--gapi-fixup', gapi_fixup.full_path(),
'--metadata', metadata_fname,
'--gapi-codegen', gapi_codegen.full_path(),
'--extra-includes', glib_api_includes,
'--glue-file', gluefile,
'--glue-includes', glueincludes,
'--out', meson.current_build_dir(),
'--files', ';'.join(generated_sources),
'--assembly-name', meson.project_name()
],
depends: [gapi_codegen, gapi_fixup],
input: raw_api_fname,
output: generated_sources,
)
atk_api_includes = join_paths(meson.current_build_dir(), 'atk-api.xml')

33
atk/meson.build Normal file
View file

@ -0,0 +1,33 @@
snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk')
assembly_name = 'atk-sharp'
raw_api_fname = join_paths(meson.current_source_dir(), 'atk-api.raw')
metadata_fname = join_paths(meson.current_source_dir(), 'Atk.metadata')
glueincludes = 'atk/atk.h'
gluefile = join_paths(meson.current_build_dir(), 'generate.c')
configure_file(input: assembly_name + '.dll.config.in',
output: assembly_name + '.dll.config',
configuration : remap_dl_data)
subdir('generated')
sources = [
'Global.cs',
'Hyperlink.cs',
'Misc.cs',
'Object.cs',
'SelectionAdapter.cs',
'TextAdapter.cs',
'TextChangedDetail.cs',
'Util.cs',
]
atk_sharp = library(assembly_name, source_gen, sources,
cs_args: ['-unsafe', '-keyfile:' + snk],
link_with: glib_sharp,
)
install_infos += [assembly_name, atk_sharp.full_path()]
atk_sharp_dep = declare_dependency(link_with: atk_sharp)

72
cairo/meson.build Normal file
View file

@ -0,0 +1,72 @@
snk = join_paths(meson.current_source_dir(), 'mono.snk')
assembly_name = 'cairo-sharp'
raw_api_fname = join_paths(meson.current_source_dir(), 'cairo-api.raw')
metadata_fname = join_paths(meson.current_source_dir(), 'cairo.metadata')
glueincludes = ''
gluefile = join_paths(meson.current_build_dir(), 'generate.c')
sources = [
'Antialias.cs',
'Cairo.cs',
'CairoDebug.cs',
'Color.cs',
'Content.cs',
'Context.cs',
'Device.cs',
'DirectFBSurface.cs',
'Distance.cs',
'Extend.cs',
'FillRule.cs',
'Filter.cs',
'FontExtents.cs',
'FontFace.cs',
'FontOptions.cs',
'FontSlant.cs',
'FontType.cs',
'FontWeight.cs',
'Format.cs',
'GlitzSurface.cs',
'Glyph.cs',
'Gradient.cs',
'HintMetrics.cs',
'HintStyle.cs',
'ImageSurface.cs',
'LinearGradient.cs',
'LineCap.cs',
'LineJoin.cs',
'Matrix.cs',
'NativeMethods.cs',
'Operator.cs',
'Path.cs',
'Pattern.cs',
'PatternType.cs',
'PdfSurface.cs',
'Point.cs',
'PointD.cs',
'PSSurface.cs',
'RadialGradient.cs',
'Rectangle.cs',
'Region.cs',
'ScaledFont.cs',
'SolidPattern.cs',
'Status.cs',
'SubpixelOrder.cs',
'Surface.cs',
'SurfacePattern.cs',
'SurfaceType.cs',
'SvgSurface.cs',
'SvgVersion.cs',
'TextExtents.cs',
'Win32Surface.cs',
'XcbSurface.cs',
'XlibSurface.cs',
]
cairo_sharp = library(assembly_name, sources,
cs_args: ['-keyfile:' + snk],
)
install_infos += [assembly_name, cairo_sharp.full_path()]
cairo_sharp_dep = declare_dependency(link_with: cairo_sharp)
cairo_api_includes = join_paths(meson.current_source_dir(), 'cairo-api.xml')

15
gacutil_install.py Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import os
import sys
import subprocess
outdir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], 'lib')
builddir = os.environ['MESON_BUILD_ROOT']
for i in range(1, len(sys.argv), 2):
assembly_name, fname = sys.argv[i], os.path.join(builddir, sys.argv[i + 1])
cmd = ['gacutil', '/i', fname, '/f', '/package', assembly_name, '/root', outdir]
print('(%s) Running %s' % (os.path.abspath(os.path.curdir), ' '.join(cmd)))
subprocess.check_call(cmd)

220
gdk/generated/meson.build Normal file
View file

@ -0,0 +1,220 @@
generated_sources = [
'Gdk_Pixbuf.cs',
'Gdk_GdkSharp.FilterFuncNative.cs',
'Gdk_GdkSharp.EventFuncNative.cs',
'Gdk_FilterFunc.cs',
'Gdk_EventFunc.cs',
'Gdk_ActionChangedHandler.cs',
'Gdk_PixbufBufferQueue.cs',
'Gdk_ByteOrder.cs',
'Gdk_Error.cs',
'Gdk_EventMask.cs',
'Gdk_FilterReturn.cs',
'Gdk_PixbufAniAnimIter.cs',
'Gdk_WindowPaint.cs',
'Gdk_ThreadsDispatch.cs',
'Gdk_EventHelper.cs',
'Gdk_DevicePadAdapter.cs',
'Gdk_Monitor.cs',
'Gdk_GLError.cs',
'Gdk_EventFilter.cs',
'Gdk_Cursor.cs',
'Gdk_Events.cs',
'Gdk_Gravity.cs',
'Gdk_Backend.cs',
'Gdk_FrameClockPhase.cs',
'Gdk_Gif89.cs',
'Gdk_OffscreenWindowClass.cs',
'Gdk_AxisUse.cs',
'Gdk_Global.cs',
'Gdk_SeatCapabilities.cs',
'Gdk_ArgContext.cs',
'Gdk_DeviceToolType.cs',
'Gdk_IOClosure.cs',
'Gdk_WindowChildFunc.cs',
'Gdk_Selection.cs',
'Gdk_WindowType.cs',
'Gdk_GLContext.cs',
'Gdk_AreaUpdatedHandler.cs',
'Gdk_ToolChangedHandler.cs',
'Gdk_Drag.cs',
'Gdk_GrabStatus.cs',
'Gdk_CursorType.cs',
'Gdk_PixbufFrameAction.cs',
'Gdk_DeviceAddedHandler.cs',
'Gdk_Color.cs',
'Gdk_EventTouchpadPinch.cs',
'Gdk_FrameClock.cs',
'Gdk_DropPerformedHandler.cs',
'Gdk_SeatRemovedHandler.cs',
'Gdk_PixbufGifAnimIter.cs',
'Gdk_MonitorAddedHandler.cs',
'Gdk_WindowWindowClass.cs',
'Gdk_PixbufGifAnim.cs',
'Gdk_PixbufScaledAnimIter.cs',
'Gdk_WMFunction.cs',
'Gdk_PickEmbeddedChildHandler.cs',
'Gdk_PropertyState.cs',
'Gdk_Atom.cs',
'Gdk_TiffContext.cs',
'Gdk_MonitorRemovedHandler.cs',
'Gdk_TimeCoord.cs',
'Gdk_PixbufAlphaMode.cs',
'Gdk_IcnsBlockHeader.cs',
'Gdk_PixbufAnimation.cs',
'Gdk_PixbufRotation.cs',
'Gdk_PixbufFormat.cs',
'Gdk_PixdataDumpType.cs',
'Gdk_Window.cs',
'Gdk_TGAContext.cs',
'Gdk_SeatDefault.cs',
'Gdk_WindowTypeHint.cs',
'Gdk_Pixdata.cs',
'Gdk_Pointer.cs',
'Gdk_Screen.cs',
'Gdk_DeviceChangedHandler.cs',
'Gdk_PangoHelper.cs',
'Gdk_GlobalErrorTrap.cs',
'Gdk_ToEmbedderHandler.cs',
'Gdk_XPMContext.cs',
'Gdk_EventPadAxis.cs',
'Gdk_Colorspace.cs',
'Gdk_Predicate.cs',
'Gdk_Seat.cs',
'Gdk_InterpType.cs',
'Gdk_TGAHeader.cs',
'Gdk_PixdataType.cs',
'Gdk_PixbufLoader.cs',
'Gdk_MovedToRectHandler.cs',
'Gdk_SizePreparedHandler.cs',
'Gdk_LoadContext.cs',
'Gdk_IconEntry.cs',
'Gdk_SettingAction.cs',
'Gdk_CrossingMode.cs',
'Gdk_Property.cs',
'Gdk_DragContext.cs',
'Gdk_FrameTimings.cs',
'Gdk_SeatGrabPrepareFunc.cs',
'Gdk_ArgDesc.cs',
'Gdk_ModifierIntent.cs',
'Gdk_OffscreenWindow.cs',
'Gdk_Keyval.cs',
'Gdk_DragAction.cs',
'Gdk_PixbufAnimationIter.cs',
'Gdk_VisibilityState.cs',
'Gdk_PixbufNonAnimIterClass.cs',
'Gdk_NotifyType.cs',
'Gdk_Keymap.cs',
'Gdk_DisplayManager.cs',
'Gdk_DeviceRemovedHandler.cs',
'Gdk_CairoHelper.cs',
'Gdk_PixbufNonAnimIter.cs',
'Gdk_IDevicePad.cs',
'Gdk_VisualType.cs',
'Gdk_FullscreenMode.cs',
'Gdk_Threads.cs',
'Gdk_GifContext.cs',
'Gdk_DeviceTool.cs',
'Gdk_KeymapKey.cs',
'Gdk_PixbufError.cs',
'Gdk_Display.cs',
'Gdk_ClosedHandler.cs',
'Gdk_EventPadButton.cs',
'Gdk_DeviceManager.cs',
'Gdk_Device.cs',
'Gdk_Visual.cs',
'Gdk_PixbufNonAnim.cs',
'Gdk_EventTouchpadSwipe.cs',
'Gdk_DragProtocol.cs',
'Gdk_PixbufSaveFunc.cs',
'Gdk_InputMode.cs',
'Gdk_DevicePadFeature.cs',
'Gdk_WindowHints.cs',
'Gdk_PixbufSimpleAnimIterClass.cs',
'Gdk_AppLaunchContext.cs',
'Gdk_ModifierType.cs',
'Gdk_TGAFooter.cs',
'Gdk_GdkSharp.PixbufDestroyNotifyNative.cs',
'Gdk_WindowAttributesType.cs',
'Gdk_DragCancelReason.cs',
'Gdk_FrameClockIdle.cs',
'Gdk_InputSource.cs',
'Gdk_Status.cs',
'Gdk_PixbufSimpleAnimIter.cs',
'Gdk_AxisFlags.cs',
'Gdk_PropMode.cs',
'Gdk_PixbufScaledAnimIterClass.cs',
'Gdk_DisplayOpenedHandler.cs',
'Gdk_Geometry.cs',
'Gdk_DeviceType.cs',
'Gdk_WindowEdge.cs',
'Gdk_WMDecoration.cs',
'Gdk_WindowRedirect.cs',
'Gdk_WindowAttr.cs',
'Gdk_Keyboard.cs',
'Gdk_EventPadGroupMode.cs',
'Gdk_GdipContext.cs',
'Gdk_PixbufDestroyNotify.cs',
'Gdk_CancelHandler.cs',
'Gdk_DrawingContext.cs',
'Gdk_Point.cs',
'Gdk_TGAColor.cs',
'Gdk_TGAColormap.cs',
'Gdk_AnchorHints.cs',
'Gdk_PixbufSimpleAnim.cs',
'Gdk_EventSequence.cs',
'Gdk_GdkSharp.WindowChildFuncNative.cs',
'Gdk_GdkSharp.PixbufSaveFuncNative.cs',
'Gdk_Drop.cs',
'Gdk_ClientFilter.cs',
'Gdk_SubpixelLayout.cs',
'Gdk_EventType.cs',
'Gdk_TouchpadGesturePhase.cs',
'Gdk_GrabOwnership.cs',
'Gdk_RGBA.cs',
'Gdk_PixbufNonAnimClass.cs',
'Gdk_SeatDefaultClass.cs',
'Gdk_WindowState.cs',
'Gdk_SeatAddedHandler.cs',
'Gdk_PixbufFrame.cs',
'Gdk_GdkSharp.SeatGrabPrepareFuncNative.cs',
'Gdk_AxisInfo.cs',
'Gdk_ScrollDirection.cs',
'Gdk_FromEmbedderHandler.cs',
'Gdk_EventTouch.cs',
'Gdk_XBMData.cs',
'Gdk_OwnerChange.cs',
'Gdk_PixbufAniAnim.cs',
'Gdk_CreateSurfaceHandler.cs',
'Gdk_GdkSharp.WindowInvalidateHandlerFuncNative.cs',
'Gdk_WindowInvalidateHandlerFunc.cs',
'GLib_GLibSharp.AsyncReadyCallbackNative.cs',
'GLib_GLibSharp.GSourceFuncNative.cs',
]
source_gen = []
source_gen += [custom_target(assembly_name + 'codegen',
input: raw_api_fname,
output: generated_sources,
command: [
generate_api,
'--api-raw', '@INPUT@',
'--gapi-fixup', gapi_fixup.full_path(),
'--metadata', metadata_fname,
'--symbols', symbols,
'--gapi-codegen', gapi_codegen.full_path(),
'--extra-includes', glib_api_includes,
'--extra-includes', pango_api_includes,
'--extra-includes', gio_api_includes,
'--extra-includes', cairo_api_includes,
'--glue-file', gluefile,
'--glue-includes', glueincludes,
'--out', meson.current_build_dir(),
'--files', ';'.join(generated_sources),
'--assembly-name', assembly_name,
'--glue-libname', gluefile,
'--schema', schema,
],
depends: [gapi_codegen, gapi_fixup])]
gdk_api_includes = join_paths(meson.current_build_dir(), 'gdk-api.xml')

71
gdk/meson.build Normal file
View file

@ -0,0 +1,71 @@
snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk')
assembly_name = 'gdk-sharp'
symbols = join_paths(meson.current_source_dir(), 'gdk-symbols.xml')
raw_api_fname = join_paths(meson.current_source_dir(), 'gdk-api.raw')
metadata_fname = join_paths(meson.current_source_dir(), 'Gdk.metadata')
glueincludes = 'gdk/gdk.h'
gluefile = join_paths(meson.current_build_dir(), 'generate.c')
configure_file(input: assembly_name + '.dll.config.in',
output: assembly_name + '.dll.config',
configuration : remap_dl_data)
configure_file(input: assembly_name + '-3.0.pc.in',
output: assembly_name + '-3.0.pc',
configuration : version_data)
subdir('generated')
sources = [
'Atom.cs',
'Color.cs',
'Device.cs',
'Display.cs',
'DisplayManager.cs',
'EventButton.cs',
'EventConfigure.cs',
'EventCrossing.cs',
'Event.cs',
'EventDND.cs',
'EventExpose.cs',
'EventFocus.cs',
'EventGrabBroken.cs',
'EventKey.cs',
'EventMotion.cs',
'EventOwnerChange.cs',
'EventProperty.cs',
'EventProximity.cs',
'EventScroll.cs',
'EventSelection.cs',
'EventSetting.cs',
'EventVisibility.cs',
'EventWindowState.cs',
'Global.cs',
'Key.cs',
'Keymap.cs',
'Pixbuf.cs',
'PixbufAnimation.cs',
'PixbufFrame.cs',
'PixbufLoader.cs',
'Pixdata.cs',
'Point.cs',
'Property.cs',
'Rectangle.cs',
'RGBA.cs',
'Screen.cs',
'Selection.cs',
'Size.cs',
'TextProperty.cs',
'WindowAttr.cs',
'Window.cs',
]
gdk_sharp = library(assembly_name, source_gen, sources,
cs_args: ['-unsafe', '-keyfile:' + snk],
link_with: [glib_sharp, pango_sharp, cairo_sharp, gio_sharp],
)
install_infos += [assembly_name, gdk_sharp.full_path()]
gdk_sharp_dep = declare_dependency(link_with: gdk_sharp)

82
generator/meson.build Normal file
View file

@ -0,0 +1,82 @@
gapi_fixup = executable('gapi-fixup', 'gapi-fixup.cs',
install_dir : gapi_installdir,
install: true)
configure_file(input: 'gapi3-fixup.in',
output: 'gapi3-fixup',
configuration : gapi_parser_data,
install_dir: get_option('bindir'),
install: true)
gapi_codegen = executable('gapi_codegen',
'AliasGen.cs',
'ArrayParameter.cs',
'BoxedGen.cs',
'ByRefGen.cs',
'CallbackGen.cs',
'ChildProperty.cs',
'ClassBase.cs',
'ClassField.cs',
'ClassGen.cs',
'CodeGenerator.cs',
'ConstFilenameGen.cs',
'ConstStringGen.cs',
'Constant.cs',
'Ctor.cs',
'DefaultSignalHandler.cs',
'EnumGen.cs',
'FieldBase.cs',
'GenBase.cs',
'GenerationInfo.cs',
'GObjectVM.cs',
'HandleBase.cs',
'IAccessor.cs',
'IGeneratable.cs',
'IManualMarshaler.cs',
'InterfaceGen.cs',
'InterfaceVM.cs',
'IOwnable.cs',
'LogWriter.cs',
'LPGen.cs',
'LPUGen.cs',
'ManagedCallString.cs',
'ManualGen.cs',
'MarshalGen.cs',
'MethodBase.cs',
'MethodBody.cs',
'Method.cs',
'NativeStructGen.cs',
'ObjectField.cs',
'ObjectBase.cs',
'ObjectGen.cs',
'OpaqueGen.cs',
'Options.cs',
'OwnableGen.cs',
'Parameter.cs',
'Parameters.cs',
'Parser.cs',
'Property.cs',
'PropertyBase.cs',
'ReturnValue.cs',
'Signal.cs',
'Signature.cs',
'SimpleBase.cs',
'SimpleGen.cs',
'Statistics.cs',
'StructBase.cs',
'StructField.cs',
'StructGen.cs',
'SymbolTable.cs',
'UnionGen.cs',
'VirtualMethod.cs',
'VMSignature.cs',
'XmlElementExtensions.cs',
install_dir : gapi_installdir,
install: true)
configure_file(input: 'gapi3-codegen.in',
output: 'gapi3-codegen',
configuration : gapi_parser_data,
install_dir: get_option('bindir'),
install: true)

View file

@ -0,0 +1,83 @@
#!/usr/bin/env python3
import argparse
import glob
import os
import re
import shutil
import subprocess
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--api-raw")
parser.add_argument("--gapi-fixup")
parser.add_argument("--metadata")
parser.add_argument("--gapi-codegen")
parser.add_argument("--glue-file")
parser.add_argument("--glue-includes")
parser.add_argument("--glue-libname")
parser.add_argument("--assembly-name")
parser.add_argument("--extra-includes", action='append', default=[])
parser.add_argument("--out")
parser.add_argument("--files")
parser.add_argument("--symbols")
parser.add_argument("--schema")
parser.add_argument("--fakeglue", action='store_true')
opts = parser.parse_args()
if opts.fakeglue:
exit(0)
if not opts.glue_libname:
opts.glue_libname = opts.assembly_name + 'sharpglue-3'
api_xml = os.path.join(opts.out, os.path.basename(
opts.api_raw).replace('.raw', '.xml'))
shutil.copyfile(opts.api_raw, api_xml)
cmd = [opts.gapi_fixup, "--api=" + api_xml,
"--metadata=" + opts.metadata]
if opts.symbols:
cmd.extend(['--symbols=' + opts.symbols])
subprocess.check_call(cmd)
cmd = [
opts.gapi_codegen, '--generate', api_xml,
'--outdir=' + opts.out,
'--glue-filename=' + opts.glue_file,
'--gluelib-name=' + opts.glue_libname,
'--glue-includes=' + opts.glue_includes,
'--assembly-name=' + opts.assembly_name,]
if opts.schema:
cmd += ['--schema=' + opts.schema]
cmd += ['-I' + i for i in opts.extra_includes]
print(' '.join(cmd))
subprocess.check_call(cmd)
# WORKAROUND: Moving files into the out directory with special names
# as meson doesn't like path separator in output names.
regex = re.compile('_')
dirs = set()
for _f in opts.files.split(';'):
fpath = os.path.join(opts.out, regex.sub("/", _f, 1))
dirs.add(os.path.dirname(fpath))
_f = os.path.join(opts.out, _f)
shutil.move(fpath, _f)
missing_files = []
for _dir in dirs:
missing_files.extend(glob.glob(os.path.join(_dir, '*.cs')))
if missing_files:
print("Following files were generated but not listed:\n %s" %
'\n '.join(["'%s_%s'," % (m.split(os.path.sep)[-2], m.split(os.path.sep)[-1])
for m in missing_files]))
exit(1)
for _dir in dirs:
shutil.rmtree(_dir)

418
gio/generated/meson.build Normal file
View file

@ -0,0 +1,418 @@
generate_api = find_program('generate_code.py')
generated_sources = [
'GLib_DBusServer.cs',
'GLib_GLibSharp.AsyncReadyCallbackNative.cs',
'GLib_DBusProxyFlags.cs',
'GLib_GLibSharp.SettingsBindGetMappingNative.cs',
'GLib_FileAttributeInfoFlags.cs',
'GLib_SettingsBackendWatch.cs',
'GLib_ResourceFileEnumerator.cs',
'GLib_Credentials.cs',
'GLib_AsyncResultAdapter.cs',
'GLib_DBusError.cs',
'GLib_DBusMessageFlags.cs',
'GLib_FileType.cs',
'GLib_FdoNotificationBackend.cs',
'GLib_TlsDatabaseVerifyFlags.cs',
'GLib_DBusMessageType.cs',
'GLib_MenuItem.cs',
'GLib_GLibSharp.FileProgressCallbackNative.cs',
'GLib_DBusCallFlags.cs',
'GLib_SocketClient.cs',
'GLib_ZlibDecompressor.cs',
'GLib_ActionMapAdapter.cs',
'GLib_IOModuleScope.cs',
'GLib_DBusSubtreeFlags.cs',
'GLib_InputStream.cs',
'GLib_SimpleProxyResolver.cs',
'GLib_NetworkAddress.cs',
'GLib_DBusObjectSkeleton.cs',
'GLib_Socks4aProxy.cs',
'GLib_SocketListener.cs',
'GLib_FileDescriptorBasedAdapter.cs',
'GLib_ActionRemovedHandler.cs',
'GLib_Resource.cs',
'GLib_SettingsBindFlags.cs',
'GLib_SocketAddress.cs',
'GLib_EmblemedIcon.cs',
'GLib_AcceptCertificateHandler.cs',
'GLib_MenuExporterLink.cs',
'GLib_PropertyAction.cs',
'GLib_TlsDatabase.cs',
'GLib_DummyTlsCertificate.cs',
'GLib_Socks5Proxy.cs',
'GLib_IFileDescriptorBased.cs',
'GLib_FileIOStream.cs',
'GLib_DataOutputStream.cs',
'GLib_SocketListenerEvent.cs',
'GLib_IOSchedulerJob.cs',
'GLib_MountRemovedHandler.cs',
'GLib_IDatagramBased.cs',
'GLib_IOExtension.cs',
'GLib_AsyncInitableAdapter.cs',
'GLib_DummyTlsConnection.cs',
'GLib_ShowUnmountProgressHandler.cs',
'GLib_DBusErrorEntry.cs',
'GLib_DummyTlsCertificateClass.cs',
'GLib_DBusAnnotationInfo.cs',
'GLib_SocketService.cs',
'GLib_LaunchedFailedHandler.cs',
'GLib_ChangeEventHandler.cs',
'GLib_MemoryBuffer.cs',
'GLib_Win32RegistrySubkeyIter.cs',
'GLib_FileMeasureProgressCallback.cs',
'GLib_OutputMessage.cs',
'GLib_DBusObject.cs',
'GLib_DBusInterfaceSkeleton.cs',
'GLib_ActionGroupAdapter.cs',
'GLib_ISeekable.cs',
'GLib_GLibSharp.PollableSourceFuncNative.cs',
'GLib_ResourceFileInputStreamClass.cs',
'GLib_GLibSharp.CancellableSourceFuncNative.cs',
'GLib_NativeVolumeMonitor.cs',
'GLib_DBusServerClass.cs',
'GLib_DBusMenuPath.cs',
'GLib_Win32WinsockFuncs.cs',
'GLib_MenuExporterGroup.cs',
'GLib_DBusPropertyInfoFlags.cs',
'GLib_DriveDisconnectedHandler.cs',
'GLib_UnixFDMessage.cs',
'GLib_Win32RegistryValueIter.cs',
'GLib_ResourceFileInputStream.cs',
'GLib_DBusAuthObserverClass.cs',
'GLib_ConverterAdapter.cs',
'GLib_ShowProcessesHandler.cs',
'GLib_ItemsChangedHandler.cs',
'GLib_CancellableSourceFunc.cs',
'GLib_FileProgressCallback.cs',
'GLib_DBusSignalInfo.cs',
'GLib_DriveStartFlags.cs',
'GLib_CredentialsType.cs',
'GLib_Menu.cs',
'GLib_IOStream.cs',
'GLib_DriveConnectedHandler.cs',
'GLib_MenuModel.cs',
'GLib_LocalFileEnumerator.cs',
'GLib_ProxyAddressEnumerator.cs',
'GLib_Win32RegistryKeyWatchCallbackFunc.cs',
'GLib_MenuExporterWatch.cs',
'GLib_Win32AppInfoApplication.cs',
'GLib_FileInfo.cs',
'GLib_ContentType.cs',
'GLib_MountOperation.cs',
'GLib_DriveAdapter.cs',
'GLib_GLibSharp.SocketSourceFuncNative.cs',
'GLib_BytesIcon.cs',
'GLib_ThreadedSocketService.cs',
'GLib_ThreadedResolver.cs',
'GLib_SettingsGetMapping.cs',
'GLib_WritableChangedHandler.cs',
'GLib_TestDBus.cs',
'GLib_FileMeasureFlags.cs',
'GLib_IAsyncResult.cs',
'GLib_DBusMethodInfo.cs',
'GLib_TaskThreadFunc.cs',
'GLib_IDrive.cs',
'GLib_SettingsBackendClosure.cs',
'GLib_DBusArgInfo.cs',
'GLib_DBusSendMessageFlags.cs',
'GLib_DBusObjectManagerClientFlags.cs',
'GLib_TlsCertificateFlags.cs',
'GLib_IAppInfo.cs',
'GLib_UnixFDList.cs',
'GLib_ITlsServerConnection.cs',
'GLib_SocketType.cs',
'GLib_TlsDatabaseLookupFlags.cs',
'GLib_Application.cs',
'GLib_DBusInterface.cs',
'GLib_HttpsProxy.cs',
'GLib_OutputStream.cs',
'GLib_TlsConnection.cs',
'GLib_DBusMessageClass.cs',
'GLib_ThemedIcon.cs',
'GLib_IOErrorEnum.cs',
'GLib_DBusServerFlags.cs',
'GLib_TcpWrapperConnection.cs',
'GLib_BusNameWatcherFlags.cs',
'GLib_GLibSharp.IOSchedulerJobFuncNative.cs',
'GLib_SocketProtocol.cs',
'GLib_DummyTlsDatabase.cs',
'GLib_TlsFileDatabase.cs',
'GLib_SeekableAdapter.cs',
'GLib_NetworkMonitor.cs',
'GLib_DtlsServerConnection.cs',
'GLib_SocketAddressEnumerator.cs',
'GLib_CommandLineHandler.cs',
'GLib_CocoaNotificationBackend.cs',
'GLib_ConverterResult.cs',
'GLib_TlsCertificateRequestFlags.cs',
'GLib_MenuAttributeIter.cs',
'GLib_IOError.cs',
'GLib_TlsServerConnectionAdapter.cs',
'GLib_SocketFamily.cs',
'GLib_RunHandler.cs',
'GLib_Win32AppInfoURLSchema.cs',
'GLib_DBusObjectManager.cs',
'GLib_MountAddedHandler.cs',
'GLib_AskPasswordFlags.cs',
'GLib_LocalFileIOStream.cs',
'GLib_FileMonitorEvent.cs',
'GLib_NativeSocketAddress.cs',
'GLib_FileReadMoreCallback.cs',
'GLib_EmblemOrigin.cs',
'GLib_IOModule.cs',
'GLib_VolumeAdapter.cs',
'GLib_Subprocess.cs',
'GLib_PortalNotificationBackend.cs',
'GLib_OutputVector.cs',
'GLib_SocketMsgFlags.cs',
'GLib_LoadableIconAdapter.cs',
'GLib_DataStreamNewlineType.cs',
'GLib_VolumeChangedHandler.cs',
'GLib_AskPasswordHandler.cs',
'GLib_SubprocessFlags.cs',
'GLib_FileAttributeInfo.cs',
'GLib_BufferedInputStream.cs',
'GLib_GLibSharp.SpawnChildSetupFuncNative.cs',
'GLib_VolumeMonitor.cs',
'GLib_DBusMethodInvocationClass.cs',
'GLib_MenuLinkIter.cs',
'GLib_ReplyHandler.cs',
'GLib_PasswordSave.cs',
'GLib_DBusInterfaceInfo.cs',
'GLib_ResolverRecordType.cs',
'GLib_Win32AppInfoFileExtensionClass.cs',
'GLib_MountMountFlags.cs',
'GLib_FilesystemPreviewType.cs',
'GLib_DatagramBasedAdapter.cs',
'GLib_ChangedHandler.cs',
'GLib_TlsError.cs',
'GLib_TlsCertificate.cs',
'GLib_Resolver.cs',
'GLib_SocketControlMessage.cs',
'GLib_DataInputStream.cs',
'GLib_MountAdapter.cs',
'GLib_SocketConnection.cs',
'GLib_DummyDtlsConnection.cs',
'GLib_DBusInterfaceSkeletonFlags.cs',
'GLib_IAsyncInitable.cs',
'GLib_SimpleAsyncThreadFunc.cs',
'GLib_TlsInteractionResult.cs',
'GLib_InitableAdapter.cs',
'GLib_DBusObjectManagerServer.cs',
'GLib_UnixConnection.cs',
'GLib_TlsPasswordFlags.cs',
'GLib_ActionEnabledChangedHandler.cs',
'GLib_GLibSharp.ReallocFuncNative.cs',
'GLib_Win32AppInfoFileExtension.cs',
'GLib_ZlibCompressorFormat.cs',
'GLib_UnixSocketAddressType.cs',
'GLib_InetAddressMask.cs',
'GLib_MenuExporter.cs',
'GLib_BusType.cs',
'GLib_EventHandler.cs',
'GLib_Win32AppInfoHandlerClass.cs',
'GLib_TlsRehandshakeMode.cs',
'GLib_FileIcon.cs',
'GLib_SettingsBackend.cs',
'GLib_ITlsClientConnection.cs',
'GLib_ResourceFileEnumeratorClass.cs',
'GLib_ResourceFlags.cs',
'GLib_DBusObjectManagerClient.cs',
'GLib_Socks4Proxy.cs',
'GLib_DBusMessageByteOrder.cs',
'GLib_SrvTarget.cs',
'GLib_CharsetConverter.cs',
'GLib_DriveStopButtonHandler.cs',
'GLib_Emblem.cs',
'GLib_DummyTlsConnectionClass.cs',
'GLib_WritableChangeEventHandler.cs',
'GLib_DummyDtlsConnectionClass.cs',
'GLib_GtkNotificationBackend.cs',
'GLib_FileMonitor.cs',
'GLib_AppInfoMonitor.cs',
'GLib_IOStreamSpliceFlags.cs',
'GLib_FileInputStream.cs',
'GLib_DBusSubtreeVTable.cs',
'GLib_InputVector.cs',
'GLib_DtlsClientConnection.cs',
'GLib_ActionAddedHandler.cs',
'GLib_GLibSharp.TaskThreadFuncNative.cs',
'GLib_AppInfoCreateFlags.cs',
'GLib_TlsInteraction.cs',
'GLib_ReallocFunc.cs',
'GLib_UnixCredentialsMessage.cs',
'GLib_ResolverError.cs',
'GLib_Settings.cs',
'GLib_GLibSharp.SettingsBindSetMappingNative.cs',
'GLib_IConverter.cs',
'GLib_DBusMessage.cs',
'GLib_SettingsBindGetMapping.cs',
'GLib_MountUnmountFlags.cs',
'GLib_IOSchedulerJobFunc.cs',
'GLib_SimpleIOStream.cs',
'GLib_IconAdapter.cs',
'GLib_DBusConnectionFlags.cs',
'GLib_SocketSourceFunc.cs',
'GLib_GLibSharp.FileMeasureProgressCallbackNative.cs',
'GLib_TestDBusClass.cs',
'GLib_FileEnumerator.cs',
'GLib_AppLaunchContext.cs',
'GLib_Task.cs',
'GLib_DBusProxy.cs',
'GLib_ProxyResolverAdapter.cs',
'GLib_DBusActionGroup.cs',
'GLib_SettingsBindSetMapping.cs',
'GLib_DriveChangedHandler.cs',
'GLib_FileCreateFlags.cs',
'GLib_PollableInputStream.cs',
'GLib_ResourceError.cs',
'GLib_MenuExporterRemote.cs',
'GLib_ExportedSubtree.cs',
'GLib_ApplicationFlags.cs',
'GLib_ProxyResolverPortal.cs',
'GLib_GioGlobal.cs',
'GLib_GLibSharp.SimpleAsyncThreadFuncNative.cs',
'GLib_DBusConnection.cs',
'GLib_Socket.cs',
'GLib_TlsClientConnectionAdapter.cs',
'GLib_GLibSharp.Win32RegistryKeyWatchCallbackFuncNative.cs',
'GLib_Win32AppInfoURLSchemaClass.cs',
'GLib_IIcon.cs',
'GLib_MountOperationResult.cs',
'GLib_VolumeRemovedHandler.cs',
'GLib_ProxyAdapter.cs',
'GLib_SubprocessLauncher.cs',
'GLib_ResourceLookupFlags.cs',
'GLib_InetAddress.cs',
'GLib_SimpleActionGroup.cs',
'GLib_FileAttributeMatcher.cs',
'GLib_NetworkConnectivity.cs',
'GLib_ConverterFlags.cs',
'GLib_DBusMessageHeaderField.cs',
'GLib_IVolume.cs',
'GLib_FileAdapter.cs',
'GLib_Notification.cs',
'GLib_DBusProxyTypeFunc.cs',
'GLib_IOExtensionPoint.cs',
'GLib_TcpConnection.cs',
'GLib_Win32AppInfoHandler.cs',
'GLib_DummyProxyResolver.cs',
'GLib_TlsPassword.cs',
'GLib_DataStreamByteOrder.cs',
'GLib_DBusPropertyInfo.cs',
'GLib_ISocketConnectable.cs',
'GLib_OpenedHandler.cs',
'GLib_IProxyResolver.cs',
'GLib_ActionStateChangedHandler.cs',
'GLib_FilterOutputStream.cs',
'GLib_SocketClientEvent.cs',
'GLib_IOStreamAdapter.cs',
'GLib_VfsFileLookupFunc.cs',
'GLib_NotificationPriority.cs',
'GLib_InputMessage.cs',
'GLib_ApplicationCommandLine.cs',
'GLib_Cancellable.cs',
'GLib_DBusObjectProxy.cs',
'GLib_DBusSignalFlags.cs',
'GLib_InetSocketAddress.cs',
'GLib_Win32RegistryValueType.cs',
'GLib_SchemaState.cs',
'GLib_DBusAuthObserver.cs',
'GLib_Win32RegistryKeyWatcherFlags.cs',
'GLib_IActionGroup.cs',
'GLib_Win32AppInfoApplicationClass.cs',
'GLib_DatagramBasedSourceFunc.cs',
'GLib_PollableSourceFunc.cs',
'GLib_GLibSharp.GSourceFuncNative.cs',
'GLib_Pollable.cs',
'GLib_ZlibCompressor.cs',
'GLib_DtlsConnection.cs',
'GLib_GLibSharp.DatagramBasedSourceFuncNative.cs',
'GLib_ExportedObject.cs',
'GLib_TestDBusFlags.cs',
'GLib_MenuExporterMenu.cs',
'GLib_BusNameOwnerFlags.cs',
'GLib_DBusNodeInfo.cs',
'GLib_GLibSharp.VfsFileLookupFuncNative.cs',
'GLib_NetworkService.cs',
'GLib_DBusMethodInvocation.cs',
'GLib_FileMonitorFlags.cs',
'GLib_DBusConnectionClass.cs',
'GLib_DBusInterfaceVTable.cs',
'GLib_IProxy.cs',
'GLib_IActionMap.cs',
'GLib_Resources.cs',
'GLib_SimplePermission.cs',
'GLib_IFile.cs',
'GLib_LaunchedHandler.cs',
'GLib_NextstepSettingsBackend.cs',
'GLib_VolumeAddedHandler.cs',
'GLib_OutputStreamSpliceFlags.cs',
'GLib_BufferedOutputStream.cs',
'GLib_PollableOutputStream.cs',
'GLib_FileCopyFlags.cs',
'GLib_AskQuestionHandler.cs',
'GLib_SimpleAsyncResult.cs',
'GLib_IMount.cs',
'GLib_DBusMenuGroup.cs',
'GLib_FilenameCompleter.cs',
'GLib_IOModuleScopeFlags.cs',
'GLib_Permission.cs',
'GLib_MountChangedHandler.cs',
'GLib_DriveEjectButtonHandler.cs',
'GLib_DummyTlsDatabaseClass.cs',
'GLib_ProxyAddress.cs',
'GLib_FileAttributeStatus.cs',
'GLib_IInitable.cs',
'GLib_MessageToWriteData.cs',
'GLib_FileOutputStream.cs',
'GLib_GLibSharp.FileReadMoreCallbackNative.cs',
'GLib_Vfs.cs',
'GLib_FileAttributeInfoList.cs',
'GLib_DriveStartStopType.cs',
'GLib_ActionEntry.cs',
'GLib_Win32RegistryKey.cs',
'GLib_NotificationBackend.cs',
'GLib_IncomingHandler.cs',
'GLib_HttpProxy.cs',
'GLib_MountPreUnmountHandler.cs',
'GLib_SocketConnectableAdapter.cs',
'GLib_SimpleAction.cs',
'GLib_ActionAdapter.cs',
'GLib_FileQueryInfoFlags.cs',
'GLib_FilterInputStream.cs',
'GLib_GLibSharp.SettingsGetMappingNative.cs',
'GLib_ILoadableIcon.cs',
'GLib_TlsAuthenticationMode.cs',
'GLib_GLibSharp.DBusProxyTypeFuncNative.cs',
'GLib_FileAttributeType.cs',
'GLib_AsyncReadyCallback.cs',
'GLib_DBusCapabilityFlags.cs',
'GLib_AppInfoAdapter.cs',
'GLib_RemoteActionGroup.cs',
'GLib_IAction.cs',
]
source_gen = custom_target('gio_generated',
command: [
generate_api,
'--api-raw', raw_api_fname,
'--gapi-fixup', gapi_fixup.full_path(),
'--metadata', metadata_fname,
'--gapi-codegen', gapi_codegen.full_path(),
'--extra-includes', glib_api_includes,
'--glue-file', gluefile,
'--glue-includes', glueincludes,
'--out', meson.current_build_dir(),
'--files', ';'.join(generated_sources),
'--assembly-name', assembly_name,
'--schema', schema,
],
depends: [gapi_codegen, gapi_fixup],
input: raw_api_fname,
output: generated_sources,
)
gio_api_includes = join_paths(meson.current_build_dir(), 'gio-api.xml')

View file

@ -14261,4 +14261,4 @@
</method>
</class>
</namespace>
</api>
</api>

36
gio/meson.build Normal file
View file

@ -0,0 +1,36 @@
snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk')
assembly_name = 'gio-sharp'
raw_api_fname = join_paths(meson.current_source_dir(), 'gio-api.raw')
metadata_fname = join_paths(meson.current_source_dir(), 'Gio.metadata')
glueincludes = 'gio/gio.h'
gluefile = join_paths(meson.current_build_dir(), 'generate.c')
configure_file(input: assembly_name + '.dll.config.in',
output: assembly_name + '.dll.config',
configuration : remap_dl_data)
configure_file(input: assembly_name + '-3.0.pc.in',
output: assembly_name + '-3.0.pc',
configuration : version_data)
subdir('generated')
sources = [
'Application.cs',
'AppInfoAdapter.cs',
'FileAdapter.cs',
'FileEnumerator.cs',
'FileFactory.cs',
'GioGlobal.cs',
'GioStream.cs',
'IFile.cs'
]
gio_sharp = library(assembly_name, source_gen, sources,
cs_args: ['-unsafe', '-keyfile:' + snk],
link_with: glib_sharp,
)
install_infos += [assembly_name, gio_sharp.full_path()]
gio_sharp_dep = declare_dependency(link_with: gio_sharp)

98
glib/meson.build Normal file
View file

@ -0,0 +1,98 @@
snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk')
assembly_name = 'glib-sharp'
configure_file(input: 'glib-sharp.dll.config.in',
output: 'glib-sharp.dll.config',
configuration : remap_dl_data)
configure_file(input: 'glib-sharp-3.0.pc.in',
output: 'glib-sharp-3.0.pc',
configuration : version_data)
policy_data = configuration_data()
policy_data.set('ASSEMBLY_NAME', assembly_name)
policy_data.set('API_VERSION', apiversion)
policy = configure_file(input: policy_config,
output: 'policy.config',
configuration : policy_data)
sources = [
'Argv.cs',
'Bytes.cs',
'ConnectBeforeAttribute.cs',
'Cond.cs',
'Date.cs',
'DateTime.cs',
'DefaultSignalHandlerAttribute.cs',
'DestroyNotify.cs',
'ExceptionManager.cs',
'FileUtils.cs',
'GException.cs',
'GInterfaceAdapter.cs',
'GInterfaceAttribute.cs',
'GLibSynchronizationContext.cs',
'Global.cs',
'GString.cs',
'GType.cs',
'GTypeAttribute.cs',
'Idle.cs',
'InitiallyUnowned.cs',
'IOChannel.cs',
'IWrapper.cs',
'KeyFile.cs',
'ListBase.cs',
'List.cs',
'Log.cs',
'MainContext.cs',
'MainLoop.cs',
'ManagedValue.cs',
'Markup.cs',
'Marshaller.cs',
'MissingIntPtrCtorException.cs',
'Mutex.cs',
'NotifyHandler.cs',
'Object.cs',
'ObjectManager.cs',
'Opaque.cs',
'ParamSpec.cs',
'PollFD.cs',
'Priority.cs',
'PropertyAttribute.cs',
'PtrArray.cs',
'RecMutex.cs',
'Signal.cs',
'SignalArgs.cs',
'SignalAttribute.cs',
'SignalClosure.cs',
'SList.cs',
'Source.cs',
'SourceFunc.cs',
'SourceFuncs.cs',
'SourceDummyMarshal.cs',
'GLibSharp.SourceFuncNative.cs',
'GLibSharp.SourceDummyMarshalNative.cs',
'SourceCallbackFuncs.cs',
'Spawn.cs',
'Thread.cs',
'Timeout.cs',
'TimeVal.cs',
'TimeZone.cs',
'ToggleRef.cs',
'TypeFundamentals.cs',
'TypeInitializerAttribute.cs',
'TypeNameAttribute.cs',
'ValueArray.cs',
'Value.cs',
'Variant.cs',
'VariantType.cs' ]
glib_sharp = library(assembly_name, sources,
cs_args: ['-unsafe', '-keyfile:' + snk],
)
install_infos += [assembly_name, glib_sharp.full_path()]
glib_sharp_dep = declare_dependency(link_with: glib_sharp)
glib_api_includes = join_paths(meson.current_source_dir(), 'glib-api.xml')

1089
gtk/generated/meson.build Normal file

File diff suppressed because it is too large Load diff

140
gtk/meson.build Normal file
View file

@ -0,0 +1,140 @@
snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk')
assembly_name = 'gtk-sharp'
symbols = join_paths(meson.current_source_dir(), 'gtk-symbols.xml')
raw_api_fname = join_paths(meson.current_source_dir(), 'gtk-api.raw')
metadata_fname = join_paths(meson.current_source_dir(), 'Gtk.metadata')
glueincludes = 'gtk/gtk.h'
gluefile = join_paths(meson.current_build_dir(), 'generate.c')
configure_file(input: assembly_name + '.dll.config.in',
output: assembly_name + '.dll.config',
configuration : remap_dl_data)
configure_file(input: assembly_name + '-3.0.pc.in',
output: assembly_name + '-3.0.pc',
configuration : version_data)
subdir('generated')
sources = [
'Accel.cs',
'AccelKey.cs',
'Action.cs',
'ActionEntry.cs',
'ActionGroup.cs',
'Adjustment.cs',
'Application.cs',
'ArrayExtensions.cs',
'Bin.cs',
'BindingAttribute.cs',
'Builder.cs',
'Button.cs',
'Calendar.cs',
'CellAreaBox.cs',
'CellLayoutAdapter.cs',
'CellRenderer.cs',
'CellView.cs',
'CheckMenuItem.cs',
'ChildPropertyAttribute.cs',
'Clipboard.cs',
'ColorSelection.cs',
'ComboBox.cs',
'ComboBoxText.cs',
'Container.cs',
'Dialog.cs',
'Drag.cs',
'Entry.cs',
'EntryCompletion.cs',
'FileChooserDialog.cs',
'FileChooserNative.cs',
'Frame.cs',
'Global.cs',
'HBox.cs',
'HScale.cs',
'ICellLayout.cs',
'IconFactory.cs',
'IconSet.cs',
'IconTheme.cs',
'IconView.cs',
'Image.cs',
'ImageMenuItem.cs',
'Init.cs',
'ITreeModel.cs',
'ITreeNode.cs',
'Key.cs',
'Label.cs',
'ListStore.cs',
'Menu.cs',
'MenuItem.cs',
'MessageDialog.cs',
'NativeDialog.cs',
'NodeCellDataFunc.cs',
'NodeSelection.cs',
'NodeStore.cs',
'NodeView.cs',
'Notebook.cs',
'PaperSize.cs',
'Plug.cs',
'Printer.cs',
'RadioAction.cs',
'RadioActionEntry.cs',
'RadioButton.cs',
'RadioMenuItem.cs',
'RadioToolButton.cs',
'RecentManager.cs',
'RowsReorderedHandler.cs',
'ScrolledWindow.cs',
'SelectionData.cs',
'Settings.cs',
'SpinButton.cs',
'StatusIcon.cs',
'Stock.cs',
'StockItem.cs',
'StockManager.cs',
'Style.cs',
'StyleContext.cs',
'StyleProviderPriority.cs',
'Target.cs',
'TargetEntry.cs',
'TargetList.cs',
'TextAttributes.cs',
'TextBuffer.cs',
'TextChildAnchor.cs',
'TextIter.cs',
'TextMark.cs',
'TextTag.cs',
'TextView.cs',
'ThreadNotify.cs',
'ToggleActionEntry.cs',
'TreeEnumerator.cs',
'TreeIter.cs',
'TreeMenu.cs',
'TreeModelAdapter.cs',
'TreeModelFilter.cs',
'TreeModelSort.cs',
'TreeNode.cs',
'TreeNodeAttribute.cs',
'TreeNodeValueAttribute.cs',
'TreePath.cs',
'TreeSelection.cs',
'TreeStore.cs',
'TreeView.cs',
'TreeViewColumn.cs',
'UIManager.cs',
'VBox.cs',
'Viewport.cs',
'VScale.cs',
'Widget.cs',
'Window.cs',
]
gtk_sharp = library(assembly_name, source_gen, sources,
cs_args: ['-unsafe', '-keyfile:' + snk, '-nowarn:0618,0612,0169'],
link_with: [glib_sharp, pango_sharp,
cairo_sharp, gio_sharp, atk_sharp,
gdk_sharp],
)
install_infos += [assembly_name, gtk_sharp.full_path()]
gtk_sharp_dep = declare_dependency(link_with: gtk_sharp)

114
meson.build Normal file
View file

@ -0,0 +1,114 @@
project('gtk-sharp', ['cs', 'c'], version: '3.22.6')
if host_machine.system() == 'windows'
if h.get(0) == host_machine.cpu()
add_project_arguments('-define:WIN64LONGS', language: 'cs')
endif
endif
apiversion = '3.0.0.0'
mono_required_version = '>=3.2.0'
gtk_required_version='>=3.0.0'
glib_required_version='>=2.32.0'
# FIXME Handle .net
mono = meson.get_compiler('cs')
if not mono.version().version_compare(mono_required_version)
error('Mono required version @0@ not found (@1@)'.format(
mono_required_version, mono.version()))
endif
assemblyinfo='/AssemblyInfo.cs'
gacutil = find_program('gacutil')
al = find_program('al')
glib_dep = dependency('glib-2.0', version: glib_required_version)
gio_dep = dependency('gio-2.0', version: glib_required_version)
mono_runtime_dep = dependency('mono', required: false)
# FIXME Check how to enabled debug flags (if at all needed).
# TODO monodoc
prefix = get_option('prefix')
assembly_data = configuration_data()
assembly_data.set_quoted('API_VERSION', apiversion)
configure_file(input: 'AssemblyInfo.cs.in', output: 'AssemblyInfo.cs', configuration : assembly_data)
policy_config = files('policy.config.in')
runtime = ''
if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
runtime_debug_flags=' --debug'
endif
if mono_runtime_dep.found()
runtime = 'mono' + runtime_debug_flags
endif
if host_machine.system() == 'osx'
lib_prefix=''
lib_suffix='.dylib'
else
lib_prefix='.so'
lib_suffix=''
endif
remap_dl_data = configuration_data()
remap_dl_data.set('LIB_PREFIX', lib_prefix)
remap_dl_data.set('LIB_SUFFIX', lib_suffix)
version_data = configuration_data()
version_data.set('VERSION', meson.project_version())
version_data.set('PACKAGE_VERSION', meson.project_name() + '-3.0')
install_infos = []
schema = join_paths(meson.current_source_dir(), 'gapi.xsd')
subdir('parser')
subdir('generator')
subdir('glib')
subdir('gio')
cairo_dep = dependency('cairo', required: false)
if cairo_dep.found()
subdir('cairo')
else
message('Cairo not found, not building')
endif
pango_dep = dependency('pango', required: false)
if pango_dep.found()
subdir('pango')
else
message('Pango not found, not building')
endif
atk_dep = dependency('atk', required: false)
if atk_dep.found()
subdir('atk')
else
message('Atk not found, not building')
endif
gdk_dep = dependency('gdk-3.0', version: gtk_required_version, required: false)
if gdk_dep.found() and atk_dep.found() and pango_dep.found()
subdir('gdk')
has_gdk = true
else
message('Gdk not found, not building')
has_gdk = false
endif
gtk_dep = dependency('gtk+-3.0', version: gtk_required_version, required: false)
if gtk_dep.found() and atk_dep.found() and pango_dep.found()
subdir('gtk')
subdir('sample/GtkDemo')
has_gtk = true
else
has_gtk = false
message('Gtk not found, not building')
endif
gacutil_install = join_paths(meson.current_source_dir(), 'gacutil_install.py')
meson.add_install_script(gacutil_install, install_infos)

136
pango/generated/meson.build Normal file
View file

@ -0,0 +1,136 @@
generated_sources = [
'Pango_Alignment.cs',
'Pango_Variant.cs',
'Pango_GlyphItem.cs',
'Pango_Analysis.cs',
'Pango_AttrDataCopyFunc.cs',
'Pango_CoreTextFamily.cs',
'Pango_Win32Family.cs',
'Pango_Fontset.cs',
'Pango_Gravity.cs',
'Pango_CairoWin32FontClass.cs',
'Pango_GlyphGeometry.cs',
'Pango_FontMetrics.cs',
'Pango_Markup.cs',
'Pango_CoreTextFamilyClass.cs',
'Pango_AttrIterator.cs',
'Pango_Rectangle.cs',
'Pango_Global.cs',
'Pango_WrapMode.cs',
'Pango_CoreTextFontset.cs',
'Pango_BlockInfo.cs',
'Pango_CairoRendererClass.cs',
'Pango_CoreTextFaceClass.cs',
'Pango_Color.cs',
'Pango_GlyphInfo.cs',
'Pango_FontsetForeachFunc.cs',
'Pango_CoreTextFontMapClass.cs',
'Pango_Win32FontMap.cs',
'Pango_AttrList.cs',
'Pango_CoreTextFontMap.cs',
'Pango_FT2Font.cs',
'Pango_CoverageLevel.cs',
'Pango_WidthIter.cs',
'Pango_EllipsizeState.cs',
'Pango_CairoFcFontMapClass.cs',
'Pango_LineState.cs',
'Pango_RenderPart.cs',
'Pango_Weight.cs',
'Pango_FontHashKey.cs',
'Pango_Style.cs',
'Pango_Script.cs',
'Pango_Units.cs',
'Pango_Language.cs',
'Pango_CoreTextFontsetClass.cs',
'Pango_PangoSharp.AttrDataCopyFuncNative.cs',
'Pango_GlyphVisAttr.cs',
'Pango_GravityHint.cs',
'Pango_FT2GlyphInfo.cs',
'Pango_LogAttr.cs',
'Pango_CairoFcFont.cs',
'Pango_Win32FontMapClass.cs',
'Pango_OTRulesetClass.cs',
'Pango_Win32MetricsInfo.cs',
'Pango_Win32Font.cs',
'Pango_GlyphItemIter.cs',
'Pango_FontFamily.cs',
'Pango_PangoSharp.FontsetForeachFuncNative.cs',
'Pango_FT2Renderer.cs',
'Pango_Win32FontClass.cs',
'Pango_GlyphString.cs',
'Pango_CacheEntry.cs',
'Pango_CairoWin32Font.cs',
'Pango_Extents.cs',
'Pango_CoreTextFontsetKey.cs',
'Pango_LineIter.cs',
'Pango_TabAlign.cs',
'Pango_Underline.cs',
'Pango_OpenTag.cs',
'Pango_EngineShape.cs',
'Pango_CairoHelper.cs',
'Pango_FontDescription.cs',
'Pango_FT2RendererClass.cs',
'Pango_CairoFcFontClass.cs',
'Pango_RunInfo.cs',
'Pango_EllipsizeMode.cs',
'Pango_Stretch.cs',
'Pango_FontMask.cs',
'Pango_Matrix.cs',
'Pango_LayoutLine.cs',
'Pango_ItemProperties.cs',
'Pango_FT2Family.cs',
'Pango_FT2FontClass.cs',
'Pango_AttrType.cs',
'Pango_Context.cs',
'Pango_Win32GlyphInfo.cs',
'Pango_CoreTextFace.cs',
'Pango_TabArray.cs',
'Pango_AttrFontFeatures.cs',
'Pango_LayoutRun.cs',
'Pango_ParaBreakState.cs',
'Pango_Renderer.cs',
'Pango_MarkupData.cs',
'Pango_Item.cs',
'Pango_CoreTextFontKey.cs',
'Pango_CoreTextFont.cs',
'Pango_EngineLang.cs',
'Pango_CairoContextInfo.cs',
'Pango_CairoWin32FontMapClass.cs',
'Pango_OTInfoClass.cs',
'Pango_Point.cs',
'Pango_ParenStackEntry.cs',
'Pango_LayoutIter.cs',
'Pango_Direction.cs',
'Pango_Font.cs',
'Pango_FontMap.cs',
'Pango_BidiType.cs',
'Pango_ItemizeState.cs',
'Pango_Win32Face.cs',
'Pango_Tab.cs',
'Pango_Coverage.cs',
'Pango_Layout.cs',
'Pango_FontFace.cs',
]
source_gen = custom_target('pango_generated',
command: [
generate_api,
'--api-raw', raw_api_fname,
'--gapi-fixup', gapi_fixup.full_path(),
'--metadata', metadata_fname,
'--gapi-codegen', gapi_codegen.full_path(),
'--extra-includes', glib_api_includes,
'--extra-includes', cairo_api_includes,
'--glue-file', gluefile,
'--glue-includes', glueincludes,
'--out', meson.current_build_dir(),
'--files', ';'.join(generated_sources),
'--assembly-name', assembly_name,
'--schema', schema,
],
depends: [gapi_codegen, gapi_fixup],
input: raw_api_fname,
output: generated_sources,
)
pango_api_includes = join_paths(meson.current_build_dir(), 'pango-api.xml')

67
pango/meson.build Normal file
View file

@ -0,0 +1,67 @@
snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk')
assembly_name = 'pango-sharp'
glueincludes = 'pango/pango.h'
raw_api_fname = join_paths(meson.current_source_dir(), 'pango-api.raw')
metadata_fname = join_paths(meson.current_source_dir(), 'Pango.metadata')
gluefile = join_paths(meson.current_build_dir(), 'generate.c')
configure_file(input: assembly_name + '.dll.config.in',
output: assembly_name + '.dll.config',
configuration : remap_dl_data)
subdir('generated')
sources = [
'Analysis.cs',
'AttrBackground.cs',
'AttrColor.cs',
'AttrFallback.cs',
'AttrFamily.cs',
'AttrFloat.cs',
'AttrFontDesc.cs',
'AttrForeground.cs',
'AttrGravity.cs',
'AttrGravityHint.cs',
'Attribute.cs',
'AttrInt.cs',
'AttrIterator.cs',
'AttrLanguage.cs',
'AttrLetterSpacing.cs',
'AttrList.cs',
'AttrRise.cs',
'AttrScale.cs',
'AttrShape.cs',
'AttrSize.cs',
'AttrStretch.cs',
'AttrStrikethrough.cs',
'AttrStrikethroughColor.cs',
'AttrStyle.cs',
'AttrUnderline.cs',
'AttrUnderlineColor.cs',
'AttrVariant.cs',
'AttrWeight.cs',
'Context.cs',
'Coverage.cs',
'FontFamily.cs',
'FontMap.cs',
'Global.cs',
'GlyphItem.cs',
'GlyphString.cs',
'Item.cs',
'Layout.cs',
'LayoutLine.cs',
'LayoutRun.cs',
'Matrix.cs',
'Scale.cs',
'ScriptIter.cs',
'TabArray.cs',
'Units.cs',
]
pango_sharp = library(assembly_name, source_gen, sources,
cs_args: ['-unsafe', '-keyfile:' + snk],
link_with: [glib_sharp, cairo_sharp]
)
install_infos += [assembly_name, pango_sharp.full_path()]
pango_sharp_dep = declare_dependency(link_with: pango_sharp)

26
parser/meson.build Normal file
View file

@ -0,0 +1,26 @@
gapi_installdir = join_paths(get_option('libdir'), 'gapi-3.0')
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
gapi_parser = executable('gapi-parser', 'gapi-parser.cs',
install_dir : gapi_installdir,
install: true)
gapi_parser_data = configuration_data()
gapi_parser_data.set('prefix', prefix)
gapi_parser_data.set('RUNTIME', runtime)
configure_file(input: 'gapi3-parser.in',
output: 'gapi3-parser',
configuration : gapi_parser_data,
install_dir: get_option('bindir'),
install: true)
pkg_gapi_parser_data = configuration_data()
pkg_gapi_parser_data .set('VERSION', meson.project_version())
configure_file(input: 'gapi-3.0.pc.in',
output: 'gapi-3.0.pc',
configuration : pkg_gapi_parser_data,
install_dir: pkg_install_dir,
install: true)
install_data('gapi_pp.pl', 'gapi2xml.pl', install_dir: gapi_installdir)

View file

@ -0,0 +1,54 @@
resource_flags = []
foreach rid: [
['css/css_basics.css', 'css_basics.css'],
['css/reset.css', 'reset.css'],
['images/gnome-foot.png', 'gnome-foot.png'],
['images/MonoIcon.png', 'MonoIcon.png'],
['images/gnome-calendar.png', 'gnome-calendar.png'],
['images/gnome-gmush.png', 'gnome-gmush.png'],
['images/gnu-keys.png', 'gnu-keys.png'],
['images/gnome-applets.png', 'gnome-applets.png'],
['images/gnome-gsame.png', 'gnome-gsame.png'],
['images/alphatest.png', 'alphatest.png'],
['images/gnome-gimp.png', 'gnome-gimp.png'],
['images/apple-red.png', 'apple-red.png'],
['images/background.jpg', 'background.jpg'],
['images/gtk-logo-rgb.gif', 'gtk-logo-rgb.gif'],
['images/floppybuddy.gif', 'floppybuddy.gif'],
['theming.ui', 'theming.ui'],]
resource_flags += ['-resource:' + join_paths(meson.current_source_dir(), rid.get(0)) + ',' + rid.get(1)]
endforeach
executable('GtkDemo',
'DemoApplicationWindow.cs',
'DemoAttribute.cs',
'DemoButtonBox.cs',
'DemoClipboard.cs',
'DemoColorSelection.cs',
'DemoDialog.cs',
'DemoDrawingArea.cs',
'DemoEditableCells.cs',
'DemoEntryCompletion.cs',
'DemoExpander.cs',
'DemoHyperText.cs',
'DemoIconView.cs',
'DemoImages.cs',
'DemoListStore.cs',
'DemoMain.cs',
'DemoMenus.cs',
'DemoPanes.cs',
'DemoPixbuf.cs',
'DemoRotatedText.cs',
'DemoSizeGroup.cs',
'DemoSpinner.cs',
'DemoStockBrowser.cs',
'DemoTextView.cs',
'DemoThemingStyleClasses.cs',
'DemoTreeStore.cs',
'DemoUIManager.cs',
'DemoPrinting.cs',
link_with: [glib_sharp, gio_sharp, cairo_sharp, pango_sharp,
atk_sharp, gdk_sharp, gtk_sharp],
cs_args: resource_flags
)