Created Project Environment

This commit is contained in:
Maddox Werts 2024-08-09 23:44:21 -04:00
parent 94bc26c5ea
commit fdfa49fd36
6 changed files with 47 additions and 0 deletions

2
.gitignore vendored
View file

@ -14,3 +14,5 @@ Cargo.lock
# MSVC Windows builds of rustc generate these, which store debugging information # MSVC Windows builds of rustc generate these, which store debugging information
*.pdb *.pdb
# Executables
**.fap

0
build/.empty Normal file
View file

26
docker/Dockerfile Normal file
View file

@ -0,0 +1,26 @@
# BACKEND #
## Parent Container
FROM debian
## Creating Directories
RUN mkdir /src /app /tmp/src
WORKDIR /tmp/src
## Copying compile script
COPY docker/flipper-dev.sh /bin/flipper-dev.sh
RUN chmod +x /bin/flipper-dev.sh
## Installing Requisites
RUN apt update -y
RUN apt install -y wget curl build-essential
## Downloading RUSTUP
RUN wget https://sh.rustup.rs -O /tmp/rustup.sh
RUN chmod +x /tmp/rustup.sh
RUN /tmp/rustup.sh -y
## Flipper-Zero Build Target
RUN /root/.cargo/bin/rustup target add thumbv7em-none-eabihf
# RUNTIME #
CMD "/bin/flipper-dev.sh"

8
docker/flipper-dev.sh Normal file
View file

@ -0,0 +1,8 @@
# Copying source code into working directory
cp -r /src/* ./
# Building the Project
cargo build
# Copy the .FAP file to the app directory
cp ./target/thumbv7em-none-eabihf/debug/*.fap /app/

6
scripts/build.sh Executable file
View file

@ -0,0 +1,6 @@
clear
echo "Building Project"
docker run --rm -it \
-v "$PWD/project:/src:ro,z" \
-v "$PWD/build:/app:Z" \
flipper-dev

5
scripts/docker.sh Executable file
View file

@ -0,0 +1,5 @@
clear
echo "Building Docker Image"
docker build . \
-t flipper-dev \
-f docker/Dockerfile