mcap/check_targets.jai
Musa Mahmood 3e6e733a9d [0.0.13] Segmentation phase 4: per-folder opt-in, the segmentation scan, -segment
- .library-folders in the library (src/app/library_folders.jai): each library folder's options,
  starting with segment: true. Every folder starts off; unknown keys are kept when it is rewritten.
- The Segmentation window (Segments, above the grid): each folder's Segment checkbox, how many of
  its images are segmented, and Erase per folder; a button to segment the folders set to segment.
- The segmentation scan (src/app/segment_ui.jai) runs on the OCR thread as its own task, with the
  OCR scan's progress, pause and cancel: images only (never videos), not yet segmented, in folders
  set to segment. The engine loads with the first scan (2.4 GB of GPU memory). Each image's segs and
  mask are stored in one rewrite and its catalog entry loaded again.
- Importing into a folder set to segment segments the new images; the Import window's checkbox is
  the folder's setting.
- -segment segments and exits; -erase segments, and -erase all now includes segments.
- The catalog reads each capture's segs (class list hash, segment count). The exit overlay names the
  segmentation scan and model. segment_mcap_chunks moved into modules/Segment, shared with
  segment-probe. The quoting helpers of Capture_File's text formats are public.
- Tests: .library-folders read and written back (quoted names, unknown keys, versions).
2026-10-10 04:13:03 +01:00

52 lines
1.6 KiB
Plaintext

// Type-checks src/App.jai for another OS without producing or linking a binary, to catch errors
// in code your machine does not build:
//
// jai check_targets.jai - linux (from any OS)
// jai check_targets.jai - macos (from a Mac only: the Objective_C module runs code at compile time)
//
// The constants below stand in for the ones first.jai generates; keep their names in step.
#run,stallable {
set_build_options_dc(.{do_output = false});
args := get_build_options().compile_time_command_line;
target := Operating_System_Tag.LINUX;
cpu := CPU_Tag.X64;
if array_find(args, "macos") { target = .MACOS; cpu = .ARM64; }
options := get_build_options();
options.os_target = target;
options.cpu_target = cpu;
options.output_type = .NO_OUTPUT;
options.backend = .LLVM;
options.output_executable_name = "check";
options.output_path = ".build";
w := compiler_create_workspace("check");
set_build_options(options, w);
compiler_begin_intercept(w);
add_build_file("src/App.jai", w);
add_build_string(#string S
APP_NAME :: "mcap";
APP_FOLDER_NAME :: "mcap";
GIT_BRANCH :: "check";
GIT_HASH :: "-";
VERSION :: "0.0.13";
BUILD_DATE :: "-";
DEBUG :: true;
COMPILE_TESTS :: true;
COMPILE_ARGS :: "";
NO_CRASH_DIALOG :: false;
S, w);
while true {
message := compiler_wait_for_message();
if message.kind == .COMPLETE {
m := cast(*Message_Complete) message;
log("% check: %", target, m.error_code);
break;
}
}
compiler_end_intercept(w);
}
#import "Basic";
#import "Compiler";