* Launcher: Run `uv python install` before running `uv sync`
* Less copy/paste.
* Minor readability improvements
* Make sure we check file presence before attempting to read
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
- Launcher can now be accessed via Tools>Upgrade/Downgrade
- Anki closes automatically on update
- When launcher not available, show update link like in the past
- It appears that access to the modern console host requires an app
to be built with the windows console subsystem, so we introduce an
extra anki-console.exe binary to relaunch ourselves with. Solves
https://forums.ankiweb.net/t/new-online-installer-launcher/62745/50
- Windows now requires you to close the terminal like on a Mac,
as I couldn't figure out how to have it automatically close. Suggestions
welcome!
- Reduce the amount of duplicate/near-duplicate code in the various
platform files, and improve readability
- Add a helper to install the current code into the launcher env
- Fix cargo test failing to build on ARM64 Windows
The legacy importer has only been kept around to support some add-ons,
and these are so infrequently used that they're better off shifted
to add-ons (even they even still work)
* Migrate build system to uv
Closes#3787, and is a step towards #3081 and #4022
This change breaks our PyOxidizer bundling process. While we probably
could update it to work with the new venvs & lockfile, my intention
is to use this as a base to try out a uv-based packager/installer.
Some notes about the changes:
- Use uv for python download + venv installation
- Drop python/requirements* in favour of pyproject files / uv.lock
- Bumped to latest Python 3.9 version. The move to 3.13 should be
a fairly trivial change when we're ready.
- Dropped the old write_wheel.py in favour of uv/hatchling. This has
the unfortunate side-effect of dropping leading zeros in our wheels,
which we could try hack around in the future.
- Switch to Qt 6.7 for the dev repo, as it's the first PyQt version
with a Linux/ARM WebEngine wheel.
- Unified our macOS deployment target with minimum required for ARM.
- Dropped unused fluent python files
- Dropped unused python license generation
- Dropped helpers to run under Qt 5, as our wheels were already
requiring Qt 6 to install.
* Build action to create universal uv binary
* Drop some PyOxidizer-related files
* Use Windows ARM64 cargo/node binaries during build
We can't provide ARM64 wheels to users yet due to #4079, but we can
at least speed up the build.
The rustls -> native-tls change on Windows is because ring requires
clang to compile for ARM64, and I figured it's best to keep our Windows
deps consistent. We already built the wheels with native-tls.
* Make libankihelper a universal library
We were shipping a single arch library in a purelib, leading to
breakages when running on a different platform.
* Use Python wheel for mpv/lame on Windows/Mac
This is convenient, but suboptimal on a Mac at the moment. The first
run of mpv will take a number of seconds for security checks to run,
and our mpv code ends up timing out, repeating the process each time.
Our installer stub will need to invoke mpv once first to get it validated.
We could address this by distributing the audio with the installer/stub,
or perhaps by putting the binaries in a .pkg file that's notarized+stapled
and then included in the wheel.
* Add some helper scripts to build a fully-locked wheel
* Initial macOS launcher prototype
* Add a hidden env var to preload our libs and audio helpers on macOS
* qt/bundle -> qt/launcher
- remove more of the old bundling code
- handle app icon
* Fat binary, notarization & dmg
* Publish wheels on testpypi for testing
* Use our Python pin for the launcher too
* Python cleanups
* Extend launcher to other platforms + more
- Switch to Qt 6.8 for repo default, as 6.7 depends on an older
libwebp/tiff which is unavailable on newer installs
- Drop tools/mac-x86, as we no longer need to test against Qt 5
- Add flags to cross compile wheels on Mac and Linux
- Bump glibc target to 2_36, building on Debian Stable
- Increase mpv timeout on macOS to allow for initial gatekeeper checks
- Ship both arm64 and amd64 uv on Linux, with a bash stub to pick
the appropriate arch.
* Fix pylint on Linux
* Fix failure to run from /usr/local/bin
* Remove remaining pyoxidizer refs, and clean up duplicate release folder
* Rust dep updates
- Rust 1.87 for now (1.88 due out in around a week)
- Nom looks involved, so I left it for now
- prost-reflect depends on a new prost version that got yanked
* Python 3.13 + dep updates
Updated protoc binaries + add helper in order to try fix build breakage.
Ended up being due to an AI-generated update to pip-system-certs that
was not reviewed carefully enough:
https://gitlab.com/alelec/pip-system-certs/-/issues/36
The updated mypy/black needed some tweaks to our files.
* Windows compilation fixes
* Automatically run Anki after installing on Windows
* Touch pyproject.toml upon install, so we check for updates
* Update Python deps
- urllib3 for CVE
- pip-system-certs got fixed
- markdown/pytest also updated
* add fill tool
* add fill tool logic
* open colour picker on fill tool activation
* refactor/add fill attr to io clozes
* fill masks in editor
* fill text and inactive masks in reviewer
* fix lint
* remove debug option
(originally merged into a PR branch)
* Make URL schemes dialog more ergonomic
* add name to contributors list
* Title Case
* Tweak build instructions so Cursor picks them up
* Use a warning icon for the URL scheme pop-up
* Default to cancelling
* CHANGE collection size too large error to add MB values and info about compressed vs. uncompressed
* Round f64 to 2 decimals
* Remove line breaks from ftl/core
* Remove string 'uncompressed' from code
* Add string 'uncompressed' to ftl/core
* Remove if statement change introduced to test changes locally
* Run ./check
* ADD name of the button after button number (1 → again...)
* ADD info string to explain what 'correct' means
* Run ./check and make it happy
* Apply suggestion from @dae to make text shorter
* Update TrueRetention.svelte adding description
* Update statistics.ftl to add additional info
* Swap TR with DR
* Change string to 'Is expected to'
* Add help modal to TR table
* Add tooltip slot to Graph.svelte (thanks @Luc-Mcgrady)
* Fix lint warning and failing test
* Remove unused code
* removedd on:mount to make eslint happy
* ADD back on:mount
* ADD back code needed for on:mount
* REMOVE openHelpModal() as I couldn't figure out how to make the title clickable
* attempt to ADD clickable title (BROKEN\!)
* Update ts/lib/components/TitledContainer.svelte
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Update ts/routes/graphs/Graph.svelte
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Update ts/routes/graphs/TrueRetention.svelte
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* ADD exported onTitleClick as @Luc-Mcgrady suggested
* REMOVE vite.config.ts file
---------
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Display median interval in Stats instead of mean
Median is better suited than mean for reporting skewed data.
* Display median ease in Stats instead of mean
* Update difficulty.ts
* Update ease.ts
* Update statistics.ftl
* Format eases.rs
* Remove unused import
* Change Median back to Average in UI
* Revert "Change Median back to Average in UI"
This reverts commit e0c1e3f8e4.
* Preserve the old translations for now (dae)
* Show "and others" at the end of the contributor list in the about dialog
* Make about addendum translatable
* Fix CONTRIBUTORS
* Fix CONTRIBUTORS
* Update ftl/qt/about.ftl (dae)
* Feat/grade now
* pass ci
* fix from_queue
* Refactor card answering to support from_queue flag
- Add `from_queue` field to `CardAnswer` struct and proto message
- Modify `answer_card_inner` to handle queue updates based on `from_queue`
- Remove `grade_card` method and consolidate card answering logic
- Update related test cases to set `from_queue` flag
* fix current_changes() called when no op set
* Optimize queue updates for batch card processing
- Refactor `grade_now` to collect processed card IDs first
- Add new `update_queues_for_processed_cards` method for efficient batch queue updates
- Improve queue management by removing entries and updating counts in a single pass
- Remove individual queue update method in favor of batch processing
* pass ci
* keep the same style
* remove ineffective code
* remove unused imports