This repository contains the source code to the current template used to create plugins for Ashita v4.
Building this plugin template requires the use of CMake. (CMake 3.22 or newer currently.)
CMake
- https://cmake.org/
We recommend using either of the following development environments to create and compile plugins:
Visual Studio Code
- https://code.visualstudio.com/Visual Studio 2022
- https://visualstudio.microsoft.com/
In order to make use of VSCode, you will need to install a few extensions to properly compile this code:
C/C++
- https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptoolsCMake
- https://marketplace.visualstudio.com/items?itemName=twxs.cmakeCMake Tools
- https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
In order to make use of Visual Studio 2022 (or newer), you need to make sure that you install the following optional packages:
Desktop development with C++
C++ CMake tools for Windows
Additional runtimes and platform targets are optional and up to you on which you wish to support. Please note that Ashita is a 32bit (x86) application and environment. All plugins must be compiled as 32bit (x86) as well!
While we do recommend using VSCode or VS2022+ in order to develop plugins for Ashita, it is not required. You may use any kind of environment that you prefer. Building plugins also does not require CMake and is simply a recommandation while following and using this plugin template.
Plugins can be built using any compiler that supports the following:
- Must compile to 32bit (x86).
- Must support exporting demangled function names.
- Must support properly handling calling conventions. (ie.
__stdcall
,__thiscall
, etc.) - Must support properly inheriting from C++ class objects. (Properly implement interfaces/vtables.)
To properly build this plugin template, it is required to have the environment variable ASHITA4_SDK_PATH
set and pointed to your current Ashita v4 plugin sdk folder. This project includes a CMake package that helps automatically find and configure the Ashita v4 SDK for use by using this variable.
You can set this variable one of many ways such as:
- As a global system environment variable.
- As a user-specific environment variable.
- As a local environment variable to the command line when building.
To add this environment variable at the user or system level on Windows, please follow these steps:
- Click
Start
. - Type in
advanced system settings
and choose the option that shows. (View advanced system settings
) - If not already selected, click the
Advanced
tab at the top. - Click the
Environment Variables
button near the bottom of the window.
Here you can decide if you wish to set this variable for just your local user or for the entire system.
- To set the variable for just your user, follow the next steps under the
User variables for <your username>
section. - To set the variable for the entire system, follow the next steps under the
System variables
section.
- Click
New
. - In the
Variable name
text box, enter:ASHITA4_SDK_PATH
- In the
Variable value
text box, enter the path to your Ashita SDK folder. (This is located in the/plugins/
folder where you have Ashita installed.) - For example,C:\Ashita\plugins\sdk\
- Click
Ok
on all windows to save the changes.
This project template makes use of an expected environment variable ASHITA4_SDK_PATH
to locate where you have the Ashita v4 SDK installed to. This path should point to your current Ashita v4 /plugins/sdk/
folder location
The Ashita plugin SDK, and thus, this plugins source code are both released under GNU LGPL v3