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
//! Compiles the markup of the crate and embeds its assets
//! (docs/porting/xaml.md, 9.5.13 and 9.6).
//!
//! The counterpart of the resource items of the upstream project file and of
//! its markup compiler: `AboutFerroDialog.xaml`, the document of the class
//! [`AboutFerroDialog`](../about_ferro_dialog_xaml.rs), is compiled to
//! `$OUT_DIR/xaml/compiled_about_ferro_dialog.rs`, and everything under
//! `Assets/` is embedded as an asset of the assembly. A compiled document is
//! not an asset: the loader table of the compiled markup answers a load by its
//! URI, as upstream's compiler removes every compiled resource from the
//! assembly.
//!
//! The compiler reads the types from the type models: the one of this crate,
//! scanned from its sources, and the ones of the crates it is built on, which
//! Cargo hands to this script as `DEP_<CRATE>_XAML_XAMLMETA`. The script links
//! the compiler and no crate for its types. The build also writes the
//! `.xamlmeta` of the crate, with its type model and its compiled document,
//! and Cargo hands the path of the file to the build scripts of the crates
//! that depend on this one (`DEP_FERROUI_DIALOGS_XAML_XAMLMETA`): the themes,
//! whose documents name the types of the dialogs.
use env;
use fs;
use PathBuf;
use ;
/// The document of the class `AboutFerroDialog`, by its path below the crate directory.
const ABOUT_FERRO_DIALOG: &str = "AboutFerroDialog.xaml";