Orketrix: Build Orchestration

Languages: [EN] English | [KO] 한국어

Orketrix: Build Orchestration
Orketrix: 빌드 오케스트레이션

Overview

소개

A build orchestrator that originated as a build tool for Smeltrix and later evolved into an independent project.

Smeltrix 빌드 도구에서 출발해 독립 프로젝트로 분리된 빌드 오케스트레이터

Supported Build Systems

  • C/C++ via xmake

지원 목록

  • C/C++ via xmake

Development History

  • Initially used batch scripts for C++ builds before switching to CMake
  • Used batch scripts alongside CMake due to limitations in external control
  • Multiple build files became mixed together, and some tasks required administrator privileges, limiting usage to the CMD environment
  • As the need for better management grew, the initial version was developed with C++/Dear ImGui, also serving as a test for introducing Vulkan
  • Switched to Python/PyQt6 after encountering greater challenges with text processing and build management
  • Implemented the features previously handled by batch scripts one by one in the custom builder, causing the program to grow significantly
  • Orketrix was developed based on experience custom-building and optimizing other projects and open-source projects, along with the Smeltrix project builder.

개발 경위

  • C++ 빌드를 위해 프로젝트 초기에는 배치 스크립트를 사용하다 CMake로 전환
  • CMake의 외부 제어 한계로 인해 배치 스크립트와 혼용
  • 여러 개의 빌드 파일이 혼재하고 일부 작업에 관리자 권한이 필요해 CMD 환경에서만 사용
  • 관리의 필요성이 커지면서 초기 버전은 C++/Dear ImGui로 작성되었으며, 당시 Vulkan 도입을 위한 테스트도 겸하여 제작
  • 텍스트 처리와 빌드 관리에서 더 큰 문제에 직면하면서 Python/PyQt6 기반으로 전환
  • 기존 배치 스크립트로 처리하던 기능들을 자체 빌더로 하나씩 구현하면서 프로그램의 규모가 확장
  • 다른 프로젝트와 오픈소스 프로젝트를 직접 커스텀 빌드하고 최적화한 경험과 Smeltrix 프로젝트의 빌더를 기반으로 Orketrix 개발.

Feature Development Status

  • User Interface (UI)
    • Source and Header Management: Source Files (add_files), Header Files (add_headerfiles) (includes instant editor opening on click and source ordering)
    • GUI
      • Target Status Indicators
        • Disabled (Dark / Dimmed): Disabled target
        • In Progress (Animated Yellow): Build and task progress shown with an animation
        • Success (Green): Completed task
        • Failed (Red): Task failed due to an error
      • Font size adjustment
      • Multilingual support - English, Korean
    • CLI
      • A command-line interface is under development.
      • It will provide project inspection, target management, pipeline execution, build status checks, and log retrieval.
  • Build Orchestration
    • Multi-Project Management:
      • Manage multiple projects in tabs and reorder them via drag and drop
    • Build Pipeline:
      • Freely configure the order of Target and Run tasks to create sequential pipelines such as Build A -> Build B -> Run Command
    • Multiple Build Modes:
      • Select and execute build modes such as Debug, Release, ReleaseDbg, and MinSizeRel per target. When multiple builds use the same output path, _MODE is automatically appended to the file name
    • Background Build:
      • Execute build and clean operations in the background and display process output in real time in the log
    • Build Cancellation:
      • Terminate running build processes together with their child processes
    • Run Command:
      • Execute user-defined commands synchronously or asynchronously (No-wait) and place them at any desired position in the pipeline
    • xmake Import/Export:
      • Import an existing xmake.lua as a GUI project or export a configured pipeline as a single xmake.lua
    • CMake Import:
      • Analyze the basic configuration of CMakeLists.txt and convert it into the basic structure of an xmake project
    • Cargo.toml Import/Export
      • Planned Support
    • Lua Script Management:
      • Manage xmake Lua scripts in a user-only storage space separate from the project
      • Saved in the orketrix path in the User Documents folder on Windows, or the .orketrix path in the home directory on Unix-like systems
    • Variables:
      • Provides its own variable @{SRCROOT} to reference the project's actual source root
      • Provides some project information via add_defines (ORKETRIX_VERSION, ORKETRIX_PROJECTNAME)
  • Global Project Settings
    • Target Environment and Modes: Target Build Modes (Debug, Release, ReleaseDbg, MinSizeRel), Platform (set_plat), Architecture (set_arch)
    • Global Compile/Link Flags: Global CX / C / CXX / LD / AR Flags
    • Global Directories and Paths: Global Includes (add_includedirs), Global Link Dirs (add_linkdirs), Module Dirs (add_moduledirs)
    • Global Macros/Symbols: Global Defines (add_defines), Global Undefines (add_undefines)
    • Global Libraries and Packages: Global Links (add_links), Global Sys Links (add_syslinks), Packages (add_requires)
    • Global xmake Control: Options (option()), Rules (add_rules), Policies (set_policy)
  • Target Options
    • Target Flags and Paths: CX / C / CXX / LD / AR Flags, Include Dirs, Link Dirs, Links, Sys Links
    • Target Macros/Symbols: Defines (add_defines), Undefines (add_undefines)
    • Dependencies and External Packages: Target Deps (add_deps), Packages (add_packages), Options (add_options)
    • Platform and Templates: Frameworks (add_frameworks), Framework Dirs (add_frameworkdirs), Config Files (add_configfiles)
    • Build Performance: PCH (C PCH, C++ PCH)
    • Custom Control and Script Hooks: Target Rules (add_rules), Lua Event Hooks (before_build, on_build, after_build)
  • Build & Distribution
    • Built with Nuitka
    • xmake must be installed separately to build projects

Limitations

  • xmake Support: Implemented for needs, but works well for lightweight projects.
  • CMake Import: Supports basic add_executable, target_link_libraries, find_package, and variable substitution. Complex conditional statements, macros, package mapping, and generator expressions are currently not supported.
  • Not all implemented features have been thoroughly tested, so there may still be bugs, and some details have been left unimplemented due to differences in policy with xmake.

기능 개발 현황

  • 사용자 환경(UI)
    • 소스 및 헤더 관리: Source Files (add_files), Header Files (add_headerfiles) (클릭 시 에디터 즉시 열기 및 소스 순서 정렬 기능 포함)
    • GUI
      • 타겟 목록 상태 표시
        • 비활성화 (어두운색): 비활성화된 타겟
        • 진행 중 (움직이는 노란색): 빌드 및 작업 진행 상태를 애니메이션으로 표시
        • 작업 성공 (녹색): 작업 완료 상태를 녹색으로 표시
        • 작업 실패 (빨간색): 오류 발생 상태를 빨간색으로 표시
      • 폰트 크기 조절
      • 다국어 지원 - 영어, 한국어
    • CLI
      • CLI 인터페이스는 개발 중
      • 프로젝트 검사, 타겟 관리, 파이프라인 실행, 빌드 상태 확인 및 로그 검색 기능
  • 빌드 오케스트레이션
    • 멀티 프로젝트 관리:
      • 여러 프로젝트를 탭으로 관리하고 드래그 앤 드롭으로 순서 변경
    • 빌드 파이프라인:
      • Target과 Run 작업의 순서를 자유롭게 구성하여 Build A -> Build B -> Run Command와 같은 순차 파이프라인 구성
    • 다중 빌드 모드:
      • Debug, Release, ReleaseDbg, MinSizeRel 등의 빌드 모드를 타겟별로 선택하여 실행, 다중 빌드 시 저장 경로가 동일한 경우 파일 이름에 _MODE가 추가됨
    • 백그라운드 빌드:
      • 빌드 및 클린 작업을 백그라운드에서 실행하고 프로세스 출력을 실시간으로 로그에 표시
    • 빌드 취소:
      • 실행 중인 빌드 프로세스와 자식 프로세스를 함께 종료
    • Run 커맨드:
      • 사용자 정의 명령을 동기 또는 비동기(No-wait) 방식으로 실행하고 파이프라인의 원하는 위치에 배치
    • xmake Import/Export:
      • 기존 xmake.lua를 GUI 프로젝트로 가져오거나, 구성한 파이프라인을 하나의 xmake.lua로 내보내기
    • CMake Import:
      • CMakeLists.txt의 기본적인 구성을 분석하여 xmake 프로젝트의 기본 구조로 변환
    • Lua 스크립트 관리:
      • 프로젝트와 분리된 사용자 전용 저장 공간에서 xmake Lua 스크립트 관리
      • Windows는 사용자 문서 폴더의 orketrix 경로, Unix 계열은 홈 디렉터리의 .orketrix 경로에 저장
    • 변수:
      • 프로젝트의 실제 소스 루트를 참조할 수 있도록 자체 변수 @{SRCROOT} 제공
      • 프로젝트 정보 일부를 add_defines로 제공 (ORKETRIX_VERSION, ORKETRIX_PROJECTNAME)
  • 글로벌 프로젝트 설정 (Project Settings)
    • 타겟 환경 및 모드: Target Build Modes (Debug, Release, ReleaseDbg, MinSizeRel), Platform (set_plat), Architecture (set_arch)
    • 전역 컴파일/링크 플래그: Global CX / C / CXX / LD / AR Flags
    • 전역 디렉터리 및 경로: Global Includes (add_includedirs), Global Link Dirs (add_linkdirs), Module Dirs (add_moduledirs)
    • 전역 매크로/심볼: Global Defines (add_defines), Global Undefines (add_undefines)
    • 전역 라이브러리 및 패키지: Global Links (add_links), Global Sys Links (add_syslinks), Packages (add_requires)
    • xmake 전역 제어: Options (option()), Rules (add_rules), Policies (set_policy)
  • 타겟별 옵션 (Target Options)
    • 타겟 플래그 및 경로: CX / C / CXX / LD / AR Flags, Include Dirs, Link Dirs, Links, Sys Links
    • 타겟 매크로/심볼: Defines (add_defines), Undefines (add_undefines)
    • 의존성 및 외부 패키지: Target Deps (add_deps), Packages (add_packages), Options (add_options)
    • 플랫폼 및 템플릿: Frameworks (add_frameworks), Framework Dirs (add_frameworkdirs), Config Files (add_configfiles)
    • 빌드 속도 최적화: PCH (C PCH, C++ PCH)
    • 커스텀 제어 및 스크립트 훅: Target Rules (add_rules), Lua Event Hooks (before_build, on_build, after_build)

제한사항

  • xmake 지원: 필요한 기능 위주로 구현하였지만 간단한 프로젝트에서는 큰 무리 없이 사용 가능
  • CMake Import: 기본적인 add_executable, target_link_libraries, find_package 및 변수 치환 등을 지원. 복잡한 조건문, 매크로, 패키지 매핑 및 generator expression 등은 현재 미지원
  • 모든 구현 기능을 충분히 테스트한 것은 아니기에 아직 버그가 있으며, xmake와의 정책 차이 등으로 구현을 미루고 있는 세부 사항이 있음

Build All — One-Click Build Pipeline

Clicking Build All executes the entire pipeline automatically in the configured order, from environment setup and code generation to server builds, the main Smeltrix build, and execution.

  1. Terminate running processes
  2. Project-wide settings
  3. Extract Smeltrix bytecode
  4. Merge bytecode into the source tree
  5. Build the Audio Server
  6. Build the Gyro Service
  7. Build Smeltrix
  8. Run Smeltrix

Build All — 원클릭 빌드 파이프라인

Build All 버튼을 클릭하면 구성된 순서에 따라 환경 설정부터 코드 생성, 서버 빌드, Smeltrix 빌드 및 실행까지 전체 파이프라인이 자동 실행

  1. 실행 중인 프로세스 종료
  2. 프로젝트 전역 설정
  3. Smeltrix 바이트코드 추출
  4. 바이트코드를 소스 트리에 병합
  5. 오디오 서버 빌드
  6. 자이로 서비스 빌드
  7. Smeltrix 빌드
  8. Smeltrix 실행

Screenshot / Project Settings

Screenshot / Project Settings Options

Screenshot / Target

Screenshot / Target Options

Notes

  • During the early development, Python was implemented in under 3K LOC, while the Vulkan-related code alone was 1K LOC.
  • This experience laid the foundation for the graphics API abstraction work in Smeltrix.

노트

  • 개발 초기 파이썬은 3K LOC 미만으로 구현한 반면 Vulkan은 관련 코드만 1K LOC.
  • 이 당시 경험은 Smeltrix에서 그래픽 API 추상화 작업의 기반이 됨.

Comments