mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-08 04:41:45 +08:00
Opt: Removed deprecated code
This commit is contained in:
36
alas.bat
36
alas.bat
@@ -2,13 +2,13 @@
|
|||||||
:: Alas Run Tool v3
|
:: Alas Run Tool v3
|
||||||
:: Author: whoamikyo (https://kyo.ninja)
|
:: Author: whoamikyo (https://kyo.ninja)
|
||||||
:: Version: 3.0
|
:: Version: 3.0
|
||||||
:: Last updated: 2020-08-22
|
:: Last updated: 2020-08-23
|
||||||
:: >>> Get updated from: https://github.com/LmeSzinc/AzurLaneAutoScript <<<
|
:: >>> Get updated from: https://github.com/LmeSzinc/AzurLaneAutoScript <<<
|
||||||
@echo off
|
@echo off
|
||||||
pushd "%~dp0"
|
pushd "%~dp0"
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
set "Version=3.0"
|
set "Version=3.0"
|
||||||
set "lastUpdated=2020-08-22"
|
set "lastUpdated=2020-08-23"
|
||||||
:: Remote repo
|
:: Remote repo
|
||||||
set "Remoterepo=https://raw.githubusercontent.com/LmeSzinc/AzurLaneAutoScript/master/toolkit"
|
set "Remoterepo=https://raw.githubusercontent.com/LmeSzinc/AzurLaneAutoScript/master/toolkit"
|
||||||
|
|
||||||
@@ -53,10 +53,10 @@ rem echo Language: %Language% & echo Region: %Region% & echo SystemType: %System
|
|||||||
rem echo http_proxy: %http_proxy% & echo https_proxy: %https_proxy%
|
rem echo http_proxy: %http_proxy% & echo https_proxy: %https_proxy%
|
||||||
echo DeployMode: %DeployMode%
|
echo DeployMode: %DeployMode%
|
||||||
rem echo KeepLocalChanges: %KeepLocalChanges%
|
rem echo KeepLocalChanges: %KeepLocalChanges%
|
||||||
rem echo RealtimeMode: %RealtimeMode%
|
echo RealtimeMode: %RealtimeMode%
|
||||||
rem echo FirstRun: %FirstRun%
|
echo FirstRun: %FirstRun%
|
||||||
rem echo IsUsingGit: %IsUsingGit%
|
rem echo IsUsingGit: %IsUsingGit%
|
||||||
rem echo Serial: %Serial%
|
echo Serial: %Serial%
|
||||||
setLocal EnableDelayedExpansion
|
setLocal EnableDelayedExpansion
|
||||||
set "STR=Alas Run Tool %Version%^"
|
set "STR=Alas Run Tool %Version%^"
|
||||||
set "SIZE=100"
|
set "SIZE=100"
|
||||||
@@ -266,11 +266,10 @@ echo. & echo [0] Return to the Main Menu
|
|||||||
echo. & echo [1] Select Download Region
|
echo. & echo [1] Select Download Region
|
||||||
echo. & echo [2] Set Global Proxy
|
echo. & echo [2] Set Global Proxy
|
||||||
echo. & echo [3] Set SERIAL (For ADB connect)
|
echo. & echo [3] Set SERIAL (For ADB connect)
|
||||||
echo. & echo [4] (Disable/Enable) Network connection test while updating
|
echo. & echo [4] (Disable/Enable) Realtime Connection Mode (Only Bluestacks Beta)
|
||||||
echo. & echo [5] (Disable/Enable) Realtime Connection Mode (Only Bluestacks Beta)
|
echo. & echo [5] (Disable/Enable) Keep local changes
|
||||||
echo. & echo [6] (Disable/Enable) Keep local changes
|
echo. & echo [6] Change default Branch to update (master/dev)
|
||||||
echo. & echo [7] Change default Branch to update (master/dev)
|
echo. & echo [7] Reset Settings
|
||||||
echo. & echo [8] Reset Settings
|
|
||||||
echo. & echo.
|
echo. & echo.
|
||||||
echo ====================================================================================================
|
echo ====================================================================================================
|
||||||
set opt2_choice=-1
|
set opt2_choice=-1
|
||||||
@@ -280,11 +279,10 @@ if "%opt2_choice%"=="0" goto MENU
|
|||||||
if "%opt2_choice%"=="1" goto Region_setting
|
if "%opt2_choice%"=="1" goto Region_setting
|
||||||
if "%opt2_choice%"=="2" goto Proxy_setting
|
if "%opt2_choice%"=="2" goto Proxy_setting
|
||||||
if "%opt2_choice%"=="3" goto Serial_setting
|
if "%opt2_choice%"=="3" goto Serial_setting
|
||||||
if "%opt2_choice%"=="4" goto NetworkTest_setting
|
if "%opt2_choice%"=="4" goto Realtime_mode
|
||||||
if "%opt2_choice%"=="5" goto Realtime_mode
|
if "%opt2_choice%"=="5" goto Keep_local_changes
|
||||||
if "%opt2_choice%"=="6" goto Keep_local_changes
|
if "%opt2_choice%"=="6" goto Branch_setting
|
||||||
if "%opt2_choice%"=="7" goto Branch_setting
|
if "%opt2_choice%"=="7" goto Reset_setting
|
||||||
if "%opt2_choice%"=="8" goto Reset_setting
|
|
||||||
echo Please input a valid option.
|
echo Please input a valid option.
|
||||||
goto ReturnToSetting
|
goto ReturnToSetting
|
||||||
|
|
||||||
@@ -413,14 +411,6 @@ if /i "%opt6_opt6_choice%"=="Y" (
|
|||||||
) else ( echo Invalid input. Cancelled. )
|
) else ( echo Invalid input. Cancelled. )
|
||||||
goto ReturnToSetting
|
goto ReturnToSetting
|
||||||
|
|
||||||
:NetworkTest_setting
|
|
||||||
call command\Config.bat NetTest
|
|
||||||
goto ReturnToSetting
|
|
||||||
|
|
||||||
:Upgrade_setting
|
|
||||||
call command\Config.bat UpgradeOnlyViaGitHub
|
|
||||||
goto ReturnToSetting
|
|
||||||
|
|
||||||
rem ================= FUNCTIONS =================
|
rem ================= FUNCTIONS =================
|
||||||
|
|
||||||
:ReturnToSetting
|
:ReturnToSetting
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ if NOT exist %cfg_File% (
|
|||||||
( echo Language = %Language%
|
( echo Language = %Language%
|
||||||
echo Region = %Region%
|
echo Region = %Region%
|
||||||
echo SystemType = %SystemType%
|
echo SystemType = %SystemType%
|
||||||
echo NetTest = enable
|
echo NetTest = disable
|
||||||
echo KeepLocalChanges = disable
|
echo KeepLocalChanges = disable
|
||||||
echo RealtimeMode = disable
|
echo RealtimeMode = disable
|
||||||
echo AdbConnect = enable
|
echo AdbConnect = disable
|
||||||
echo Serial = %Serial%
|
echo Serial = %Serial%
|
||||||
echo FirstRun = %FirstRun%
|
echo FirstRun = %FirstRun%
|
||||||
echo IsUsingGit = %IsUsingGit%
|
echo IsUsingGit = %IsUsingGit%
|
||||||
@@ -43,19 +43,17 @@ copy %cfg_File% %cfg_File%.bak > NUL
|
|||||||
type NUL > %cfg_File%
|
type NUL > %cfg_File%
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
:Config_Common2
|
:Config_Common2
|
||||||
del /Q %cfg_File%.bak >NUL 2>NUL
|
del /Q %cfg_File%.bak >NUL 2>NUL
|
||||||
cd ..
|
cd ..
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
:: There are 3 types of configuration items: assignable, toggle-able, or both.
|
:: There are 3 types of configuration items: assignable, toggle-able, or both.
|
||||||
:: Assignable : You should call it with an argument `%2`.
|
:: Assignable : You should call it with an argument `%2`.
|
||||||
:: Toggle-able: No argument `%2`. If it is already enabled, set it to disabled and vice versa.
|
:: Toggle-able: No argument `%2`. If it is already enabled, set it to disabled and vice versa.
|
||||||
:: Both : If you call it without argument `%2`, toggle it. Otherwise assign it.
|
:: Both : If you call it without argument `%2`, toggle it. Otherwise assign it.
|
||||||
|
|
||||||
:: Toggle-able: SystemType, ProxyHint, FFmpeg, NetTest, UpgradeOnlyViaGitHub
|
:: Toggle-able: SystemType
|
||||||
:: Assignable : Language, Region, ProxyHost, HttpPort, HttpsPort
|
:: Assignable : Language, Region, ProxyHost, HttpPort, HttpsPort
|
||||||
:: Both : Proxy
|
:: Both : Proxy
|
||||||
|
|
||||||
@@ -131,19 +129,6 @@ for /f "delims=" %%i in (%cfg_File%.bak) do (
|
|||||||
)
|
)
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Config_NetTest
|
|
||||||
for /f "delims=" %%i in (%cfg_File%.bak) do (
|
|
||||||
set "cfg_Temp=%%i"
|
|
||||||
set "cfg_Content=!cfg_Temp!"
|
|
||||||
if "!cfg_Temp!"=="NetTest = disable" ( set "cfg_Content=NetTest = enable" && set "cfg_State=enable" )
|
|
||||||
if "!cfg_Temp!"=="NetTest = enable" ( set "cfg_Content=NetTest = disable" && set "cfg_State=disable" )
|
|
||||||
echo !cfg_Content!>>%cfg_File%
|
|
||||||
)
|
|
||||||
if "%cfg_State%"=="enable" (
|
|
||||||
echo Network connection test while upgrading: enabled ^(DEFAULT^)
|
|
||||||
) else echo Network connection test while upgrading: disabled
|
|
||||||
goto :eof
|
|
||||||
|
|
||||||
:Config_IsUsingGit
|
:Config_IsUsingGit
|
||||||
for /f "delims=" %%i in (%cfg_File%.bak) do (
|
for /f "delims=" %%i in (%cfg_File%.bak) do (
|
||||||
set "cfg_Content=%%i"
|
set "cfg_Content=%%i"
|
||||||
@@ -207,17 +192,4 @@ for /f "delims=" %%i in (%cfg_File%.bak) do (
|
|||||||
)
|
)
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Config_UpgradeOnlyViaGitHub
|
|
||||||
for /f "delims=" %%i in (%cfg_File%.bak) do (
|
|
||||||
set "cfg_Temp=%%i"
|
|
||||||
set "cfg_Content=!cfg_Temp!"
|
|
||||||
if "!cfg_Temp!"=="UpgradeOnlyViaGitHub = disable" ( set "cfg_Content=UpgradeOnlyViaGitHub = enable" && set "cfg_State=enable" )
|
|
||||||
if "!cfg_Temp!"=="UpgradeOnlyViaGitHub = enable" ( set "cfg_Content=UpgradeOnlyViaGitHub = disable" && set "cfg_State=disable" )
|
|
||||||
echo !cfg_Content!>>%cfg_File%
|
|
||||||
)
|
|
||||||
if "%cfg_State%"=="enable" (
|
|
||||||
echo Upgrade you-get via: GitHub_Releases
|
|
||||||
) else echo Upgrade you-get via: PyPI.org ^(DEFAULT^)
|
|
||||||
goto :eof
|
|
||||||
|
|
||||||
rem ================= End of File =================
|
rem ================= End of File =================
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ goto :eof
|
|||||||
:GenerateDownloadBatch_Common2
|
:GenerateDownloadBatch_Common2
|
||||||
( REM :: Show the instructions
|
( REM :: Show the instructions
|
||||||
echo title Alas Console Debugger
|
echo title Alas Console Debugger
|
||||||
echo echo Alas Console Debugger
|
echo echo This is an console to run adb, git, python and pip.
|
||||||
echo echo adb devices
|
echo echo adb devices
|
||||||
echo echo git log
|
echo echo git log
|
||||||
echo echo python -V
|
echo echo python -V
|
||||||
|
|||||||
@@ -11,10 +11,8 @@
|
|||||||
call :Import_%~1
|
call :Import_%~1
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
rem ================= FUNCTIONS =================
|
rem ================= FUNCTIONS =================
|
||||||
|
|
||||||
|
|
||||||
:: %cd%: "%root%"
|
:: %cd%: "%root%"
|
||||||
:: Get %Language% , %Region% , %SystemType%
|
:: Get %Language% , %Region% , %SystemType%
|
||||||
:Import_Main
|
:Import_Main
|
||||||
@@ -77,6 +75,26 @@ echo =========================================================================
|
|||||||
echo Press any to continue...
|
echo Press any to continue...
|
||||||
pause > NUL
|
pause > NUL
|
||||||
|
|
||||||
|
rem set template=%root%\config\template.ini
|
||||||
|
rem setlocal enabledelayedexpansion
|
||||||
|
rem for /f "delims=" %%i in (!template!) do (
|
||||||
|
rem set line=%%i
|
||||||
|
rem if "x!line:~0,9!"=="xserial = " (
|
||||||
|
rem set serial=!line:~9!
|
||||||
|
rem )
|
||||||
|
rem )
|
||||||
|
rem echo =========================================================================
|
||||||
|
rem echo Old Serial: %serial%
|
||||||
|
rem echo New Serial: %serial_input%
|
||||||
|
rem echo =========================================================================
|
||||||
|
rem echo Press any to continue...
|
||||||
|
rem pause > NUL
|
||||||
|
rem for /f "delims=" %%i in ('type "%template%" ^& break ^> "%template%" ') do (
|
||||||
|
rem set line=%%i
|
||||||
|
rem >>"%template%" echo(!line:%serial%=%serial_input%!
|
||||||
|
rem )
|
||||||
|
rem )
|
||||||
|
rem endlocal
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ call :Log_init
|
|||||||
call :GetPackagesInfo
|
call :GetPackagesInfo
|
||||||
( echo pipVer: %log_pipVer%
|
( echo pipVer: %log_pipVer%
|
||||||
echo adbutilsVer: %log_adbutilsVer%
|
echo adbutilsVer: %log_adbutilsVer%
|
||||||
echo python_Levenshtein: %log_LevenshteinVer%
|
|
||||||
echo numpy: %log_numpyVer%
|
echo numpy: %log_numpyVer%
|
||||||
echo scipy: %log_scipyVer%
|
echo scipy: %log_scipyVer%
|
||||||
echo pillow: %log_pillowVer%
|
echo pillow: %log_pillowVer%
|
||||||
@@ -34,6 +33,7 @@ echo mxnet: %log_mxnetVer%
|
|||||||
echo cnocr: %log_cnocrVer%
|
echo cnocr: %log_cnocrVer%
|
||||||
echo gooey: %log_gooeyVer%
|
echo gooey: %log_gooeyVer%
|
||||||
echo colored: %log_coloredVer%
|
echo colored: %log_coloredVer%
|
||||||
|
echo Python Levenshtein: %log_LevenshteinVer%
|
||||||
echo pyocr: %log_pyocrVer%) >> %deploy_log_file%
|
echo pyocr: %log_pyocrVer%) >> %deploy_log_file%
|
||||||
call :Log_common
|
call :Log_common
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|||||||
Reference in New Issue
Block a user