added a doc command to the run script

This commit is contained in:
ZennDev1337 2023-08-16 14:46:00 +02:00
parent 747ec6e9c9
commit 61a1052b3e
3 changed files with 7 additions and 4 deletions

View file

@ -1,9 +1,6 @@
#![no_std] #![no_std]
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]
#[no_mangle]
pub static ArduboyTones_Library: u8 = 1;
//Include the Arduboy Library //Include the Arduboy Library
#[allow(unused_imports)] #[allow(unused_imports)]
use arduboy_rust::prelude::*; use arduboy_rust::prelude::*;

5
run
View file

@ -4,7 +4,10 @@ option=$1
if [ -z "$option" ] if [ -z "$option" ]
then then
cargo build -p game --release && cp ./target/arduboy/release/libgame.a ./Wrapper-Project/lib/libgame.a && cd Wrapper-Project/ && pio run -v -t upload && cp ./.pio/build/arduboy/firmware.hex ./.pio/build/game.hex && pio run -t clean && rm lib/libgame.a && cd .. cargo doc -p arduboy-rust && rm -r ./docs/doc/ && cp -r ./target/arduboy/doc ./docs/
elif [ "$option" = "doc" ]
then
cargo build -p snake --release && cp ./target/arduboy/release/libsnake.a ./Wrapper-Project/lib/libgame.a && cd Wrapper-Project/ && pio run -v -t upload && cp ./.pio/build/arduboy/firmware.hex ./.pio/build/snake.hex && pio run -t clean && rm lib/libgame.a && cd ..
elif [ "$option" = "snake" ] elif [ "$option" = "snake" ]
then then
cargo build -p snake --release && cp ./target/arduboy/release/libsnake.a ./Wrapper-Project/lib/libgame.a && cd Wrapper-Project/ && pio run -v -t upload && cp ./.pio/build/arduboy/firmware.hex ./.pio/build/snake.hex && pio run -t clean && rm lib/libgame.a && cd .. cargo build -p snake --release && cp ./target/arduboy/release/libsnake.a ./Wrapper-Project/lib/libgame.a && cd Wrapper-Project/ && pio run -v -t upload && cp ./.pio/build/arduboy/firmware.hex ./.pio/build/snake.hex && pio run -t clean && rm lib/libgame.a && cd ..

View file

@ -9,6 +9,9 @@ if [%option%]==[] (
if %option%==snake ( if %option%==snake (
goto :run goto :run
) else if %option%==doc (
powershell -Command "cargo doc -p arduboy-rust; rm -r ./docs/doc/; cp -r ./target/arduboy/doc ./docs/"
goto :eof
) else if %option%==pong ( ) else if %option%==pong (
goto :run goto :run
) else if %option%==rustacean ( ) else if %option%==rustacean (