updated readme

This commit is contained in:
partisan 2024-12-13 12:23:51 +01:00
parent 6a0f36bcf2
commit f678947010

View file

@ -66,14 +66,22 @@ Here are the details of each parameter used in the patching system:
- Used for general file modifications. - Used for general file modifications.
- **Example:** - **Example:**
```patch ```patch
i: /browser/branding/official/configure.sh
o: /browser/branding/official/configure.sh
-MOZ_APP_DISPLAYNAME=Firefox -MOZ_APP_DISPLAYNAME=Firefox
+MOZ_APP_DISPLAYNAME=Spitfire +MOZ_APP_DISPLAYNAME=Spitfire
``` ```
Note: *Type will fallback to t:standard when no type is specified.*
2. **`pref`:** Indicates that the patch is modifying preference settings (e.g., Firefox `prefs.js`). 2. **`pref`:** Indicates that the patch is modifying preference settings (e.g., Firefox `prefs.js`).
- When `t:pref` is specified, the script will search for existing preferences in the input file and replace them with the new ones provided in the patch. If not found, it will add the new preference. - When `t:pref` is specified, the script will search for existing preferences in the input file and replace them with the new ones provided in the patch. If not found, it will add the new preference.
- **Example:** - **Example:**
```patch ```patch
t:pref t:pref
i:/browser/branding/nightly/pref/firefox-branding.js
o:/browser/branding/nightly/pref/firefox-branding.js
+pref("extensions.getAddons.showPane", false); // HIDDEN +pref("extensions.getAddons.showPane", false); // HIDDEN
``` ```
3. **`new`:** Used for creating new files or overwriting existing files with specified content. 3. **`new`:** Used for creating new files or overwriting existing files with specified content.
@ -85,6 +93,14 @@ Here are the details of each parameter used in the patching system:
+This is a new file created by Spitfire Patcher. +This is a new file created by Spitfire Patcher.
``` ```
4. **`copy`:**: Copies files or directories from the input path to the output path, overwriting if necessary.
- Copies the contents of a file or directory from i: to o:.
- **Example:**
```patch
t:copy
i:/patcher/pre-compile-patches/branding
o:/browser/branding/official
```
### Example Patch Files ### Example Patch Files
@ -119,7 +135,7 @@ o:/browser/branding/official/new-file.txt
| ----------- | ---------- | ------------------------------------- | ------------------------------------- | | ----------- | ---------- | ------------------------------------- | ------------------------------------- |
| `i:` | Yes | Specifies the input file path. | `i:/browser/app/profile/firefox.js` | | `i:` | Yes | Specifies the input file path. | `i:/browser/app/profile/firefox.js` |
| `o:` | Yes | Specifies the output file path. | `o:/browser/app/profile/firefox.js` | | `o:` | Yes | Specifies the output file path. | `o:/browser/app/profile/firefox.js` |
| `t:` | No | Defines the type of patch. | `t:pref`, `t:standard`, or `t:new` | | `t:` | No | Defines the type of patch. | `t:pref`, `t:standard`, `t:new`, or `t:move` |
| `+` | Yes | Adds a line to the output file. | `+MOZ_APP_DISPLAYNAME=Spitfire` | | `+` | Yes | Adds a line to the output file. | `+MOZ_APP_DISPLAYNAME=Spitfire` |
| `-` | Yes | Removes a line from the input file. | `-MOZ_APP_DISPLAYNAME=Firefox` | | `-` | Yes | Removes a line from the input file. | `-MOZ_APP_DISPLAYNAME=Firefox` |