-
Notifications
You must be signed in to change notification settings - Fork 2
/
makensis.mk
47 lines (35 loc) · 1.11 KB
/
makensis.mk
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
# Copyright (c) 2002-2016, Ross Smith II. MIT licensed.
APP_FILES+=license.txt
APP_NSI:=$(APP).nsi
NSIS_FILES+=version.txt
NSIS_FILES+=license.txt
NSIS_FILES+=$(wildcard *.nsh)
NSIS_FILES+=$(wildcard ../nshlib/*.nsh)
ifeq ("$(FLAVOR)", "win64")
MAKENSIS_OPTS64=/DINSTALL_IN_PROGRAMFILES64=1
endif
#######################################################################
ifndef MAKENSIS
MAKENSIS:=$(shell which makensis 2>/dev/null)
endif
ifndef MAKENSIS
NSIS_DIR:=$(shell cygpath -m -s "$(PROGRAMFILES)/NSIS" 2>/dev/null)
ifneq ($(wildcard $(NSIS_DIR)/makensis.exe),)
MAKENSIS:=$(NSIS_DIR)/makensis.exe
endif
endif
#######################################################################
$(RELEASE_APP_EXE): $(APP_NSI) $(NSIS_FILES)
test -d $(dir $@) || mkdir -p $(dir $@)
$(MAKENSIS) /V4 /O$(APP).log /DPRODUCT_VERSION=$(VER) /DPRODUCT_OUTFILE=$@ $(MAKENSIS_OPTS) $(MAKENSIS_OPTS64) $<
chmod +x $@
.PHONY: all
all: $(RELEASE_APP_EXE)
#######################################################################
.PHONY: clean
clean:
-rm -f \
$(RELEASE_APP_EXE) \
$(CLEAN_FILES) \
$(SIGNED_FILES) \
$(UPXED_FILES)