mirror of
https://github.com/nihas101/steamos-scripts.git
synced 2026-10-06 01:00:16 +02:00
Add install script for yomininja
This commit is contained in:
1 parent
0b67b3a9dd
commit
6dea5d5f98
3 files changed
+49
-31
No files matched your search
@@ -7,9 +7,11 @@
|
||||
- [External Optical Drives](#external-optical-drives)
|
||||
- [Japanese Learning](#japanese-learning)
|
||||
- [./scripts/enable\_jp\_locale](#scriptsenable_jp_locale)
|
||||
- [Installing Game2text](#installing-game2text)
|
||||
- [Running the Windows Build Via Bottles](#running-the-windows-build-via-bottles)
|
||||
- [Building Game2text From Source on the Steamdeck](#building-game2text-from-source-on-the-steamdeck)
|
||||
- [OCR](#ocr)
|
||||
- [Installing YomiNinja](#installing-yomininja)
|
||||
- [Installing Game2text](#installing-game2text)
|
||||
- [Running the Windows Build Via Bottles](#running-the-windows-build-via-bottles)
|
||||
- [Building Game2text From Source on the Steamdeck](#building-game2text-from-source-on-the-steamdeck)
|
||||
- [Installing MPV and mpvacious](#installing-mpv-and-mpvacious)
|
||||
- [Japanese Input](#japanese-input)
|
||||
- [Anki](#anki)
|
||||
@@ -65,10 +67,15 @@ Enables the japanese locale on the steamdeck. Useful for learners of japanese th
|
||||
```bash
|
||||
LANG=ja_JP 7zz x <zip-archive>
|
||||
```
|
||||
### OCR
|
||||
|
||||
### Installing Game2text
|
||||
#### Installing YomiNinja
|
||||
|
||||
#### Running the Windows Build Via Bottles
|
||||
Download the latest YomiNinja [AppImage](https://github.com/matt-m-o/YomiNinja/releases) and run it. See also `./scripts/install_yomininja`
|
||||
|
||||
#### Installing Game2text
|
||||
|
||||
##### Running the Windows Build Via Bottles
|
||||
|
||||
[Game2text](https://game2text.com/) can be used via [bottles](https://usebottles.com/).
|
||||
|
||||
@@ -78,7 +85,7 @@ LANG=ja_JP 7zz x <zip-archive>
|
||||
4. Setup a bottle optimized for gaming
|
||||
5. Run Game2text inside the bottle you just created
|
||||
|
||||
#### Building Game2text From Source on the Steamdeck
|
||||
##### Building Game2text From Source on the Steamdeck
|
||||
|
||||
See: [Game2Text](https://github.com/mathewthe2/Game2Text)
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# See: https://github.com/mathewthe2/Game2Text
|
||||
|
||||
function make_game2text {
|
||||
# The requirements may need to be slightly adjusted if e.g. the specific version of numpy is not available
|
||||
# TODO: Replace == with >= in requirements.py automatically
|
||||
# TODO: In config.ini replace `browser = default` with `browser = chromium` automatically
|
||||
# See: https://game2text.com/faq/switch-browser/
|
||||
pip install -r requirements.txt
|
||||
}
|
||||
|
||||
sudo steamos-readonly disable && \
|
||||
sudo pacman base-devel glibc linux-api-headers zlib cmake python3 gcc nodejs npm libffi openssl rust tk tcl && \
|
||||
sudo steamos-readonly enable && \
|
||||
git clone https://github.com/mathewthe2/Game2Text.git && \
|
||||
cd Game2Text && \
|
||||
virtualenv venv --python='/usr/bin/python' && \
|
||||
source venv/bin/activate && \
|
||||
pip install virtualenv && \
|
||||
make_game2text && \
|
||||
deactivate
|
||||
|
||||
# TODO: Create a script for this and put it on the path
|
||||
echo 'Run "source venv/bin/activate && python game2text.py ; deactivate" to start game2text'
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
function yes_or_no {
|
||||
while true; do
|
||||
read -p "$* [y/n]: " yn
|
||||
case $yn in
|
||||
[Yy]*) return 0 ;;
|
||||
[Nn]*) return 1 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
function install_yomininja {
|
||||
ymn="${HOME}/bin/yomininja"
|
||||
|
||||
if [ -e ${ymn} ]; then
|
||||
yes_or_no "yomininja is already installed, do you want to overwrite the existing installation?"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Aborting install of yomininja."
|
||||
return 0
|
||||
fi
|
||||
|
||||
version=${1}
|
||||
echo "Installing yomininja ${version}..."
|
||||
ymnurl="https://github.com/matt-m-o/YomiNinja/releases/download/v${version}/YomiNinja-${version}.AppImage"
|
||||
mkdir -p "$(dirname "$ymn")"
|
||||
if [ -e ${ymn} ]; then
|
||||
rm "$ymn"
|
||||
fi
|
||||
curl -fL "$ymnurl" -o "$ymn"
|
||||
chmod u+x "$ymn"
|
||||
}
|
||||
|
||||
install_yomininja ${1}
|
||||
Reference in new issue
Block a user