Skip to content

Commit ed978f0

Browse files
engalarclaude
andcommitted
build: copy .exe binaries on Windows for PowerShell compatibility
make build now creates bin/mxcli.exe and bin/mxcli-daemon.exe on Windows (copies of the PE binaries) so PowerShell users can run .\bin\mxcli.exe directly without needing the release-named binary. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent f1b9a35 commit ed978f0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,19 @@ sync-examples:
121121
sync-all: sync-skills sync-commands sync-lint-rules sync-changelog sync-examples
122122

123123
# Build for current platform (auto-syncs skills and commands)
124+
# On Windows, also creates .exe-suffixed copies so PowerShell can execute them.
124125
build: sync-all
125126
@mkdir -p $(BUILD_DIR)
126127
CGO_ENABLED=0 go build $(LDFLAGS) -o $(BUILD_DIR)/$(DAEMON_NAME) $(CMD_PATH)
127128
CGO_ENABLED=0 go build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/mxcli-launcher
128129
CGO_ENABLED=0 go build -o $(BUILD_DIR)/source_tree ./cmd/source_tree
129-
@echo "Built $(BUILD_DIR)/$(BINARY_NAME) $(BUILD_DIR)/$(DAEMON_NAME) $(BUILD_DIR)/source_tree"
130+
@if [ "$(OS)" = "Windows_NT" ] || echo "$$OSTYPE" | grep -qi msys; then \
131+
cp $(BUILD_DIR)/$(DAEMON_NAME) $(BUILD_DIR)/$(DAEMON_NAME).exe 2>/dev/null || true; \
132+
cp $(BUILD_DIR)/$(BINARY_NAME) $(BUILD_DIR)/$(BINARY_NAME).exe 2>/dev/null || true; \
133+
echo "Built $(BUILD_DIR)/$(BINARY_NAME)[.exe] $(BUILD_DIR)/$(DAEMON_NAME)[.exe] $(BUILD_DIR)/source_tree"; \
134+
else \
135+
echo "Built $(BUILD_DIR)/$(BINARY_NAME) $(BUILD_DIR)/$(DAEMON_NAME) $(BUILD_DIR)/source_tree"; \
136+
fi
130137

131138
# Compress a single daemon binary: make compress-daemon BIN=bin/mxcli-daemon-linux-amd64
132139
compress-daemon:

0 commit comments

Comments
 (0)