forked from Amebis/eduVPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefileCfgClient.mak
82 lines (68 loc) · 3.69 KB
/
MakefileCfgClient.mak
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# eduVPN - VPN for education and research
#
# Copyright: 2017-2020 The Commons Conservancy eduVPN Programme
# SPDX-License-Identifier: GPL-3.0+
#
# WiX parameters
WIX_CANDLE_FLAGS_CFG_CLIENT=$(WIX_CANDLE_FLAGS_CFG) \
-dClientTarget="$(CLIENT_TARGET)" \
-dClientUpgradeCode="$(CLIENT_UPGRADE_CODE)" \
-dClientAboutUrl="$(CLIENT_ABOUT_URL)"
######################################################################
# Setup
######################################################################
!IF "$(CFG)" == "Release"
SetupExe :: \
"$(SETUP_DIR)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe"
"$(SETUP_DIR)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" : \
!IFDEF MANIFESTCERTIFICATETHUMBPRINT
"$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" \
"$(OUTPUT_DIR)\$(CFG)\x86\Engine_$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe"
"$(WIX)bin\insignia.exe" $(WIX_INSIGNIA_FLAGS) -ab "$(OUTPUT_DIR)\$(CFG)\x86\Engine_$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" "$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" -o "$(@:"=).tmp"
signtool.exe sign /sha1 "$(MANIFESTCERTIFICATETHUMBPRINT)" /fd sha256 /as /tr "$(MANIFESTTIMESTAMPRFC3161URL)" /td sha256 /d "$(CLIENT_TITLE) Client" /q "$(@:"=).tmp"
move /y "$(@:"=).tmp" $@ > NUL
!ELSE
"$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe"
copy /y $** $@ > NUL
!ENDIF
Clean ::
-if exist "$(SETUP_DIR)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" del /f /q "$(SETUP_DIR)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe"
!ENDIF
######################################################################
# Building
######################################################################
"$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET).wixobj" : "eduVPN.wxs"
"$(WIX)bin\wixcop.exe" $(WIX_WIXCOP_FLAGS) $**
"$(WIX)bin\candle.exe" $(WIX_CANDLE_FLAGS_CFG_CLIENT) -out $@ $**
Clean ::
-if exist "$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET).wixobj" del /f /q "$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET).wixobj"
"$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" : \
"eduVPN.wxl" \
"Install\thm.wxl" \
"Install\thm.fr.wxl" \
"Install\thm.nl.wxl" \
"Install\thm.sl.wxl" \
"Install\thm.uk.wxl" \
"Install\thm.xml" \
"Install\$(CLIENT_TARGET)\logo.png" \
"$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET).wixobj" \
"$(OUTPUT_DIR)\$(CFG)\TAP-Windows.wixobj" \
"$(SETUP_DIR)\$(CLIENT_TARGET)TAPWinPre_$(TAPWINPRE_VERSION)_x86.msi" \
"$(SETUP_DIR)\$(CLIENT_TARGET)TAPWinPre_$(TAPWINPRE_VERSION)_x64.msi" \
"$(SETUP_DIR)\$(CLIENT_TARGET)OpenVPN_$(OPENVPN_VERSION)_x86.msi" \
"$(SETUP_DIR)\$(CLIENT_TARGET)OpenVPN_$(OPENVPN_VERSION)_x64.msi" \
"$(SETUP_DIR)\$(CLIENT_TARGET)Core_$(CORE_VERSION)_x86.msi" \
"$(SETUP_DIR)\$(CLIENT_TARGET)Core_$(CORE_VERSION)_x64.msi"
"$(WIX)bin\light.exe" $(WIX_LIGHT_FLAGS) -cultures:en-US -loc "eduVPN.wxl" -out $@ "$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET).wixobj" "$(OUTPUT_DIR)\$(CFG)\TAP-Windows.wixobj"
Clean ::
-if exist "$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_*.exe" del /f /q "$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_*.exe"
"$(OUTPUT_DIR)\$(CFG)\x86\Engine_$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe" : \
"$(OUTPUT_DIR)\$(CFG)\$(CLIENT_TARGET)Client_$(BUNDLE_VERSION).exe"
"$(WIX)bin\insignia.exe" $(WIX_INSIGNIA_FLAGS) -ib $** -o "$(@:"=).tmp"
!IFDEF MANIFESTCERTIFICATETHUMBPRINT
signtool.exe sign /sha1 "$(MANIFESTCERTIFICATETHUMBPRINT)" /fd sha256 /as /tr "$(MANIFESTTIMESTAMPRFC3161URL)" /td sha256 /d "$(CLIENT_TITLE) Client" /q "$(@:"=).tmp"
!ENDIF
move /y "$(@:"=).tmp" $@ > NUL
Clean ::
-if exist "$(OUTPUT_DIR)\$(CFG)\x86\Engine_$(CLIENT_TARGET)Client_*.exe" del /f /q "$(OUTPUT_DIR)\$(CFG)\x86\Engine_$(CLIENT_TARGET)Client_*.exe"