Skip to content

Packaging & Cloudflare R2 Release Guide ​

ShibaPPT uses Inno Setup 6 to build per-user (no-UAC) Windows installers and Cloudflare R2 (scripts\publish-r2.ps1) to distribute auto-update manifests (version.json), setup binaries, and on-demand heavy asset archives.


1. Installer Architecture (Inno Setup/Setup.iss) ​

To avoid classic VSTO deployment pitfalls under C:\Program Files (permission errors when writing caches, UAC prompts, or blocked satellite DLLs), Setup.iss applies five key engineering practices:

  1. Per-User No-UAC Installation:
    • Sets PrivilegesRequired=lowest and installs by default into %LocalAppData%\ShibaPPT.
    • Registers the VSTO add-in under HKCU\SOFTWARE\Microsoft\Office\PowerPoint\Addins\shibappt (plus HKEY_CURRENT_USER_64 on 64-bit Windows) with LoadBehavior = 3 and Manifest = "{app}\shibappt.vsto|vstolocal".
  2. Automatic NTFS Zone Unblocking (UnblockInstalledFiles):
    • Runs Unblock-File across all installed *.dll, *.exe, and *.vsto files (clearing Zone.Identifier alternate data streams) so .NET CAS policy never blocks downloaded assemblies.
  3. VSTO Security Inclusion (AddToTrustedLocations):
    • Registers {app}\ under HKCU\SOFTWARE\Microsoft\VSTO\Security\Inclusion\ShibaPPT.
  4. .vba File Association:
    • Registers HKCU\Software\Classes\.vba -> ShibaPPT.VbaScript pointing to ShibaVbaRunner.exe, enabling double-click execution of .vba scripts against the active presentation.
  5. Lean Installer Footprint:
    • Excludes Tools\PaddleSegSharp\*, Tools\PPTOCR\*, FontTool.exe, and *.pdb symbols from [Files]. Heavy AI models and font utilities are fetched on demand from Cloudflare R2 via RemoteAssetManager into %LocalAppData%\ShibaPPT\Assets.

2. Four-Step Release Workflow ​

Step 1: Bump Version & Run Full Release Build ​

Update AssemblyVersion and AssemblyFileVersion in Properties\AssemblyInfo.cs (e.g., 1.0.0.29), then run a full Release build:

powershell
powershell -ExecutionPolicy Bypass -File scripts\build.ps1 -Configuration Release

Step 2: Compile the Inno Setup Installer ​

Invoke ISCC.exe explicitly with /DAppVersion matching the compiled assembly (or run Inno Setup\build.bat, which auto-increments the 4th version segment in AssemblyInfo.cs and compiles):

powershell
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DAppVersion=1.0.0.29 "Inno Setup\Setup.iss"

This produces Inno Setup\Output\shibappt-setup-v1.0.0.29.exe.

Step 3: Update Inno Setup\Output\version.json ​

Ensure version and the filename at the end of downloadUrl match the newly built installer (publish-r2.ps1 validates both):

json
{
  "version": "1.0.0.29",
  "downloadUrl": "https://dl.shibappt.com/shibappt-setup-v1.0.0.29.exe",
  "releaseNotes": "1. Added Cross-Page Sync Panel\n2. Improved WebView2 multi-window memory cleanup",
  "publishedAt": "2026-11-27"
}

Step 4: Publish to Cloudflare R2 (scripts\publish-r2.ps1) ​

Prerequisites: npm install -g wrangler, authenticated via wrangler login, and R2 bucket name configured in .r2-bucket or $env:SHIBAPPT_R2_BUCKET.

powershell
# 1. Dry-run first to inspect resolved paths, byte size, and wrangler commands
powershell -ExecutionPolicy Bypass -File scripts\publish-r2.ps1 -DryRun

# 2. Upload installer + version.json and verify live CDN endpoints
powershell -ExecutionPolicy Bypass -File scripts\publish-r2.ps1

publish-r2.ps1 automatically:

  1. Verifies version consistency between version.json, downloadUrl, and the non-empty .exe binary;
  2. Uploads shibappt-setup-v<Version>.exe (application/octet-stream);
  3. Uploads version.json with Cache-Control: no-cache, max-age=60;
  4. Performs live HTTP GET and HEAD checks against https://dl.shibappt.com to confirm the live version string and Content-Length match byte-for-byte.

3. Client Auto-Update Flow (AppUpdateManager) ​

Core\Utils\AppUpdateManager.cs consumes the R2 endpoints inside PowerPoint:

  1. Fetches https://dl.shibappt.com/version.json?t=<timestamp>;
  2. Compares against Assembly.GetExecutingAssembly().GetName().Version;
  3. When an update is confirmed by the user, streams the setup .exe to %TEMP% with a ShibaProgressWebWindow progress bar and launches the installer.