forked from microsoft/cpp_client_telemetry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ide.cmd
22 lines (19 loc) · 789 Bytes
/
ide.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
pushd "%~dp0"
for /F "usebackq skip=2 tokens=1-2*" %%A in (`reg.exe QUERY "HKLM\Software\Android Studio" /v "Path" 2^>nul`) do (
set AndroidStudioPath=%%C
)
echo Android Studio Path: %AndroidStudioPath%
set "PATH=%AndroidStudioPath%\bin;%PATH%"
if "%ANDROID_SDK_ROOT%" == "" set "ANDROID_SDK_ROOT=C:\Android\android-sdk"
if "%ANDROID_HOME%" == "" set "ANDROID_HOME=%ANDROID_SDK_ROOT%"
if "%ANDROID_NDK_VERSION%"== "" set "ANDROID_NDK_VERSION=21.1.6352462"
if "%ANDROID_NDK%" == "" set "ANDROID_NDK=%ANDROID_SDK_ROOT%\ndk\%ANDROID_NDK_VERSION%"
if "%ANDROID_NDK_HOME%" == "" set "ANDROID_NDK_HOME=%ANDROID_NDK%"
where studio.bat >NUL 2>NUL
if %ERRORLEVEL% neq 0 (
echo Please add Android Studio "studio.bat" to PATH
) else (
call studio.bat %~dp0
)
popd