From d1c320cc6e3fe983d9a9b39834cb3591f797875f Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 10:26:06 -0300 Subject: [PATCH 1/8] Fix: fix CRLF .bat files --- .gitattributes | 1 + Easy_Install-V2.bat | 379 -------------------------------------------- alas.bat | 125 --------------- dev_tools.bat | 221 -------------------------- 4 files changed, 1 insertion(+), 725 deletions(-) create mode 100644 .gitattributes delete mode 100644 Easy_Install-V2.bat delete mode 100644 alas.bat delete mode 100644 dev_tools.bat diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..0b2229721 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.bat text eol=crlf \ No newline at end of file diff --git a/Easy_Install-V2.bat b/Easy_Install-V2.bat deleted file mode 100644 index ca69829d7..000000000 --- a/Easy_Install-V2.bat +++ /dev/null @@ -1,379 +0,0 @@ -@SETLOCAL EnableExtensions EnableDelayedExpansion -@echo off -pushd "%~dp0" -:: VARIABLES INSTALL - -SET CMD=%SystemRoot%\system32\cmd.exe -SET LMESZINC=https://github.com/LmeSzinc/AzurLaneAutoScript.git -SET WHOAMIKYO=https://github.com/whoamikyo/AzurLaneAutoScript.git - -rem SET ROOT_UPPER=%~dp0 -rem SET ADB_PATH=%AZURLANESCRIPT%\python-3.7.6.amd64\Lib\site-packages\adbutils\binaries - -:: ----------------------------------------------------------------------------- -:: Make sure we're running with administrator privileges -echo. -echo :: Checking For Administrator Elevation... -echo. -net session >nul 2>&1 -if %errorLevel% == 0 ( - echo Elevation found! Proceeding... - goto menu -) else ( - echo :: You are NOT running as Administrator - echo. - echo Right-click and select ^'Run as Administrator^' and try again. - echo Press any key to exit... - pause > NUL - exit -) -REM PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 -:: ----------------------------------------------------------------------------- - -:: Make sure the second path exists. The first path won't be created until the second script is run -rem IF NOT EXIST !ADB_PATH! (ECHO Path not found: %ADB_PATH% && GOTO ExitBatch) -:: ----------------------------------------------------------------------------- - -:: Add paths -rem CALL :AddPath %ADB_PATH% -rem CALL :AddPath %GIT_PATH% -rem CALL :AddPath %AZURLANESCRIPT% -rem CALL :AddPath %ROOT_UPPER% -pause - -:: Branch to UpdateEnv if we need to update -REM IF DEFINED UPDATE (GOTO UpdateEnv) - -REM GOTO ExitBatch -:: ----------------------------------------------------------------------------- - -REM :UpdateEnv -REM ECHO Making updated PATH go live . . . -REM REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1 -REM setx TEMPVAR 1 > nul 2>&1 -REM REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1 -REM IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer) -REM GOTO ExitBatch - -:: ----------------------------------------------------------------------------- -goto menu -:menu - cls - echo. - echo :: Easy install for ALAS - echo. - echo This script will install Python 3.7.6 + requirements.txt + ADB + GIT + CHOCOLATEY - echo. - echo :: For fresh install, Run step "1" and "2" - echo. - echo 1.Python 3.7.6 + ADB + GIT + requirements.txt - echo 2.Clone repository (Download the latest version from LmeSzinc repository) - echo 3.Programs (ADB + GIT Alternative way with CHOCOLATEY) - echo 4.Updater ONLY (Do not update if you are doing a fresh install) - echo. - echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER - echo. - echo Install in order - echo. - echo :: Type a 'number' and press ENTER - echo :: Type 'exit' to quit - echo. - set /P menu= - if %menu%==1 GOTO python - if %menu%==2 GOTO clone - if %menu%==3 GOTO programs - if %menu%==4 GOTO updater - if %menu%==exit GOTO EOF - - else ( - cls - echo. - echo :: Incorrect Input Entered - echo. - echo Please type a 'number' or 'exit' - echo Press any key to return to the menu... - echo. - pause > NUL - goto menu - ) -:: ----------------------------------------------------------------------------- -:programs -cls - echo. - echo :: Checking For Internet Connection... - echo. - timeout /t 2 /nobreak > NUL - - ping -n 1 archlinux.org -w 20000 >nul - - if %errorlevel% == 0 ( - echo Internet Connection Found! Proceeding.. - ) else ( - echo :: You are NOT connected to the Internet - echo. - echo Please enable your Networking adapter and connect to try again. - echo Press any key to retry... - pause > NUL - goto packages - ) - cls - echo. - echo :: Installing Packages ADB + GIT + CHOCOLATEY - echo :: If you already have any of these packages installed - echo :: you will probably have an error installing that package - echo :: you can try to proceed anyway - echo :: it might work if there is nothing wrong with the previous installation - echo :: if you have problems I suggest uninstalling all packages mentioned in the control panel (windows) - echo. - timeout /t 1 /nobreak > NUL - SET PATH=%PATH%;%PROGRAMDATA%\chocolatey\lib\adb\tools\platform-tools\;%PROGRAMFILES%\Git\cmd;%PROGRAMDATA%\chocolatey\bin - echo Installing chocolatey on this machine - @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))">>chocolatey-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin - ) - echo Installing Essentials programs, It may take - @powershell -NoProfile -ExecutionPolicy Bypass -Command "choco install -y --force --allow-empty-checksums adb git">>Essentials-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log - ) -call refreshenv -goto menu -:: ----------------------------------------------------------------------------- -:: killing adb server -:killadb - call %ADB_PATH% --version >nul - if %errorlevel% == 0 ( - echo ADB Found! Proceeding.. - echo killing adb server.. - call %ADB_PATH% kill-server > nul 2>&1 - goto menu - ) else ( - echo :: ADB not found, maybe there was an installation issue, try opening another CMD window and type choco install adb - echo. - pause > NUL - goto menu - ) -:: ----------------------------------------------------------------------------- -:clone -SET AZURLANESCRIPT=%~dp0AzurLaneAutoScript -SET GIT_PATH=%AZURLANESCRIPT%\python-3.7.6.amd64\Git\cmd -SET GIT=%GIT_PATH%\git.exe - call %GIT% --version >nul - if %errorlevel% == 0 ( - echo Cloning repository - echo GIT Found! Proceeding.. - echo Cloning repository... - cd %AZURLANESCRIPT% - echo Deleting folder unused files - for /D %%D in ("*") do ( - if /I not "%%~nxD"=="python-3.7.6.amd64" rd /S /Q "%%~D" - ) -for %%F in ("*") do ( - del "%%~F" - ) - echo ## initializing.. - call %GIT% init - echo ## adding origin.. - call %GIT% remote add origin %LMESZINC% - echo ## pulling project... - call %GIT% pull origin master - echo ## setting default branch... - call %GIT% branch --set-upstream-to=origin/master master - call %GIT% remote add whoamikyo %WHOAMIKYO% - echo The installation was successful - echo Press any key to proceed - pause > NUL - goto menu - ) else ( - echo :: Git not found, maybe there was an installation issue, try opening another CMD window and type choco install git - echo. - pause > NUL - ) -:: ----------------------------------------------------------------------------- -:python -cls -echo. -echo :: Python 3.7.6 + ADB + GIT + requirements.txt -echo. -echo. -SET PYTHON=%~dp0AzurLaneAutoScript/python-3.7.6.amd64/python.exe -SET AZURLANESCRIPT=%~dp0AzurLaneAutoScript -SET FILE_URL=https://gitlab.com/whoamikyo/alas-venv/-/raw/master/python.zip -SET FILE_DEST=%AZURLANESCRIPT%\pythonpackage.zip -if not exist %AZURLANESCRIPT% ( - echo WILL BE CREATED A FOLDER "AzurLaneAutoScript" - echo DO NOT RENAME THE FOLDER NEVER - mkdir %AZURLANESCRIPT% -) - if not exist "%FILE_DEST%" ( - echo Downloading with powershell: %FILE_URL% to %FILE_DEST% - powershell.exe -command "$webclient = New-Object System.Net.WebClient; $url = \"%FILE_URL%\"; $file = \"%FILE_DEST%\"; $webclient.DownloadFile($url,$file);" - echo Expanding with powershell to: %AZURLANESCRIPT% - powershell -command "$shell_app=new-object -com shell.application; $zip_file = $shell_app.namespace(\"%FILE_DEST%\"); $destination = $shell_app.namespace(\"%AZURLANESCRIPT%\"); $destination.Copyhere($zip_file.items())" - ) else ( - echo "pythonpackage.zip already downloaded, delete to re-download" - pause > NUL - ) - call %PYTHON% --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo initializing uiautomator2.. - call %PYTHON% -m uiautomator2 init - echo The installation was successful - echo Press any key to proceed - pause > NUL - goto menu - ) else ( - echo :: it was not possible to install uiautomator2 - echo :: make sure you have a folder "python-3.7.6.amd64" - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - goto menu - ) -:: ----------------------------------------------------------------------------- -:updater -SET GIT_ALAS=%~dp0python-3.7.6.amd64\Git\cmd\git.exe -SET GLP=%GIT_ALAS% -SET ALAS_PY=alas.py - if exist %ALAS_PY% ( - goto updater_menu - ) else ( - cd AzurLaneAutoScript - echo. - goto updater_menu - ) -:: ----------------------------------------------------------------------------- -:updater_menu - cls - echo. - echo :: This update only will work if you downloaded ALAS with this file using option 2. clone - echo. - echo ::DISCLAIMER:: - echo IF YOU GET THE FOLLOWING ERROR: - echo "error: Your local changes to the following files would be overwritten by merge:Easy_Install-V2.bat" - echo YOU NEED RE-DOWNLOAD ONLY Easy_Install-V2.bat FILE FROM REPOSITORY AND OVERWRITTEN THE OLD FOR NEW FILE - echo - echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER - echo. - echo 1. https://github.com/LmeSzinc/AzurLaneAutoScript (Main Repo, When in doubt, use it) - echo 2. https://github.com/whoamikyo/AzurLaneAutoScript (Mirrored Fork) - echo 3. https://github.com/whoamikyo/AzurLaneAutoScript (nightly build, dont use) - echo 4. Back to main menu - echo. - echo :: Type a 'number' and press ENTER - echo :: Type 'exit' to quit - echo. - - set /P choice= - if %choice%==1 GOTO LmeSzinc - if %choice%==2 GOTO whoamikyo - if %choice%==3 GOTO nightly - if %choice%==4 GOTO menu - if %choice%==exit GOTO EOF - - else ( - cls - echo. - echo :: Incorrect Input Entered - echo. - echo Please type a 'number' or 'exit' - echo Press any key to return to the menu... - echo. - pause > NUL - goto updater_menu - ) -:: ----------------------------------------------------------------------------- -:LmeSzinc - call %GLP% --version >nul - if %errorlevel% == 0 ( - echo GIT Found! Proceeding.. - echo Updating from LmeSzinc repository.. - call %GLP% fetch origin master - call %GLP% reset --hard origin/master - call %GLP% pull --ff-only origin master - echo DONE! - echo Press any key to proceed - pause > NUL - goto updater_menu - ) else ( - echo :: Git not detected, maybe there was an installation issue - echo check if you have this directory: - echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd - echo. - pause > NUL - ) -:: ----------------------------------------------------------------------------- -:whoamikyo - call %GLP% --version >nul - if %errorlevel% == 0 ( - echo GIT Found! Proceeding.. - echo Updating from whoamikyo repository.. - call %GLP% fetch whoamikyo master - call %GLP% reset --hard whoamikyo/master - call %GLP% pull --ff-only whoamikyo master - echo DONE! - echo Press any key to proceed - pause > NUL - goto updater_menu - ) else ( - echo :: Git not detected, maybe there was an installation issue - echo check if you have this directory: - echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd - pause > NUL - goto updater_menu - ) -:: ----------------------------------------------------------------------------- -:nightly - call %GLP% --version >nul - if %errorlevel% == 0 ( - echo GIT Found! Proceeding.. - echo Updating from whoamikyo nightly repository.. - call %GLP% fetch whoamikyo nightly - call %GLP% reset --hard whoamikyo/nightly - call %GLP% pull --ff-only whoamikyo nightly - echo Press any key to proceed - pause > NUL - goto updater_menu - ) else ( - echo :: Git not detected, maybe there was an installation issue - echo check if you have this directory: - echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd - echo. - pause > NUL - goto updater_menu - ) - -:: ----------------------------------------------------------------------------- - -rem :AddPath -rem ECHO %PATH% | FINDSTR /C:"%~1" > nul -rem IF ERRORLEVEL 1 ( -rem REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" > nul 2>&1 -rem IF ERRORLEVEL 0 ( -rem ECHO Adding %1 . . . Success! -rem SET "PATH=%PATH%;%~1" -rem SET UPDATE=1 -rem ) ELSE ( -rem ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. -rem ) -rem ) ELSE ( -rem ECHO Skipping %1 - Already in PATH -rem ) -rem EXIT /b - -:: ----------------------------------------------------------------------------- - -rem :KillExplorer - -rem ECHO Your desktop is being restarted, please wait. . . -rem ping -n 5 127.0.0.1 > NUL 2>&1 -rem ECHO Killing process Explorer.exe. . . -rem taskkill /f /im explorer.exe -rem ECHO. -rem ECHO Your desktop is now loading. . . -rem ping -n 5 127.0.0.1 > NUL 2>&1 -rem ECHO. -rem ping -n 5 127.0.0.1 > NUL 2>&1 -rem START explorer.exe -rem START explorer.exe %CD% -rem EXIT /b - -:: ----------------------------------------------------------------------------- diff --git a/alas.bat b/alas.bat deleted file mode 100644 index d89d89895..000000000 --- a/alas.bat +++ /dev/null @@ -1,125 +0,0 @@ -@SETLOCAL EnableExtensions EnableDelayedExpansion -@echo off -title ALAS run -SET ADB=%~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb.exe -SET PYTHON=%~dp0python-3.7.6.amd64\python.exe - -call %ADB% kill-server > nul 2>&1 - -set SCREENSHOT_FOLDER=%~dp0screenshots -if not exist %SCREENSHOT_FOLDER% ( - mkdir %SCREENSHOT_FOLDER% -) - -if not exist adb_port.ini ( - cd . > adb_port.ini -) - -REM if adb_port is empty, prompt HOST:PORT -set "adb_empty=*adb_port.ini" -for %%A in (%adb_empty%) do if %%~zA==0 ( - echo enter your HOST:PORT eg: 127.0.0.1:5555 for default bluestacks - echo WARNING! DONT FORGET TO SETUP AGAIN IN, ALAS ON EMULATOR SETTINGS FUNCTION - set /p adb_input= -) - -REM if adb_input = 0 load from adb_port.ini -if [%adb_input%]==[] ( - goto load -) - -REM write adb_input on adb_port.ini -echo %adb_input% >> adb_port.ini - -REM Load adb_port.ini -:load -REM -set /p ADB_PORT= nul 2>&1 - -goto alas - -:alas - cls - echo. - echo :: Alas run - echo. - echo Choose your server - echo. - echo 1. EN - echo 2. CN - echo 3. JP - echo. - echo :: Type a 'number' and press ENTER - echo :: Type 'exit' to quit - echo. - - set /P menu= - if %menu%==1 GOTO en - if %menu%==2 GOTO cn - if %menu%==3 GOTO jp - if %menu%==exit GOTO EOF - - else ( - cls - echo. - echo :: Incorrect Input Entered - echo. - echo Please type a 'number' or 'exit' - echo Press any key to retry to the menu... - echo. - pause > NUL - goto alas - ) - -:en - call %PYTHON% --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening alas_en.pyw... - call %PYTHON% alas_en.pyw - ) else ( - echo :: it was not possible to open alas_en.pyw, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 -goto alas -:cn - call %PYTHON% --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening alas_en.pyw... - call %PYTHON% alas_cn.pyw - ) else ( - echo :: it was not possible to open alas_cn.pyw, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -goto alas -:jp - call %PYTHON% --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening alas_en.pyw... - call %PYTHON% alas_jp.pyw - ) else ( - echo :: it was not possible to open alas_jp.pyw, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -goto alas -:EOF -exit - - diff --git a/dev_tools.bat b/dev_tools.bat deleted file mode 100644 index 8a071d0e1..000000000 --- a/dev_tools.bat +++ /dev/null @@ -1,221 +0,0 @@ -@echo off -setlocal EnableDelayedExpansion -title Dev_tools - -set SCREENSHOT_FOLDER=%~dp0screenshots -if not exist %SCREENSHOT_FOLDER% ( - mkdir %SCREENSHOT_FOLDER% -) - -if not exist adb_port.ini ( - cd . > adb_port.ini -) - -set "adb_empty=*adb_port.ini" -for %%A in (%adb_empty%) do if %%~zA==0 ( - echo enter your HOST:PORT eg: 127.0.0.1:5555 for default bluestacks - set /p adb_input= -) - -REM if adb_input = 0 load from adb_port.ini -if [%adb_input%]==[] ( - goto load -) - -REM write adb_input on adb_port.ini -echo %adb_input% >> adb_port.ini - -REM Load adb_port.ini -:load -REM -set /p ADB_PORT= NUL - goto dev_menu - ) - -:emulator_test -%~dp0python-3.7.6.amd64/python.exe -m dev_tools.emulator_test -echo. -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 - -goto dev_menu - -:button_extract - call %~dp0python-3.7.6.amd64/python.exe --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening dev_tools.button_extract... - %~dp0python-3.7.6.amd64/python.exe -m dev_tools.button_extract - ) else ( - echo :: it was not possible to open dev_tools.button_extract, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 - -goto dev_menu - -:grids_debug - call %~dp0python-3.7.6.amd64/python.exe --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening dev_tools.button_extract... - %~dp0python-3.7.6.amd64/python.exe -m dev_tools.grids_debug - ) else ( - echo :: it was not possible to open dev_tools.grids_debug, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 - -goto dev_menu - -:item_stastistics - call %~dp0python-3.7.6.amd64/python.exe --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening dev_tools.button_extract... - %~dp0python-3.7.6.amd64/python.exe -m dev_tools.item_stastistics - ) else ( - echo :: it was not possible to open dev_tools.item_stastistics, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 - -goto dev_menu - -:relative_crop - call %~dp0python-3.7.6.amd64/python.exe --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening dev_tools.button_extract... - %~dp0python-3.7.6.amd64/python.exe -m dev_tools.relative_crop - ) else ( - echo :: it was not possible to open dev_tools.relative_crop, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 - -goto dev_menu - -:map_extractor - call %~dp0python-3.7.6.amd64/python.exe --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening dev_tools.button_extract... - %~dp0python-3.7.6.amd64/python.exe -m dev_tools.map_extractor - ) else ( - echo :: it was not possible to open dev_tools.map_extractor, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 - -goto dev_menu - -:word_template_extractor - call %~dp0python-3.7.6.amd64/python.exe --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo Opening dev_tools.button_extract... - %~dp0python-3.7.6.amd64/python.exe -m dev_tools.word_template_extractor - ) else ( - echo :: it was not possible to open dev_tools.word_template_extractor, make sure you have a folder python-3.7.6.amd64 - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - ) -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 - -goto dev_menu - -:adbss -echo Enter any text/letter instead of the file name, do not enter spaces, enter exit to exit -echo or enter alas to back to main menu -echo. -:set -SET time=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2% -SET name=%time% -SET /P name= -IF /I '%name%'=='exit' goto EOF -IF /I '%name%'=='alas' goto dev_menu -adb -s %ADB_PORT% shell mkdir /sdcard/dcim/Screenshot 2>nul -adb -s %ADB_PORT% shell screencap -p /sdcard/dcim/Screenshot/%name%.png -adb -s %ADB_PORT% pull /sdcard/dcim/Screenshot/%name%.png %SCREENSHOT_FOLDER%\%name%.png -adb -s %ADB_PORT% shell rm /sdcard/dcim/Screenshot/%name%.png -echo. -echo The file %name%.png has been copied to ./screenshots/ directory -echo. -SET time= -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 -if NOT ["%errorlevel%"]==["0"] ( - pause - exit /b %errorlevel% -) -goto adbss - -:u2ss -%~dp0python-3.7.6.amd64/python.exe -m dev_tools.uiautomator2_screenshot -echo The file *.png has been copied to ./screenshots/ directory -PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 -if NOT ["%errorlevel%"]==["0"] ( - pause - exit /b %errorlevel% -) -echo. - -goto dev_menu - - -:EOF -exit \ No newline at end of file From f2d720eea91d79617961d4634084853c1795c846 Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 10:26:54 -0300 Subject: [PATCH 2/8] Fix: fix CRLF .bat files - Added with CRLF fixed --- Easy_Install-V2.bat | 379 ++++++++++++++++++++++++++++++++++++++++++++ alas.bat | 125 +++++++++++++++ dev_tools.bat | 221 ++++++++++++++++++++++++++ 3 files changed, 725 insertions(+) create mode 100644 Easy_Install-V2.bat create mode 100644 alas.bat create mode 100644 dev_tools.bat diff --git a/Easy_Install-V2.bat b/Easy_Install-V2.bat new file mode 100644 index 000000000..ca69829d7 --- /dev/null +++ b/Easy_Install-V2.bat @@ -0,0 +1,379 @@ +@SETLOCAL EnableExtensions EnableDelayedExpansion +@echo off +pushd "%~dp0" +:: VARIABLES INSTALL + +SET CMD=%SystemRoot%\system32\cmd.exe +SET LMESZINC=https://github.com/LmeSzinc/AzurLaneAutoScript.git +SET WHOAMIKYO=https://github.com/whoamikyo/AzurLaneAutoScript.git + +rem SET ROOT_UPPER=%~dp0 +rem SET ADB_PATH=%AZURLANESCRIPT%\python-3.7.6.amd64\Lib\site-packages\adbutils\binaries + +:: ----------------------------------------------------------------------------- +:: Make sure we're running with administrator privileges +echo. +echo :: Checking For Administrator Elevation... +echo. +net session >nul 2>&1 +if %errorLevel% == 0 ( + echo Elevation found! Proceeding... + goto menu +) else ( + echo :: You are NOT running as Administrator + echo. + echo Right-click and select ^'Run as Administrator^' and try again. + echo Press any key to exit... + pause > NUL + exit +) +REM PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 +:: ----------------------------------------------------------------------------- + +:: Make sure the second path exists. The first path won't be created until the second script is run +rem IF NOT EXIST !ADB_PATH! (ECHO Path not found: %ADB_PATH% && GOTO ExitBatch) +:: ----------------------------------------------------------------------------- + +:: Add paths +rem CALL :AddPath %ADB_PATH% +rem CALL :AddPath %GIT_PATH% +rem CALL :AddPath %AZURLANESCRIPT% +rem CALL :AddPath %ROOT_UPPER% +pause + +:: Branch to UpdateEnv if we need to update +REM IF DEFINED UPDATE (GOTO UpdateEnv) + +REM GOTO ExitBatch +:: ----------------------------------------------------------------------------- + +REM :UpdateEnv +REM ECHO Making updated PATH go live . . . +REM REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1 +REM setx TEMPVAR 1 > nul 2>&1 +REM REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1 +REM IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer) +REM GOTO ExitBatch + +:: ----------------------------------------------------------------------------- +goto menu +:menu + cls + echo. + echo :: Easy install for ALAS + echo. + echo This script will install Python 3.7.6 + requirements.txt + ADB + GIT + CHOCOLATEY + echo. + echo :: For fresh install, Run step "1" and "2" + echo. + echo 1.Python 3.7.6 + ADB + GIT + requirements.txt + echo 2.Clone repository (Download the latest version from LmeSzinc repository) + echo 3.Programs (ADB + GIT Alternative way with CHOCOLATEY) + echo 4.Updater ONLY (Do not update if you are doing a fresh install) + echo. + echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER + echo. + echo Install in order + echo. + echo :: Type a 'number' and press ENTER + echo :: Type 'exit' to quit + echo. + set /P menu= + if %menu%==1 GOTO python + if %menu%==2 GOTO clone + if %menu%==3 GOTO programs + if %menu%==4 GOTO updater + if %menu%==exit GOTO EOF + + else ( + cls + echo. + echo :: Incorrect Input Entered + echo. + echo Please type a 'number' or 'exit' + echo Press any key to return to the menu... + echo. + pause > NUL + goto menu + ) +:: ----------------------------------------------------------------------------- +:programs +cls + echo. + echo :: Checking For Internet Connection... + echo. + timeout /t 2 /nobreak > NUL + + ping -n 1 archlinux.org -w 20000 >nul + + if %errorlevel% == 0 ( + echo Internet Connection Found! Proceeding.. + ) else ( + echo :: You are NOT connected to the Internet + echo. + echo Please enable your Networking adapter and connect to try again. + echo Press any key to retry... + pause > NUL + goto packages + ) + cls + echo. + echo :: Installing Packages ADB + GIT + CHOCOLATEY + echo :: If you already have any of these packages installed + echo :: you will probably have an error installing that package + echo :: you can try to proceed anyway + echo :: it might work if there is nothing wrong with the previous installation + echo :: if you have problems I suggest uninstalling all packages mentioned in the control panel (windows) + echo. + timeout /t 1 /nobreak > NUL + SET PATH=%PATH%;%PROGRAMDATA%\chocolatey\lib\adb\tools\platform-tools\;%PROGRAMFILES%\Git\cmd;%PROGRAMDATA%\chocolatey\bin + echo Installing chocolatey on this machine + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))">>chocolatey-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin + ) + echo Installing Essentials programs, It may take + @powershell -NoProfile -ExecutionPolicy Bypass -Command "choco install -y --force --allow-empty-checksums adb git">>Essentials-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log + ) +call refreshenv +goto menu +:: ----------------------------------------------------------------------------- +:: killing adb server +:killadb + call %ADB_PATH% --version >nul + if %errorlevel% == 0 ( + echo ADB Found! Proceeding.. + echo killing adb server.. + call %ADB_PATH% kill-server > nul 2>&1 + goto menu + ) else ( + echo :: ADB not found, maybe there was an installation issue, try opening another CMD window and type choco install adb + echo. + pause > NUL + goto menu + ) +:: ----------------------------------------------------------------------------- +:clone +SET AZURLANESCRIPT=%~dp0AzurLaneAutoScript +SET GIT_PATH=%AZURLANESCRIPT%\python-3.7.6.amd64\Git\cmd +SET GIT=%GIT_PATH%\git.exe + call %GIT% --version >nul + if %errorlevel% == 0 ( + echo Cloning repository + echo GIT Found! Proceeding.. + echo Cloning repository... + cd %AZURLANESCRIPT% + echo Deleting folder unused files + for /D %%D in ("*") do ( + if /I not "%%~nxD"=="python-3.7.6.amd64" rd /S /Q "%%~D" + ) +for %%F in ("*") do ( + del "%%~F" + ) + echo ## initializing.. + call %GIT% init + echo ## adding origin.. + call %GIT% remote add origin %LMESZINC% + echo ## pulling project... + call %GIT% pull origin master + echo ## setting default branch... + call %GIT% branch --set-upstream-to=origin/master master + call %GIT% remote add whoamikyo %WHOAMIKYO% + echo The installation was successful + echo Press any key to proceed + pause > NUL + goto menu + ) else ( + echo :: Git not found, maybe there was an installation issue, try opening another CMD window and type choco install git + echo. + pause > NUL + ) +:: ----------------------------------------------------------------------------- +:python +cls +echo. +echo :: Python 3.7.6 + ADB + GIT + requirements.txt +echo. +echo. +SET PYTHON=%~dp0AzurLaneAutoScript/python-3.7.6.amd64/python.exe +SET AZURLANESCRIPT=%~dp0AzurLaneAutoScript +SET FILE_URL=https://gitlab.com/whoamikyo/alas-venv/-/raw/master/python.zip +SET FILE_DEST=%AZURLANESCRIPT%\pythonpackage.zip +if not exist %AZURLANESCRIPT% ( + echo WILL BE CREATED A FOLDER "AzurLaneAutoScript" + echo DO NOT RENAME THE FOLDER NEVER + mkdir %AZURLANESCRIPT% +) + if not exist "%FILE_DEST%" ( + echo Downloading with powershell: %FILE_URL% to %FILE_DEST% + powershell.exe -command "$webclient = New-Object System.Net.WebClient; $url = \"%FILE_URL%\"; $file = \"%FILE_DEST%\"; $webclient.DownloadFile($url,$file);" + echo Expanding with powershell to: %AZURLANESCRIPT% + powershell -command "$shell_app=new-object -com shell.application; $zip_file = $shell_app.namespace(\"%FILE_DEST%\"); $destination = $shell_app.namespace(\"%AZURLANESCRIPT%\"); $destination.Copyhere($zip_file.items())" + ) else ( + echo "pythonpackage.zip already downloaded, delete to re-download" + pause > NUL + ) + call %PYTHON% --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo initializing uiautomator2.. + call %PYTHON% -m uiautomator2 init + echo The installation was successful + echo Press any key to proceed + pause > NUL + goto menu + ) else ( + echo :: it was not possible to install uiautomator2 + echo :: make sure you have a folder "python-3.7.6.amd64" + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + goto menu + ) +:: ----------------------------------------------------------------------------- +:updater +SET GIT_ALAS=%~dp0python-3.7.6.amd64\Git\cmd\git.exe +SET GLP=%GIT_ALAS% +SET ALAS_PY=alas.py + if exist %ALAS_PY% ( + goto updater_menu + ) else ( + cd AzurLaneAutoScript + echo. + goto updater_menu + ) +:: ----------------------------------------------------------------------------- +:updater_menu + cls + echo. + echo :: This update only will work if you downloaded ALAS with this file using option 2. clone + echo. + echo ::DISCLAIMER:: + echo IF YOU GET THE FOLLOWING ERROR: + echo "error: Your local changes to the following files would be overwritten by merge:Easy_Install-V2.bat" + echo YOU NEED RE-DOWNLOAD ONLY Easy_Install-V2.bat FILE FROM REPOSITORY AND OVERWRITTEN THE OLD FOR NEW FILE + echo + echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER + echo. + echo 1. https://github.com/LmeSzinc/AzurLaneAutoScript (Main Repo, When in doubt, use it) + echo 2. https://github.com/whoamikyo/AzurLaneAutoScript (Mirrored Fork) + echo 3. https://github.com/whoamikyo/AzurLaneAutoScript (nightly build, dont use) + echo 4. Back to main menu + echo. + echo :: Type a 'number' and press ENTER + echo :: Type 'exit' to quit + echo. + + set /P choice= + if %choice%==1 GOTO LmeSzinc + if %choice%==2 GOTO whoamikyo + if %choice%==3 GOTO nightly + if %choice%==4 GOTO menu + if %choice%==exit GOTO EOF + + else ( + cls + echo. + echo :: Incorrect Input Entered + echo. + echo Please type a 'number' or 'exit' + echo Press any key to return to the menu... + echo. + pause > NUL + goto updater_menu + ) +:: ----------------------------------------------------------------------------- +:LmeSzinc + call %GLP% --version >nul + if %errorlevel% == 0 ( + echo GIT Found! Proceeding.. + echo Updating from LmeSzinc repository.. + call %GLP% fetch origin master + call %GLP% reset --hard origin/master + call %GLP% pull --ff-only origin master + echo DONE! + echo Press any key to proceed + pause > NUL + goto updater_menu + ) else ( + echo :: Git not detected, maybe there was an installation issue + echo check if you have this directory: + echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd + echo. + pause > NUL + ) +:: ----------------------------------------------------------------------------- +:whoamikyo + call %GLP% --version >nul + if %errorlevel% == 0 ( + echo GIT Found! Proceeding.. + echo Updating from whoamikyo repository.. + call %GLP% fetch whoamikyo master + call %GLP% reset --hard whoamikyo/master + call %GLP% pull --ff-only whoamikyo master + echo DONE! + echo Press any key to proceed + pause > NUL + goto updater_menu + ) else ( + echo :: Git not detected, maybe there was an installation issue + echo check if you have this directory: + echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd + pause > NUL + goto updater_menu + ) +:: ----------------------------------------------------------------------------- +:nightly + call %GLP% --version >nul + if %errorlevel% == 0 ( + echo GIT Found! Proceeding.. + echo Updating from whoamikyo nightly repository.. + call %GLP% fetch whoamikyo nightly + call %GLP% reset --hard whoamikyo/nightly + call %GLP% pull --ff-only whoamikyo nightly + echo Press any key to proceed + pause > NUL + goto updater_menu + ) else ( + echo :: Git not detected, maybe there was an installation issue + echo check if you have this directory: + echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd + echo. + pause > NUL + goto updater_menu + ) + +:: ----------------------------------------------------------------------------- + +rem :AddPath +rem ECHO %PATH% | FINDSTR /C:"%~1" > nul +rem IF ERRORLEVEL 1 ( +rem REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" > nul 2>&1 +rem IF ERRORLEVEL 0 ( +rem ECHO Adding %1 . . . Success! +rem SET "PATH=%PATH%;%~1" +rem SET UPDATE=1 +rem ) ELSE ( +rem ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. +rem ) +rem ) ELSE ( +rem ECHO Skipping %1 - Already in PATH +rem ) +rem EXIT /b + +:: ----------------------------------------------------------------------------- + +rem :KillExplorer + +rem ECHO Your desktop is being restarted, please wait. . . +rem ping -n 5 127.0.0.1 > NUL 2>&1 +rem ECHO Killing process Explorer.exe. . . +rem taskkill /f /im explorer.exe +rem ECHO. +rem ECHO Your desktop is now loading. . . +rem ping -n 5 127.0.0.1 > NUL 2>&1 +rem ECHO. +rem ping -n 5 127.0.0.1 > NUL 2>&1 +rem START explorer.exe +rem START explorer.exe %CD% +rem EXIT /b + +:: ----------------------------------------------------------------------------- diff --git a/alas.bat b/alas.bat new file mode 100644 index 000000000..d89d89895 --- /dev/null +++ b/alas.bat @@ -0,0 +1,125 @@ +@SETLOCAL EnableExtensions EnableDelayedExpansion +@echo off +title ALAS run +SET ADB=%~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb.exe +SET PYTHON=%~dp0python-3.7.6.amd64\python.exe + +call %ADB% kill-server > nul 2>&1 + +set SCREENSHOT_FOLDER=%~dp0screenshots +if not exist %SCREENSHOT_FOLDER% ( + mkdir %SCREENSHOT_FOLDER% +) + +if not exist adb_port.ini ( + cd . > adb_port.ini +) + +REM if adb_port is empty, prompt HOST:PORT +set "adb_empty=*adb_port.ini" +for %%A in (%adb_empty%) do if %%~zA==0 ( + echo enter your HOST:PORT eg: 127.0.0.1:5555 for default bluestacks + echo WARNING! DONT FORGET TO SETUP AGAIN IN, ALAS ON EMULATOR SETTINGS FUNCTION + set /p adb_input= +) + +REM if adb_input = 0 load from adb_port.ini +if [%adb_input%]==[] ( + goto load +) + +REM write adb_input on adb_port.ini +echo %adb_input% >> adb_port.ini + +REM Load adb_port.ini +:load +REM +set /p ADB_PORT= nul 2>&1 + +goto alas + +:alas + cls + echo. + echo :: Alas run + echo. + echo Choose your server + echo. + echo 1. EN + echo 2. CN + echo 3. JP + echo. + echo :: Type a 'number' and press ENTER + echo :: Type 'exit' to quit + echo. + + set /P menu= + if %menu%==1 GOTO en + if %menu%==2 GOTO cn + if %menu%==3 GOTO jp + if %menu%==exit GOTO EOF + + else ( + cls + echo. + echo :: Incorrect Input Entered + echo. + echo Please type a 'number' or 'exit' + echo Press any key to retry to the menu... + echo. + pause > NUL + goto alas + ) + +:en + call %PYTHON% --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening alas_en.pyw... + call %PYTHON% alas_en.pyw + ) else ( + echo :: it was not possible to open alas_en.pyw, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +goto alas +:cn + call %PYTHON% --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening alas_en.pyw... + call %PYTHON% alas_cn.pyw + ) else ( + echo :: it was not possible to open alas_cn.pyw, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +goto alas +:jp + call %PYTHON% --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening alas_en.pyw... + call %PYTHON% alas_jp.pyw + ) else ( + echo :: it was not possible to open alas_jp.pyw, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +goto alas +:EOF +exit + + diff --git a/dev_tools.bat b/dev_tools.bat new file mode 100644 index 000000000..28b8d1445 --- /dev/null +++ b/dev_tools.bat @@ -0,0 +1,221 @@ +@echo off +setlocal EnableDelayedExpansion +title Dev_tools + +set SCREENSHOT_FOLDER=%~dp0screenshots +if not exist %SCREENSHOT_FOLDER% ( + mkdir %SCREENSHOT_FOLDER% +) + +if not exist adb_port.ini ( + cd . > adb_port.ini +) + +set "adb_empty=*adb_port.ini" +for %%A in (%adb_empty%) do if %%~zA==0 ( + echo enter your HOST:PORT eg: 127.0.0.1:5555 for default bluestacks + set /p adb_input= +) + +REM if adb_input = 0 load from adb_port.ini +if [%adb_input%]==[] ( + goto load +) + +REM write adb_input on adb_port.ini +echo %adb_input% >> adb_port.ini + +REM Load adb_port.ini +:load +REM +set /p ADB_PORT= NUL + goto dev_menu + ) + +:emulator_test +%~dp0python-3.7.6.amd64/python.exe -m dev_tools.emulator_test +echo. +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 + +goto dev_menu + +:button_extract + call %~dp0python-3.7.6.amd64/python.exe --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening dev_tools.button_extract... + %~dp0python-3.7.6.amd64/python.exe -m dev_tools.button_extract + ) else ( + echo :: it was not possible to open dev_tools.button_extract, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 + +goto dev_menu + +:grids_debug + call %~dp0python-3.7.6.amd64/python.exe --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening dev_tools.button_extract... + %~dp0python-3.7.6.amd64/python.exe -m dev_tools.grids_debug + ) else ( + echo :: it was not possible to open dev_tools.grids_debug, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 + +goto dev_menu + +:item_stastistics + call %~dp0python-3.7.6.amd64/python.exe --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening dev_tools.button_extract... + %~dp0python-3.7.6.amd64/python.exe -m dev_tools.item_stastistics + ) else ( + echo :: it was not possible to open dev_tools.item_stastistics, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 + +goto dev_menu + +:relative_crop + call %~dp0python-3.7.6.amd64/python.exe --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening dev_tools.button_extract... + %~dp0python-3.7.6.amd64/python.exe -m dev_tools.relative_crop + ) else ( + echo :: it was not possible to open dev_tools.relative_crop, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 + +goto dev_menu + +:map_extractor + call %~dp0python-3.7.6.amd64/python.exe --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening dev_tools.button_extract... + %~dp0python-3.7.6.amd64/python.exe -m dev_tools.map_extractor + ) else ( + echo :: it was not possible to open dev_tools.map_extractor, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 + +goto dev_menu + +:word_template_extractor + call %~dp0python-3.7.6.amd64/python.exe --version >nul + if %errorlevel% == 0 ( + echo Python Found! Proceeding.. + echo Opening dev_tools.button_extract... + %~dp0python-3.7.6.amd64/python.exe -m dev_tools.word_template_extractor + ) else ( + echo :: it was not possible to open dev_tools.word_template_extractor, make sure you have a folder python-3.7.6.amd64 + echo :: inside AzurLaneAutoScript folder. + echo. + pause > NUL + ) +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 + +goto dev_menu + +:adbss +echo Enter any text/letter instead of the file name, do not enter spaces, enter exit to exit +echo or enter alas to back to main menu +echo. +:set +SET time=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2% +SET name=%time% +SET /P name= +IF /I '%name%'=='exit' goto EOF +IF /I '%name%'=='alas' goto dev_menu +call %~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb -s %ADB_PORT% shell mkdir /sdcard/dcim/Screenshot 2>nul +call %~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb -s %ADB_PORT% shell screencap -p /sdcard/dcim/Screenshot/%name%.png +call %~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb -s %ADB_PORT% pull /sdcard/dcim/Screenshot/%name%.png %SCREENSHOT_FOLDER%\%name%.png +call %~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb -s %ADB_PORT% shell rm /sdcard/dcim/Screenshot/%name%.png +echo. +echo The file %name%.png has been copied to ./screenshots/ directory +echo. +SET time= +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 +if NOT ["%errorlevel%"]==["0"] ( + pause + exit /b %errorlevel% +) +goto adbss + +:u2ss +%~dp0python-3.7.6.amd64/python.exe -m dev_tools.uiautomator2_screenshot +echo The file *.png has been copied to ./screenshots/ directory +PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 +if NOT ["%errorlevel%"]==["0"] ( + pause + exit /b %errorlevel% +) +echo. + +goto dev_menu + + +:EOF +exit \ No newline at end of file From 9f23b9bab026c05ea8787f83ad018c92db8e37c7 Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 10:46:48 -0300 Subject: [PATCH 3/8] Docs: Updated --- README.md | 2 +- README_en.md | 2 +- doc/Quick_guide.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6351898fb..605918e67 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [English Readme](README_en.md) `Translation in progress` -[Download Easy Install-v2](https://github.com/LmeSzinc/AzurLaneAutoScript/raw/master/Easy_Install-V2.bat) +[Download Easy Install-v2](https://github.com/whoamikyo/AzurLaneAutoScript/releases) # AzurLaneAutoScript Alas, an Azur Lane automation tool with GUI (Support CN, EN, JP, able to support other servers). diff --git a/README_en.md b/README_en.md index a5d4bf57a..f4656d38d 100644 --- a/README_en.md +++ b/README_en.md @@ -1,6 +1,6 @@ [English Quick Guide](doc%2FQuick_guide.md) -[Download Easy Install-v2](https://github.com/LmeSzinc/AzurLaneAutoScript/raw/master/Easy_Install-V2.bat) +[Download Easy Install-v2](https://github.com/whoamikyo/AzurLaneAutoScript/releases) # AzurLaneAutoScript diff --git a/doc/Quick_guide.md b/doc/Quick_guide.md index d7de3f3ff..30f2d39b2 100644 --- a/doc/Quick_guide.md +++ b/doc/Quick_guide.md @@ -13,7 +13,7 @@ # New automatic installation method (Recommended) -* Just download the file [Easy_Install-V2.bat](https://raw.githubusercontent.com/LmeSzinc/AzurLaneAutoScript/master/Easy_Install-V2.bat), put in some folder and run as administrator (`Right click> Run as administrator`) +* Just download the file [Easy_Install-V2.bat](https://github.com/whoamikyo/AzurLaneAutoScript/releases), put in some folder and run as administrator (`Right click> Run as administrator`) * Do not install ALAS in a folder that contains spaces in the name, this will make the scripts not work correctly, created a folder at the root of some drive like `C:\ALAS\` or `D:\ALAS\`, Then place Easy_Install-V2.bat in that folder and run. * Then it will install everything and download ALAS * Will be created a folder `AzurLaneAutoScript` in the directory you run `Easy_Install-V2.bat` From 2e3f48540abc90489aafe33cea5a1f2f5e790d5a Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 10:52:52 -0300 Subject: [PATCH 4/8] Easy_Install-V2: removed redundancy --- Easy_Install-V2.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Easy_Install-V2.bat b/Easy_Install-V2.bat index ca69829d7..00d8250ef 100644 --- a/Easy_Install-V2.bat +++ b/Easy_Install-V2.bat @@ -72,8 +72,6 @@ goto menu echo 4.Updater ONLY (Do not update if you are doing a fresh install) echo. echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER - echo. - echo Install in order echo. echo :: Type a 'number' and press ENTER echo :: Type 'exit' to quit @@ -176,6 +174,7 @@ for %%F in ("*") do ( call %GIT% pull origin master echo ## setting default branch... call %GIT% branch --set-upstream-to=origin/master master + echo ## adding whoamikyo remote origin call %GIT% remote add whoamikyo %WHOAMIKYO% echo The installation was successful echo Press any key to proceed From 0a67a665bbde76166ca71d6943022403dd651bc9 Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 13:39:57 -0300 Subject: [PATCH 5/8] Update alas.bat added uiautomator2 init again because if the user use easy install without install emulator before will get error --- alas.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alas.bat b/alas.bat index d89d89895..9af48ba67 100644 --- a/alas.bat +++ b/alas.bat @@ -39,8 +39,8 @@ set /p ADB_PORT= nul 2>&1 From 08d74ae466d90e92947e93942c41987407761448 Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 14:43:30 -0300 Subject: [PATCH 6/8] Delete Easy_Install-V2.bat --- Easy_Install-V2.bat | 378 -------------------------------------------- 1 file changed, 378 deletions(-) delete mode 100644 Easy_Install-V2.bat diff --git a/Easy_Install-V2.bat b/Easy_Install-V2.bat deleted file mode 100644 index 00d8250ef..000000000 --- a/Easy_Install-V2.bat +++ /dev/null @@ -1,378 +0,0 @@ -@SETLOCAL EnableExtensions EnableDelayedExpansion -@echo off -pushd "%~dp0" -:: VARIABLES INSTALL - -SET CMD=%SystemRoot%\system32\cmd.exe -SET LMESZINC=https://github.com/LmeSzinc/AzurLaneAutoScript.git -SET WHOAMIKYO=https://github.com/whoamikyo/AzurLaneAutoScript.git - -rem SET ROOT_UPPER=%~dp0 -rem SET ADB_PATH=%AZURLANESCRIPT%\python-3.7.6.amd64\Lib\site-packages\adbutils\binaries - -:: ----------------------------------------------------------------------------- -:: Make sure we're running with administrator privileges -echo. -echo :: Checking For Administrator Elevation... -echo. -net session >nul 2>&1 -if %errorLevel% == 0 ( - echo Elevation found! Proceeding... - goto menu -) else ( - echo :: You are NOT running as Administrator - echo. - echo Right-click and select ^'Run as Administrator^' and try again. - echo Press any key to exit... - pause > NUL - exit -) -REM PowerShell -Command "Start-Sleep -s 3" > nul 2>&1 -:: ----------------------------------------------------------------------------- - -:: Make sure the second path exists. The first path won't be created until the second script is run -rem IF NOT EXIST !ADB_PATH! (ECHO Path not found: %ADB_PATH% && GOTO ExitBatch) -:: ----------------------------------------------------------------------------- - -:: Add paths -rem CALL :AddPath %ADB_PATH% -rem CALL :AddPath %GIT_PATH% -rem CALL :AddPath %AZURLANESCRIPT% -rem CALL :AddPath %ROOT_UPPER% -pause - -:: Branch to UpdateEnv if we need to update -REM IF DEFINED UPDATE (GOTO UpdateEnv) - -REM GOTO ExitBatch -:: ----------------------------------------------------------------------------- - -REM :UpdateEnv -REM ECHO Making updated PATH go live . . . -REM REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1 -REM setx TEMPVAR 1 > nul 2>&1 -REM REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1 -REM IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer) -REM GOTO ExitBatch - -:: ----------------------------------------------------------------------------- -goto menu -:menu - cls - echo. - echo :: Easy install for ALAS - echo. - echo This script will install Python 3.7.6 + requirements.txt + ADB + GIT + CHOCOLATEY - echo. - echo :: For fresh install, Run step "1" and "2" - echo. - echo 1.Python 3.7.6 + ADB + GIT + requirements.txt - echo 2.Clone repository (Download the latest version from LmeSzinc repository) - echo 3.Programs (ADB + GIT Alternative way with CHOCOLATEY) - echo 4.Updater ONLY (Do not update if you are doing a fresh install) - echo. - echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER - echo. - echo :: Type a 'number' and press ENTER - echo :: Type 'exit' to quit - echo. - set /P menu= - if %menu%==1 GOTO python - if %menu%==2 GOTO clone - if %menu%==3 GOTO programs - if %menu%==4 GOTO updater - if %menu%==exit GOTO EOF - - else ( - cls - echo. - echo :: Incorrect Input Entered - echo. - echo Please type a 'number' or 'exit' - echo Press any key to return to the menu... - echo. - pause > NUL - goto menu - ) -:: ----------------------------------------------------------------------------- -:programs -cls - echo. - echo :: Checking For Internet Connection... - echo. - timeout /t 2 /nobreak > NUL - - ping -n 1 archlinux.org -w 20000 >nul - - if %errorlevel% == 0 ( - echo Internet Connection Found! Proceeding.. - ) else ( - echo :: You are NOT connected to the Internet - echo. - echo Please enable your Networking adapter and connect to try again. - echo Press any key to retry... - pause > NUL - goto packages - ) - cls - echo. - echo :: Installing Packages ADB + GIT + CHOCOLATEY - echo :: If you already have any of these packages installed - echo :: you will probably have an error installing that package - echo :: you can try to proceed anyway - echo :: it might work if there is nothing wrong with the previous installation - echo :: if you have problems I suggest uninstalling all packages mentioned in the control panel (windows) - echo. - timeout /t 1 /nobreak > NUL - SET PATH=%PATH%;%PROGRAMDATA%\chocolatey\lib\adb\tools\platform-tools\;%PROGRAMFILES%\Git\cmd;%PROGRAMDATA%\chocolatey\bin - echo Installing chocolatey on this machine - @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))">>chocolatey-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin - ) - echo Installing Essentials programs, It may take - @powershell -NoProfile -ExecutionPolicy Bypass -Command "choco install -y --force --allow-empty-checksums adb git">>Essentials-%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log - ) -call refreshenv -goto menu -:: ----------------------------------------------------------------------------- -:: killing adb server -:killadb - call %ADB_PATH% --version >nul - if %errorlevel% == 0 ( - echo ADB Found! Proceeding.. - echo killing adb server.. - call %ADB_PATH% kill-server > nul 2>&1 - goto menu - ) else ( - echo :: ADB not found, maybe there was an installation issue, try opening another CMD window and type choco install adb - echo. - pause > NUL - goto menu - ) -:: ----------------------------------------------------------------------------- -:clone -SET AZURLANESCRIPT=%~dp0AzurLaneAutoScript -SET GIT_PATH=%AZURLANESCRIPT%\python-3.7.6.amd64\Git\cmd -SET GIT=%GIT_PATH%\git.exe - call %GIT% --version >nul - if %errorlevel% == 0 ( - echo Cloning repository - echo GIT Found! Proceeding.. - echo Cloning repository... - cd %AZURLANESCRIPT% - echo Deleting folder unused files - for /D %%D in ("*") do ( - if /I not "%%~nxD"=="python-3.7.6.amd64" rd /S /Q "%%~D" - ) -for %%F in ("*") do ( - del "%%~F" - ) - echo ## initializing.. - call %GIT% init - echo ## adding origin.. - call %GIT% remote add origin %LMESZINC% - echo ## pulling project... - call %GIT% pull origin master - echo ## setting default branch... - call %GIT% branch --set-upstream-to=origin/master master - echo ## adding whoamikyo remote origin - call %GIT% remote add whoamikyo %WHOAMIKYO% - echo The installation was successful - echo Press any key to proceed - pause > NUL - goto menu - ) else ( - echo :: Git not found, maybe there was an installation issue, try opening another CMD window and type choco install git - echo. - pause > NUL - ) -:: ----------------------------------------------------------------------------- -:python -cls -echo. -echo :: Python 3.7.6 + ADB + GIT + requirements.txt -echo. -echo. -SET PYTHON=%~dp0AzurLaneAutoScript/python-3.7.6.amd64/python.exe -SET AZURLANESCRIPT=%~dp0AzurLaneAutoScript -SET FILE_URL=https://gitlab.com/whoamikyo/alas-venv/-/raw/master/python.zip -SET FILE_DEST=%AZURLANESCRIPT%\pythonpackage.zip -if not exist %AZURLANESCRIPT% ( - echo WILL BE CREATED A FOLDER "AzurLaneAutoScript" - echo DO NOT RENAME THE FOLDER NEVER - mkdir %AZURLANESCRIPT% -) - if not exist "%FILE_DEST%" ( - echo Downloading with powershell: %FILE_URL% to %FILE_DEST% - powershell.exe -command "$webclient = New-Object System.Net.WebClient; $url = \"%FILE_URL%\"; $file = \"%FILE_DEST%\"; $webclient.DownloadFile($url,$file);" - echo Expanding with powershell to: %AZURLANESCRIPT% - powershell -command "$shell_app=new-object -com shell.application; $zip_file = $shell_app.namespace(\"%FILE_DEST%\"); $destination = $shell_app.namespace(\"%AZURLANESCRIPT%\"); $destination.Copyhere($zip_file.items())" - ) else ( - echo "pythonpackage.zip already downloaded, delete to re-download" - pause > NUL - ) - call %PYTHON% --version >nul - if %errorlevel% == 0 ( - echo Python Found! Proceeding.. - echo initializing uiautomator2.. - call %PYTHON% -m uiautomator2 init - echo The installation was successful - echo Press any key to proceed - pause > NUL - goto menu - ) else ( - echo :: it was not possible to install uiautomator2 - echo :: make sure you have a folder "python-3.7.6.amd64" - echo :: inside AzurLaneAutoScript folder. - echo. - pause > NUL - goto menu - ) -:: ----------------------------------------------------------------------------- -:updater -SET GIT_ALAS=%~dp0python-3.7.6.amd64\Git\cmd\git.exe -SET GLP=%GIT_ALAS% -SET ALAS_PY=alas.py - if exist %ALAS_PY% ( - goto updater_menu - ) else ( - cd AzurLaneAutoScript - echo. - goto updater_menu - ) -:: ----------------------------------------------------------------------------- -:updater_menu - cls - echo. - echo :: This update only will work if you downloaded ALAS with this file using option 2. clone - echo. - echo ::DISCLAIMER:: - echo IF YOU GET THE FOLLOWING ERROR: - echo "error: Your local changes to the following files would be overwritten by merge:Easy_Install-V2.bat" - echo YOU NEED RE-DOWNLOAD ONLY Easy_Install-V2.bat FILE FROM REPOSITORY AND OVERWRITTEN THE OLD FOR NEW FILE - echo - echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER - echo. - echo 1. https://github.com/LmeSzinc/AzurLaneAutoScript (Main Repo, When in doubt, use it) - echo 2. https://github.com/whoamikyo/AzurLaneAutoScript (Mirrored Fork) - echo 3. https://github.com/whoamikyo/AzurLaneAutoScript (nightly build, dont use) - echo 4. Back to main menu - echo. - echo :: Type a 'number' and press ENTER - echo :: Type 'exit' to quit - echo. - - set /P choice= - if %choice%==1 GOTO LmeSzinc - if %choice%==2 GOTO whoamikyo - if %choice%==3 GOTO nightly - if %choice%==4 GOTO menu - if %choice%==exit GOTO EOF - - else ( - cls - echo. - echo :: Incorrect Input Entered - echo. - echo Please type a 'number' or 'exit' - echo Press any key to return to the menu... - echo. - pause > NUL - goto updater_menu - ) -:: ----------------------------------------------------------------------------- -:LmeSzinc - call %GLP% --version >nul - if %errorlevel% == 0 ( - echo GIT Found! Proceeding.. - echo Updating from LmeSzinc repository.. - call %GLP% fetch origin master - call %GLP% reset --hard origin/master - call %GLP% pull --ff-only origin master - echo DONE! - echo Press any key to proceed - pause > NUL - goto updater_menu - ) else ( - echo :: Git not detected, maybe there was an installation issue - echo check if you have this directory: - echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd - echo. - pause > NUL - ) -:: ----------------------------------------------------------------------------- -:whoamikyo - call %GLP% --version >nul - if %errorlevel% == 0 ( - echo GIT Found! Proceeding.. - echo Updating from whoamikyo repository.. - call %GLP% fetch whoamikyo master - call %GLP% reset --hard whoamikyo/master - call %GLP% pull --ff-only whoamikyo master - echo DONE! - echo Press any key to proceed - pause > NUL - goto updater_menu - ) else ( - echo :: Git not detected, maybe there was an installation issue - echo check if you have this directory: - echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd - pause > NUL - goto updater_menu - ) -:: ----------------------------------------------------------------------------- -:nightly - call %GLP% --version >nul - if %errorlevel% == 0 ( - echo GIT Found! Proceeding.. - echo Updating from whoamikyo nightly repository.. - call %GLP% fetch whoamikyo nightly - call %GLP% reset --hard whoamikyo/nightly - call %GLP% pull --ff-only whoamikyo nightly - echo Press any key to proceed - pause > NUL - goto updater_menu - ) else ( - echo :: Git not detected, maybe there was an installation issue - echo check if you have this directory: - echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd - echo. - pause > NUL - goto updater_menu - ) - -:: ----------------------------------------------------------------------------- - -rem :AddPath -rem ECHO %PATH% | FINDSTR /C:"%~1" > nul -rem IF ERRORLEVEL 1 ( -rem REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" > nul 2>&1 -rem IF ERRORLEVEL 0 ( -rem ECHO Adding %1 . . . Success! -rem SET "PATH=%PATH%;%~1" -rem SET UPDATE=1 -rem ) ELSE ( -rem ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. -rem ) -rem ) ELSE ( -rem ECHO Skipping %1 - Already in PATH -rem ) -rem EXIT /b - -:: ----------------------------------------------------------------------------- - -rem :KillExplorer - -rem ECHO Your desktop is being restarted, please wait. . . -rem ping -n 5 127.0.0.1 > NUL 2>&1 -rem ECHO Killing process Explorer.exe. . . -rem taskkill /f /im explorer.exe -rem ECHO. -rem ECHO Your desktop is now loading. . . -rem ping -n 5 127.0.0.1 > NUL 2>&1 -rem ECHO. -rem ping -n 5 127.0.0.1 > NUL 2>&1 -rem START explorer.exe -rem START explorer.exe %CD% -rem EXIT /b - -:: ----------------------------------------------------------------------------- From 2fc66e018d7b2224d92d65c3f7857dcef13dbabb Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 15:31:48 -0300 Subject: [PATCH 7/8] Added updater function to alas.bat --- alas.bat | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) diff --git a/alas.bat b/alas.bat index 9af48ba67..4132ff275 100644 --- a/alas.bat +++ b/alas.bat @@ -3,6 +3,9 @@ title ALAS run SET ADB=%~dp0python-3.7.6.amd64\Lib\site-packages\adbutils\binaries\adb.exe SET PYTHON=%~dp0python-3.7.6.amd64\python.exe +SET CMD=%SystemRoot%\system32\cmd.exe +SET LMESZINC=https://github.com/LmeSzinc/AzurLaneAutoScript.git +SET WHOAMIKYO=https://github.com/whoamikyo/AzurLaneAutoScript.git call %ADB% kill-server > nul 2>&1 @@ -56,6 +59,7 @@ goto alas echo 1. EN echo 2. CN echo 3. JP + echo 4. UPDATER echo. echo :: Type a 'number' and press ENTER echo :: Type 'exit' to quit @@ -65,6 +69,7 @@ goto alas if %menu%==1 GOTO en if %menu%==2 GOTO cn if %menu%==3 GOTO jp + if %menu%==4 GOTO updater if %menu%==exit GOTO EOF else ( @@ -119,6 +124,121 @@ goto alas pause > NUL ) goto alas + +:: ----------------------------------------------------------------------------- +:updater +SET GIT_ALAS=%~dp0python-3.7.6.amd64\Git\cmd\git.exe +SET GLP=%GIT_ALAS% +SET ALAS_PY=alas.py + if exist %ALAS_PY% ( + goto updater_menu + ) else ( + cd AzurLaneAutoScript + echo. + goto updater_menu + ) +:: ----------------------------------------------------------------------------- +:updater_menu + cls + echo. + echo :: This update only will work if you downloaded ALAS with this file using option 2. clone + echo. + echo ::DISCLAIMER:: + echo IF YOU GET THE FOLLOWING ERROR: + echo "error: Your local changes to the following files would be overwritten by merge:Easy_Install-V2.bat" + echo YOU NEED RE-DOWNLOAD ONLY Easy_Install-V2.bat FILE FROM REPOSITORY AND OVERWRITTEN THE OLD FOR NEW FILE + echo + echo JUST RUN UPDATER INSIDE AzurLaneAutoScript FOLDER + echo. + echo 1. https://github.com/LmeSzinc/AzurLaneAutoScript (Main Repo, When in doubt, use it) + echo 2. https://github.com/whoamikyo/AzurLaneAutoScript (Mirrored Fork) + echo 3. https://github.com/whoamikyo/AzurLaneAutoScript (nightly build, dont use) + echo 4. Back to main menu + echo. + echo :: Type a 'number' and press ENTER + echo :: Type 'exit' to quit + echo. + + set /P choice= + if %choice%==1 GOTO LmeSzinc + if %choice%==2 GOTO whoamikyo + if %choice%==3 GOTO nightly + if %choice%==4 GOTO menu + if %choice%==exit GOTO EOF + + else ( + cls + echo. + echo :: Incorrect Input Entered + echo. + echo Please type a 'number' or 'exit' + echo Press any key to return to the menu... + echo. + pause > NUL + goto updater_menu + ) +:: ----------------------------------------------------------------------------- +:LmeSzinc + call %GLP% --version >nul + if %errorlevel% == 0 ( + echo GIT Found! Proceeding.. + echo Updating from LmeSzinc repository.. + call %GLP% fetch origin master + call %GLP% reset --hard origin/master + call %GLP% pull --ff-only origin master + echo DONE! + echo Press any key to proceed + pause > NUL + goto updater_menu + ) else ( + echo :: Git not detected, maybe there was an installation issue + echo check if you have this directory: + echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd + echo. + pause > NUL + ) +:: ----------------------------------------------------------------------------- +:whoamikyo + call %GLP% --version >nul + if %errorlevel% == 0 ( + echo GIT Found! Proceeding.. + echo Updating from whoamikyo repository.. + call %GLP% fetch whoamikyo master + call %GLP% reset --hard whoamikyo/master + call %GLP% pull --ff-only whoamikyo master + echo DONE! + echo Press any key to proceed + pause > NUL + goto updater_menu + ) else ( + echo :: Git not detected, maybe there was an installation issue + echo check if you have this directory: + echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd + pause > NUL + goto updater_menu + ) +:: ----------------------------------------------------------------------------- +:nightly + call %GLP% --version >nul + if %errorlevel% == 0 ( + echo GIT Found! Proceeding.. + echo Updating from whoamikyo nightly repository.. + call %GLP% fetch whoamikyo nightly + call %GLP% reset --hard whoamikyo/nightly + call %GLP% pull --ff-only whoamikyo nightly + echo Press any key to proceed + pause > NUL + goto updater_menu + ) else ( + echo :: Git not detected, maybe there was an installation issue + echo check if you have this directory: + echo AzurLaneAutoScript\python-3.7.6.amd64\Git\cmd + echo. + pause > NUL + goto updater_menu + ) + +:: ----------------------------------------------------------------------------- :EOF exit From 417a64f590e3877d40b27d7b5a3fa4eb7b3141f8 Mon Sep 17 00:00:00 2001 From: whoamikyo Date: Wed, 24 Jun 2020 15:36:44 -0300 Subject: [PATCH 8/8] Revert "Docs: Updated" This reverts commit 9f23b9bab026c05ea8787f83ad018c92db8e37c7. --- README.md | 2 +- README_en.md | 2 +- doc/Quick_guide.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 605918e67..6351898fb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [English Readme](README_en.md) `Translation in progress` -[Download Easy Install-v2](https://github.com/whoamikyo/AzurLaneAutoScript/releases) +[Download Easy Install-v2](https://github.com/LmeSzinc/AzurLaneAutoScript/raw/master/Easy_Install-V2.bat) # AzurLaneAutoScript Alas, an Azur Lane automation tool with GUI (Support CN, EN, JP, able to support other servers). diff --git a/README_en.md b/README_en.md index f4656d38d..a5d4bf57a 100644 --- a/README_en.md +++ b/README_en.md @@ -1,6 +1,6 @@ [English Quick Guide](doc%2FQuick_guide.md) -[Download Easy Install-v2](https://github.com/whoamikyo/AzurLaneAutoScript/releases) +[Download Easy Install-v2](https://github.com/LmeSzinc/AzurLaneAutoScript/raw/master/Easy_Install-V2.bat) # AzurLaneAutoScript diff --git a/doc/Quick_guide.md b/doc/Quick_guide.md index 30f2d39b2..d7de3f3ff 100644 --- a/doc/Quick_guide.md +++ b/doc/Quick_guide.md @@ -13,7 +13,7 @@ # New automatic installation method (Recommended) -* Just download the file [Easy_Install-V2.bat](https://github.com/whoamikyo/AzurLaneAutoScript/releases), put in some folder and run as administrator (`Right click> Run as administrator`) +* Just download the file [Easy_Install-V2.bat](https://raw.githubusercontent.com/LmeSzinc/AzurLaneAutoScript/master/Easy_Install-V2.bat), put in some folder and run as administrator (`Right click> Run as administrator`) * Do not install ALAS in a folder that contains spaces in the name, this will make the scripts not work correctly, created a folder at the root of some drive like `C:\ALAS\` or `D:\ALAS\`, Then place Easy_Install-V2.bat in that folder and run. * Then it will install everything and download ALAS * Will be created a folder `AzurLaneAutoScript` in the directory you run `Easy_Install-V2.bat`