-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup_android.bat
More file actions
64 lines (57 loc) · 1.7 KB
/
Copy pathsetup_android.bat
File metadata and controls
64 lines (57 loc) · 1.7 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
git > nul
if %errorlevel% == 9009 goto nogit
rem we need admin for symlinks for some reason
net session > nul
if not %errorlevel% == 0 goto noadmin
cd /d %~dp0
call copy_assets
cd android-project\app\jni
git clone --recursive https://github.com/libsdl-org/SDL.git
cd SDL
git checkout release-3.4.8
cd ..
git clone --recursive https://github.com/libsdl-org/SDL_image.git
cd SDL_image
git checkout release-3.4.4
cd ..
git clone --recursive https://github.com/libsdl-org/SDL_ttf.git
REM git clone --recursive https://github.com/libsdl-org/SDL_net.git
REM *use the above when SDL fixes android build
git clone --recursive https://github.com/counter185/SDL_net-android21.git SDL_net
git clone --recursive https://github.com/madler/zlib.git
git clone --recursive https://github.com/AOMediaCodec/libavif.git
git clone --recursive https://github.com/EasyRPG/liblcf.git
cd src
mklink /d voidsprite "..\..\..\..\freesprite"
exit
:noadmin
echo --------------------------
echo Please launch this script with admin privileges
pause
exit
:nogit
echo --------------------------
echo git is not installed.
echo Install it now? [Y/N]
set /p "ch=>"
if "%ch%" == "Y" goto psinstallgit
if "%ch%" == "y" goto psinstallgit
pause
exit
:wingetdoesntfeellikeit
echo Failed to install git through winget
echo Download git manually at https://git-scm.com/downloads
pause
exit
:psinstallgit
for /f %%i in ('winget -v') do set wingetversion=%%i
rem if winget is older than 1.6 it will always fail because the cdn url is outdated
winget install -e --id Git.Git
if %errorlevel% == 9009 goto wingetdoesntfeellikeit
if %errorlevel% == -1073741819 goto wingetdoesntfeellikeit
pause
echo Git should now be installed
echo Restart this script.
pause
exit