├── .gitmodules ├── LICENSE ├── README.md └── Dockerfile /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pilauncher"] 2 | path = pilauncher 3 | url = https://github.com/ser-mk/pilauncher.git 4 | [submodule "mclient"] 5 | path = mclient 6 | url = https://github.com/ser-mk/mclient.git 7 | [submodule "piball"] 8 | path = piball 9 | url = https://github.com/ser-mk/piball.git 10 | [submodule "admin-dpc"] 11 | path = admin-dpc 12 | url = https://github.com/ser-mk/admin-dpc.git 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Evgeny Chormonov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pibuild 2 | This repository contains all the necessary scripts, tools, and configurations for building the Pinect software from source. 3 | 4 | - https://github.com/ser-mk/pilauncher 5 | 6 | - https://github.com/ser-mk/mclient 7 | 8 | - https://github.com/ser-mk/piball 9 | 10 | - https://github.com/ser-mk/admin-dpc 11 | 12 | It enables developers to easily build the software on android platforms. 13 | 14 | ## Prerequisites 15 | 16 | * docker 17 | 18 | ## How build 19 | 20 | 1. Clone the repo: 21 | ``` 22 | git clone --recurse-submodules https://github.com/ser-mk/pibuild.git 23 | ``` 24 | 25 | 2. Run docker contatiner: 26 | ``` 27 | docker pull sermkd/pibuild:1.0.0a 28 | docker run --rm -it -v "$PWD/pibuild:/home/gradle/" sermkd/pibuild:1.0.0a python build.py 29 | ``` 30 | 3. Built apks will be in $PWD/pibuild/build_archive/current/ 31 | ``` 32 | $ ls pibuild/build_archive/current/ 33 | admin-dpc.apk mclient.apk piball.apk pilauncher.apk 34 | ``` 35 | 36 | ### Help 37 | If you're building the Pinect software and you notice that not all of the APKs are being generated, one thing you can try is running the build command multiple times. Sometimes, issues with dependencies or missing files can cause the build process to fail, but running the command again can help resolve these issues: 38 | ```bash 39 | $ docker run --rm -it -v "$PWD/pibuild:/home/gradle/" sermkd/pibuild:1.0.0a python build.py 40 | ... 41 | $ ls pibuild/build_archive/current/ 42 | admin-dpc.apk mclient.apk 43 | 44 | # rerun the build command 45 | $ docker run --rm -it -v "$PWD/pibuild:/home/gradle/" sermkd/pibuild:1.0.0a python build.py 46 | ... 47 | $ ls pibuild/build_archive/current/ 48 | admin-dpc.apk mclient.apk piball.apk pilauncher.apk 49 | ``` 50 | 51 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gradle:4.10.0-jdk8 2 | USER root 3 | ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip" \ 4 | ANDROID_HOME="/usr/local/android-sdk" \ 5 | ANDROID_VERSION=27 \ 6 | ANDROID_BUILD_TOOLS_VERSION=26.0.2 7 | 8 | 9 | # Download Android SDK 10 | RUN mkdir "$ANDROID_HOME" .android \ 11 | && cd "$ANDROID_HOME" \ 12 | && curl -o sdk.zip $SDK_URL \ 13 | && unzip sdk.zip \ 14 | && rm sdk.zip \ 15 | && mkdir "$ANDROID_HOME/licenses" || true \ 16 | && echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license" 17 | # && yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses 18 | # Install Android Build Tool and Libraries 19 | RUN $ANDROID_HOME/tools/bin/sdkmanager --update 20 | RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \ 21 | "platforms;android-${ANDROID_VERSION}" \ 22 | "platform-tools" 23 | 24 | 25 | RUN $ANDROID_HOME/tools/bin/sdkmanager --uninstall "cmake;3.18.1" 26 | RUN $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.6.4111459" 27 | # RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager "extras;android;m2repository" "extras;google;m2repository" "extras;google;google_play_services" 28 | 29 | ENV ANDROID_NDK_HOME /opt/android-ndk 30 | ENV ANDROID_NDK_VERSION r14b 31 | # ENV GCE_METADATA_ROOT 127.0.0.1 32 | 33 | 34 | # ------------------------------------------------------ 35 | # --- Install required tools 36 | 37 | RUN apt-get update -qq && \ 38 | apt-get clean 39 | 40 | 41 | # ------------------------------------------------------ 42 | # --- Android NDK 43 | 44 | # download 45 | RUN mkdir /opt/android-ndk-tmp && \ 46 | cd /opt/android-ndk-tmp && \ 47 | wget -q https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip && \ 48 | # uncompress 49 | unzip -q android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip && \ 50 | # move to its final location 51 | mv ./android-ndk-${ANDROID_NDK_VERSION} ${ANDROID_NDK_HOME} && \ 52 | # remove temp dir 53 | cd ${ANDROID_NDK_HOME} && \ 54 | rm -rf /opt/android-ndk-tmp 55 | 56 | # add to PATH 57 | ENV PATH ${PATH}:${ANDROID_NDK_HOME} 58 | 59 | # Install Build Essentials 60 | RUN apt-get update && apt-get install build-essential -y && apt-get install file -y && apt-get install apt-utils -y --------------------------------------------------------------------------------