1. Overview
The LicenseText module embeds the complete text of the GNU General Public License version 2 directly inside the BastionGuard Backup executable.
The file does not implement backup, restore, device, process, or graphical logic. Its sole responsibility is to expose the license document as a reusable Vala string constant that can be displayed by an About dialog, license window, installer, or other user-interface component.
2. Public Constant
public const string GPLv2LicenseText
GPLv2LicenseText is a compile-time string constant containing the full GNU General Public License version 2, including:
- The license title and publication date
- The Free Software Foundation copyright notice
- The preamble
- The terms and conditions for copying, distribution, and modification
- The no-warranty clauses
- The final guidance concerning library licensing
3. String Representation
The license is stored using Vala’s multiline string syntax:
public const string GPLv2LicenseText = """
...
""";
This representation preserves the original paragraph structure, indentation, line breaks, headings, section numbers, and legal wording without requiring runtime file access.
4. Runtime Behavior
The constant is compiled into the application binary. Accessing it does not:
- Read a file from disk
- Allocate or modify persistent configuration
- Execute an external process
- Require administrator privileges
- Perform network access
- Change application state
A caller can assign the value directly to a GTK label, text buffer, dialog, terminal output stream, or exported documentation file.
5. Typical Integration
A graphical component can use the constant as the body of a scrollable license viewer:
text_buffer.set_text(GPLv2LicenseText);
A command-line component can write it to standard output:
stdout.printf("%s\n", GPLv2LicenseText);
The module therefore provides a single canonical license source for every application surface.
6. Packaging Advantages
- No external dependency: the license remains available even when a separate COPYING or LICENSE file is missing from the installation.
- Consistent content: every caller receives the same embedded GPLv2 text.
- Offline availability: no network connection is required to display the licensing terms.
- Read-only data: the constant cannot be changed at runtime through ordinary application state.
- Simple deployment: no resource lookup or filesystem search is required.
7. Maintenance Considerations
- Verbatim preservation: the embedded legal text should remain identical to the official GNU GPL version 2 document.
- Whitespace preservation: changes to multiline-string indentation or line endings can alter the displayed formatting.
- Binary size: the complete license text becomes part of the compiled application data.
- Localization: the constant contains the original English license and is not passed through gettext.
- License selection: this file contains GPL version 2 text and should not be presented as GPL version 3 or another license.
- Source distribution: embedding the text in the executable does not replace any separate source-distribution obligations applicable to the project.
8. Error Handling
The module contains no executable functions and therefore has no local error-handling path. Failures can occur only in the caller that displays, copies, or exports the constant.
9. Security Considerations
- The value contains public legal text and no credentials, user information, filesystem paths, or operational secrets.
- The constant performs no shell execution and accepts no external input.
- When inserted into a markup-enabled widget, callers should treat it as plain text rather than interpreting it as HTML or Pango markup.
10. Licensing
The embedded document is the GNU General Public License, Version 2, June 1991.
It includes the Free Software Foundation notice permitting verbatim copying and distribution of the license document while prohibiting modification of the license text itself.
