MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / generateResourcesDefinitions

Method generateResourcesDefinitions

tools/mcmanifest.js:944–1097  ·  view source on GitHub ↗
(tool)

Source from the content-addressed store, hash-verified

942 generateObjectsRules(tool) {
943 }
944 generateResourcesDefinitions(tool) {
945 if (tool.platform == "zephyr") {
946 this.line("list(APPEND mRESOURCES ${STRINGS})");
947 for (var result of tool.resourcesFiles) {
948 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
949 this.write("/");
950 this.write(result.target);
951 this.line(")");
952 }
953 for (var result of tool.bmpColorFiles) {
954 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
955 this.write("/");
956 this.write(result.target);
957 this.line(")");
958 }
959 for (var result of tool.bmpAlphaFiles) {
960 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
961 this.write("/");
962 this.write(result.target);
963 this.line(")");
964 }
965 for (var result of tool.bmpFontFiles) {
966 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
967 this.write("/");
968 this.write(result.target);
969 this.line(")");
970 }
971 for (var result of tool.bmpMaskFiles) {
972 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
973 this.write("/");
974 this.write(result.target);
975 this.line(")");
976 }
977 if (tool.format?.startsWith("clut")) {
978 for (var result of tool.clutFiles) {
979 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
980 this.write("/");
981 this.write(result.target);
982 this.line(")");
983 }
984 }
985 for (var result of tool.imageFiles) {
986 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
987 this.write("/");
988 this.write(result.target);
989 this.line(")");
990 }
991 for (var result of tool.outlineFontFiles) {
992 result.faces.forEach(face => {
993 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
994 this.write(tool.slash);
995 if ("-alpha" === face.suffix) {
996 this.line(face.name + `-${face.size}.fnt)`);
997 this.write("list(APPEND mRESOURCES ${RESOURCES_DIR}");
998 this.write("/");
999 this.line(`face.name}-${face.size}-alpha.bmp)`);
1000 }
1001 else if ("-mask" === face.suffix) {

Callers 1

generateDefinitionsMethod · 0.95

Calls 2

writeMethod · 0.65
lineMethod · 0.45

Tested by

no test coverage detected