The version is the project() line of CMakeLists.txt and nowhere else: CMake writes it, with the text of CHANGELOG.md, into a generated core/version.hpp, so the number and the release notes the binary shows are the ones it was built from. effector --version (-V) prints it, and the header-bar menu gains a section with Changelog, a window laying the Markdown out as headings and bullets, and About Effector. The core tests hold the newest changelog entry to the current version, so a bump cannot go in without its notes. Releases are tagged vX.Y.Z; this is 0.5.0, and the changelog reconstructs 0.1.0-0.4.0 from the history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.6 KiB
C++
46 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "core/canvas.hpp"
|
|
#include "core/chain.hpp"
|
|
#include "core/params.hpp"
|
|
|
|
namespace effector {
|
|
|
|
struct Options {
|
|
std::vector<std::string> images;
|
|
std::vector<std::string> effects; // one per cascade stage, in order
|
|
// The effects named by --disable: their stages stay in the chain, in
|
|
// place, but are skipped. Named rather than numbered, exactly as the
|
|
// params are, so two stages of one effect are disabled together.
|
|
std::vector<std::string> disabled;
|
|
std::string output; // empty -> launch the interface
|
|
int width = 1920;
|
|
int height = 1080;
|
|
std::string format; // a named canvas format, empty for plain pixels
|
|
int dpi = kDefaultDpi; // only a print format is rendered at a resolution
|
|
std::optional<std::uint64_t> seed;
|
|
ParamValues params; // only the keys the user actually passed
|
|
bool listEffects = false;
|
|
bool showHelp = false;
|
|
bool showVersion = false;
|
|
};
|
|
|
|
// Throws EffectError on bad input. Effect flags are generated from the
|
|
// registry, so a new effect gets its flags without touching this file.
|
|
Options parseOptions(int argc, char** argv);
|
|
|
|
std::string usage(const char* programName);
|
|
|
|
// Turns the parsed names and flags into cascade stages: every flag goes to the
|
|
// stage whose effect declares it, so --strip-height and --radius can be given
|
|
// together for `-e scanlines -e blur`. A stage named by --disable is built
|
|
// with all its settings and marked to be skipped.
|
|
std::vector<ChainStage> buildChain(const Options& options);
|
|
|
|
} // namespace effector
|