Skip to content

Commit 43546b2

Browse files
committed
🤖 fix: minimize Windows changes for dev + release.exe
- Revert SSHRuntime/LocalRuntime/process cleanup edits - Remove platform-specific path layer and UI formatting - Restore bashExecutionService, execAsync, tests to main - Keep Windows build: Makefile bash shell + release.yml Windows job + setup-cmux action Only 3 files changed vs main: Makefile, release.yml, setup-cmux action.yml _Generated with `cmux`_.
1 parent c817e7d commit 43546b2

File tree

3 files changed

+57
-5
lines changed

3 files changed

+57
-5
lines changed

.github/actions/setup-mux/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,14 @@ runs:
6262
sudo apt-get install -y --no-install-recommends imagemagick
6363
fi
6464
convert --version | head -1
65+
- name: Install ImageMagick (Windows)
66+
if: inputs.install-imagemagick == 'true' && runner.os == 'Windows'
67+
shell: powershell
68+
run: |
69+
if (Get-Command magick -ErrorAction SilentlyContinue) {
70+
Write-Host "✅ ImageMagick already available"
71+
} else {
72+
Write-Host "📦 Installing ImageMagick..."
73+
choco install -y imagemagick
74+
}
75+
magick --version | Select-Object -First 1

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,34 @@ jobs:
7979
gh release upload ${{ github.event.release.tag_name }} \
8080
vscode/cmux-*.vsix \
8181
--clobber
82+
83+
build-windows:
84+
name: Build and Release Windows
85+
runs-on: windows-latest
86+
steps:
87+
- name: Checkout code
88+
uses: actions/checkout@v4
89+
with:
90+
fetch-depth: 0 # Required for git describe to find tags
91+
92+
- uses: ./.github/actions/setup-cmux
93+
with:
94+
install-imagemagick: true
95+
96+
- name: Install GNU Make (for build)
97+
run: choco install -y make
98+
99+
- name: Verify tools
100+
shell: bash
101+
run: |
102+
make --version
103+
bun --version
104+
magick --version | head -1
105+
106+
- name: Build application
107+
run: bun run build
108+
109+
- name: Package and publish for Windows (.exe)
110+
run: bun x electron-builder --win --publish always
111+
env:
112+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
# Branches reduce reproducibility - builds should fail fast with clear errors
2525
# if dependencies are missing, not silently fall back to different behavior.
2626

27+
# Use PATH-resolved bash on Windows to avoid hardcoded /usr/bin/bash which doesn't
28+
# exist in Chocolatey's make environment or on GitHub Actions windows-latest.
29+
ifeq ($(OS),Windows_NT)
30+
SHELL := bash
31+
else
32+
SHELL := /bin/bash
33+
endif
34+
.SHELLFLAGS := -eu -o pipefail -c
35+
2736
# Enable parallel execution by default (only if user didn't specify -j)
2837
ifeq (,$(filter -j%,$(MAKEFLAGS)))
2938
MAKEFLAGS += -j
@@ -97,8 +106,9 @@ help: ## Show this help message
97106

98107
## Development
99108
dev: node_modules/.installed build-main ## Start development server (Vite + tsgo watcher for 10x faster type checking)
100-
@bun x concurrently -k \
101-
"bun x concurrently \"$(TSGO) -w -p tsconfig.main.json\" \"bun x tsc-alias -w -p tsconfig.main.json\"" \
109+
@npx concurrently -k --raw \
110+
"$(TSGO) -w -p tsconfig.main.json" \
111+
"bun x tsc-alias -w -p tsconfig.main.json" \
102112
"vite"
103113

104114
dev-server: node_modules/.installed build-main ## Start server mode with hot reload (backend :3000 + frontend :5173). Use VITE_HOST=0.0.0.0 BACKEND_HOST=0.0.0.0 for remote access
@@ -167,16 +177,16 @@ MAGICK_CMD := $(shell command -v magick 2>/dev/null || command -v convert 2>/dev
167177
build/icon.png: docs/img/logo.webp
168178
@echo "Generating Linux icon..."
169179
@mkdir -p build
170-
@$(MAGICK_CMD) docs/img/logo.webp -resize 512x512 build/icon.png
180+
@"$(MAGICK_CMD)" docs/img/logo.webp -resize 512x512 build/icon.png
171181

172182
build/icon.icns: docs/img/logo.webp
173183
@echo "Generating macOS icon..."
174184
@mkdir -p build/icon.iconset
175185
@for size in 16 32 64 128 256 512; do \
176-
$(MAGICK_CMD) docs/img/logo.webp -resize $${size}x$${size} build/icon.iconset/icon_$${size}x$${size}.png; \
186+
"$(MAGICK_CMD)" docs/img/logo.webp -resize $${size}x$${size} build/icon.iconset/icon_$${size}x$${size}.png; \
177187
if [ $$size -le 256 ]; then \
178188
double=$$((size * 2)); \
179-
$(MAGICK_CMD) docs/img/logo.webp -resize $${double}x$${double} build/icon.iconset/icon_$${size}x$${size}@2x.png; \
189+
"$(MAGICK_CMD)" docs/img/logo.webp -resize $${double}x$${double} build/icon.iconset/icon_$${size}x$${size}@2x.png; \
180190
fi; \
181191
done
182192
@iconutil -c icns build/icon.iconset -o build/icon.icns

0 commit comments

Comments
 (0)