mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
docs: Add Setup page
This commit is contained in:
parent
c443009261
commit
c576fdf211
2 changed files with 57 additions and 6 deletions
|
@ -1,14 +1,12 @@
|
||||||
gtk-blueprint-tool
|
Overview
|
||||||
==================
|
========
|
||||||
|
|
||||||
.. title:: Overview
|
gtk-blueprint-tool is a markup language and compiler for GTK 4 user interfaces.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:hidden:
|
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:caption: Contents:
|
:caption: Contents:
|
||||||
|
|
||||||
|
setup
|
||||||
examples
|
examples
|
||||||
|
|
||||||
|
|
||||||
gtk-blueprint-tool is a markup language and compiler for GTK user interfaces.
|
|
||||||
|
|
53
docs/setup.rst
Normal file
53
docs/setup.rst
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
=====
|
||||||
|
Setup
|
||||||
|
=====
|
||||||
|
|
||||||
|
Use gtk-blueprint-tool in your project
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
gtk-blueprint-tool works as a meson subproject.
|
||||||
|
|
||||||
|
#. Save the following file as ``subprojects/gtk-blueprint-tool.wrap``:
|
||||||
|
|
||||||
|
.. code-block:: cfg
|
||||||
|
|
||||||
|
[wrap-git]
|
||||||
|
directory = gtk-blueprint-tool
|
||||||
|
url = https://gitlab.gnome.org/jwestman/gtk-blueprint-tool.git
|
||||||
|
revision = main
|
||||||
|
depth = 1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
program_names = gtk-blueprint-tool
|
||||||
|
|
||||||
|
#. Add this to your ``.gitignore``:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
/subprojects/gtk-blueprint-tool
|
||||||
|
|
||||||
|
#. Add this to the ``meson.build`` file where you build your GResources:
|
||||||
|
|
||||||
|
.. code-block:: meson.build
|
||||||
|
|
||||||
|
blueprints = custom_target('blueprints',
|
||||||
|
input: files(
|
||||||
|
# LIST YOUR BLUEPRINT FILES HERE
|
||||||
|
),
|
||||||
|
output: '.',
|
||||||
|
command: [find_program('gtk-blueprint-tool'), 'batch-compile', '@OUTPUT@', '@INPUT@'],
|
||||||
|
)
|
||||||
|
|
||||||
|
#. In the same ``meson.build`` file, add this argument to your ``gnome.compile_resources`` command:
|
||||||
|
|
||||||
|
.. code-block:: meson.build
|
||||||
|
|
||||||
|
dependencies: blueprints,
|
||||||
|
|
||||||
|
#. Convert your .ui XML files to blueprint format. In the future, an automatic
|
||||||
|
porting tool is planned.
|
||||||
|
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
The blueprint compiler flattens the directory structure of the resulting XML
|
||||||
|
files. You may need to update your ``.gresource.xml`` file to match.
|
Loading…
Add table
Add a link
Reference in a new issue