diff --git a/EasyALAS_CLICK_INSTALL.bat b/EasyALAS_CLICK_INSTALL.bat new file mode 100644 index 000000000..23679a951 --- /dev/null +++ b/EasyALAS_CLICK_INSTALL.bat @@ -0,0 +1,82 @@ +@echo off +:: Initial message +echo ==================================================== +echo Easy install for ALAS +echo Install Python 3.7.6 x64, ADB, GIT, CHOCOLATEY +echo ==================================================== +echo .................................................... +echo By whoamikyo +echo ==================================================== +:: +echo. +:: request admin previleges, if no admin previleges +net session >nul 2>&1 +if NOT %errorLevel% == 0 ( +powershell start -verb runas '%0' am_admin & exit /b +) + +set PATH=%PATH%;C:\Python37\;C:\Python37\Scripts\;%PROGRAMDATA%\chocolatey\lib\adb\tools\platform-tools\;%PROGRAMFILES%\Git\cmd;%PROGRAMDATA%\chocolatey\bin + +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 + +echo. +echo Starting Installation + +:: Installing chocolatey +echo Downloading chocolatey +PowerShell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" +call refreshenv +:: Using Environment variables for program files +:: Uninstalling/removing the platform tools older version, if they exists and killing instances of adb if they are running +echo Uninstalling older version +adb kill-server > nul 2>&1 +rmdir /Q /S "%PROGRAMFILES%\platform-tools" > nul 2>&1 + +echo installing ADB +choco install adb --force -y +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +echo installing python +choco install python --version=3.7.6 -dfvym +call refreshenv +call python --version +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +echo installing git +choco install git --force -y +call refreshenv +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +echo Cloning repository +pushd %~dp0 +git clone https://github.com/LmeSzinc/AzurLaneAutoScript.git +popd +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 + +:: killing adb server +"%PROGRAMDATA%\chocolatey\lib\adb\tools\platform-tools\adb.exe" kill-server > nul 2>&1 + +pushd %~dp0 +echo creating Virtual Environment +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +call python -m venv .\AzurLaneAutoScript\venvalas +echo activating Virtual Environment +:: timout +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +call .\AzurLaneAutoScript\venvalas\Scripts\activate +echo installing requirements +pip install -r .\AzurLaneAutoScript\requirements.txt +popd + + +:: Installation done +echo. +echo. +echo Hurray!! Installation Complete, Now you can proceed +PowerShell -Command "Start-Sleep -s 10" > nul 2>&1 +echo. +echo press any key to exit +pause > NUL \ No newline at end of file diff --git a/doc/How_to_update.md b/doc/How_to_update.md index 4223cf36b..a372b5db0 100644 --- a/doc/How_to_update.md +++ b/doc/How_to_update.md @@ -11,9 +11,9 @@ # How to Download repository through GIT -* Like above, you need GIT installed and make sure it is installed in the same path as it is in the file `downloader.bat`. +* Like above, you need GIT installed and make sure it is installed in the same path as it's in the file in the file `downloader.bat`. * If you already download `AzurLaneAutoScript-master.zip`, just extract and double-click in `downloader.bat`, then the repository will be cloned again, but now the .git folder will be created. -* If you haven't downloaded the .zip, just download the `downloader.bat` file, created a folder where you want ALAS to be downloaded, put `downloader.bat` inside that folder and click. +* If you haven't downloaded the .zip, just download the `downloader.bat` file, create a folder where you want ALAS to be downloaded, put `downloader.bat` inside that folder and click. If you do it right, you will have a similar result, so only what has been changed will be downloaded again. diff --git a/downloader.bat b/downloader.bat deleted file mode 100644 index 19cc06794..000000000 --- a/downloader.bat +++ /dev/null @@ -1,7 +0,0 @@ -@ECHO off -set PATH=%PATH%;C:\Program Files\Git\cmd -cls - -git clone https://github.com/LmeSzinc/AzurLaneAutoScript.git - -pause \ No newline at end of file diff --git a/module/config/config.py b/module/config/config.py index 42a2bff8e..01636555c 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -149,8 +149,8 @@ class AzurLaneConfig: """ module.device """ - SERIAL = '127.0.0.1:62001' - PACKAGE_NAME = 'com.bilibili.azurlane' + SERIAL = '' + PACKAGE_NAME = '' COMMAND = '' USE_ADB_SCREENSHOT = True USE_ADB_CONTROL = False diff --git a/module/config/dictionary.py b/module/config/dictionary.py index 6346eaaa5..2e392a672 100644 --- a/module/config/dictionary.py +++ b/module/config/dictionary.py @@ -202,8 +202,9 @@ dic_true_eng_to_eng = { 'hard': 'hard', # Event - 'event_20200521_en': 'event_20200521_en', + 'Iris_of_Light_and_Dark': 'event_20200521_en', 'Skybound_Oratorio': 'event_20200611_en', + 'Prelude_under_the_Moon': 'event_20200603_en' } dic_eng_to_true_eng = {v: k for k, v in dic_true_eng_to_eng.items()} diff --git a/updater.bat b/updater.bat index ac277331e..166b460d3 100644 --- a/updater.bat +++ b/updater.bat @@ -1,5 +1,5 @@ @ECHO off -set PATH=%PATH%;C:\Program Files\Git\cmd +set PATH=%PATH%;%PROGRAMFILES%\Git\cmd cls :start ECHO.