forked from godotengine/godot-cpp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen.bat
31 lines (24 loc) · 1.03 KB
/
open.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
set DOWNLOAD_URL=https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_win64.exe.zip
set UNZIP_DIR=.godot-editor
REM Create the target directory if it doesn't exist
if not exist %UNZIP_DIR% mkdir %UNZIP_DIR%
REM Check if the executable already exists
if not exist %UNZIP_DIR%\Godot_v4.3-stable_win64.exe (
pushd %UNZIP_DIR%
REM Download the Godot editor zip file
curl -L -o godot-editor.zip %DOWNLOAD_URL%
REM Unzip the downloaded file into the target directory
powershell -Command "Expand-Archive -Path godot-editor.zip -DestinationPath ."
REM Clean up the downloaded zip file
del godot-editor.zip
popd
)
REM Prompt the user to choose between console or regular executable
choice /C YN /M "Do you want to open the Godot Editor in Console Mode?"
REM Open the chosen executable
if errorlevel 2 (
call %UNZIP_DIR%\Godot_v4.3-stable_win64.exe --editor --path %CD%\demo\client
) else (
%UNZIP_DIR%\Godot_v4.3-stable_win64_console.exe --editor --path %CD%\demo\client
)