mirror of
https://github.com/nihas101/steamos-scripts.git
synced 2026-10-04 22:00:09 +02:00
Add rough first attempt to build game2text from source
This commit is contained in:
1 parent
303992f5ad
commit
80ff7a4f8a
4 files changed
+63
No files matched your search
@@ -0,0 +1 @@
|
||||
Game2Text/
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# See: https://github.com/mathewthe2/Game2Text
|
||||
function make_python_3_7_4 {
|
||||
# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz && \
|
||||
# tar -xf Python-3.7.4.tgz && \
|
||||
# cd Python-3.7.4 && \
|
||||
# ./configure && \
|
||||
# make && \
|
||||
# cd .. && \
|
||||
pip install virtualenv && \
|
||||
# curl -fsSL https://pyenv.run | bash
|
||||
# Add the following to your ~/.bashrc
|
||||
# echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
|
||||
# echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
|
||||
# echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc
|
||||
# pyenv install 3.12.10
|
||||
}
|
||||
|
||||
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=Python-3.7.4/python && \
|
||||
#virtualenv venv --python='/home/deck/.pyenv/versions/3.12.10/bin/python' && \
|
||||
virtualenv venv --python='/usr/bin/python' && \
|
||||
source venv/bin/activate && \
|
||||
make_python_3_7_4 && \
|
||||
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'
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
function install_tesseract {
|
||||
echo "Installing tesseract, tesseract-data-jpn and tesseract-data-jpn_vert..."
|
||||
sudo pacman -S tesseract-data-jpn tesseract-data-jpn_vert
|
||||
}
|
||||
|
||||
sudo steamos-readonly disable
|
||||
install_tesseract
|
||||
sudo steamos-readonly enable
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
function install_virtualenv {
|
||||
echo "Installing virtualenv..."
|
||||
sudo pacman -S python-virtualenv
|
||||
}
|
||||
|
||||
sudo steamos-readonly disable
|
||||
install_virtualenv
|
||||
sudo steamos-readonly enable
|
||||
|
||||
Reference in new issue
Block a user