Ensure Win buildscript works
This commit is contained in:
+7
-98
@@ -11,32 +11,6 @@ setlocal
|
||||
call :setESC
|
||||
|
||||
cls
|
||||
echo.
|
||||
echo %ESC%[1;4mBuild dex...%ESC%[0m
|
||||
echo.
|
||||
call gradlew clean
|
||||
del app\src\main\assets\version.properties
|
||||
del smali\assets\version.properties
|
||||
call gradlew versionFile
|
||||
call gradlew assembleRelease
|
||||
if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo %ESC%[1;4mExport dex...%ESC%[0m
|
||||
echo.
|
||||
call gradlew exportDex
|
||||
if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo %ESC%[1;4mMove dex6 to source dir...%ESC%[0m
|
||||
echo.
|
||||
@@ -45,7 +19,7 @@ if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
call :pauseThenExit
|
||||
)
|
||||
|
||||
echo.
|
||||
@@ -78,7 +52,7 @@ if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
call :pauseThenExit
|
||||
)
|
||||
del classes6.dex
|
||||
del classes8.dex
|
||||
@@ -92,81 +66,16 @@ if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
call :pauseThenExit
|
||||
)
|
||||
|
||||
|
||||
:startinstall
|
||||
SET choice=
|
||||
SET /p choice=Do you want to install APK?:
|
||||
|
||||
IF /i '%choice%'=='Y' GOTO yesinst
|
||||
IF /i '%choice%'=='yes' GOTO yesinst
|
||||
IF /i '%choice%'=='Yes' GOTO yesinst
|
||||
IF /i '%choice%'=='y' GOTO yesinst
|
||||
|
||||
IF /i '%choice%'=='N' GOTO noinst
|
||||
IF /i '%choice%'=='No' GOTO noinst
|
||||
IF /i '%choice%'=='n' GOTO noinst
|
||||
IF /i '%choice%'=='no' GOTO noinst
|
||||
|
||||
ECHO "%choice%" doesn't exist
|
||||
|
||||
ECHO.
|
||||
GOTO startinstall
|
||||
|
||||
:yesinst
|
||||
echo.
|
||||
echo %ESC%[1;4mInstall apk...%ESC%[0m
|
||||
echo.
|
||||
call adb install ../scripts/VTLite.apk
|
||||
if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
:noinst
|
||||
|
||||
|
||||
:startapp
|
||||
SET choice=
|
||||
SET /p choice=Do you want to start app?:
|
||||
|
||||
IF /i '%choice%'=='Y' GOTO start
|
||||
IF /i '%choice%'=='yes' GOTO start
|
||||
IF /i '%choice%'=='Yes' GOTO start
|
||||
IF /i '%choice%'=='y' GOTO start
|
||||
|
||||
IF /i '%choice%'=='N' GOTO skip
|
||||
IF /i '%choice%'=='No' GOTO skip
|
||||
IF /i '%choice%'=='n' GOTO skip
|
||||
IF /i '%choice%'=='no' GOTO skip
|
||||
|
||||
ECHO "%choice%" doesn't exist
|
||||
|
||||
ECHO.
|
||||
GOTO startapp
|
||||
|
||||
:start
|
||||
echo.
|
||||
echo %ESC%[1;4mOpen VTL...%ESC%[0m
|
||||
echo.
|
||||
call adb shell monkey -p com.vtosters.lite -c android.intent.category.LAUNCHER 1
|
||||
if "%ERRORLEVEL%" == "0" (
|
||||
echo %ESC%[92mSuccessful%ESC%[0m
|
||||
) else (
|
||||
echo %ESC%[31mFailed%ESC%[0m
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
:skip
|
||||
|
||||
:setESC
|
||||
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
|
||||
set ESC=%%b
|
||||
exit /B 0
|
||||
)
|
||||
exit /B 0
|
||||
exit
|
||||
|
||||
:pauseThenExit
|
||||
pause
|
||||
Exit /B 1
|
||||
Reference in New Issue
Block a user