1 | # $Id: Makefile.kmk 96407 2022-08-22 17:43:14Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Windows NT Additions Tools.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2012-2022 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Certificate utility.
|
---|
33 | #
|
---|
34 | PROGRAMS += VBoxCertUtil
|
---|
35 |
|
---|
36 | VBoxCertUtil_TEMPLATE = VBoxGuestR3Exe
|
---|
37 | VBoxCertUtil_SOURCES = \
|
---|
38 | VBoxCertUtil.cpp
|
---|
39 | VBoxCertUtil_LIBS = \
|
---|
40 | crypt32.lib
|
---|
41 | $(call VBOX_SET_VER_INFO_EXE,VBoxCertUtil,VirtualBox Certificate Utility,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))
|
---|
42 |
|
---|
43 |
|
---|
44 | #
|
---|
45 | # Install all the certificates we use here.
|
---|
46 | #
|
---|
47 | INSTALLS += AdditionsInstCertFiles
|
---|
48 | AdditionsInstCertFiles_TEMPLATE = VBoxGuestR3Exe
|
---|
49 | AdditionsInstCertFiles_SOURCES =
|
---|
50 | AdditionsInstCertFiles_CLEAN =
|
---|
51 | ifdef VBOX_SIGNING_MODE
|
---|
52 | define def_VBoxAdditionsInstCertFiles
|
---|
53 | AdditionsInstCertFiles_SOURCES += $$(AdditionsInstCertFiles_0_OUTDIR)/$(1)=>$1
|
---|
54 | AdditionsInstCertFiles_CLEAN += $$(AdditionsInstCertFiles_0_OUTDIR)/$(1)
|
---|
55 | $$$$(AdditionsInstCertFiles_0_OUTDIR)/$(1): $$(2) | $$$$(dir $$$$@) $(VBOX_RTSIGNTOOL)
|
---|
56 | $(QUIET)$(RM) -f -- "$$@"
|
---|
57 | $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index $3 --exe "$$<" --output "$$@" --der
|
---|
58 | endef
|
---|
59 |
|
---|
60 | if !defined(VBOX_CERTIFICATE_SHA2_SUBJECT_NAME) && !$(intersects win all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
61 | $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,0)
|
---|
62 | else
|
---|
63 | $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox-sha1.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,0)
|
---|
64 | $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox-sha256.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,1)
|
---|
65 | if $(intersects win_planb,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
66 | $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox-sha256-r3.cer,$(VBOX_PATH_ADDITIONS)/VBoxCertUtil.exe,1)
|
---|
67 | endif
|
---|
68 | endif
|
---|
69 | ifdef VBOX_WITH_VBOX_LEGACY_TS_CA
|
---|
70 | AdditionsInstCertFiles_SOURCES += $(VBOX_LEGACY_TS_CA_FILE)=>vbox-legacy-timestamp-ca.cer
|
---|
71 | endif
|
---|
72 | endif
|
---|
73 |
|
---|
74 | #
|
---|
75 | # Install the registry file for bypassing the Windows 11 installer checks.
|
---|
76 | #
|
---|
77 | INSTALLS += AdditionsInstW11Bypass
|
---|
78 | AdditionsInstW11Bypass_INST = $(INST_ADDITIONS)
|
---|
79 | AdditionsInstW11Bypass_MODE = a+r,u+w
|
---|
80 | AdditionsInstW11Bypass_SOURCES = windows11-bypass.reg
|
---|
81 |
|
---|
82 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
83 |
|
---|