Skip to content

Add Windows portable release support#402

Closed
jabrailkhalil wants to merge 4 commits into
nexmoe:mainfrom
jabrailkhalil:codex/windows-portable-release
Closed

Add Windows portable release support#402
jabrailkhalil wants to merge 4 commits into
nexmoe:mainfrom
jabrailkhalil:codex/windows-portable-release

Conversation

@jabrailkhalil
Copy link
Copy Markdown

What changed

  • Adds the Windows portable electron-builder target alongside the existing NSIS installer.
  • Adds portable-mode path setup using PORTABLE_EXECUTABLE_DIR from electron-builder, with VIDBEE_PORTABLE_DIR as a local/testing override.
  • Keeps portable app data, session data, logs, crash dumps, temp data, Deno cache, and default downloads under the portable executable directory.
  • Disables auto-update behavior and launch-at-login persistence in portable mode.
  • Skips default protocol handler registration in portable mode to avoid registry writes.

Why

This implements the direction proposed in #401: a no-install Windows release artifact for USB / isolated / portable use cases while preserving the existing installer behavior for normal Windows users.

The regular installer path remains unchanged because portable mode only activates when PORTABLE_EXECUTABLE_DIR or VIDBEE_PORTABLE_DIR is present.

Validation

  • corepack pnpm --filter ./apps/desktop run check
  • corepack pnpm --filter ./apps/desktop run build
  • corepack pnpm --filter ./apps/desktop exec electron-builder --win portable --publish never

The portable packaging command produced:

apps/desktop/dist/vidbee-1.3.10-portable.exe

Local Windows Sandbox testing from #401 also verified that the manually wrapped portable launch kept config/download paths inside the portable folder and left 0 matches in the checked host trace locations after Sandbox shutdown.

Copy link
Copy Markdown
Author

Follow-up validation for commit 2f88402:

  • Hid the main window until both Electron ready-to-show and a renderer-side app:renderer-ready signal are received, so the packaged app no longer exposes Electron's blank pre-render frame before the themed UI is mounted.
  • Extended portable mode to create standard home folders (Desktop, Documents, Downloads, Music, Pictures, Videos) and set Electron app paths for them. This fixes Windows native file dialogs falling back to a missing portable Desktop path.
  • Made fs.getDefaultDownloadPath() return the portable Downloads folder in portable mode, matching settings/default download behavior.

Checks run on Windows:

  • pnpm --filter ./apps/desktop run check
  • pnpm --filter ./apps/desktop run build
  • pnpm --filter ./apps/desktop exec electron-builder --win portable --publish never
  • Smoke-tested packaged win-unpacked through renderer IPC: app info, settings locks, portable download paths, cookies file validation, browser profile path validation, download queue status, history/subscriptions reads, update-disabled behavior, thumbnail/window IPC.
  • Opened and closed the native fs.selectFile dialog from IPC; no Location is not available dialog appeared and the dialog resolved cleanly with null when canceled.

Copy link
Copy Markdown
Author

Follow-up for release coverage in commit c75d1e9:

  • Added a Windows release artifact check in the reusable build workflow so CI explicitly requires both *-setup.exe and *-portable.exe after the Windows build.
  • Set if-no-files-found: error on the artifact upload step so release uploads fail loudly if no build artifacts are present.

Local validation:

  • pnpm --filter ./apps/desktop run check
  • pnpm --filter ./apps/desktop exec electron-builder --win --publish never
  • Verified the same PowerShell check finds both vidbee-1.3.10-setup.exe and vidbee-1.3.10-portable.exe in apps/desktop/dist.

Copy link
Copy Markdown
Author

Follow-up for the user-facing portable folder release in commit 9ad0b16:

This adds a second Windows portable distribution format in addition to electron-builder's *-portable.exe:

  • vidbee-<version>-windows-portable.zip
  • The ZIP contains a VidBee-portable/ folder with:
    • app/ copied from dist/win-unpacked
    • VidBee Portable.lnk
    • hidden-window launchers: Start-VidBee-Portable.vbs and Start-VidBee-Portable.ps1
    • pre-created Data/, Downloads/, and Temp/ folders
    • README-portable.txt

The folder launcher sets VIDBEE_PORTABLE_DIR, redirects app/profile/cache/temp paths into the extracted folder, and starts the packaged app with a local --user-data-dir. This gives users the familiar "download zip, extract folder, run shortcut" portable workflow.

Release coverage:

  • build:win now creates the folder ZIP after electron-builder --win.
  • The reusable build workflow now requires *-setup.exe, *-portable.exe, and *-windows-portable.zip.
  • release.yml already uploads dist/*.zip, so the folder archive will be attached to GitHub Releases.

Local validation:

  • Ran scripts/create-windows-portable-folder.ps1 successfully.
  • Verified ZIP contents include the shortcut, launchers, app/vidbee.exe, and app/resources/app.asar.
  • Extracted the ZIP into a fresh directory and launched VidBee Portable.lnk; it started app/vidbee.exe from the extracted folder.
  • pnpm --filter ./apps/desktop run check passed.

@jabrailkhalil jabrailkhalil changed the title [codex] Add Windows portable release support Add Windows portable release support Jun 4, 2026
@jabrailkhalil jabrailkhalil deleted the codex/windows-portable-release branch June 4, 2026 21:27
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