Use nssm instead of sc

This commit is contained in:
Hamza committed 2026-03-17 15:07:24 +01:00
1 parent 59ba823865
commit d05ba5cc55
5 files changed
+56 -11

No files matched your search

+8 -2
View File
@@ -4,9 +4,12 @@ VERSION = 0.1.0
all: build run
# Default build
build:
@if not exist $(BIN_DIR) mkdir $(BIN_DIR)
go build -ldflags "-s -w -X main.version=$(VERSION)" -o $(BIN_DIR)\$(APP_NAME).exe .
set CGO_ENABLED=0 && \
set GOOS=windows && set GOARCH=amd64 && \
go build -ldflags="-s -w -trimpath -X main.version=$(VERSION)" -o $(BIN_DIR)\$(APP_NAME).exe .
run:
go run .
@@ -14,9 +17,12 @@ run:
clean:
@if exist $(BIN_DIR) rmdir /s /q $(BIN_DIR)
# Windows-specific optimized build
windows:
@if not exist $(BIN_DIR) mkdir $(BIN_DIR)
set GOOS=windows&& set GOARCH=amd64&& go build -o $(BIN_DIR)\$(APP_NAME).exe .
set CGO_ENABLED=0 && \
set GOOS=windows && set GOARCH=amd64 && \
go build -ldflags="-s -w -trimpath -X main.version=$(VERSION)" -o $(BIN_DIR)\$(APP_NAME).exe .
tidy:
go mod tidy