AxelBjork / Rush-Royale-Bot

Python based bot for Rush Royale
MIT License
32 stars 21 forks source link

Last update, launch_gui.bat #14

Closed rand0mka closed 2 years ago

rand0mka commented 2 years ago

Hi Boss!

I've tested last version and can't find some files: call .bot_env\Scripts\activate.bat - where I can find folder Scripts with this bat file?

AxelBjork commented 2 years ago

Hello,

Cool that you tested it! I tried to make sure the old notebook still works for now, so that's always an alternative and it works the same way.

The launch script just tries to run the Src/gui.py file in its own python environment. I'm guessing the issue is that you haven't run the install.bat, which is what creates and installs all the Python packages needed.

I can probably make it so the install file is run automatically if the environment is not created yet.

When you try to start the bot with the gui it will also try to install Scrcpy in the local folder, so the previous Scrcpy installation is not needed anymore.

rand0mka commented 2 years ago

I had, but it also trying to find directory script:

C:\Code\Rush-Royale-Bot>C:\Code\Rush-Royale-Bot\install.bat

C:\Code\Rush-Royale-Bot>python -m venv .bot_env Python C:\Code\Rush-Royale-Bot>call .bot_env\Scripts\activate.bat Системе не удается найти указанный путь. (The system cannot find the specified path.)

If you want I can give you access to test

AxelBjork commented 2 years ago

The python -m venv .bot_env command should create a virtual python environment located in the bot directory. Scripts\activate.bat is a base python script to activate the environment which will run the gui.

92b6973da4fdc420aeefba6b0d8d6f9a

You also don't need to do this step, but it helps with compatibility if you are using python for other things on your computer.

rand0mka commented 2 years ago

but I can't run gui :( And I don't have activate.bat file anywhere (in python directory scripts also) image

Can you please copy this file for me?

AxelBjork commented 2 years ago

The base python installation won't have a activate script, only venvs do https://docs.python.org/3/library/venv.html

I just did the whole installation process on my laptop probably had the same thing as you because Python was not added to path, or when I type python it goes to the Microsoft store. You can turn that off in windows settings under 'Manage app execution aliases', but I also just made it look in app data for python39.

%LOCALAPPDATA%\Programs\Python\Python39\python -m venv .bot_env

call .bot_env\Scripts\activate.bat

pip install -r requirements.txt

You can try run this in the bot folder.

rand0mka commented 2 years ago

Thanks a lot! image