diff options
| author | ludolpif <ludolpif@ass-project.org> | 2026-11-29 00:01:11 +0100 |
|---|---|---|
| committer | ludolpif <ludolpif@ass-project.org> | 2026-11-29 00:01:11 +0100 |
| commit | 88e891a048cc2b0c9f7b201bf62fa9845d182aeb (patch) | |
| tree | 8a4599804de492f5030f8846657a886a88efc763 | |
| download | ass-88e891a048cc2b0c9f7b201bf62fa9845d182aeb.tar.gz ass-88e891a048cc2b0c9f7b201bf62fa9845d182aeb.tar.bz2 ass-88e891a048cc2b0c9f7b201bf62fa9845d182aeb.zip | |
Signed-off-by: ludolpif <ludolpif@ass-project.org>
| -rw-r--r-- | .gitignore | 10 | ||||
| -rw-r--r-- | CHANGELOG.md | 81 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | app_metadata/ass_metadata.h | 37 | ||||
| -rw-r--r-- | meson.build | 34 | ||||
| -rwxr-xr-x | scripts/generate_version.py | 138 | ||||
| -rwxr-xr-x | scripts/get_version.sh | 21 | ||||
| -rw-r--r-- | src/app/main.c | 68 |
8 files changed, 392 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a43355f --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/app_metadata/version.h +/build-lin/ +/build-mac/build/ +/build-steamrt4/ +/build-win/bin/ +/build-win/obj/ +/build-win/.vs/ +/external/ +/downloads/ +/VERSION diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bdfaded --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,81 @@ +# CHANGELOG + +## v0.5.0 + +First compilable thing, mostly advancd Hello World. + +## Real project init + +On 2026-11-28, I decided to start to codesign my commits, starting again from empty git repositories, hoping that attempt is the definitive one. + +My initial thought is to commit everything by hand, with a human-acceptable git history, using a fair amount of the AI assisted mockup, but with systematic human-only review, criticism and improvements. The AI assisted mockup is above 40k SLOC (Single Lines Of Codes), including 8k for the UI. + +In the mockup I use tags from v0.1.0 to v0.4.4, so I will start the real project with v0.5.0. +I may use AI to make patch releases of the AI mockup, keeping it in v0.4.x. + +## Prior work + +### 2026-11-04 to 2026-11-28 + +I, ludolpif, with Antigrativy CLI and Gemini 3.5 then 4 models, produced a mockup of a SDL3/ImGui/FLECS based streaming software, named ASS (Advanced Streaming Software) to a fairly capable tech-demo, successfully streamed few minutes of content of twitch.tv. + +```sh +# With tools from Debian 13.8 +ssh-keygen -Y sign -f id_ed25519_codesign_ass -n file git-ass-ai-assisted-mockup-2026-11-28.tar.zst +cat id_ed25519_codesign_ass.pub git-ass-ai-assisted-mockup-2026-11-28.tar.zst.sig +``` +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK5cFKUQApGxLyyWv0x0bR6i127CdB7L4rCwEaVX80zk ludolpif@ass-project.org +-----BEGIN SSH SIGNATURE----- +U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgrlwUpRACkbEvLJa/THRtHqLXbs +J0HsvisLARpVfzTOQAAAAEZmlsZQAAAAAAAAAGc2hhNTEyAAAAUwAAAAtzc2gtZWQyNTUx +OQAAAEB8Vr1TsuCmxeZ/6YH11e0SwtHiiO1iAK9NGD9OM95rZDBq1LpI35CUWODzks4l6Z +9lQMDg7hoG1+Fy5ZQPyO0E +-----END SSH SIGNATURE----- +``` + +If, for legal reasons, someone has to inspect the amount of work I and the AI have produced, I keep a private archive with the full logs and interactions with Antigravity CLI. It's my ~/.gemini/antigravity-cli entire folder, OAuth token removed, I am unsure about other copies of security tokens in there. + +```sh +# With tools from Debian 13.8 +ssh-keygen -Y sign -f id_ed25519_codesign_ass -n file dot-gemini-ass-agy-2026-11-28.tar.zst +cat id_ed25519_codesign_ass.pub dot-gemini-ass-agy-2026-11-28.tar.zst.sig +``` +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK5cFKUQApGxLyyWv0x0bR6i127CdB7L4rCwEaVX80zk ludolpif@ass-project.org +-----BEGIN SSH SIGNATURE----- +U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgrlwUpRACkbEvLJa/THRtHqLXbs +J0HsvisLARpVfzTOQAAAAEZmlsZQAAAAAAAAAGc2hhNTEyAAAAUwAAAAtzc2gtZWQyNTUx +OQAAAEDa6xtMiCZFYrnnF2RrrkmtPYX9c5cohBGdaDIc/idC1Wkhro04r1AILTLGMS61g+ +hjfA17C4/vOOqOJKVDE+gP +-----END SSH SIGNATURE----- +``` + +### 2025-12-26 to 2026-04-26 + +I, ludolpif, wrote by hand a fairly incomplete attempt of a SDL3/ImGui/FLECS based streaming software. +I occasionnaly have asked AI on the web to show me snippets of code to understand how I can acheive a few subgoals like inter-process VRAM Zero-copy / DMABUF, build systems. +It used to be publicly available at https://github.com/ludolpif/llss (and llss-builddep). + +```sh +# With tools from Debian 13.8 +mkdir llss +cd llss +git clone --bare https://github.com/ludolpif/llss.git +git clone --bare https://github.com/ludolpif/llss-build-dep.git +tar c . | zstd -13 -M0 -o ../git-llss-2026-04-26.tar.zst +cd .. +rm -fr llss + +ssh-keygen -Y sign -f id_ed25519_codesign_ass -n file git-llss-2026-04-26.tar.zst +cat id_ed25519_codesign_ass.pub git-llss-2026-04-26.tar.zst.sig +``` +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK5cFKUQApGxLyyWv0x0bR6i127CdB7L4rCwEaVX80zk ludolpif@ass-project.org +-----BEGIN SSH SIGNATURE----- +U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgrlwUpRACkbEvLJa/THRtHqLXbs +J0HsvisLARpVfzTOQAAAAEZmlsZQAAAAAAAAAGc2hhNTEyAAAAUwAAAAtzc2gtZWQyNTUx +OQAAAEA8ewe/tVCigw9DCVqGvunZ0BkNJdfyYe8w+Rzl0StZx5bKsp8OIw+oWtqum8BOuR +m8ONgKyD0UpFTBtO3OyHcD +-----END SSH SIGNATURE----- +``` diff --git a/README.md b/README.md new file mode 100644 index 0000000..a8facc3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ASS (Advanced Streaming Software) + +A cross-platform real-time video compositing and live streaming application built on game-oriented librairies, notably **SDL3 GPU**, **Dear ImGui**, **Flecs ECS**. diff --git a/app_metadata/ass_metadata.h b/app_metadata/ass_metadata.h new file mode 100644 index 0000000..1b0f228 --- /dev/null +++ b/app_metadata/ass_metadata.h @@ -0,0 +1,37 @@ +#pragma once +/* + * ASS (Advanced Streaming Software) - Application Metadata Definitions + * This file is part of ASS. + * + * ASS is free software: you can redistribute it and/or modify it under the terms of the Affero GNU + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * ASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Affero GNU + * General Public License for more details. + * + * You should have received a copy of the Affero GNU General Public License along with ASS. + * If not, see <https://www.gnu.org/licenses/> + * + * Copyright 2026 ludolpif <ludolpif@gmail.com> + */ + +/* + * Shared between SDL application initialization (SDL_SetAppMetadata) + * and Windows executable resource compilation (.rc FileVersion/ProductVersion). + * + * All values here MUST remain simple string literals to remain strictly + * compatible with the Windows Resource Compiler (rc.exe). + */ + +#define ASS_APP_NAME "ASS (Advanced Streaming Software)" +#define ASS_APP_TITLE "ASS (Advanced Streaming Software)" +#define ASS_APP_SHORT_NAME "ASS" +#define ASS_APP_IDENTIFIER "org.ass-project.app" +#define ASS_APP_CREATOR "ASS Project" +#define ASS_APP_COPYRIGHT "Copyright (C) 2026 ASS Project" +#define ASS_APP_URL "https://github.com/ass-project/ass" +#define ASS_APP_TYPE "mediaplayer" +#define ASS_APP_DESCRIPTION "Live Streaming & Compositing Software" +#define ASS_LICENSE_NAME_STR "AGPL-3.0" diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..ac6f7c9 --- /dev/null +++ b/meson.build @@ -0,0 +1,34 @@ +# NOTE: Meson is used exclusively for Linux builds. +# Windows builds use MSBuild / Visual Studio (build-win/ass.sln). +# macOS builds use native Xcode project (build-mac/ass.xcodeproj). +project( + 'ass', + ['c', 'cpp'], + version: run_command('scripts/get_version.sh', check: true).stdout().strip(), + default_options: ['c_std=gnu11', 'cpp_std=c++17', 'warning_level=2'], +) + +if host_machine.system() != 'linux' + error('Meson build is supported exclusively on Linux. For macOS, use native Xcode (build-mac/ass.xcodeproj). For Windows, use MSBuild (build-win/ass.sln).') +endif + + +cc = meson.get_compiler('c') +sdl3_dep = dependency('sdl3', required: true) + +project_inc = include_directories('app_metadata') + +dev_args = [] +if get_option('debug') + dev_args += ['-DASS_DEV_BUILD=1'] +endif + +executable( + 'ass', + [ + 'src/app/main.c', + ], + include_directories: project_inc, + c_args: ['-D_GNU_SOURCE'] + dev_args, + dependencies: [sdl3_dep], +) diff --git a/scripts/generate_version.py b/scripts/generate_version.py new file mode 100755 index 0000000..ff9d6d9 --- /dev/null +++ b/scripts/generate_version.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 +""" + ASS (Advanced Streaming Software) - Helper script + This file is part of ASS. + + ASS is free software: you can redistribute it and/or modify it under the terms of the Affero GNU + General Public License as published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + ASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Affero GNU + General Public License for more details. + + You should have received a copy of the Affero GNU General Public License along with ASS. + If not, see <https://www.gnu.org/licenses/> + + Copyright 2026 ludolpif <ludolpif@gmail.com> +""" + +""" +Generates /app_metadata/version.h and /VERSION from git tags (e.g. v1.2.3) or fallback. + +Outputs a minimal, rc.exe-friendly header containing ONLY simple defines: + ASS_VERSION_MAJOR + ASS_VERSION_MINOR + ASS_VERSION_PATCH + ASS_VERSION_STRING + +If no git tag is found, falls back to 999.999.999 (unreleased development build) +with ASS_VERSION_STRING set to the 7-character short commit hash. + +Output files are meant to remain uncommitted (.gitignored). +""" +import os +import re +import subprocess +import sys +from pathlib import Path + + +def get_git_info(repo_dir): + # 1. Check CI environment variables (e.g. GITHUB_REF_NAME, CI_COMMIT_TAG) + for env_var in ("CI_COMMIT_TAG", "GITHUB_REF_NAME", "ASS_GIT_TAG"): + val = os.environ.get(env_var, "") + m = re.match(r"^v?(\d+)\.(\d+)\.(\d+)$", val) + if m: + return int(m.group(1)), int(m.group(2)), int(m.group(3)), f"{m.group(1)}.{m.group(2)}.{m.group(3)}" + + short_hash = "0000000" + try: + cmd = ["git", "rev-parse", "--short=7", "HEAD"] + out = subprocess.check_output(cmd, cwd=repo_dir, stderr=subprocess.DEVNULL, text=True).strip() + if out: + short_hash = out[:7] + except Exception: + pass + + # 2. Check exact tags on HEAD first, sorted by highest semver (--sort=-v:refname) + try: + cmd_exact = ["git", "tag", "--points-at", "HEAD", "--sort=-v:refname", "v*"] + out_exact = subprocess.check_output(cmd_exact, cwd=repo_dir, stderr=subprocess.DEVNULL, text=True).splitlines() + for line in out_exact: + m_exact = re.match(r"^v?(\d+)\.(\d+)\.(\d+)$", line.strip()) + if m_exact: + major, minor, patch = int(m_exact.group(1)), int(m_exact.group(2)), int(m_exact.group(3)) + return major, minor, patch, f"{major}.{minor}.{patch}" + except Exception: + pass + + # 3. Not on an exact release tag: find highest reachable tag for MAJOR.MINOR, PATCH=999 + tag_major, tag_minor = 999, 999 + try: + cmd_merged = ["git", "tag", "--merged", "HEAD", "--sort=-v:refname", "v*"] + out_merged = subprocess.check_output(cmd_merged, cwd=repo_dir, stderr=subprocess.DEVNULL, text=True).splitlines() + for line in out_merged: + m = re.match(r"^v?(\d+)\.(\d+)(?:\.(\d+))?", line.strip()) + if m: + tag_major, tag_minor = int(m.group(1)), int(m.group(2)) + break + except Exception: + pass + + return tag_major, tag_minor, 999, short_hash + +def main(): + script_dir = Path(__file__).resolve().parent + + repo_dir = script_dir.parent + major, minor, patch, ver_string = get_git_info(repo_dir) + + target_dir = repo_dir / "app_metadata" + target_path = target_dir / "version.h" + content = f"""#pragma once + +/* + * Auto-generated by scripts/generate_version.py from git tag or CI environment. + * DO NOT COMMIT THIS FILE TO VERSION CONTROL. + * + * This file contains strictly simple #defines compatible with rc.exe (Windows Resource Compiler). + */ + +#define ASS_VERSION_MAJOR {major} +#define ASS_VERSION_MINOR {minor} +#define ASS_VERSION_PATCH {patch} +#define ASS_VERSION_STRING "{ver_string}" +""" + + os.makedirs(target_dir, exist_ok=True) + + header_changed = True + if target_path.exists(): + with open(target_path, "r", encoding="utf-8") as f: + existing = f.read() + if existing == content: + header_changed = False + + if header_changed: + with open(target_path, "w", encoding="utf-8") as f: + f.write(content) + print(f"[generate_version] Generated {target_path} -> v{major}.{minor}.{patch} ({ver_string})") + + # Maintain the flat VERSION file at repo root + version_file_path = repo_dir / "VERSION" + ver_content = f"{major}.{minor}.{patch}\n" + ver_changed = True + if version_file_path.exists(): + with open(version_file_path, "r", encoding="utf-8") as vf: + if vf.read() == ver_content: + ver_changed = False + if ver_changed: + with open(version_file_path, "w", encoding="utf-8") as vf: + vf.write(ver_content) + print(f"[generate_version] Generated {version_file_path} -> {major}.{minor}.{patch}") + + return 0 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/get_version.sh b/scripts/get_version.sh new file mode 100755 index 0000000..324ed75 --- /dev/null +++ b/scripts/get_version.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# ASS (Advanced Streaming Software) - Helper script +# This file is part of ASS. +# +# ASS is free software: you can redistribute it and/or modify it under the terms of the Affero GNU +# General Public License as published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# ASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Affero GNU +# General Public License for more details. +# +# You should have received a copy of the Affero GNU General Public License along with ASS. +# If not, see <https://www.gnu.org/licenses/> +# +# Copyright 2026 ludolpif <ludolpif@gmail.com> + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +"$SCRIPT_DIR/generate_version.py" >/dev/null +cat -- "$(dirname $SCRIPT_DIR)/VERSION" diff --git a/src/app/main.c b/src/app/main.c new file mode 100644 index 0000000..52f39c2 --- /dev/null +++ b/src/app/main.c @@ -0,0 +1,68 @@ +/* + * ASS (Advanced Streaming Software) - Thin Application Bootstrap + * This file is part of ASS. + * + * ASS is free software: you can redistribute it and/or modify it under the terms of the Affero GNU + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * ASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Affero GNU + * General Public License for more details. + * + * You should have received a copy of the Affero GNU General Public License along with ASS. + * If not, see <https://www.gnu.org/licenses/> + * + * Copyright 2026 ludolpif <ludolpif@gmail.com> + */ + +#define SDL_MAIN_USE_CALLBACKS 1 +#include <SDL3/SDL.h> +#include <SDL3/SDL_main.h> +#include "ass_metadata.h" +#include "version.h" + +SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[]) +{ + (void) argc; + (void) argv; + SDL_SetAppMetadata(ASS_APP_NAME, ASS_VERSION_STRING, ASS_APP_IDENTIFIER); + SDL_SetAppMetadataProperty(SDL_PROP_APP_METADATA_CREATOR_STRING, ASS_APP_CREATOR); + SDL_SetAppMetadataProperty(SDL_PROP_APP_METADATA_COPYRIGHT_STRING, ASS_APP_COPYRIGHT); + SDL_SetAppMetadataProperty(SDL_PROP_APP_METADATA_URL_STRING, ASS_APP_URL); + SDL_SetAppMetadataProperty(SDL_PROP_APP_METADATA_TYPE_STRING, ASS_APP_TYPE); + + + if (!SDL_Init(SDL_INIT_VIDEO)) { + return SDL_APP_FAILURE; + } + SDL_Window *window = SDL_CreateWindow("Hello World", 640, 480, 0); + if (!window) { + return SDL_APP_FAILURE; + } + + *appstate = window; + return SDL_APP_CONTINUE; +} + +SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) +{ + (void) appstate; + if (event->type == SDL_EVENT_QUIT) { + return SDL_APP_SUCCESS; + } + return SDL_APP_CONTINUE; +} + +SDL_AppResult SDL_AppIterate(void* appstate) +{ + (void) appstate; + return SDL_APP_CONTINUE; +} + +void SDL_AppQuit(void* appstate, SDL_AppResult result) +{ + (void) result; + SDL_Window *window = (SDL_Window *)appstate; + SDL_DestroyWindow(window); +} |
