Pulse Package Manager (PPM) is a comprehensive package manager designed specifically for open.mp (Open Multiplayer), a multiplayer modification for Grand Theft Auto: San Andreas. PPM streamlines the management of dependencies, configurations, and project settings within open.mp projects, facilitating easier development and deployment processes.
Execute the script to install (or update if necessary) pulse
.
wget -qO- https://raw.githubusercontent.com/pulsepm/pulse/master/install.sh | bash -s
Download the latest version of Pulse from our releases.
Mark the downloaded binary as executable:
chmod u+x pulse
(Optional) Move it to a location that's defined in your $PATH
:
mv pulse /usr/local/bin/ # sudo permissions are required by this specific path
To set up a development environment, ensure you have pip
installed (it may be packaged as pip
or pip3
on your system).
While it's possible to have Pulse working without setting up an virtual environment, it's strongly not recommended.
If you don't want to bother with virtual environments, you may want to look into pipx.
Clone the repository:
git clone https://github.com/pulsepm/pulse
Navigate to the project directory:
cd pulse
Create and activate a virtual environment:
virtualenv venv --distribute && source venv/bin/activate
Install the required dependencies:
pip install -r requirements.txt
(Optional) Create a script for easier launching Pulse
Make sure ~/.local/bin
is in your $PATH
.
echo "python3 $(pwd)/pulse.py \"\$@\"" > ~/.local/bin/pulse && chmod u+x ~/.local/bin/pulse
Contributions to Pulse Package Manager are welcome! If you encounter any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request on the GitHub repository.
pulse init
.pulse config
and pulse install
.pulse build
and pulse run
.To utilize Pulse Package Manager in your open.mp project, install Pulse and execute the desired commands in your project directory. Refer to the command syntax and examples provided above for detailed usage instructions.
pulse.toml
Configuration[project]
name = "e"
publisher = "Mergevos"
repo = "e"
entry = "main.pwn"
output = "gm/main.amx"
[runtime]
version = "v1.2.0.2670"
[requirements]
live = [
"Ykpauneu/pmtest@main",
]
[compiler]
version = "3.10.11"
options = [ "-d3", "-;+"]
[compiler.profiles.dev]
version = "3.10.11"
options = [ "-d3",]
pulse config
pulse config
Configures Pulse.
The pulse config
command prompts the user to configure Pulse by modifying various project settings, including GitHub credentials and other configuration parameters. If a configuration file already exists, it offers options to modify the existing configuration; otherwise, it guides the user through the process of creating a new configuration file. A welcome message is displayed at the beginning to guide the user through the configuration process.
pulse init
pulse init
Initializes a new Pulse project.
Upon executing the pulse init
command, the user is prompted to provide details about the new open.mp project. These details include the user's GitHub username, project name, repository name, entry file name, and whether to initialize a GitHub repository or use Pods for project isolation. If the user chooses to initialize a GitHub repository, the tool creates the repository with the provided credentials via pulse configure
. If project isolation with Pods is selected, the command runs pulse pods
to set up project isolation.
pulse build [PROFILE]
pulse build [PROFILE]
Builds the pawn file.
Profile: str
: Profile specified by a string representation within pulse.toml
.The pulse build
command compiles the pawn file using options specified within the pulse.toml
configuration file. If no options are present, it uses a default list of options. Users can specify build profiles defined in pulse.toml
. If the specified profile is not present, an error is shown, aborting the compilation process. The command adds legacy list, modules list, and dependencies from the requirements
folder as include paths.
pulse run
pulse run
Runs the open.mp server.
Executing the pulse run
command launches the omp-server. If the .pods
folder is present, the command ignores the version specified in pulse.toml
and executes the version located within the .pods
folder. Otherwise, it uses the version specified in pulse.toml
. If the specified version is not installed, it is automatically installed. Additionally, the command adds plugins from project_folder/requirements/plugins
into the plugins
folder of the server and moves the output file so the server has an executable file.
pulse pods
pulse pods
Initialize project isolation.
The pulse pods
command initializes project isolation by creating a .pods
folder and installing a compiler or runtime of a specific version, which is taken from the cache or downloaded as needed.
pulse install [PACKAGE]
pulse install [PACKAGE]
package: str
: Package name. Branch, commit, or tag specification is supported.Install a package for open.mp.
pulse install Ykpauneu/pmtest@main
The pulse install
command installs the specified package, including its dependencies, plugins, and configuration. It supports branch, commit, or tag specifications. The tool checks for the existence of a pulse.toml
file; if it exists, the package is loaded, and its dependencies are loaded recursively (including dependencies for dependencies). If the package contains a *.dll
or *.so
plugin, it is moved to the plugins folder. Similar actions are performed in the project_folder/requirements
folder. The package is also added to pulse.toml
.
pulse uninstall [PACKAGE] [OPTIONS]
pulse uninstall [PACKAGE] [OPTIONS]
package: str
: Package name. Branch, commit, or tag specification is supported (same for pulse install
).--recursive
: Removes the package with all dependencies.Uninstall a package from open.mp.
pulse uninstall Ykpauneu/pmtest==2.0.0
The pulse uninstall
command removes the specified package from the Pulse Package Configuration and from project_folder/requirements
. If the --recursive
flag is used, it removes all dependencies of the specified package as well. After removal, the package entry is deleted from project_folder/pulse.toml
.
pulse ensure
pulse ensure
Ensures all packages are present.
The pulse ensure
command reads the packages specified in project_folder/pulse.toml
, then copies them from the Pulse Package Configuration to project_folder/requirements
(including plugins, dependencies, etc.). If any packages are not found, they are installed and automatically copied.
To uninstall Pulse and remove only the program binary, execute the following command in your terminal:
wget -qO- https://raw.githubusercontent.com/pulsepm/pulse/master/install.sh | bash -s -- --remove
To completely remove Pulse, including all associated configuration and cache directories, use the --remove-all option:
wget -qO- https://raw.githubusercontent.com/pulsepm/pulse/master/install.sh | bash -s -- --remove-all
The --remove-all option will delete all files and directories related to Pulse. Ensure you have backed up any important data before proceeding with this command.
Pulse Package Manager is licensed under the MIT License.
This enhanced Markdown document provides a comprehensive overview of Pulse Package Manager (PPM) tailored specifically for open.mp projects, with detailed explanations of commands, configurations, and usage guidelines.