Skip to content

Add windows support#26

Open
tommyjcarpenter wants to merge 1 commit intomainfrom
windows-support
Open

Add windows support#26
tommyjcarpenter wants to merge 1 commit intomainfrom
windows-support

Conversation

@tommyjcarpenter
Copy link
Copy Markdown
Owner

Add windows support

Cross-platform additions

  • auto-detect systype from sys.platform (mac/arch/ubuntu/windows)
  • replace shell mkdir -p / ln -f -n -s with os.makedirs / os.symlink
    (target_is_directory matters on Windows where file/dir symlinks differ)
  • HOMEDIR via os.path.expanduser("~") so Windows works without $HOME

Windows package managers

  • winget package type with winget list precheck (skips already-installed
    packages whose "upgrade" exits non-zero with no available newer version)
  • scoop and scoop_bucket package types
  • scoop installs run one at a time with shortcircuit=False so a single missing
    manifest doesn't abort the rest of the batch (matches winget behavior)
  • npm on Windows skips sudo (user-writable global prefix; no sudo on Windows)
  • _refresh_windows_path() re-reads HKLM+HKCU PATH after each _run_cmd, and
    before each _run_check, so prechecks see packages installed in prior runs
    even when the parent shell's environment is stale

New pip package type

  • python3 -m pip install --user on POSIX (system-Python protections)
  • python -m pip install on Windows (winget Python's Scripts dir is on PATH;
    the --user Scripts dir is not, which would leave installs invisible)

New file_associations config section (Windows)

  • per-user registration under HKCU\Software\Classes (no admin needed)
  • writes ext -> ProgID, ProgID name (FriendlyAppName), DefaultIcon, and
    shell\open\command — chosen so the "Open with" picker shows a real app
    name instead of the launcher exe metadata or "Shim"
  • preserves UserChoice if it already points to our ProgID; only clears it
    when it points elsewhere, so a user's "Always use this app" selection
    survives subsequent bootstrap runs

Misc

  • schema updated for windows section and file_associations
  • README documents new package types and the file_associations section
  • sample_config.json rewritten to current schema with windows + new features
  • drop dead _gitclone() helper (never called, not part of the schema)
  • bump to 1.4.0

Signed-off-by: Tommy Carpenter <9419125+tommyjcarpenter@users.noreply.github.com>
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