mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
chore: Remove the Windows scripts; the test VM runs on Linux
This commit is contained in:
1 parent
4aeb3de43f
commit
0464ede893
5 files changed
+1
-79
No files matched your search
@@ -5,10 +5,7 @@
|
||||
!/README.md
|
||||
!/CHANGELOG.md
|
||||
!/run.sh
|
||||
!/run.ps1
|
||||
!/get-iso.sh
|
||||
!/get-iso.ps1
|
||||
!/add-ssh-key.ps1
|
||||
!/scripts/
|
||||
!/share/
|
||||
!/.claude/
|
||||
|
||||
@@ -17,14 +17,6 @@ tracked file to it explicitly.
|
||||
- `curl` and `sha256sum` for `get-iso.sh`.
|
||||
- Optional: an NVIDIA dGPU for `--nvidia` (PRIME offload of the virgl renderer).
|
||||
|
||||
### Windows
|
||||
|
||||
`run.ps1` and `get-iso.ps1` are Windows versions. They need
|
||||
[QEMU for Windows](https://qemu.weilnetz.de/w64/) (or set `QEMU_DIR`) and the
|
||||
"Windows Hypervisor Platform" feature (`-accel whpx`). Windows QEMU has no 9p
|
||||
shares: copy the repo into the guest with `scp -P 2222 -r ...`, and authorize
|
||||
your key with `.\add-ssh-key.ps1 -User <vm-user>`.
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
@@ -77,8 +69,7 @@ user's password:
|
||||
ssh-copy-id -p 2222 <vm-user>@localhost
|
||||
```
|
||||
|
||||
On Windows, use `.\add-ssh-key.ps1 -User <vm-user>` instead (it creates a key
|
||||
if needed). If SSH hangs at "banner exchange", `sshd` isn't running in the
|
||||
If SSH hangs at "banner exchange", `sshd` isn't running in the
|
||||
guest or a firewall blocks port 22; check with `systemctl is-active sshd` in
|
||||
the guest.
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Windows: authorize your SSH key in the VM (asks for the VM password once).
|
||||
# Run after guest-ssh-setup.sh inside the VM, or at least after sshd is enabled there.
|
||||
# .\add-ssh-key.ps1 -User <vm-user>
|
||||
param([Parameter(Mandatory)][string]$User)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$key = Join-Path $env:USERPROFILE '.ssh\id_ed25519.pub'
|
||||
if (-not (Test-Path $key)) { ssh-keygen -t ed25519 -f ($key -replace '\.pub$', '') -N '""' }
|
||||
Get-Content $key | ssh -p 2222 "$User@localhost" 'install -d -m 700 ~/.ssh && k=$(cat) && (grep -qxF "$k" ~/.ssh/authorized_keys 2>/dev/null || echo "$k" >> ~/.ssh/authorized_keys) && chmod 600 ~/.ssh/authorized_keys'
|
||||
Write-Host "Done. Connect with: ssh -p 2222 $User@localhost"
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
# Download the latest CachyOS desktop ISO to cachyos.iso and verify its checksum.
|
||||
# Windows version of get-iso.sh; re-running resumes a partial download.
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-Location $PSScriptRoot
|
||||
|
||||
$mirror = if ($env:MIRROR) { $env:MIRROR } else { 'https://nl.mirror.cx/cachyos' }
|
||||
|
||||
$page = (Invoke-WebRequest -UseBasicParsing https://cachyos.org/download/).Content
|
||||
$m = [regex]::Match($page, 'ISO/desktop/[0-9]+/cachyos-desktop-linux-[0-9]+\.iso')
|
||||
if (-not $m.Success) { throw 'Could not find the current ISO on cachyos.org/download' }
|
||||
$url = "$mirror/$($m.Value)"
|
||||
$name = Split-Path $m.Value -Leaf
|
||||
Write-Host "Latest release: $name"
|
||||
|
||||
if ((Test-Path cachyos.iso) -and ((Get-Content cachyos.iso.version -ErrorAction SilentlyContinue) -ne $name)) {
|
||||
Write-Host 'Existing cachyos.iso is an older release, replacing it.'
|
||||
Remove-Item cachyos.iso
|
||||
}
|
||||
|
||||
# curl.exe ships with Windows 10+ and supports resuming (-C -).
|
||||
curl.exe -fL -C - -o cachyos.iso $url
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Download failed' }
|
||||
Set-Content cachyos.iso.version $name
|
||||
|
||||
Write-Host 'Verifying checksum...'
|
||||
$expected = ((curl.exe -fsL "$url.sha256") -split '\s+')[0]
|
||||
$actual = (Get-FileHash cachyos.iso -Algorithm SHA256).Hash
|
||||
if ($actual -ieq $expected) { Write-Host 'cachyos.iso: OK' } else { throw "Checksum mismatch: $actual" }
|
||||
@@ -1,29 +0,0 @@
|
||||
# CachyOS test VM for steamify.sh -- Windows version.
|
||||
# .\run.ps1 [-Install]
|
||||
# Needs QEMU for Windows (https://qemu.weilnetz.de/w64/) and the Windows
|
||||
# feature "Windows Hypervisor Platform" (for -accel whpx).
|
||||
# Windows QEMU has no 9p shared folders: copy the repo in over SSH instead:
|
||||
# scp -P 2222 -r ..\..\projects\cachyos-gamescope-boot <user>@localhost:
|
||||
param([switch]$Install)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-Location $PSScriptRoot
|
||||
|
||||
$qemuDir = if ($env:QEMU_DIR) { $env:QEMU_DIR } else { 'C:\Program Files\qemu' }
|
||||
$qemu = Join-Path $qemuDir 'qemu-system-x86_64.exe'
|
||||
$code = Join-Path $qemuDir 'share\edk2-x86_64-code.fd'
|
||||
|
||||
if (-not (Test-Path vars.fd)) { Copy-Item (Join-Path $qemuDir 'share\edk2-i386-vars.fd') vars.fd }
|
||||
if (-not (Test-Path disk.qcow2)) { & (Join-Path $qemuDir 'qemu-img.exe') create -f qcow2 disk.qcow2 60G | Out-Null }
|
||||
|
||||
$qargs = @(
|
||||
'-accel', 'whpx,kernel-irqchip=off', '-machine', 'q35', '-cpu', 'max', '-smp', '6', '-m', '8G',
|
||||
'-drive', "if=pflash,format=raw,readonly=on,file=$code",
|
||||
'-drive', 'if=pflash,format=raw,file=vars.fd',
|
||||
'-drive', 'file=disk.qcow2,if=virtio',
|
||||
'-device', 'virtio-vga,xres=1920,yres=1080', '-display', 'sdl',
|
||||
'-device', 'qemu-xhci', '-device', 'usb-tablet',
|
||||
'-nic', 'user,model=virtio-net-pci,hostfwd=tcp::2222-:22'
|
||||
)
|
||||
if ($Install) { $qargs += @('-cdrom', 'cachyos.iso', '-boot', 'd') }
|
||||
|
||||
& $qemu @qargs
|
||||
Reference in new issue
Block a user