Skip to main content
Version: Next

LMES Patch Packaging Specification

📋 Overview​

This document details the usage specifications and version management rules for the LMES Patch Packaging Tool to ensure the standardization and traceability of the patch packaging process.

![image-20251020113014473](./LMES Patch Packaging Specification.assets/image-20251020113014473.png)


🔢 Version Number Specification​

📌 Version Format​

LMES patch versions use a four-segment version number format:

Major.Minor.Revision.Patch

Example: 2.7.1.6

📊 Version Number Meaning​

SegmentMeaningExample
2.7.1 (First three segments)Product version number, corresponding to the main program version2.7.1
6 (Fourth segment)Patch version number, must be incremented each time a patch is released6

⚠️ Version Number Management Rules​

  1. Product Version Number (First three segments) must be consistent with the main program version.
  2. Patch Version Number (Fourth segment) starts from 1 and must be +1 for each new patch release.
  3. No Skipping, must increment sequentially.

🔄 Packaging Process​

1️⃣ Preparation​

Before starting packaging, please ensure the following preparations are completed:

✅ Directory Structure Check

  • Ensure the LMES-Patch directory structure is complete
  • Check if hotplugsprofile.json configuration file exists
  • Confirm CMS.HotPlug.Packer.exe packaging tool is available

✅ Required File Verification

  • Must ensure LMES Patch Description.txt file exists in the root directory of LMES-Patch

2️⃣ Version Input​

When running the packaging script, you need to input the complete four-segment version number.

Format Requirement: 2.7.1.6

Input Prompt Description:

  • 🔴 Red Prompt: Shows version number format example
  • 🟡 Yellow Description: Clearly informs the meaning of each part of the version number

3️⃣ Automatic Configuration​

The script will automatically execute the following configurations:

⚙️ Configuration File Update

  • Update version information in hotplugsprofile.json
  • Set patch description information (including packaging timestamp)
  • Configure dependency information

4️⃣ Packaging Output​

📦 Generate Patch Package

  • Generate patch package file in .cmsplugs format
  • Filename Format: lmes-v{ProductVersion}-patch{PatchVersion}.cmsplugs
  • Example: lmes-v2.7.1-patch6.cmsplugs

5️⃣ Update Mechanism​

🔁 LMES patches adopt cumulative update mode

MechanismDescription
📁 New patch contains all files from old patchesEach packaging is a complete set of files
🔄 Same-name file overwrite mechanismFiles with the same name in the new patch overwrite those in the old patch, indicating an update
⚡ Direct overwrite installationNo need to uninstall the old version, new files directly overwrite old files
📈 Cumulative updateInstalling the latest patch provides all historical functions

📄 Configuration File Description​

🔧 hotplugsprofile.json​

⚠️ Important Reminder: Automatically updated by the packaging script, no manual modification needed

Contains basic information and metadata of the patch package:

{
"HotPlugs": [
{
"HotPlugId": "LMES-Patch",
"HotPlugName": "LMES-Patch",
"Category": "LMES",
"Version": "v2.7.1.6",
"Description": "LMES Patch (2024-12-19 14:30:45)",
"Dependencies": [
{
"HotPlugId": "LMES",
"Version": "v2.7.1"
}
]
}
]
}

📋 Field Description​

Field NameDescriptionGeneration Method
HotPlugIdPatch identifier, fixed as "LMES-Patch"Auto-generated
HotPlugNamePatch name, fixed as "LMES-Patch"Auto-generated
CategoryCategory, fixed as "LMES"Auto-generated
VersionComplete version number, including v prefixAuto-updated
DescriptionPatch description, automatically appends packaging timestampAuto-updated
DependenciesDependencies, specifies version dependency on main programAuto-configured

⏰ Timestamp Specification​

📅 Format Requirement​

All patch package description information automatically includes a packaging timestamp in the format:

yyyy-MM-dd HH:mm:ss

🎯 Example​

LMES Patch (2024-12-19 14:30:45)

✅ Function​

  • 🕐 Accurately record patch generation time
  • 📊 Facilitate version tracing and management
  • 🔄 Support distinguishing multiple packagings within the same day

🔗 Dependency Management​

⚙️ Dependency Configuration​

Each patch package automatically configures version dependency on the main program:

FieldValueDescription
HotPlugId"LMES"Main program identifier
Version"v2.7.1"Product version number (First three segments)

🔍 Dependency Check​

Ensure the patch version matches the main program version to avoid version incompatibility issues.


📤 Output File Specification​

🏷️ File Naming​

Generated patch package files follow a unified naming convention:

lmes-v{ProductVersion}-patch{PatchVersion}.cmsplugs

📋 File Examples​

  • lmes-v2.7.1-patch1.cmsplugs
  • lmes-v2.7.1-patch2.cmsplugs
  • lmes-v2.7.1-patch8.cmsplugs

📍 File Location​

Patch packages are generated in the current directory, at the same level as the packaging script.


❌ Error Handling​

🔢 Version Number Format Validation​

  • ✅ Must input four-segment version number
  • ✅ Each segment must be a valid number
  • ❌ Incorrect format displays red error prompt and exits

⌨️ Input Validation​

  • ⚠️ No input displays red warning
  • 🔄 Provides opportunity to re-input
  • 🚪 Consecutive no input automatically exits script

💡 Best Practices​

📝 Version Release Suggestions​

  1. 📈 Confirm patch version number increments correctly before each release
  2. 🎯 Keep product version number consistent with main program version
  3. 📝 Record changes and release time for each patch
  4. 💾 Keep historical patch packages for version rollback

✅ Pre-packaging Checklist​

  • Confirm version number format is correct
  • Verify patch version number has incremented
  • Check LMES-Patch directory structure is complete
  • 📄 Check LMES Patch Description.txt exists in LMES-Patch root directory
  • Confirm all modified files are ready
  • Verify new patch contains all historical files (Full update)
  • Confirm same-name file overwrite is expected update (New file correctly replaces old file)
  • Reserve enough packaging time

⚠️ Precautions​

Important Reminder: Please strictly follow the rules below

No.PrecautionDetailed Description
1Version Number ConsistencyProduct version number must exactly match main program version
2Patch IncrementPatch version number must strictly increment, no repetition or skipping
3Time AccuracyPackaging timestamp is based on current system time, ensure system time is accurate
4File BackupRecommended to keep backup copies of important patch packages
5Naming SpecificationGenerated patch package filename cannot be manually modified, keep automated naming
6Full Update PrincipleNew patch must contain files from all historical patches to ensure completeness
7Same-name File OverwriteSame-name files in new patch will overwrite those in old patch to achieve file update

📋 Document Version: v1.0 📅 Last Updated: September 30, 2025 🎯 Scope: LMES Patch Packaging Tool