  We show that if \kappa\ is a weakly compact cardinal then the embeddability
relation on (generalized) trees of size \kappa\ is invariantly universal. This
means that for every analytic quasi-order R on the generalized Cantor space
2^\kappa\ there is an L_{\kappa^+ \kappa}-sentence \phi\ such that the
embeddability relation on its models of size \kappa, which are all trees, is
Borel bireducible (and, in fact, classwise Borel isomorphic) to R. In
particular, this implies that the relation of embeddability on trees of size
\kappa\ is complete for analytic quasi-orders. These facts generalize analogous
results for \kappa=\omega\ obtained in [LR05, FMR11], and it also partially
extends a result from [Bau76] concerning the structure of the embeddability
relation on linear orders of size \kappa.
