commit to new branch for android emulator
This commit is contained in:
parent
631056030e
commit
e3324e374b
3 changed files with 33 additions and 86 deletions
26
Dockerfile
26
Dockerfile
|
@ -1,7 +1,9 @@
|
|||
FROM archlinux:latest
|
||||
|
||||
ARG YESACCEPT=n
|
||||
RUN echo "this is $YESACCEPT"
|
||||
RUN pacman -Syu --noconfirm
|
||||
RUN pacman -S --noconfirm coreutils bash shadow make unzip zip jdk11-openjdk wget
|
||||
RUN pacman -S --noconfirm coreutils bash shadow make unzip zip jdk11-openjdk wget xorg-xclock
|
||||
ENV ANDROID_SDK_ROOT="/opt/android"
|
||||
ENV BUILD_TOOLS_LATEST="$ANDROID_SDK_ROOT/cmdline-tools/latest"
|
||||
RUN BUILD_TOOLS="$(realpath -m "$BUILD_TOOLS_LATEST/..")";\
|
||||
|
@ -18,12 +20,32 @@ ENV PATH="$PATH:$BUILD_TOOLS_LATEST/bin"
|
|||
ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk/"
|
||||
#ENTRYPOINT bash -c 'sleep 10000'
|
||||
ENV LIBRARY_PATH="$LIBRARY_PATH:$BUILD_TOOLS_LATEST/lib"
|
||||
ARG YESACCEPT=n
|
||||
RUN test "$YESACCEPT" = "y" || { printf "\033[31;1;4m%s\n%s\033[0m " "FAILED TO BUILD CONTAINER: You did not ACCEPT THE UPSTREAM LICENSE" " -> export YESACCEPT=y" >&2; exit 1; }
|
||||
RUN echo you selected to accept the licenses/TOS
|
||||
RUN echo "$YESACCEPT" | sdkmanager --install "build-tools;33.0.2"
|
||||
RUN echo "$YESACCEPT" | sdkmanager --install "platforms;android-33"
|
||||
RUN echo "$YESACCEPT" | sdkmanager --install "ndk;28.0.12433566"
|
||||
RUN echo "$YESACCEPT" | sdkmanager --install "system-images;android-33;aosp_atd;x86_64"
|
||||
RUN echo "$YESACCEPT" | sdkmanager --install "emulator"
|
||||
RUN echo "no" | avdmanager --verbose create avd --force --name "thedevice" --package 'system-images;android-33;aosp_atd;x86_64' --tag "aosp_atd" --abi "x86_64"
|
||||
RUN echo "$YESACCEPT" | sdkmanager --install "platform-tools"
|
||||
RUN pacman -S --noconfirm libpulse libdrm libbsd libxi
|
||||
RUN mkdir /tmp/.X11-unix/
|
||||
|
||||
# 10 pacman -Ss pulse
|
||||
# 11 pacman -Ss pulse | grpe lib
|
||||
# 12 pacman -Ss pulse | grep lib
|
||||
# 13 pacman -S libpulse
|
||||
# 15 pacman -S libdrm
|
||||
# 17 pacman -S libXi
|
||||
# 18 pacman -Ss libXi
|
||||
# 19 pacman -Ss libxi
|
||||
# 20 pacman -S libxi
|
||||
# 22 pacman -S libsd
|
||||
# 23 pacman -S libbsd
|
||||
# 24 pacman -S libbsd
|
||||
# 26 history | grep pacman
|
||||
#
|
||||
#RUN apk add setpriv
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chown 0:0 /entrypoint.sh
|
||||
|
|
86
Makefile
86
Makefile
|
@ -34,91 +34,9 @@ force-install reinstall:
|
|||
for APP in apps/*/; do rm -f "$$APP""app.apk.install-log" 2>/dev/null; done; $(MAKE) install
|
||||
run: $(shell cd apps/; for APP in */; do test -d "$$APP" || continue; echo "run-$${APP%/}"; done)
|
||||
|
||||
#newer :=$(shell test Makefile.apps -nt Makefile -a Makefile.apps -nt apps && printf Y)
|
||||
#ifndef newer
|
||||
#Makefile.apps: FORCE
|
||||
# printf 'inmf: ; echo $$@\n' > $@
|
||||
#FORCE:
|
||||
#endif
|
||||
#include Makefile.apps
|
||||
|
||||
|
||||
#include depend
|
||||
#depend: Makefile
|
||||
# printf 'independ: ; echo super\n' >> $@
|
||||
#newer :=$(shell echo a)
|
||||
#ifdef($(newer))
|
||||
#include depend
|
||||
#endif
|
||||
|
||||
|
||||
#APPDIRS = $(wildcard apps/*/)
|
||||
##APPDIRS := $(APPDIRS) apps/newapp/
|
||||
#TESTFILES = $(patsubst %, %test ,$(APPDIRS))
|
||||
#test:
|
||||
# echo $(wildcard apps/*/)
|
||||
# echo $(APPDIRS)
|
||||
|
||||
##a b c:
|
||||
## echo $@
|
||||
|
||||
#echo-testfiles:
|
||||
# echo $(TESTFILES)
|
||||
#
|
||||
#$(TESTFILES) :
|
||||
# echo "$@"
|
||||
#
|
||||
#$(APPDIRS) :
|
||||
# echo "$@"
|
||||
#
|
||||
###.PHONY: all
|
||||
###all: install-all
|
||||
###
|
||||
###.PHONY: run-webview
|
||||
###run-webview: install-webview
|
||||
### adb shell am start -n app.example/.ExampleApp
|
||||
###
|
||||
###.PHONY: build-all
|
||||
###build-all: build-webview build-native
|
||||
###
|
||||
###
|
||||
###.PHONY: build-webview
|
||||
###build-webview: docker-compose-build.log
|
||||
### docker-compose run --rm compile webview
|
||||
### ln -sf apk/webview/result/example.app.apk ./; test -e ./example.app.apk || rm ./example.app.apk
|
||||
###
|
||||
###.PHONY: build-native
|
||||
###build-native: docker-compose-build.log
|
||||
### docker-compose run --rm compile native
|
||||
### #ln -sf apk/native/result/example.app.apk ./; test -e ./example.app.apk || rm ./example.app.apk
|
||||
###
|
||||
###.PHONY: install-all
|
||||
###install-all: install-webview install-native
|
||||
###
|
||||
###.PHONY: install-webview
|
||||
###install-webview: build-webview
|
||||
### adb install -r ./example.app.apk
|
||||
###
|
||||
###.PHONY: install-native
|
||||
###install-native: build-native
|
||||
### true
|
||||
### #adb install -r ./example.app.apk
|
||||
###
|
||||
###.PHONY: clean-all
|
||||
###clean-all: clean-docker clean-apk
|
||||
###
|
||||
###.PHONY: clean-docker
|
||||
###clean-docker:
|
||||
### rm docker-compose-build.log || true
|
||||
### docker-compose down --remove-orphans --rmi all
|
||||
###
|
||||
###.PHONY: clean-apk
|
||||
###clean-apk:
|
||||
### cd apk && $(MAKE) clean
|
||||
###
|
||||
###
|
||||
docker-compose-build.log: Dockerfile compose.yml
|
||||
docker-compose down --remove-orphans --rmi all
|
||||
BUILDKIT_PROGRESS=plain docker-compose build | tee docker-compose-build.log
|
||||
|
||||
|
||||
some thing:
|
||||
echo was $@
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
services:
|
||||
compile:
|
||||
hostname: thinkbox
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
YESACCEPT: ${YESACCEPT:-}
|
||||
stop_grace_period: 1s
|
||||
environment:
|
||||
XAUTHORITY: /root/.Xauthority
|
||||
DISPLAY: ":0"
|
||||
volumes:
|
||||
- ./apps:/apps
|
||||
- /home/alex/.Xauthority:/root/.Xauthority:ro
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue