Brings ~55 mod-exclusive files to the upstream-based mod/master-resync branch: Activities (migrated to new ActivityManager pattern): - Clock/Time: SetTimeActivity, SetTimezoneOffsetActivity, NtpSyncActivity - Dictionary: DictionaryDefinitionActivity, DictionarySuggestionsActivity, DictionaryWordSelectActivity, LookedUpWordsActivity - Bookmark: EpubReaderBookmarkSelectionActivity - Book management: BookManageMenuActivity, EndOfBookMenuActivity - OPDS: OpdsServerListActivity, OpdsSettingsActivity - Utility: DirectoryPickerActivity, NumericStepperActivity Utilities (unchanged): - BookManager, BookSettings, BookmarkStore, BootNtpSync - Dictionary, LookupHistory, TimeSync, OpdsServerStore Libraries: PlaceholderCover, TableData, ChapterXPathIndexer Scripts: inject_mod_version, generate_book_icon, preview_placeholder_cover Docs: KOReader sync XPath mapping Migration changes: - ActivityWithSubactivity -> Activity base class - Callback constructors -> finish()/setResult() pattern - enterNewActivity() -> startActivityForResult() - Activity::RenderLock&& -> RenderLock&& These files won't compile yet - they reference mod settings and I18n strings that will be added in subsequent phases. Made-with: Cursor
701 B
701 B
Add env:mod with version + git hash
Task
Add a PlatformIO environment that flashes firmware with a -mod+<git_hash> version suffix (e.g. 1.0.0-mod+a3f7c21).
Changes
New file: scripts/inject_mod_version.py
- PlatformIO pre-build script
- Reads
versionfrom the[crosspoint]section ofplatformio.ini - Runs
git rev-parse --short HEADto get the current commit hash - Injects
-DCROSSPOINT_VERSION="{version}-mod+{hash}"into build flags
Modified: platformio.ini
- Added
[env:mod]section (lines 58-64) that extendsbase, includes the new script viaextra_scripts, and inherits base build flags
Usage
pio run -e mod -t upload
Follow-up
- None