Commit graph

91 commits

Author SHA1 Message Date
llama
fd1cbd38b0
trim after splitting 2025-11-02 19:35:33 +08:00
llama
88752aeeb7
sys.executable is the bin we're getting sys.executable from 🤦‍♂️ 2025-11-02 19:24:02 +08:00
llama
8ac763ceba
remove CString unwraps
no idea why windows needs an explicit decl, possible compiler bug?
2025-11-02 18:31:01 +08:00
llama
2c018574e1
update ffl run impls 2025-11-02 17:58:48 +08:00
llama
cea6263688
update ffi load impls 2025-11-02 17:57:59 +08:00
llama
cd156d8524
add PyConfigExt and refactor PyFfi impl 2025-11-02 17:56:39 +08:00
llama
3281796435
add new ffi methods
we can't rely on the very high level layer alone anymore
2025-11-02 17:54:53 +08:00
llama
a64aad5e48
refactor get_libpython_path into get_python_env_info
instead of just libpython's path we now get and cache the nodot version and venv bin path
2025-11-02 17:53:09 +08:00
llama
84619fd099
add ffi types 2025-11-02 17:50:42 +08:00
llama
36ca68a869
add bindgen'd py39/313 PyConfig definitions 2025-11-02 17:49:19 +08:00
llama
c22e38f4a8
launch anki embeddedly(?), fallback to usual launch 2025-11-01 22:42:46 +08:00
llama
e31c8b4586
add run_anki_normally 2025-11-01 22:42:29 +08:00
llama
de531e07ab
add PyFfi impl for windows 2025-11-01 22:42:11 +08:00
llama
6e5b0c96ef
add PyFfi impl for nixes 2025-11-01 22:41:55 +08:00
llama
ec75658a0a
add PyFfi impl 2025-11-01 22:23:35 +08:00
llama
a882a87800
clear lib path cache on sync 2025-11-01 22:21:32 +08:00
llama
69e0fc3aae
add get_libpython_path 2025-11-01 22:20:50 +08:00
llama
f2c2d6d93a
add libpython_path 2025-11-01 22:19:15 +08:00
llama
9d0ae31780
add PyFfi 2025-11-01 22:14:51 +08:00
llama
d9f94badf6
add helper scripts 2025-11-01 22:12:37 +08:00
llama
92339ce290
add libc crate for macos as well (for dlopen) 2025-11-01 22:11:35 +08:00
llama
739e41ce16
fix(launcher): apply cache settings to all uv invocations (#4404) 2025-10-27 19:42:45 +07:00
user1823
62c950120c
Fix(launcher)/Exclude pre-release if a newer major_minor exists (#4388)
The current main produces a list like "25.09.2, 25.08b5, 25.07.5, 25.06b7, 25.02.7"
Here, 25.08b5 and 25.06b7 should be filtered out for the same reason this code filters out the older patch releases.
2025-10-27 19:26:09 +07:00
llama
a05c90cbce
fix: make uv use system certstore (#4386) 2025-10-27 19:19:28 +07:00
llama
23263caea2
feat: show launcher if different version was installed (#4381) 2025-10-27 19:08:40 +07:00
user1823
1ba4512011
Fix launcher strings (#4375)
* Fix launcher strings

* Add prompt to press enter for installation

* Prompt should appear after ensuring that the OS is supported
2025-10-02 21:50:44 +07:00
llama
a842ba1498
replace more hardcoded strings in the launcher with translations (#4368) 2025-09-30 00:13:09 +10:00
llama
e0b0d0d19b
feat: add i18n to launcher (#4361)
* add anki_i18n and locale_config crates to launcher

* add launcher.ftl

* add tr to state

* replace most hardcoded strings with translations

* add support for `launcher` rustcfg to trim translations

* use marker structs to denote type of translations

* move underscores into generated code

* Update cargo-license, which may fix the license order issue (dae)
2025-09-27 16:58:46 +10:00
Damien Elmes
04a0b10a15 Launcher now checks Windows version
https://forums.ankiweb.net/t/issue-with-installing-anki-launcher-into-custom-folder/66355
2025-09-23 19:50:40 +10:00
Damien Elmes
58deb14028 Ensure the newly-spawned terminal doesn't inherit the env var
It seems like the open call was leaking it into the newly spawned
process.

Follow-up fix to 2491eb0316
2025-09-04 16:18:11 +10:00
Damien Elmes
08431106da Exclude SSLKEYLOGFILE from Python
Closes #4308
2025-09-04 13:20:12 +10:00
Damien Elmes
b2ab0c0830 Add an experimental new system Qt mode to the launcher
Goal is to allow users to use their system Qt libraries that have
things like fcitx support available.

For #4313
2025-09-03 23:54:27 +10:00
Damien Elmes
6a985c9fb0 Add support for custom launcher venv locations
Closes #4305 when https://github.com/ankitects/anki-manual/pull/444 is
merged, and makes it easier to maintain multiple Anki versions at once.
2025-09-03 20:54:16 +10:00
Damien Elmes
db1d04f622 Centralize uv command setup
Closes #4306
2025-09-03 19:58:45 +10:00
Damien Elmes
2491eb0316 Don't reuse existing terminal process
May possibly help with #4304
2025-09-03 17:32:30 +10:00
Damien Elmes
06f9d41a96 Bypass install_name_tool invocation on macOS
Not sure when https://github.com/astral-sh/uv/issues/14893 will be
ready, and this seems to solve the problem for now.

Closes #4227
2025-09-03 17:32:30 +10:00
洩氏诹诹子
157da4c7a7
Fix mirror configuration not working during launcher download (#4280)
Use environment variable instead of configuration file
2025-09-02 14:58:34 +10:00
Damien Elmes
8c7cd80245 Support socks proxies when fetching versions 2025-08-08 20:30:51 +10:00
Damien Elmes
68bc4c02cf Add mirror option to launcher; stop downloading automatically
To give users a chance to choose a mirror first, we have to give up
the automatic downloading on first run.

Closes #4226
2025-08-08 20:30:51 +10:00
Damien Elmes
8932199513 Possible fix for launcher failing to appear on some Linux systems
While testing the previous PR, I noticed that if stdout is set to None,
the same behaviour is shown as in the following report:
https://forums.ankiweb.net/t/cannot-switch-versions/64565

This leads me to wonder whether IsTerminal is behaving differently
on that user's system, and the use of an env var may be more reliable.
2025-07-28 21:53:44 +10:00
Damien Elmes
69d54864a8 Fix launcher display on Tools>Upgrade/Downgrade on Windows 10
Thanks to abdo:
https://forums.ankiweb.net/t/anki-25-08-beta-3/64738/6
2025-07-28 21:43:11 +10:00
Damien Elmes
7172b2d266 More launcher fixes
- The pyproject copy change broke the initial run case
- Avoid calling 'uv pip show' before venv created, as it causes
a pop-up prompting the user to install developer tools on macOS (#4227)
- Add a tip to the user about the unwanted install_name_tool pop-up
(Also tracked in #4227)
- Print 'Checking for updates...' prior to the potentially slow network
request
2025-07-25 23:34:50 +07:00
Damien Elmes
e2692b5ac9 Fix inability to upgrade/downgrade from a Python 3.9 version
Resolves AttributeError: module 'pip_system_certs.wrapt_requests' has no attribute 'inject_truststore'
2025-07-25 16:49:31 +07:00
Damien Elmes
177c483398 Stop copying updated pyproject/python pin on startup
The 'latest' and 'choose version' paths always read from the the
dist file these days, so the file doesn't need to be copied in advance.
The other reason for the current behaviour was so that when the user
manually installs a new launcher, it opens into the launcher on next
run, as that's probably what the user wanted. But this causes problems
when the launcher is updated automatically by things like homebrew.

https://forums.ankiweb.net/t/anki-homebrew-issues-terminal-and-crash-on-exit/64413/4
2025-07-25 15:40:00 +07:00
Damien Elmes
ca0459d8ee Use pip-system-certs when checking Anki versions 2025-07-24 21:56:15 +07:00
Damien Elmes
416e7af02b Pass --managed-python when fetching versions
Tentatively closes https://github.com/ankitects/anki/issues/4227
2025-07-24 21:32:23 +07:00
Damien Elmes
c74a97a5fa Increase default network timeout in launcher
https://forums.ankiweb.net/t/the-desktop-anki-app-cant-launch/64425/4
2025-07-24 20:34:43 +07:00
Damien Elmes
00bc0354c9 Provide better output when downloading versions fails
- include stdout/stderr when utf8_output() fails
- don't swallow the error returned by handle_Version_install_or_update
- skip codesigning when NODMG set

Closes #4224
2025-07-24 20:23:43 +07:00
Damien Elmes
229337dbe0 Work around Conda breaking launcher
Closes #4216
2025-07-24 18:40:41 +07:00
Damien Elmes
aeaf001df7 Hack back in a fix for lack of ANSI codes on Windows 10
There must be a better way to do this, but someone more familiar
with Win32 internals than I will need to discover it.

https://forums.ankiweb.net/t/anki-25-08-beta/63645/61
2025-07-19 00:40:16 +07:00