{"id":19462591,"url":"https://github.com/zerodaycode/rumble-lol-plugin","last_synced_at":"2025-02-25T12:47:43.655Z","repository":{"id":46615654,"uuid":"410061878","full_name":"zerodaycode/Rumble-LoL-Plugin","owner":"zerodaycode","description":"The League of Legends plugin for the Rumble AI Virtual Assistant!","archived":false,"fork":false,"pushed_at":"2024-02-22T21:05:03.000Z","size":114831,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T02:51:54.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerodaycode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.MD","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS.md","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-09-24T18:18:43.000Z","updated_at":"2023-11-28T18:40:03.000Z","dependencies_parsed_at":"2024-02-22T22:24:19.567Z","dependency_job_id":null,"html_url":"https://github.com/zerodaycode/Rumble-LoL-Plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodaycode%2FRumble-LoL-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodaycode%2FRumble-LoL-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodaycode%2FRumble-LoL-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodaycode%2FRumble-LoL-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerodaycode","download_url":"https://codeload.github.com/zerodaycode/Rumble-LoL-Plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240672817,"owners_count":19838929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T18:04:02.319Z","updated_at":"2025-02-25T12:47:43.610Z","avatar_url":"https://github.com/zerodaycode.png","language":"C++","readme":"# The Rumble LoL Plugin for Rumble-AI\n\nWelcome to the Rumble LoL Plugin, or **RLP** for short.\nThis is the documentation (developer oriented) for the project.\n\n[![Build Rumble LoL Plugin](https://github.com/zerodaycode/Rumble-LoL-Plugin/actions/workflows/build_cmake.yml/badge.svg)](https://github.com/zerodaycode/Rumble-LoL-Plugin/actions/workflows/build_cmake.yml)\n\n## Building the project\n\nIn order to build this project, we provide two different options that you may want to choose.\n\n### A bit of history of our setup\n\nIn the early times, this was developed on Microsoft's `Visual Studio`, using all its power for generate the `C++` library, and\nglue the code to generate the `Python` module, that ultimately will run as a plugin of `Rumble-AI`, but we liked to move\ntowards a more **Open Source** kind of tools.\n\nSo, later, we started to use the `setuptools` Python's module to build the project. This approach is really nice, and an\neasy one to set up, so it was really welcome at that time. That allowed us to use other editors, and a build system that didn't\ndepend on the many configuration files that come attached with `VS` projects. Even tho, was a nice step, but we still need the\nMicrosoft compiler, their `STD library` implementation, so on and so forth...\n\n## CMake and LLVM tools on Windows\n\nThis is our main way of build and compile the project. Here, in `Zero Day Code`, we are big fans of the `LLVM` project.\nFor that reason, we set up an intricate way of building the project, but, in exchange, we are building it with zero proprietary dependencies.\n\nThe most notorious ones:\n\n- Make\n- CMake\n- The LLVM project, for getting the clang compiler frontend and its **C++** marvelous tools, like code formatters, static analyzers, address sanitizers...\n- Python\n\n\u003e *Note*: This approach will require a **MSYS2** installation, and get all the components through the `Clang64` environment.\n\u003e Even tho is technically possible to make the same job that we will explain below with other kind of installations,\n\u003e tools or environments, that's the one that we prefer, that we will document and will support.\n\u003e But feel free to play as much as you want with other tools, and propose any if better.\n\nWe will be using those three, and no others, from the `Clang64` environment of **MSYS2**.\n\n\u003e *Note*: We found tons of problems with this setup, until we managed to make it work consistently and\n\u003e productively. The thing is that other installations may silently interfere in your development journey, like other Python\n\u003e versions installed in your machine. Not for sure, but keep that in mind.\n\n### Gather the dependencies required\n\nOpen the **MSYS2** **Clang64** terminal and download the following tools\n\n```bash\npacman -S mingw-w64-clang-x86_64-cmake\npacman -S mingw-w64-clang-x86_64-ninja\npacman -S mingw-w64-clang-x86_64-clang\npacman -S mingw-w64-clang-x86_64-llvm (already gathered with `pacman -S mingw-w64-clang-x86_64-clang`)\npacman -S mingw-w64-clang-x86_64-llvm-libs (already gathered with `pacman -S mingw-w64-clang-x86_64-clang`)\npacman -S mingw-w64-clang-x86_64-clang-analyzer (non required, but nice to have)\npacman -S mingw-w64-clang-x86_64-lld (already gathered with `pacman -S mingw-w64-clang-x86_64-clang`)\npacman -S mingw-w64-clang-x86_64-libc++ (already gathered)\npacman -S mingw-w64-x86_64-libunwind\npacman -S mingw-w64-clang-x86_64-clang-tools-extra\npacman -S pacman -S mingw-w64-clang-x86_64-compiler-rt (already gathered with `pacman -S mingw-w64-clang-x86_64-clang`)\npacman -S mingw-w64-clang-x86_64-gcc-compat\n```\n\n\u003e Feel free to merge them in just one command.\n\n### Optimizing your development workflow with `Make` (recommended)\n\nIf you want to take advantage of working with the `Makefiles` configured for the project, you'll need the following one:\n\n```bash\npacman -S mingw-w64-clang-x86_64-make\n```\n\n#### Renaming the `Make` binary (optional)\n\nThe downloaded binary comes named as `ming32-make.exe`.\n\nFor convenience, you can go to the `clang64` **bin** folder of your **MSYS2** installation, and just rename the binary by strip\nthe prefix before the hyphen (and the hyphen itself) so you end up having a `make.exe` binary.\n\nFrom this:\n\n![Alt text](/docs/assets/mingw32-make.png)\n\nTo this:\n\n![Alt text](/docs/assets/make.png)\n\n\u003e We'll assume that you did this optional step when explain *make* commands. If not, you'll must use original binary name.\n\nYou have a more in-depth description of the tools in a toy project used as example\non how to integrate this setup with OpenCV on Windows [here](https://github.com/Pyzyryab/OpenCV-Clang-Windows)\n\n\u003e With this build system we aren't able to compiling **OpenCV** from scratch with `Clang`, because `Clang` refuses to compile certain parts of `OpenCV` (while other\n\u003e compilers are just fine). Don't worry, we stand on the side of the `Clang's` perspective. But we are just able to provide a `OpenCV` version up until the `4.6.0` (included).\n\u003e This is the one that is downloaded, built and installed directly by `CMake`. Don't worry about it, but we just want to let you know.\n\n### Add them to your path (optional)\n\nFor making the things easier, we just add the **MinGW** `Clang64` environment to our *PATH* in our personal\ncomputers. Take this in consideration, because certain elements are configured assuming this premise.\n\n## Configuring and building the project\n\nWith all the dependencies that we need gathered, now is straightforward to configure and build the project.\n\n1. Create a new `build` directory and move inside it.\n\nThis is where all the elements of the compilation process will be placed, and from where the build process will be triggered.\n\n```bash\nmkdir build\ncd build\n```\n\n2. From the build directory, call `CMake` to configure and build the project\n\n```bash\ncmake -G \"Ninja\" -DCMAKE_TOOLCHAIN_FILE=./clang-x86_64_windows_gnu.cmake\n```\n\n3. Finally:\n\n```bash\ncmake --build .\n```\n\n\u003e **IMPORTANT:* The first time that you configure and build the project, you must be patient. It took a bit\n\u003e to download and configure `OpenCV`, and the first time also takes a long time to build it.\n\n### Do it in one line\n\nThose steps above are the classical way of configure and build a `CMake` based project. But you can create the `build` directory\nand run `CMake` configure and build process from the project's root in a nice one-liner with the following command:\n\n```bash\ncmake -S . -B ./build -G \"Ninja\" -DCMAKE_TOOLCHAIN_FILE=./clang-x86_64_windows_gnu.cmake \u0026\u0026 cmake --build ./build\n```\n\n\u003e By default, the project is build in *Debug* mode. If you want to test a **release** version, just add to\n\u003e the command line `-DCMAKE_BUILD_TYPE=Release`, or use the `make build_release`\n\u003e *NOTE:* Project's dependencies are built in **release** mode always.\n\n### Make support\n\nWe've recently added support for `Make` via Makefiles. This allows us to have a nice and better workflow while we're\nworking on the project. Available `Make` commands are:\n\n- `make configure` or `make configure_r` for work targeting release builds\n- `make compile`\n- `make run`\n\n#### Cleaning the project\n\nSometimes comes in handy to have a fresh clean. You can just delete the `build` and `install` folders, or just\n\n- `make clean`\n\n## Running the project\n\nNow that finally the project has been built, it's time to finally use the `Rumble-LoL-Plugin`.\n\n### Running in STANDALONE mode\n\nFor developers, we create a small custom script that takes care of setting up the plugin in standalone mode.\nThis means, without being a `plugin` working inside `Rumble-AI`.\n\nThe main purpose of this mode is to let the developers quickly debug changes made without having to worry about\nto plugin it into the virtual assistant.\n\nThis mode just takes text directly by the command line to perform actions that match voice patterns. i.e, the same\nas you would say to the virtual assistant, but directly from terminal, so you can quickly debug changes and speed\nup the introduction of new functionalities.\n\nFor this, from the root of the project, just run:\n\n```bash\npython ./python/run_rlp.py\n```\n\nor with `Make`:\n\n```bash\nmake run\n```\n\nAnd you should see the application running directly in your terminal.\n\nFor see what options are available to control, you main want to take a look to the\nsource code where they are defined, in [this translation unit](./code/rumble_lol_plugin/league_client/api_buttons.hpp)\n\n### TODO make a real list with the available actions (through buttons)\n\n### Running as a Rumble-AI plugin (#TODO)\n\n#### TODO ideas for the description\n\n- Get Rumble-AI\n- Install the RLP plugin\n- Or maybe generate a Python package with all the deps and DLLs?\n\n## Legacy build system way\n\nWe already discussed the `setuptools` way. This one is the easiest way possible of building the project, and it's configured out of the\nbox for work immediately. On the other hand, it's code and configuration aren't as accurate as possible, and you won't use what we consider\nthe best technologies available.\n\nBut it could be a solution if you don't want to have the **MinGW** setup, or if you already have an installation of `OpenCV` or whatever\ngood reason is.\n\n\u003e *NOTE:* Take in consideration that this method could be deprecated soon, as we are planning to change our way to interact with\n\u003e the **League of Legends** client, and instead as parse it as image and manually click handling the mouse pointer, we will change\n\u003e to directly make REST API calls. This will probably introduce `***The Rust Programming Language*** into the ecosystem,\n\u003e and will be glued with some existent C++ code in the codebase.\n\nFor now, our project heavy relies on [OpenCV](https://opencv.org), concretely in this release [4.8.0](https://opencv.org/releases/),\nso, for you to be able to run the project, you'll need an installation of `OpenCV`.\n\n\u003e For building the project in this way, we support up until OpenCV \u003c= 4.8.1.\n\nWe assume up until this point, that you already installed `OpenCV`. Where you installed it, it's completely up to you,\nbut remember to modify the `include` paths accordingly in the [setup.py](./python/c++_bindings/setup.py),\nas well the ones to the dependent libraries and DLL's.\n\nThe best part of this procedure is that is extremely straightforward. You just need to literally use *Python's pip* package manager\nto get the job done.\n\n\u003e Is possible that we're missing certain Python packages. So, while installing, if some package is missing just `pip install \u003cpackage_name\u003e`\n\u003e and try again.\n\nFrom the root of the project, you just need to invoke:\n\n```bash\npip install ./python/c++_bindings/setup.py\n```\n\nYou'll see the process build starting. If everything goes well, `pip` will automatically make the `C++` code a library that will be generated\nin a way that `Python` will specifically understand and therefore, that can consume.\n\nAlso, it will install directly `RLP` in your *Python* installation, so the only thing that you'll need to start to use it is:\n\n```Python\nimport rlp\n\n# Rest of your Python code...\n```\n\n## Technical specifications overview\n\n### Project layout\n\nFor this project, at this time of writing (11/2023), and after two years without develop nor maintaining this codebase,\nwe are adapting our project layout [to this specification](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1204r0.html)\njust for the sake of having a good internal structure and coherence in the project layout, but introducing an intermediate\nfolder named code, mixing the modern GitHub CI typical configurations and furthermore, for hide our `includePath` from the\nroot of the project, taking as \"root\" `\u003crumble_league_plugin/...\u003e`\n\n### C++\n\nTODO - Language level, build system, compilation process?\n\n### Python\n\n## Building process (setuptools and (CMake?), maybe Zork++)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerodaycode%2Frumble-lol-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerodaycode%2Frumble-lol-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerodaycode%2Frumble-lol-plugin/lists"}