mirror of
https://github.com/NaitLee/Cat-Printer.git
synced 2025-05-18 16:20:14 -07:00
+ Added another troubleshooting case
* Replaced "/mnt/@/" with a DIR_BUILD variable *
This commit is contained in:
parent
565b359908
commit
9c3e959a24
@ -53,8 +53,14 @@ Make 3 folders inside:
|
|||||||
### Git Repositories
|
### Git Repositories
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Remember to use your path
|
# Define your build directories
|
||||||
DIR_GIT="/mnt/data/@/git-repo/"
|
DIR_BUILD="/mnt/data/@"
|
||||||
|
DIR_GIT="$DIR_BUILD/git-repo/"
|
||||||
|
|
||||||
|
# Make sure both directories exist
|
||||||
|
mkdir -p $DIR_BUILD
|
||||||
|
mkdir -p $DIR_GIT
|
||||||
|
|
||||||
cd $DIR_GIT
|
cd $DIR_GIT
|
||||||
|
|
||||||
# Cat-Printer
|
# Cat-Printer
|
||||||
@ -116,8 +122,8 @@ System doesn’t understand it. Let’s replace them as symlinks:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# you may already have these from p4a guide
|
# you may already have these from p4a guide
|
||||||
ANDROIDSDK="/mnt/data/@/android"
|
ANDROIDSDK="$DIR_BUILD/android"
|
||||||
ANDROIDNDK="/mnt/data/@/android/android-ndk-r23b"
|
ANDROIDNDK="$DIR_BUILD/android/android-ndk-r23b"
|
||||||
# feel free to check this script
|
# feel free to check this script
|
||||||
python3 $DIR_GIT/Cat-Printer/build-android/fix-ndk-execs.py $ANDROIDNDK
|
python3 $DIR_GIT/Cat-Printer/build-android/fix-ndk-execs.py $ANDROIDNDK
|
||||||
```
|
```
|
||||||
@ -175,15 +181,15 @@ The most tricky fact is that none of these things work out-of-the-box.
|
|||||||
We should glue them up by hand.
|
We should glue them up by hand.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# let’s put those environment variables required by python-for-android here
|
# append target paths and environment variables required by python-for-android (adjust if necessary)
|
||||||
nano ~/.bashrc
|
echo '
|
||||||
# append in the end. use your target paths!
|
export DIR_BUILD="/mnt/data/@"
|
||||||
export ANDROIDSDK="/mnt/data/@/android"
|
export ANDROIDSDK="$DIR_BUILD/android"
|
||||||
export ANDROIDNDK="/mnt/data/@/android/android-ndk-r23b"
|
export ANDROIDNDK="$DIR_BUILD/android/android-ndk-r23b"
|
||||||
export ANDROIDAPI="30"
|
export ANDROIDAPI="30"
|
||||||
export NDKAPI="21"
|
export NDKAPI="21"' >> .bashrc
|
||||||
|
|
||||||
# after that, apply these
|
# reload environment variables
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -191,12 +197,12 @@ source ~/.bashrc
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# define shortcut(s). use your target paths!
|
# define shortcut(s). use your target paths!
|
||||||
DIR_GIT="/mnt/data/@/git-repo/"
|
DIR_GIT="$DIR_BUILD/git-repo/"
|
||||||
DIR_P4A="/usr/local/lib/python3.10/dist-packages/pythonforandroid/"
|
DIR_P4A="/usr/local/lib/python3.10/dist-packages/pythonforandroid/"
|
||||||
|
|
||||||
# p4a will generate some intermediate data. “expose” this to the host for convenient manipulation.
|
# p4a will generate some intermediate data. “expose” this to the host for convenient manipulation.
|
||||||
mkdir -p ~/.local/share/
|
mkdir -p ~/.local/share/
|
||||||
ln -s /mnt/data/@/p4a/ ~/.local/share/python-for-android
|
ln -s $DIR_BUILD/p4a/ ~/.local/share/python-for-android
|
||||||
|
|
||||||
# give p4a the bleak recipe. fortunately, p4a will resolve this symlink
|
# give p4a the bleak recipe. fortunately, p4a will resolve this symlink
|
||||||
ln -s $DIR_GIT/bleak/bleak/backends/p4android/recipes/bleak $DIR_P4A/recipes/bleak
|
ln -s $DIR_GIT/bleak/bleak/backends/p4android/recipes/bleak $DIR_P4A/recipes/bleak
|
||||||
@ -344,7 +350,7 @@ Common issues and fixes:
|
|||||||
| setuptools could not be imported | Fixed by specifying a different python version by adding `--requirements=pip,setuptools,wheel,hostpython3==3.9.16,python3==3.9.16` |
|
| setuptools could not be imported | Fixed by specifying a different python version by adding `--requirements=pip,setuptools,wheel,hostpython3==3.9.16,python3==3.9.16` |
|
||||||
| No such file or directory `bleak/setup.py` | Run `2-clean-up-build.sh` or specify a different python version via the arguments provided above |
|
| No such file or directory `bleak/setup.py` | Run `2-clean-up-build.sh` or specify a different python version via the arguments provided above |
|
||||||
| No such file or directory `build-android/dist` | Create a bare bundle before creating an APK |
|
| No such file or directory `build-android/dist` | Create a bare bundle before creating an APK |
|
||||||
|
| JAVA_HOME is not set and no 'java' command could be found in your PATH. | Install a JDK (e.g. `openjdk-19-jdk`) |
|
||||||
|
|
||||||
## The End
|
## The End
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user