mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
tweaks for Linux package
This commit is contained in:
parent
ba86502a27
commit
94001273cc
11 changed files with 32 additions and 16 deletions
|
@ -1,12 +0,0 @@
|
|||
To run, change to this folder in a terminal and run the following command:
|
||||
|
||||
./bin/Anki
|
||||
|
||||
- To install system wide, run 'sudo ./install.sh'
|
||||
- To remove in the future, run 'sudo ./uninstall.sh' from the same folder.
|
||||
|
||||
To play and record audio, mpv and lame must be installed. If mpv is not
|
||||
installed or too old, Anki will try to fall back on using mplayer.
|
||||
|
||||
If Anki fails to start, please run it from a terminal to see what errors it
|
||||
outputs, and then post on our support site.
|
|
@ -1,3 +0,0 @@
|
|||
These files are distributed with the packaged Linux version, and may be useful
|
||||
to Linux packagers. If you're building Anki yourself, please ignore these files,
|
||||
and follow the instructions in docs/development.md instead.
|
|
@ -38,6 +38,7 @@ os.environ["CARGO_TARGET_DIR"] = str(cargo_target)
|
|||
|
||||
# OS-specific things
|
||||
pyqt5_folder_name = "pyqt515"
|
||||
is_lin = False
|
||||
if is_win:
|
||||
os.environ["TARGET"] = "x86_64-pc-windows-msvc"
|
||||
elif sys.platform.startswith("darwin"):
|
||||
|
@ -50,6 +51,7 @@ elif sys.platform.startswith("darwin"):
|
|||
os.environ["TARGET"] = "x86_64-apple-darwin"
|
||||
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.13"
|
||||
else:
|
||||
is_lin = True
|
||||
if platform.machine() == "x86_64":
|
||||
os.environ["TARGET"] = "x86_64-unknown-linux-gnu"
|
||||
else:
|
||||
|
@ -200,6 +202,8 @@ def merge_into_dist(output_folder: Path, pyqt_src_path: Path):
|
|||
]
|
||||
if is_win:
|
||||
resources.append(adj_path_for_windows_rsync(Path("win")) + "/")
|
||||
elif is_lin:
|
||||
resources.append("lin/")
|
||||
|
||||
subprocess.run(
|
||||
[
|
||||
|
|
25
qt/package/lin/README.md
Normal file
25
qt/package/lin/README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Installing Anki
|
||||
|
||||
## Running directly
|
||||
|
||||
To run without installing, change to this folder in a terminal, and run the
|
||||
following command:
|
||||
|
||||
./anki
|
||||
|
||||
## Installing
|
||||
|
||||
To install system wide, run 'sudo ./install.sh'
|
||||
|
||||
To remove in the future, run 'sudo /usr/local/share/anki/uninstall.sh'. You should
|
||||
do this before installing a newer version.
|
||||
|
||||
## Audio
|
||||
|
||||
To play and record audio, mpv and lame must be installed. If mpv is not
|
||||
installed or too old, Anki will try to fall back on using mplayer.
|
||||
|
||||
## Problems
|
||||
|
||||
If Anki fails to start, please run it from a terminal to see what errors it
|
||||
outputs, and then post on our support site.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
@ -15,7 +15,7 @@ rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki
|
|||
mkdir -p "$PREFIX"/share/anki
|
||||
cp -av * "$PREFIX"/share/anki/
|
||||
mkdir -p "$PREFIX"/bin
|
||||
ln -sf "$PREFIX"/share/anki/bin/Anki "$PREFIX"/bin/anki
|
||||
ln -sf "$PREFIX"/share/anki/anki "$PREFIX"/bin/anki
|
||||
# fix a previous packaging issue where we created this as a file
|
||||
(test -f "$PREFIX"/share/applications && rm "$PREFIX"/share/applications)||true
|
||||
mkdir -p "$PREFIX"/share/pixmaps
|
||||
|
@ -31,4 +31,6 @@ xdg-mime default anki.desktop application/x-colpkg
|
|||
xdg-mime default anki.desktop application/x-apkg
|
||||
xdg-mime default anki.desktop application/x-ankiaddon
|
||||
|
||||
rm install.sh
|
||||
|
||||
echo "Install complete. Type 'anki' to run."
|
Loading…
Reference in a new issue