added a doc command to the run script
This commit is contained in:
parent
747ec6e9c9
commit
61a1052b3e
3 changed files with 7 additions and 4 deletions
|
@ -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
5
run
|
@ -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 ..
|
||||||
|
|
3
run.bat
3
run.bat
|
@ -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 (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue