-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.89 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PROJECT := src/WinGroup.csproj
CONFIG ?= Release
RID ?= win-x64
VERSION ?= 0.1.0-local
INFO_VERSION ?= $(VERSION)
OUT_DIR ?= publish/$(RID)
DIST_DIR ?= dist
INSTALLER_SCRIPT ?= installer/WinGroup.iss
INSTALLER_BASENAME ?= WinGroup-Setup
PORTABLE_FILENAME ?= WinGroup.exe
ISCC ?= C:/Program Files (x86)/Inno Setup 6/ISCC.exe
.PHONY: help setup icon restore build run publish portable installer clean
help:
@printf "Targets:\n"
@printf " make setup - install Node deps with pnpm\n"
@printf " make icon - generate src/app.ico from icon.svg\n"
@printf " make restore - restore .NET dependencies\n"
@printf " make build - build the WinGroup app\n"
@printf " make run - run the WinGroup app\n"
@printf " make publish - publish single-file exe output\n"
@printf " make portable - create portable exe artifact\n"
@printf " make installer - build Inno Setup installer\n"
@printf " make clean - clean .NET build artifacts\n"
setup:
pnpm install
icon: setup
node scripts/build-icon.mjs
restore:
dotnet restore $(PROJECT)
run: icon
dotnet run --project $(PROJECT)
build: icon restore
dotnet build $(PROJECT) -c $(CONFIG)
publish: icon restore
dotnet publish $(PROJECT) -c $(CONFIG) -r $(RID) --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -p:Version=$(VERSION) -p:InformationalVersion=$(INFO_VERSION) -o $(OUT_DIR)
portable: publish
pwsh -NoProfile -Command "New-Item -ItemType Directory -Force -Path '$(DIST_DIR)' | Out-Null; Copy-Item '$(OUT_DIR)/WinGroup.exe' '$(DIST_DIR)/$(PORTABLE_FILENAME)' -Force"
installer: publish
pwsh -NoProfile -Command "& '$(ISCC)' /DMyAppVersion='$(VERSION)' /DMyOutputBaseFilename='$(INSTALLER_BASENAME)' /DMyOutputDir='../$(DIST_DIR)' '$(INSTALLER_SCRIPT)'"
clean:
dotnet clean $(PROJECT)