Commit Graph

570 Commits

Author SHA1 Message Date
Michel Abboud
2e51fafe80 fix: Cache original ISOs instead of rebuilt ones, add cache download
The container's genisoimage rebuilds ISOs with a duplicate boot catalog
entry that 7z cannot re-extract ("Break signaled"). This caused cache
restore to fail for new instances.

- Add `cache download <version>` command to download original ISOs
  directly using the container's download logic
- Add `_is_rebuilt_iso()` helper to detect rebuilt ISOs (magic byte 0x16)
- Skip rebuilt ISOs in `cache save` and `auto_cache_save` with warning
- Remove magic byte manipulation from restore paths (originals work as-is)
- Update WINCTL_GUIDE.md and readme.md with new cache workflow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:41:40 +00:00
Michel Abboud
04d909acd7 feat: Add auto-cache, fix cache restore, refactor help system
- Add AUTO_CACHE=Y/N setting in .env to auto-cache ISOs on stop
- Fix cache restore to copy metadata files (windows.base, windows.ver,
  windows.mode, windows.type, windows.args) alongside ISOs so the
  container recognizes them as already processed and skips re-download
- Refactor show_usage() into topic-based help with interactive menu
  (commands, instances, cache, examples, config) and aligned columns
- Fix clean --data to unregister instances and remove compose files
- Update WINCTL_GUIDE.md and readme.md with all changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:04:18 +00:00
Michel Abboud
40b5466a77 chore: Add snapshots/ to .gitignore with .gitkeep placeholder
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:43:44 +00:00
Michel Abboud
e7dc55454b fix: Check for existing ISOs instead of empty dir in cache restore
The data directories contain .gitkeep files, so the empty-directory
check (ls -A) always returned non-empty and cache restore never
triggered. Now checks for *.iso files specifically, which is the
actual condition that determines whether a download is needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:42:10 +00:00
Michel Abboud
aa45e1691e fix: Reset magic byte on cached ISOs to trigger install pipeline
The container marks processed ISOs with byte 0x16 at offset 0. Restoring
a cached ISO with this byte into an empty data directory caused the
container to skip installation and try to boot a nonexistent disk,
dropping into a UEFI shell. Now resets byte 0 to 0x00 after copying so
the container re-processes the ISO (driver injection, answer file, etc.)
without re-downloading it. Also adds cache auto-restore to cmd_start()
for base versions, not just cmd_new() instances.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:10:55 +00:00
Michel Abboud
2b07b9cf07 feat: Add ISO cache for winctl.sh to skip re-downloads
Cache downloaded ISOs so new instances of the same Windows version skip
the 3-6 GB download. Adds `winctl cache` subcommands (save/list/rm/flush)
and auto-restores cached ISOs when creating new instances with --new.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 07:58:20 +00:00
Michel Abboud
3330596879 docs: Add GitHub Codespaces section to CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:39:57 +00:00
Michel Abboud
814c6e8591 fix: Add YAML document start marker to all compose files
Adds missing `---` document start to satisfy yamllint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:45:49 +00:00
Michel Abboud
a51651e34a fix: Use US spelling 'Canceled' instead of 'Cancelled'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:43:21 +00:00
Michel Abboud
ba6c915ea4 docs: Add ARM64 setup section and update commands in WINCTL_GUIDE
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:39:41 +00:00
Michel Abboud
b6029d521d docs: Add ARM64 FAQ entry and update winctl.sh section in README
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:38:35 +00:00
Michel Abboud
bdabd06c3a docs: Add active PRs reference to CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:37:38 +00:00
Michel Abboud
e3ea8a1154 docs: Add git remotes and PR workflow to CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:37:17 +00:00
Michel Abboud
15dd307279 fix: Replace deprecated fail_on_error with fail_level in reviewdog actions
All reviewdog actions in review.yml now use fail_level: error instead
of the deprecated fail_on_error parameter.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:48:14 +00:00
Michel Abboud
fd2100193a feat: Add ARM64 support section to help output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:31:16 +00:00
Michel Abboud
6a0b6a1511 feat: Add ARM64 architecture auto-detection and image selection
Auto-detect machine architecture via uname and use the correct Docker
image (dockurr/windows for x86, dockurr/windows-arm for ARM64). Block
unsupported versions on ARM with a clear error message, and show
[x86 only] tags in the list command. Compose files now use a
configurable WINDOWS_IMAGE variable with a default fallback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 07:24:03 +00:00
Michel Abboud
d75f6b23b1 fix: Replace all echo with printf for reliable ANSI color output
- Changed color definitions from '\033[...]' to $'\033[...]'
  (actual escape bytes instead of literal strings)
- Replaced all display echo -e/echo -n/echo with printf
- Kept echo only for function return values and JSON output
- Fixes ANSI escape codes showing as raw text in list/inspect/monitor

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:51:05 +00:00
Michel Abboud
8864309c7d feat: Add 'stop all' to stop all running containers
- ./winctl.sh stop all finds and stops all running containers
- Updated help, WINCTL_GUIDE.md, and readme.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:54:47 +00:00
Michel Abboud
23cc434703 feat: Add configurable restart policy, default to on-failure
- Changed restart policy from unless-stopped to on-failure
  so Windows shutdown stops the container instead of restarting
- Added RESTART_POLICY env variable to .env.modern and .env.legacy
- Compose files use ${RESTART_POLICY:-on-failure} for flexibility
- Updated WINCTL_GUIDE.md with restart policy documentation
- Updated readme.md with RESTART_POLICY setting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:46:11 +00:00
Michel Abboud
5b274afbba fix: Monitor command exiting immediately due to arithmetic error
- Changed post-increment to pre-increment in cmd_monitor
  ((total_count++)) → ((++total_count)) to avoid set -e exit on ((0))
- Added invalidate_cache for accurate real-time status updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:32:34 +00:00
Michel Abboud
831531eeb4 docs: Fix username case and add link to winctl guide
- Changed USERNAME example from Docker to docker (lowercase)
- Added link to WINCTL_GUIDE.md for complete documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:11:01 +00:00
Michel Abboud
68e1cce002 docs: Add comprehensive winctl.sh user guide
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:09:19 +00:00
Michel Abboud
e78fed6bd3 feat: Auto-create data directory before starting container
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:55:51 +00:00
Michel Abboud
99053a0238 chore: Use lowercase username 'docker'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:53:24 +00:00
Michel Abboud
c27837738d refactor: Use separate .env.modern and .env.legacy files
- Remove base-legacy.yml and base-modern.yml (YAML anchors don't work with include)
- Make all compose files self-contained
- Add .env.modern (8G RAM, 4 CPU) for Win 10/11, Server 2016+
- Add .env.legacy (2G RAM, 2 CPU) for older systems
- Update README and .env.example documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:44:10 +00:00
Michel Abboud
620cda9282 fix: Use printf for ANSI colors in interactive menus
Replace echo with printf '%b' in select_category and select_versions
to properly interpret ANSI escape sequences.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:38:36 +00:00
Michel Abboud
978abbe7ec feat: Add JSON file cache for container status
- Cache container statuses in ~/.cache/winctl/status.json
- Auto-refresh if cache older than 7 days or data is stale
- Add 'refresh' command to force cache refresh
- Dramatically faster menus (single Docker call vs 44 calls)
- Bump version to 1.1.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:35:28 +00:00
Michel Abboud
b06f53cb17 fix: Interactive menu not displaying and slow status checks
- Send menu prompts to stderr so they display in terminal
- Read user input from /dev/tty for proper interactive mode
- Add status cache to fetch all container states in one Docker call
- Handle interactive_select errors properly in all callers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:28:56 +00:00
Michel Abboud
f642f8faa2 fix: Escape ANSI color codes properly in help output
Use printf '%b' instead of cat heredoc to properly interpret
ANSI escape sequences in the show_usage function.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:22:18 +00:00
Michel Abboud
effdbe0f6f feat: Add winctl.sh management script and multi-version setup
Add winctl.sh with 12 commands for managing Windows Docker containers:
- start, stop, restart, status, logs, shell, stats
- build, rebuild, list, inspect, monitor, check
- Interactive menus, prerequisites checking, color output
- Support for 22 Windows versions across 4 categories

Multi-version compose structure:
- Split base.yml into base-modern.yml (8G) and base-legacy.yml (2G)
- Add .env.example for configuration
- Update all compose files to use env_file
- Add unique port mappings per version
- Update README with winctl.sh documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:14:45 +00:00
Michel Abboud
c1d3f8e886 feat: Add multi-version compose structure with organized data folders
- Add compose/ folder with modular compose files for all Windows versions
- Organize by category: desktop, legacy, server, tiny
- Create data/ subfolders for each version's storage
- Update .gitignore to track folder structure via .gitkeep files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:37:10 +00:00
Michel Abboud
acdeb62db2 docs: Add CLAUDE.md for Claude Code guidance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:29:45 +00:00
Azim Muradov
588969ae5f
fix: Path to "Desktop" folder on Windows XP (#1625)
Fix path to "Desktop" folder to work correctly with different locales on Windows XP.
2026-01-13 13:43:48 +01:00
Kroese
c7aac1edcf
build: Update QEMU base image to v7.29 (#1583)
Some checks failed
Update / dockerHubDescription (push) Has been cancelled
2025-11-22 05:02:48 +01:00
renovate[bot]
ea03c67a04
chore(deps): update actions/checkout action to v6 (#1580) 2025-11-21 12:38:58 +01:00
Gamal Moussa
bdb0488151
refactor: replace PID cleanup with loop (#1579) 2025-11-20 08:49:24 +01:00
Kroese
ad6f87046a
build: Update VirtIO drivers to v1.9.49 (#1570) 2025-11-14 07:18:24 +01:00
Kroese
e7a3894210
fix: Update Workspaces configuration (#1569) 2025-11-14 06:26:07 +01:00
Kroese
8443559a76
build: Update QEMU base image to v7.28 (#1562) 2025-11-12 07:08:22 +01:00
Kroese
6dbac13cd1
fix: Use pcnet network adapter for Win9x (#1558) 2025-11-07 06:06:01 +01:00
Kroese
fd907bb78a
feat: Update Windows Server download links (#1555) 2025-11-06 01:27:27 +01:00
Kroese
1a6a2dbad0
build: Use Github token (#1539) 2025-10-29 14:06:26 +01:00
Kroese
11a19f6a9d
fix: Remove unnecessary operation (#1534) 2025-10-24 04:33:47 +02:00
Kroese
544501107a
feat: Check if shared folder is writeable (#1531) 2025-10-22 12:19:39 +02:00
Kroese
122d1ff98e
fix: Inherit owner from parent folder (#1526) 2025-10-22 10:06:26 +02:00
Kroese
c1c44c4da7
build: Add code quality checks (#1529) 2025-10-22 01:23:25 +02:00
Kroese
f661df3abc
build: Update QEMU base image to v7.27 (#1528) 2025-10-21 23:19:54 +02:00
Kroese
a0bcd719be
build: Add review workflow for shell formatting (#1527) 2025-10-21 22:46:06 +02:00
Kroese
9236127a86
fix: Add SELinux warning for shared folder (#1522)
Some checks failed
Update / dockerHubDescription (push) Has been cancelled
2025-10-20 14:50:37 +02:00
Kroese
fa606aec53
build: Update wsddn package to v1.22 (#1521) 2025-10-20 14:48:46 +02:00