This commit is contained in:
luboslenco
2024-09-12 21:24:34 +02:00
parent ee0b32a0d7
commit 7841a5d5c6
16 changed files with 139 additions and 140 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
let project = new Project("plugins");
project.addFile("plugins.c");
project.add_cfiles("plugins.c");
return project;
+16 -16
View File
@@ -5,22 +5,22 @@ flags.package = 'org.armorforge';
flags.with_mpeg_write = true;
let project = new Project(flags.name);
project.addDefine("is_forge");
project.addDefine("is_paint");
project.addProject("../base");
project.add_define("is_forge");
project.add_define("is_paint");
project.add_project("../base");
project.addSources("../armorpaint/sources");
project.addSources("../armorpaint/sources/nodes");
project.addShaders("../armorpaint/shaders/*.glsl");
project.addSources("sources");
project.addSources("sources/nodes");
project.addShaders("shaders/*.glsl");
project.addAssets("assets/*", { destination: "data/{name}" });
project.addAssets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.addAssets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.addAssets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.addAssets("../armorpaint/assets/plugins/hello_world.js", { destination: "data/plugins/{name}" });
project.addAssets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.addAssets("assets/readme/readme.txt", { destination: "{name}" });
project.add_tsfiles("../armorpaint/sources");
project.add_tsfiles("../armorpaint/sources/nodes");
project.add_shaders("../armorpaint/shaders/*.glsl");
project.add_tsfiles("sources");
project.add_tsfiles("sources/nodes");
project.add_shaders("shaders/*.glsl");
project.add_assets("assets/*", { destination: "data/{name}" });
project.add_assets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.add_assets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.add_assets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.add_assets("../armorpaint/assets/plugins/hello_world.js", { destination: "data/plugins/{name}" });
project.add_assets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.add_assets("assets/readme/readme.txt", { destination: "{name}" });
return project;
+4 -4
View File
@@ -1,15 +1,15 @@
let project = new Project("plugins");
project.addFile("plugins.c");
project.add_cfiles("plugins.c");
if (platform === "windows") {
project.addLib('proc_texsynth/win32/texsynth');
project.add_lib('proc_texsynth/win32/texsynth');
}
else if (platform === "linux") {
project.addLib("texsynth -L" + project.basedir + "/proc_texsynth/linux");
project.add_lib("texsynth -L" + project.basedir + "/proc_texsynth/linux");
}
else if (platform === "macos") {
project.addLib(project.basedir + '/proc_texsynth/macos/libtexsynth.a');
project.add_lib(project.basedir + '/proc_texsynth/macos/libtexsynth.a');
}
return project;
+19 -19
View File
@@ -5,30 +5,30 @@ flags.package = 'org.armorlab';
flags.with_onnx = true;
let project = new Project(flags.name);
project.addDefine("is_lab");
project.addProject("../base");
project.add_define("is_lab");
project.add_project("../base");
project.addSources("sources");
project.addSources("sources/nodes");
project.addShaders("shaders/*.glsl");
project.addAssets("assets/*", { destination: "data/{name}" });
project.addAssets("../armorpaint/assets/export_presets/*", { destination: "data/export_presets/{name}" });
project.addAssets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.addAssets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.addAssets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.addAssets("../armorpaint/assets/plugins/hello_world.js", { destination: "data/plugins/{name}" });
project.addAssets("../armorpaint/assets/plugins/hello_node_brush.js", { destination: "data/plugins/{name}" });
project.addAssets("../armorpaint/assets/plugins/import_svg.js", { destination: "data/plugins/{name}" });
project.addAssets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.addAssets("assets/models/*.onnx", { destination: "data/models/{name}" });
project.addAssets("assets/models/LICENSE.txt", { destination: "data/models/LICENSE.txt" });
project.addAssets("assets/readme/readme.txt", { destination: "{name}" });
project.add_tsfiles("sources");
project.add_tsfiles("sources/nodes");
project.add_shaders("shaders/*.glsl");
project.add_assets("assets/*", { destination: "data/{name}" });
project.add_assets("../armorpaint/assets/export_presets/*", { destination: "data/export_presets/{name}" });
project.add_assets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.add_assets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.add_assets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.add_assets("../armorpaint/assets/plugins/hello_world.js", { destination: "data/plugins/{name}" });
project.add_assets("../armorpaint/assets/plugins/hello_node_brush.js", { destination: "data/plugins/{name}" });
project.add_assets("../armorpaint/assets/plugins/import_svg.js", { destination: "data/plugins/{name}" });
project.add_assets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.add_assets("assets/models/*.onnx", { destination: "data/models/{name}" });
project.add_assets("assets/models/LICENSE.txt", { destination: "data/models/LICENSE.txt" });
project.add_assets("assets/readme/readme.txt", { destination: "{name}" });
if (platform === "win32") {
project.addAssets("onnx/win32/*.dll", { destination: "{name}" });
project.add_assets("onnx/win32/*.dll", { destination: "{name}" });
}
else if (platform === "linux") {
project.addAssets("onnx/linux/*.so.*", { destination: "{name}" }); // Versioned lib
project.add_assets("onnx/linux/*.so.*", { destination: "{name}" }); // Versioned lib
}
return project;
+11 -11
View File
@@ -1,18 +1,18 @@
let project = new Project("plugins");
project.addFile("plugins.c");
project.addFile("proc_xatlas/**");
project.addFile("io_svg/**");
project.addFile("io_usd/**");
project.addDefine("TINYUSDZ_NO_STB_IMAGE_IMPLEMENTATION");
project.addFile("io_gltf/**");
project.addFile("io_fbx/**");
project.add_cfiles("plugins.c");
project.add_cfiles("proc_xatlas/**");
project.add_cfiles("io_svg/**");
project.add_cfiles("io_usd/**");
project.add_define("TINYUSDZ_NO_STB_IMAGE_IMPLEMENTATION");
project.add_cfiles("io_gltf/**");
project.add_cfiles("io_fbx/**");
if (flags.physics) {
project.addFile("phys_jolt/phys_jolt.cpp");
project.addFile("phys_jolt/Jolt/**");
project.addIncludeDir("phys_jolt");
project.addDefine("JPH_NO_DEBUG");
project.add_cfiles("phys_jolt/phys_jolt.cpp");
project.add_cfiles("phys_jolt/Jolt/**");
project.add_include_dir("phys_jolt");
project.add_define("JPH_NO_DEBUG");
}
return project;
+12 -12
View File
@@ -4,19 +4,19 @@ flags.name = 'ArmorPaint';
flags.package = 'org.armorpaint';
let project = new Project(flags.name);
project.addDefine("is_paint");
project.addProject("../base");
project.add_define("is_paint");
project.add_project("../base");
project.addSources("sources");
project.addSources("sources/nodes");
project.addShaders("shaders/*.glsl");
project.addAssets("assets/*", { destination: "data/{name}" });
project.addAssets("assets/export_presets/*", { destination: "data/export_presets/{name}" });
project.addAssets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.addAssets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.addAssets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.addAssets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.addAssets("assets/readme/readme.txt", { destination: "{name}" });
project.add_tsfiles("sources");
project.add_tsfiles("sources/nodes");
project.add_shaders("shaders/*.glsl");
project.add_assets("assets/*", { destination: "data/{name}" });
project.add_assets("assets/export_presets/*", { destination: "data/export_presets/{name}" });
project.add_assets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.add_assets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.add_assets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.add_assets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.add_assets("assets/readme/readme.txt", { destination: "{name}" });
project.flatten();
return project;
+1 -1
View File
@@ -350,7 +350,7 @@ function tab_layers_draw_layer_slot_full(l: slot_layer_t, i: i32) {
ui._x += 2;
ui._y += 3;
ui._y += center;
let col: i32 = ui.ops.theme.ACCENT_SELECT_COL;
let col: i32 = ui.ops.theme.ACCENT_COL;
let parent_hidden: bool = l.parent != null && (!l.parent.visible || (l.parent.parent != null && !l.parent.parent.visible));
if (parent_hidden) {
col -= 0x99000000;
+1 -1
View File
@@ -1,5 +1,5 @@
let project = new Project("plugins");
project.addFile("plugins.c");
project.add_cfiles("plugins.c");
return project;
+14 -14
View File
@@ -4,20 +4,20 @@ flags.name = 'ArmorSculpt';
flags.package = 'org.armorsculpt';
let project = new Project(flags.name);
project.addDefine("is_sculpt");
project.addProject("../base");
project.add_define("is_sculpt");
project.add_project("../base");
project.addSources("../armorpaint/sources");
project.addSources("../armorpaint/sources/nodes");
project.addSources("sources");
project.addSources("sources/nodes");
project.addShaders("shaders/*.glsl");
project.addAssets("assets/*", { destination: "data/{name}" });
project.addAssets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.addAssets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.addAssets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.addAssets("../armorpaint/assets/plugins/hello_world.js", { destination: "data/plugins/{name}" });
project.addAssets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.addAssets("assets/readme/readme.txt", { destination: "{name}" });
project.add_tsfiles("../armorpaint/sources");
project.add_tsfiles("../armorpaint/sources/nodes");
project.add_tsfiles("sources");
project.add_tsfiles("sources/nodes");
project.add_shaders("shaders/*.glsl");
project.add_assets("assets/*", { destination: "data/{name}" });
project.add_assets("assets/keymap_presets/*", { destination: "data/keymap_presets/{name}" });
project.add_assets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.add_assets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.add_assets("../armorpaint/assets/plugins/hello_world.js", { destination: "data/plugins/{name}" });
project.add_assets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
project.add_assets("assets/readme/readme.txt", { destination: "{name}" });
return project;
+1 -1
View File
@@ -231,7 +231,7 @@ function tab_layers_draw_layer_slot_full(l: slot_layer_t, i: i32) {
ui._x += 2;
ui._y += 3;
ui._y += center;
let col: i32 = ui.ops.theme.ACCENT_SELECT_COL;
let col: i32 = ui.ops.theme.ACCENT_COL;
let parent_hidden: bool = l.parent != null && (!l.parent.visible || (l.parent.parent != null && !l.parent.parent.visible));
if (parent_hidden) {
col -= 0x99000000;
+2 -3
View File
@@ -1,14 +1,13 @@
{
"WINDOW_BG_COL": 4291611852,
"HOVER_COL": 4290493371,
"ACCENT_SELECT_COL": 4283782485,
"ACCENT_COL": 4283782485,
"BUTTON_COL": 4293914607,
"BUTTON_PRESSED_COL": 4289835441,
"PRESSED_COL": 4289835441,
"TEXT_COL": 4280427042,
"LABEL_COL": 4280427042,
"SEPARATOR_COL": 4289967027,
"HIGHLIGHT_COL": 4284521948,
"CONTEXT_COL": 4284521948,
"FONT_SIZE": 13,
"ELEMENT_W": 100,
"ELEMENT_H": 24,
+47 -47
View File
@@ -23,97 +23,97 @@ flags.with_eval = true;
let project = new Project("Base");
{
project.addDefine("IDLE_SLEEP");
project.add_define("IDLE_SLEEP");
let dir = flags.name.toLowerCase();
if (graphics === "vulkan") {
project.addDefine("KINC_VKRT");
project.addProject("../armorcore/tools/ashader/to_spirv");
project.add_define("KINC_VKRT");
project.add_project("../armorcore/tools/ashader/to_spirv");
}
if (flags.with_onnx) {
project.addDefine("WITH_ONNX");
project.addIncludeDir("../" + dir + "/onnx/include");
project.add_define("WITH_ONNX");
project.add_include_dir("../" + dir + "/onnx/include");
if (platform === "win32") {
project.addLib("../" + dir + "/onnx/win32/onnxruntime");
project.add_lib("../" + dir + "/onnx/win32/onnxruntime");
}
else if (platform === "linux") {
// patchelf --set-rpath . ArmorLab
project.addLib("onnxruntime -L" + flags.dirname + "/../" + dir + "/onnx/linux");
// project.addLib("onnxruntime_providers_cuda");
// project.addLib("onnxruntime_providers_shared");
// project.addLib("cublasLt");
// project.addLib("cublas");
// project.addLib("cudart");
// project.addLib("cudnn");
// project.addLib("cufft");
// project.addLib("curand");
project.add_lib("onnxruntime -L" + flags.dirname + "/../" + dir + "/onnx/linux");
// project.add_lib("onnxruntime_providers_cuda");
// project.add_lib("onnxruntime_providers_shared");
// project.add_lib("cublasLt");
// project.add_lib("cublas");
// project.add_lib("cudart");
// project.add_lib("cudnn");
// project.add_lib("cufft");
// project.add_lib("curand");
}
else if (platform === "macos") {
project.addLib("../" + dir + "/onnx/macos/libonnxruntime.1.14.1.dylib");
project.add_lib("../" + dir + "/onnx/macos/libonnxruntime.1.14.1.dylib");
}
}
project.addDefine('WITH_PLUGINS');
project.addFile("sources/plugin_api.c");
project.addProject("../" + dir + "/plugins");
project.add_define('WITH_PLUGINS');
project.add_cfiles("sources/plugin_api.c");
project.add_project("../" + dir + "/plugins");
}
project.addProject("../armorcore");
project.addSources("sources");
project.addSources("sources/nodes");
project.addShaders("../armorcore/shaders/*.glsl");
project.addShaders("shaders/*.glsl");
project.addAssets("assets/*", { destination: "data/{name}" });
project.addAssets("assets/locale/*", { destination: "data/locale/{name}" });
project.addAssets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.addAssets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.addAssets("assets/themes/*.json", { destination: "data/themes/{name}" });
project.add_project("../armorcore");
project.add_tsfiles("sources");
project.add_tsfiles("sources/nodes");
project.add_shaders("../armorcore/shaders/*.glsl");
project.add_shaders("shaders/*.glsl");
project.add_assets("assets/*", { destination: "data/{name}" });
project.add_assets("assets/locale/*", { destination: "data/locale/{name}" });
project.add_assets("assets/licenses/**", { destination: "data/licenses/{name}" });
project.add_assets("assets/plugins/*", { destination: "data/plugins/{name}" });
project.add_assets("assets/themes/*.json", { destination: "data/themes/{name}" });
if (flags.embed) {
project.addDefine("WITH_EMBED");
project.addDefine("arm_embed");
project.add_define("WITH_EMBED");
project.add_define("arm_embed");
}
else {
project.addAssets("assets/extra/*", { destination: "data/{name}" });
project.add_assets("assets/extra/*", { destination: "data/{name}" });
}
if (flags.physics) {
project.addDefine("arm_physics");
project.add_define("arm_physics");
}
project.addDefine("arm_particles");
// project.addDefine("arm_skin");
// project.addDefine("arm_audio");
project.add_define("arm_particles");
// project.add_define("arm_skin");
// project.add_define("arm_audio");
if (flags.android) {
project.addDefine("arm_android_rmb");
project.add_define("arm_android_rmb");
}
if (flags.raytrace) {
project.addAssets("assets/raytrace/*", { destination: "data/{name}" });
project.add_assets("assets/raytrace/*", { destination: "data/{name}" });
if (flags.d3d12) {
project.addAssets("shaders/raytrace/*.cso", { destination: "data/{name}" });
project.addAssets("assets/readme/readme_dxr.txt", { destination: "{name}" });
project.add_assets("shaders/raytrace/*.cso", { destination: "data/{name}" });
project.add_assets("assets/readme/readme_dxr.txt", { destination: "{name}" });
}
else if (flags.vulkan) {
project.addAssets("shaders/raytrace/*.spirv", { destination: "data/{name}" });
project.addAssets("assets/readme/readme_vkrt.txt", { destination: "{name}" });
project.add_assets("shaders/raytrace/*.spirv", { destination: "data/{name}" });
project.add_assets("assets/readme/readme_vkrt.txt", { destination: "{name}" });
}
else if (flags.metal) {
project.addAssets("shaders/raytrace/*.metal", { destination: "data/{name}" });
project.add_assets("shaders/raytrace/*.metal", { destination: "data/{name}" });
}
}
if (flags.voxels) {
project.addDefine("arm_voxels");
project.add_define("arm_voxels");
if (os_platform() === "win32") {
project.addShaders("shaders/voxel_hlsl/*.glsl", { noprocessing: true });
project.add_shaders("shaders/voxel_hlsl/*.glsl", { noprocessing: true });
}
else {
project.addShaders("shaders/voxel_glsl/*.glsl");
project.add_shaders("shaders/voxel_glsl/*.glsl");
}
}
@@ -126,7 +126,7 @@ if (export_version_info) {
fs_ensuredir(dir);
fs_writefile(dir + "/version.json", data);
// Adds version.json to embed.txt list
project.addAssets(dir + "/version.json", { destination: "data/{name}" });
project.add_assets(dir + "/version.json", { destination: "data/{name}" });
}
project.flatten();
+2 -2
View File
@@ -703,10 +703,10 @@ function ui_menu_fill(ui: ui_t) {
function ui_menu_separator(ui: ui_t) {
ui._y++;
if (config_raw.touch_ui) {
ui_fill(0, 0, ui._w / ui_SCALE(ui), 1, ui.ops.theme.ACCENT_SELECT_COL);
ui_fill(0, 0, ui._w / ui_SCALE(ui), 1, ui.ops.theme.BUTTON_COL);
}
else {
ui_fill(26, 0, ui._w / ui_SCALE(ui) - 26, 1, ui.ops.theme.ACCENT_SELECT_COL);
ui_fill(26, 0, ui._w / ui_SCALE(ui) - 26, 1, ui.ops.theme.BUTTON_COL);
}
}
+1 -1
View File
@@ -1255,7 +1255,7 @@ function ui_nodes_render() {
if (is_group_category) {
for (let i: i32 = 0; i < project_material_groups.length; ++i) {
let g: node_group_t = project_material_groups[i];
ui_fill(0, 1, ui_nodes_ui._w / ui_SCALE(ui_nodes_ui), ui_nodes_ui.ops.theme.BUTTON_H + 2, ui_nodes_ui.ops.theme.ACCENT_SELECT_COL);
ui_fill(0, 1, ui_nodes_ui._w / ui_SCALE(ui_nodes_ui), ui_nodes_ui.ops.theme.BUTTON_H + 2, ui_nodes_ui.ops.theme.ACCENT_COL);
ui_fill(1, 1, ui_nodes_ui._w / ui_SCALE(ui_nodes_ui) - 2, ui_nodes_ui.ops.theme.BUTTON_H + 1, ui_nodes_ui.ops.theme.SEPARATOR_COL);
ui_nodes_ui.enabled = ui_nodes_can_place_group(g.canvas.name);
ui_menu_fill(ui_nodes_ui);
+6 -6
View File
@@ -9,14 +9,14 @@ flags.with_iron = true;
flags.with_ui = true;
let project = new Project("ArmorPad");
project.addSources("sources");
project.add_tsfiles("sources");
let root = "../../../";
project.addShaders(root + "armorcore/shaders/*.glsl",);
project.addAssets(root + "base/assets/font_mono.ttf", { destination: "data/{name}" });
project.addAssets(root + "base/assets/text_coloring.json", { destination: "data/{name}" });
project.add_shaders(root + "armorcore/shaders/*.glsl",);
project.add_assets(root + "base/assets/font_mono.ttf", { destination: "data/{name}" });
project.add_assets(root + "base/assets/text_coloring.json", { destination: "data/{name}" });
project.addDefine('IDLE_SLEEP');
project.addProject(root + "armorcore");
project.add_define('IDLE_SLEEP');
project.add_project(root + "armorcore");
return project;
+1 -1
View File
@@ -118,7 +118,7 @@ function list_folder(path: string) {
// Active file
if (abs == storage.file) {
ui_fill(0, 1, ui._w - 1, UI_ELEMENT_H() - 1, theme.BUTTON_PRESSED_COL);
ui_fill(0, 1, ui._w - 1, UI_ELEMENT_H() - 1, theme.PRESSED_COL);
}
let prefix: string = "";