Skip to content

Commit f35f6ea

Browse files
committed
fix: more fixes
1 parent 67014ed commit f35f6ea

File tree

29 files changed

+238
-206
lines changed

29 files changed

+238
-206
lines changed

content/1.introduction/5.faq.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ To create a new language module:
9393
1. Implement the `ILanguageModule` interface provided by Plugify.
9494
2. Compile the module with the same C++ version and compiler as the Plugify core.
9595
3. Place the compiled module in the `res/extensions` folder.
96-
4. Update the `plugify.pconfig` file to include the new module.
9796
9897
Refer to the [Language Module Development Guide](/developer-guide) for detailed instructions.
9998
::
@@ -154,7 +153,6 @@ Manifest files are JSON configuration files used by Plugify to define metadata a
154153
"$schema": "https://raw.githubusercontent.com/untrustedmodders/plugify/refs/heads/main/schemas/config.schema.json",
155154
"baseDir": "res",
156155
"logSeverity": "debug",
157-
"repositories": [],
158156
"preferOwnSymbols": false
159157
}
160158
```

content/2.essentials/1.installation.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ The `plug` app requires a configuration file named `plugify.pconfig` in the work
8080
"$schema": "https://raw.githubusercontent.com/untrustedmodders/plugify/refs/heads/main/schemas/config.schema.json",
8181
"baseDir": "res",
8282
"logSeverity": "debug",
83-
"repositories": [],
8483
"preferOwnSymbols": false
8584
}
8685
```
8786
- **`baseDir`**: Specifies the directory where plugins and language modules are located (default: `res`).
8887
- **`logSeverity`**: Controls the logging level (e.g., `debug`, `info`, `error`).
89-
- **`repositories`**: A list of remote repositories for downloading packages (leave empty for local testing).
9088
- **`preferOwnSymbols`**: Determines whether Plugify should prefer its own symbols over those provided by plugins (set to `false` for most use cases).
9189

9290
### Run the Testing App

content/2.essentials/2.directory-structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ The root directory is where you clone the Plugify repository and build the proje
1818

1919
The `res` directory is the central location for plugins and language modules. It has the following structure:
2020

21-
- **`plugins/`**: Contains individual plugin folders.
21+
- **`extensions/`**: Contains individual plugin folders.
2222
- Each plugin folder should include:
2323
- **`bin/`**: Contains the compiled plugin binaries (e.g., `.dll`, `.so`).
2424
- **`.pplugin`**: The plugin manifest file (e.g., `my-plugin.pplugin`).
25-
- **`modules/`**: Contains individual language module folders.
25+
- **`extensions/`**: Contains individual language module folders.
2626
- Each language module folder should include:
2727
- **`bin/`**: Contains the compiled module binaries (e.g., `.dll`, `.so`).
2828
- **`.pmodule`**: The language module manifest file (e.g., `cpp-module.pmodule`).

content/2.essentials/5.configuration.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ The `plugify.pconfig` file is required for the `plug` testing app to locate the
1616
"$schema": "https://raw.githubusercontent.com/untrustedmodders/plugify/refs/heads/main/schemas/config.schema.json",
1717
"baseDir": "res",
1818
"logSeverity": "debug",
19-
"repositories": [],
2019
"preferOwnSymbols": false
2120
}
2221
```
@@ -25,7 +24,6 @@ The `plugify.pconfig` file is required for the `plug` testing app to locate the
2524
#### Configuration Options:
2625
- **`baseDir`**: Specifies the directory where plugins and language modules are located (default: `res`).
2726
- **`logSeverity`**: Controls the logging level (e.g., `debug`, `info`, `error`).
28-
- **`repositories`**: A list of remote repositories for downloading packages (leave empty for local testing).
2927
- **`preferOwnSymbols`**: Determines whether Plugify should prefer its own symbols over those provided by plugins (set to `false` for most use cases).
3028

3129
### Plugin Manifest
@@ -94,5 +92,4 @@ The `.pmodule` file defines the configuration for a language module. Below is an
9492

9593
### Notes:
9694
- Ensure all configuration files are valid JSON and adhere to the schema provided by Plugify.
97-
- Use the `$schema` field to validate your configuration files against the official schema.
98-
- For local testing, leave the `repositories` field in `plugify.pconfig` empty.
95+
- Use the `$schema` field to validate your configuration files against the official schema.

content/2.essentials/6.commands.md

Lines changed: 87 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ Load the plugin manager with plugins and language modules.
1818
plg load
1919
```
2020

21-
**Options**:
22-
- `--ignore`: Load the plugin manager while ignoring missing or conflicting packages.
23-
24-
```bash
25-
plg load --ignore
26-
```
27-
2821
### Unload Plugin Manager
2922
Unload the plugin manager and all associated plugins and language modules.
3023

@@ -78,119 +71,161 @@ Display the current version of Plugify.
7871
plg version
7972
```
8073

81-
## **Package Manager Commands**
74+
# **Package Manager Commands (mamba)**
8275

83-
Plugify's package manager allows you to install, update, remove, and search for packages. It also supports managing local and remote repositories.
76+
Mamba is a fast, drop-in replacement for conda and uses the same CLI patterns and configuration. This guide replaces the old Plugify (`plg`) commands with **mamba** equivalents and gives a few practical notes for migrating your workflows. :contentReference[oaicite:0]{index=0}
77+
78+
---
8479

8580
### Install Packages
86-
Install one or more packages by name.
81+
Install one or more packages by name:
8782

8883
```bash
89-
plg install _package_name1_ _package_name2_ ...
84+
mamba install package_name1 package_name2 ...
9085
```
9186

9287
**Options**:
93-
- Install packages from a local manifest file:
88+
89+
- Install packages from a local package list (one package per line):
9490

9591
```bash
96-
plg install --file D:/_package_file_.json
92+
mamba install --file /path/to/package_file.txt
9793
```
9894

99-
- Install packages from a remote manifest file:
95+
*(This accepts the same file-format as `conda install --file` — a simple list of package specs.)*
96+
97+
- Create an environment from an `environment.yml` (recommended for reproducible envs):
10098

10199
```bash
102-
plg install --link https://website.com/_package_file_.json
100+
mamba env create -f environment.yml
103101
```
104102

105-
- Install missing packages to resolve dependencies:
103+
- If your manifest is a remote URL, fetch it then create:
104+
105+
```bash
106+
curl -sL https://website.com/environment.yml -o environment.yml
107+
mamba env create -f environment.yml
108+
```
109+
110+
*(Using environment YAMLs is the standard way to capture full environment metadata.)*
111+
112+
- Install packages and let mamba resolve dependencies (default behavior):
106113

107114
```bash
108-
plg install --missing
115+
mamba install package_name --yes
109116
```
110117

118+
*(Mamba resolves and installs dependencies automatically; avoid disabling dependency resolution unless you know what you’re doing.)*
119+
120+
---
121+
111122
### Update Packages
112-
Update one or more installed packages.
123+
Update one or more installed packages:
113124

114125
```bash
115-
plg update _package_name1_ _package_name2_ ...
126+
mamba update package_name1 package_name2 ...
116127
```
117128

118129
**Options**:
119130
- Update all installed packages:
120131

121132
```bash
122-
plg update --all
133+
mamba update --all
123134
```
124135

136+
*(Same command style as conda — `mamba` is a drop-in replacement here.)*
137+
138+
---
139+
125140
### Remove Packages
126-
Remove one or more installed packages.
141+
Remove one or more installed packages:
127142

128143
```bash
129-
plg remove _package_name1_ _package_name2_ ...
144+
mamba remove package_name1 package_name2 ...
130145
```
131146

132147
**Options**:
133-
- Remove all installed packages:
148+
- Remove all packages in an environment (remove the env):
134149

135150
```bash
136-
plg remove --all
151+
mamba env remove -n your_env_name
137152
```
138153

139-
- Remove conflicted packages with unresolved dependencies:
154+
- Force-remove or change dependency behavior only with caution (e.g. `--no-deps`); these flags can break environments.
140155

141-
```bash
142-
plg remove --conflict
143-
```
156+
---
144157

145158
### Search for Packages
146159

147160
#### List Local Packages
148-
Display all locally installed packages.
161+
Display all locally installed packages:
149162

150163
```bash
151-
plg list
164+
mamba list
152165
```
153166

154-
#### List Remote Packages
155-
Display all packages available in remote repositories.
167+
#### List Remote Packages (available in configured channels)
168+
Show packages available in remote repositories (search across channels):
156169

157170
```bash
158-
plg query
171+
mamba search
159172
```
160173

161-
#### Search Remote Packages
162-
Search for remote packages by name.
174+
#### Search Remote Packages (by name)
175+
Search for remote packages by name:
163176

164177
```bash
165-
plg search _package_name_
178+
mamba search package_name
166179
```
167180

168-
#### Search Local Packages
169-
Search for locally installed packages by name.
181+
#### Show Local Package Info
182+
Show locally installed package information:
170183

171184
```bash
172-
plg show _package_name_
185+
mamba list package_name
173186
```
174187

175-
### Manage Repositories
188+
*(`mamba search` and `mamba list` mirror conda usage; use `mamba repoquery` for deeper repository dependency queries if you need them.)*
189+
190+
---
176191

177-
#### Add a Repository
178-
Add a new remote repository for package installation.
192+
### Manage Repositories / Channels
193+
194+
#### Add a Channel (temporary)
195+
Use `-c` to specify a channel for a single install:
179196

180197
```bash
181-
mamba install -n your_env_name -c https://website.com/conda_channel/ package_name
198+
mamba install -n your_env_name -c channel_name_or_url package_name
182199
```
183200

184-
**Note**: Only add repositories from trusted sources to avoid security risks.
185-
186-
#### Create a Snapshot
187-
Generate a snapshot of all installed packages into a manifest file. The file will be saved in the base directory.
201+
#### Add a Channel (permanent)
202+
Add a remote repository (channel) to your configuration permanently:
188203

189204
```bash
190-
plg snapshot
205+
mamba config --add channels https://website.com/conda_channel/
191206
```
192207

193-
## **Best Practices**
194-
- Always use the `--ignore` flag with caution, as it may lead to unstable behavior if dependencies are missing or conflicted.
195-
- Regularly update your packages to ensure compatibility and security.
196-
- Use snapshots to back up your package configurations before making significant changes.
208+
**Note**: Only add channels from trusted sources. Channel order and priority matter — prefer a pinned channel list (e.g., `conda-forge` then `defaults`) to avoid unexpected package mixes. :contentReference[oaicite:5]{index=5}
209+
210+
---
211+
212+
### Create a Snapshot / Export Environment
213+
For backups and reproducibility, export the environment in one of two common ways:
214+
215+
- Export a YAML environment spec (cross-platform, recommended):
216+
217+
```bash
218+
mamba env export -n your_env_name > environment.yml
219+
```
220+
221+
- Create an *explicit* spec file for bit-for-bit reproducibility on the same OS:
222+
223+
```bash
224+
mamba list --explicit > spec-file.txt
225+
# recreate from spec:
226+
mamba create --name MY_ENV --file spec-file.txt
227+
```
228+
229+
*(Explicit spec files are single-platform but great for exact restores; YAML is more portable.)*
230+
231+
---

content/3.use-cases/1.metamod-plugin/4.updating.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To update plugins and language modules automatically, follow these steps:
5151
Run the following command to update all installed packages:
5252

5353
```bash
54-
plg update --all
54+
mamba update --all
5555
```
5656

5757
This will check for updates to plugins and language modules and install them automatically.
@@ -78,12 +78,7 @@ The **package manager cannot update itself or the core Plugify library** at this
7878
- Verify that you have the correct permissions to modify files in the server directory.
7979

8080
2. **Package Manager Errors**:
81-
- If the package manager fails to update, check your internet connection and ensure that the repository URLs in `plugify.pconfig` are correct.
82-
- Run the following command to resolve missing or conflicted packages:
83-
84-
```bash
85-
plg install --missing
86-
```
81+
- If the package manager fails to update, check your internet connection and ensure that the repository URLs are correct.
8782

8883
3. **Server Crashes After Update**:
8984
- Check the server logs for errors related to Plugify or its dependencies.

content/3.use-cases/1.metamod-plugin/5.metamod.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Metamod:Source is a plugin loader for Source 2 games like Counter-Strike 2. It p
2020
#### **Edit `gameinfo.gi`**:
2121
- Open the `gameinfo.gi` file located in `game/csgo`.
2222
- Add the following line to the `SearchPaths` section:
23-
```diff
23+
```
2424
"GameInfo"
2525
{
26-
game "Counter-Strike 2"
27-
title "Counter-Strike 2"
28-
title_pw "E58F8DE68190E7B2BEE88BB1EFBC9AE585A8E79083E694BBE58ABF"
26+
game "Counter-Strike 2"
27+
title "Counter-Strike 2"
28+
title_pw "E58F8DE68190E7B2BEE88BB1EFBC9AE585A8E79083E694BBE58ABF"
2929
3030
LayeredOnMod csgo_imported // Inherits the gameinfo.gi data from csgo_imported (which itself inherits from csgo_core)
3131
@@ -35,7 +35,7 @@ Metamod:Source is a plugin loader for Source 2 games like Counter-Strike 2. It p
3535
{
3636
Game_LowViolence csgo_lv // Perfect World content override
3737
38-
+ Game csgo/addons/metamod
38+
Game csgo/addons/metamod // [\!code ++]
3939
Game csgo
4040
Game csgo_imported
4141
Game csgo_core

content/3.use-cases/2.standalone-launcher/4.updating.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ To update plugins and language modules automatically, follow these steps:
5353
Run the following command to update all installed packages:
5454

5555
```bash
56-
plg update --all
56+
mamba update --all
5757
```
5858

5959
This will check for updates to plugins and language modules and install them automatically.
@@ -80,12 +80,7 @@ The **package manager cannot update itself or the core Plugify library** at this
8080
- Verify that you have the correct permissions to modify files in the game directory.
8181

8282
2. **Package Manager Errors**:
83-
- If the package manager fails to update, check your internet connection and ensure that the repository URLs in `plugify.pconfig` are correct.
84-
- Run the following command to resolve missing or conflicted packages:
85-
86-
```bash
87-
plg install --missing
88-
```
83+
- If the package manager fails to update, check your internet connection and ensure that the repository URLs are correct.
8984

9085
3. **Game Crashes After Update**:
9186
- Check the game logs for errors related to Plugify or its dependencies.

content/4.languages/1.python/2.first-plugin.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ By the end of this tutorial, you’ll have a working Python plugin that can be l
2525

2626
## Directory Structure
2727

28-
To ensure seamless integration with the Plugify framework, your plugin must follow a specific directory structure. Each plugin should be placed inside its own folder within the `plugins/` directory. The folder name must match the plugin’s name and follow these rules:
28+
To ensure seamless integration with the Plugify framework, your plugin must follow a specific directory structure. Each plugin should be placed inside its own folder within the `extensions` directory. The folder name must match the plugin’s name and follow these rules:
2929

30-
1. [x] **Allowed Characters**: Alphanumeric (`A-Z, a-z, 0-9`), special characters (`$, #, @, -`).
30+
1. [x] **Allowed Characters**: Alphanumeric (`A-Z, a-z, 0-9`), special characters (`_`).
3131
2. [x] **Spaces are NOT allowed** in the folder name.
3232
3. [x] The `.pplugin` configuration file must have the **same name** as the plugin folder.
3333

@@ -160,7 +160,7 @@ These methods are optional. If not implemented, the language module will not cal
160160
Once you have written your plugin, the next step is to **run and test it** within the Plugify system. To do this, follow these steps:
161161

162162
### Placing the Plugin in the Correct Directory
163-
Ensure your plugin is correctly structured inside the `plugins/` folder. Your plugin directory should contain:
163+
Ensure your plugin is correctly structured inside the `extensions` folder. Your plugin directory should contain:
164164

165165
Once the **plugin folder and manifest file** are correctly placed, Plugify will **automatically detect and attempt to load the plugin**.
166166

0 commit comments

Comments
 (0)