跳转到内容
查看源码

包结构自动生成

一个包包含什么,以及场景如何找到它。

名称 类别 写法
assets package name.entpkg/font.png
by name package use "name.entpkg";
docs package //! at the top of a manifest or a preset; /// above a Kernel, a port or a param
graphs package name.entpkg/graphs/*.esn
kernels package use "kernels/"; (in the manifest)
manifest package name.entpkg/package.esn: package name@1 { language = 1; ir = 1; }
name.entpkg/font.png

Any other file in the directory, which a scene’s input reads by its path or through the package’s name (name.entpkg/font.png), as a document is; a package’s files are readable wherever reads are held.


use "name.entpkg";

A package not beside the document is found by its name: beside the package the document is in, so packages kept together name one another; then in each directory of ENTELECHY_PACKAGES; then in packages/ beside the program.


//! at the top of a manifest or a preset; /// above a Kernel, a port or a param

What each part is for, in its source; kernel and kernels answer a published Kernel’s.


name.entpkg/graphs/*.esn

Preset graphs, placed with node n: graph "name.entpkg/graphs/g.esn" { ... }.


use "kernels/"; (in the manifest)

The documents the manifest uses, inside the directory, are the package’s Kernels; a scene that uses the package publishes every one of them. A document outside the package uses it whole, never a file inside it, so the manifest’s versions hold.


name.entpkg/package.esn: package name@1 { language = 1; ir = 1; }

Its name and edition, and the least language and IR it needs: one this Entelechy does not have refuses the package, naming both. The directory is named for the package, name.entpkg; a scene reaches one package of a name, and two, as two editions of one, are refused.