cmake: add CUTTER_ENABLE_TRANSLATIONS option to skip translation build#3640
Conversation
|
To add some context: this is admittedly a workaround, but I don't see a cleaner alternative for distributors building from archive tarballs. The issue is that GitHub's archive downloads (both commit snapshots and release tarballs) do not include the src/translations/*.ts files — those only exist in a full git clone. For other bundled dependencies like rizin there is a proper escape hatch (CUTTER_USE_BUNDLED_RIZIN=OFF) that lets the build use a system-installed package instead. Translations have no equivalent: there is no "system translations package" to fall back to, and the .ts files must be physically present under src/translations/ for lrelease to compile them into .qm files. The alternative would be to fetch the translation files separately (e.g. as an additional download), but that adds complexity for little gain if the goal is simply to build the application without translations. This option keeps that path straightforward. |
|
Shouldn't this option be in the main |
d638c8d to
25729ea
Compare
good point. I trusted AI too much. It is fixed in the last commit |
Could you please merge/rebase? |
Allows building and installing Cutter without translation files by passing -DCUTTER_ENABLE_TRANSLATIONS=OFF to CMake. This is useful when building from a source snapshot (e.g. a GitHub commit archive) that does not include the .ts files, or when the Qt linguist tools are not available.
25729ea to
d0c3092
Compare
done |
|
@blshkv As a sidenote, if you build a release of cutter, you should use the tarballs provided by us, e.g. https://github.com/rizinorg/cutter/releases/download/v2.5.0/Cutter-v2.5.0-src.tar.gz |
Summary
Adds a CMake option
CUTTER_ENABLE_TRANSLATIONS(defaultON) tocmake/Translations.cmakethat allows skipping the translation file build and install step.Motivation
When building from a GitHub commit/tag archive rather than a full git clone, the
.tssource files are not present (they live in the repository but are not included in the archive tarballs). Without this option, CMake fails at install time with:Passing
-DCUTTER_ENABLE_TRANSLATIONS=OFFavoids the issue cleanly without requiring any other changes.Test plan
-DCUTTER_ENABLE_TRANSLATIONS=ON(default) — translations build as before-DCUTTER_ENABLE_TRANSLATIONS=OFF— translation step is skipped, install succeeds