From 311de5e98890b119d41a0cead5f767c3367f621d Mon Sep 17 00:00:00 2001 From: Giani Statie Date: Wed, 16 Oct 2024 19:37:34 +0300 Subject: [PATCH] feat: added examples download script for windows --- Makefile | 10 +++++++++- scripts/get_all_examples_from_hub.bat | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 scripts/get_all_examples_from_hub.bat diff --git a/Makefile b/Makefile index b939b2aa..4ec7bae1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,12 @@ .PHONY: quality style test unity-test +# Switch between the download scripts based on OS +ifeq ($(OS),Windows_NT) + SCRIPT = scripts\\get_all_examples_from_hub.bat +else + SCRIPT = bash scripts/get_all_examples_from_hub.sh +endif + # Format source code automatically style: black --line-length 120 --target-version py310 tests godot_rl examples @@ -15,7 +22,8 @@ test: python -m pytest tests/ download_examples: - bash scripts/get_all_examples_from_hub.sh + @echo "Running script: $(SCRIPT)" + $(SCRIPT) wheel: rm dist/* diff --git a/scripts/get_all_examples_from_hub.bat b/scripts/get_all_examples_from_hub.bat new file mode 100644 index 00000000..1e3cfcee --- /dev/null +++ b/scripts/get_all_examples_from_hub.bat @@ -0,0 +1,14 @@ +REM HF login (TODO) + +set EXAMPLE_NAMES=BallChase FPS FlyBy JumperHard Racer Ships Racer ItemSortingCart AirHockey "3DCarParking" DownFall + +for %%E in (%EXAMPLE_NAMES%) do ( + echo Downloading example: %%E + REM Assuming 'gdrl.env_from_hub' is a command you have set up on your system + gdrl.env_from_hub -r edbeeching/godot_rl_%%E + + REM Skipping the chmod equivalent, as it's not required in Windows + REM If execution permission needed for binaries, consider icacls or similar. +) + +pause