Skip to content

installer: replace InstallOrSkip and md5dll with clean uninstall and direct File extraction - #969

Merged
PCMan merged 2 commits into
masterfrom
refactor/installer-safe-delete
Oct 19, 2026
Merged

PCMan merged 2 commits into
masterfrom
refactor/installer-safe-delete

Conversation

@PCMan

@PCMan PCMan commented Oct 19, 2026

Copy link
Copy Markdown
Member

In-use binary replacement during upgrade does not benefit from MD5 comparison against candidate files because code signing and Authenticode timestamping yield differing file hashes even when source code is unchanged. Furthermore, when uninstallOldVersion performs SafeDeleteFile, target binary paths on disk are guaranteed to be vacant (renamed to <temp>.deleted if in-use), allowing standard native NSIS File commands to write candidates directly with zero write errors.

Summary of Changes

  • CI Fix: Download CMake 4.3.0 from GitHub Releases in AppVeyor to prevent environment setup timeout.
  • SafeDeleteFile: Restores RebootFlag when rename succeeds, so temporary file cleanup scheduled on reboot does not trigger false reboot prompts or installation failures. Only true hard-locks (rename failure) set RebootFlag true.
  • CleanOldBinaries: Centralizes safe removal/renaming of all PIME DLLs and PIMELauncher.exe in $INSTDIR across x86, x64, and ARM64.
  • Installer Workflow:
    • Safely cleans/renames old binaries in uninstallOldVersion, SecMain, and Section "Uninstall".
    • Replaces InstallOrSkip with standard NSIS File commands in SecMain and the text service registration sections.
    • Removes .onInit extraction of candidate binaries to $PLUGINSDIR and the CopyFiles mechanism.
  • Dependency Removal: Completely removes the obsolete md5dll plugin directory (installer/md5dll) and its plugin directory registration.

Generated with assistance from Antigravity (Gemini 3.8 Flash).

PCMan added 2 commits October 19, 2026 00:48
AppVeyor CI failed during environment setup because downloading CMake 4.3.0 from cmake.org timed out with 'Unable to connect to the remote server'.

- Switch the download source for CMake 4.3.0 to the official Kitware GitHub Releases asset URL.
- Fix a typo in the comment referencing VS 2026.

Generated with assistance from Antigravity (Gemini 3.8 Flash).
…direct File extraction

In-use binary replacement during upgrade does not benefit from MD5 comparison against candidate files because code signing and Authenticode timestamping yield differing file hashes even when source code is unchanged. Furthermore, when uninstallOldVersion performs SafeDeleteFile, target binary paths on disk are guaranteed to be vacant (renamed to <temp>.deleted if in-use), allowing standard native NSIS File commands to write candidates directly with zero write errors.

- Update SafeDeleteFile in macros.nsh to restore RebootFlag when rename succeeds, so temporary file cleanup on reboot does not trigger premature reboot prompts or installation failures.
- Add CleanOldBinaries macro in macros.nsh to centralize safe deletion/renaming of PIME DLLs and launcher in  across x86, x64, and ARM64.
- In installer.nsi, run CleanOldBinaries during uninstallOldVersion, SecMain, and uninstallation to ensure target paths are free before installation.
- Remove candidate file extraction into  in .onInit, InstallOrSkip macro, and CheckFileMD5Equal macro.
- Replace InstallOrSkip calls with standard NSIS File commands directly in sections.
- Remove the obsolete md5dll plugin directory and its plugin registration.

Generated with assistance from Antigravity (Gemini 3.8 Flash).
@PCMan PCMan self-assigned this Oct 19, 2026
@PCMan
PCMan merged commit e1eb3ba into master Oct 19, 2026
5 of 6 checks passed
@PCMan
PCMan deleted the refactor/installer-safe-delete branch October 19, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant