Offline distribution of Anki

EDIT: Builds available here for anyone interested: GitHub - voczi/allinanki

Is it possible for Anki to be distributed in an all-in-one package just like before? I really don’t care much for an actual installation wizard, but I would just like if it could be downloaded once and be able to be installed on airgapped machines. I think it’s also possible for packages to be deleted from Pypi which hurts the archiveability of Anki imo.

Maybe my concerns are unfounded, but if not I am down to create a PR that uses Pyinstaller to create Anki .zip distribution. Or maybe there’s something more appropriate than Pyinstaller, dunno.

2 Likes

Currently, there is no such all-in-one package. Github tracks an issue for that as well: Offline installer · Issue #4241 · ankitects/anki · GitHub.

But you should be able to build anki from source, or just download the dependencies once and copy them to your other devices where you want to install anki (see Managing Files - Anki Manual).

1 Like

Ok thank you, that issue is what I needed for the community’s view. But it would be good to have dae’s opinion in regards to a PR adding the functionality I mentioned in the OP into the main repo.

Dae rejected a single package. See this entire thread for more info

2 Likes

Hm ok that sucks. But projects are bound to change after some time. Oh well, thanks for the pointers.

2 Likes

Got something going for Linux now at least. Ran it and it seems to work fine.

Size might be a bit concerning. I’ve probably just included too many things in the Pyinstaller package.

But I’ll move to Windows next, and then publish a lil repo on Github for others to get the packaged Anki versions from.

2 Likes

Published the repo here: GitHub - voczi/allinanki

Readme should contain most details, but I probably forgot something, idk. The setup process might end up being fairly simple anyway.

4 Likes

That seems like a convenient and interesting project, but I have some concerns.

As Anon_0000 already said the official Anki refuses to distribute such all in one packages so it seems unlikely your project will be incorporated into the official Anki.

If so, wouldn’t your project become a competing app unrelated to Anki? Since “Anki” is a registered trademark permission would likely be required to use it. Also accessing AnkiWeb (sync server, shared deck, add-ons) from non official Anki apps is prohibited. So it seems to me that distributing those would require confirmation from the official Anki.

The official Anki and volunteers are actively developing the new installer and collaborating with UV developers (UV is the most popular tool praised by developers in this year’s Stack Overflow survey), So it seems to me that your project is working against their interests. (I’m not related to the official Anki or mod, so I don’t know exactly.)

Other, For apps developed with Pyinstaller code signing may be required on both Windows and macOS. If not, the app is often blocked by antivirus software on Windows, and non Apple developer apps may be blocked from running on macOS. This problem is common with Pyinstaller.
(when I tried to include a small app in an add-on using PyInstaller I encountered that issue. After looking into it it seems separate code signing is required for Windows and macOS and they are expensive so I didn’t do it.)

2 Likes

This is just an alternative distribution, so I don’t think the trademark is relevant, especially when there are minimal changes to the source? Linux distros do that all the time.

3 Likes

No problem.

I read dae’s comments about using Pyinstaller and he mentioned experiencing “packaging issues” when using it. So maybe he can actually make use of what I got going? Dunno. It seems to work for me.

I’d rather not derail this thread to talk about legal aspects of things, but I have already considered both points anyway.

For the trademark thing, if you’re curious, you can lookup similar cases (trademarked names vs OSS projects) on Google.

17610282788759221892425771235983

Seemed to be fine on both platforms. I think Pyinstaller actually self-signs the binaries on macOS or something? And yeah if Windows AVs flags the binaries as containing viruses then I’ll take it there and then. I was actually going to auto-submit the packages to VirusTotal between the builds finishing and creating a release on Github, just to stay ahead of this problem (kinda). But then I felt I spent too much time on this project already so yeah…

1 Like

You used to be able to run pipx install aqt and get the latest version. Doesn’t that work anymore?

1 Like

The launcher installs three dependencies via uv: anki-release, anki, aqt. It seems like the dependencies installed by aqt are the same as for anki-release? Idk, maybe there’s something I’m missing here but I just install anki-release in my workflows and it installs everything I need (anki, aqt, pyqt6, etc.)

2 Likes