Files
DP44/docs/ai/DataPRO/InstallShieldBranch.md
2026-04-17 14:55:32 -04:00

1.8 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/InstallShieldBranch/Brancher.cs
DataPRO/InstallShieldBranch/BrancherForm.Designer.cs
DataPRO/InstallShieldBranch/BrancherForm.cs
2026-04-17T16:11:52.545850+00:00 zai-org/GLM-5-FP8 1 5517450301a3034c

InstallShieldBranch

1. Purpose

This module is a utility application designed to perform binary search-and-replace operations on InstallShield project files (.ise). It exists to automate the patching of version identifiers or internal codes within proprietary binary file formats, likely to facilitate branching or versioning of installer configurations.

2. Public Interface

Class: Brancher (static, in Brancher.cs)

  • static void Main(string[] args): Application entry point. Initializes visual styles and launches BrancherForm.

Class: BrancherForm (in BrancherForm.cs)

  • public BrancherForm(): Constructor initializing a BackgroundWorker configured to report progress and support cancellation.
  • public static class BinaryUtility: A nested utility class for stream manipulation.
    • public static IEnumerable<byte> GetByteStream(BinaryReader reader): Lazily reads bytes from a BinaryReader in 1024-byte chunks.
    • public static void Replace(BinaryReader reader, BinaryWriter writer, IEnumerable<Tuple<byte[], byte[]>> searchAndReplace): Reads a stream, performs replacements, and writes to the output stream.
    • public static IEnumerable<byte> Replace(IEnumerable<byte> source, IEnumerable<Tuple<byte[], byte[]>> searchAndReplace): Applies multiple search/replace patterns to a byte stream.
    • public static IEnumerable<byte> Replace(IEnumerable<byte> input, IEnumerable<byte> from, IEnumerable<byte> to): Core logic that replaces occurrences of a specific byte sequence (from) with another (to).