VirtualBox

Ignore:
Timestamp:
Nov 16, 2012 9:53:32 AM (12 years ago)
Author:
vboxsync
Message:

BUGZ:6508 Enable Stub installer silent cert installation only in case if binaries signing is enabled on build time.

Location:
trunk/src/VBox/Installer/win/Stub
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/Stub/Makefile.kmk

    r43878 r43894  
    2929VBoxStub_TEMPLATE= VBOXSTUB
    3030VBoxStub_DEFS    = _WIN32_WINNT=0x0501 IN_RT_R3
     31
    3132VBoxStub_SOURCES = \
    3233        VBoxStub.cpp \
    33         VBoxStubCertUtil.cpp \
    3434        VBoxStub.rc
    35 
    36 $$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h: $(VBOX_BIN2C) $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer
    37         $(VBOX_BIN2C) _VBoxStubPublicCert $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer $@
    3835
    3936VBoxStub_SDKS += \
     
    4138VBoxStub_LIBS = \
    4239        $(VBOX_LIB_RUNTIME_STATIC) \
    43         $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Msi.lib \
    44         crypt32.lib
     40        $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Msi.lib
    4541
    4642VBoxStub.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
    47 VBoxStub.cpp_DEPS  = \
    48         $(VBOX_SVN_REV_KMK) \
    49         $(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h
     43VBoxStub.cpp_DEPS  = $(VBOX_SVN_REV_KMK)
     44
     45# If signing mode is enabled, then add the possibility to
     46# install public certificate automatically in /silent mode
     47ifdef VBOX_SIGNING_MODE
     48
     49VBoxStub_SOURCES  += VBoxStubCertUtil.cpp
     50VBoxStub_LIBS     += crypt32.lib
     51VBoxStub.cpp_DEPS += $(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h
    5052VBoxStub.cpp_INCS += $(VBoxStub_0_OUTDIR)
     53VBoxStub.cpp_DEFS += VBOX_SIGNING_MODE
     54
     55$$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h: $(VBOX_BIN2C) $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer
     56        $(VBOX_BIN2C) _VBoxStubPublicCert $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer $@
     57
     58endif
    5159
    5260# The icon location is configurable.
  • trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp

    r43878 r43894  
    4949#include "resource.h"
    5050
     51#ifdef VBOX_SIGNING_MODE
    5152#include "VBoxStubCertUtil.h"
    5253#include "VBoxStubPublicCert.h"
     54#endif
    5355
    5456#ifndef  _UNICODE
     
    367369    bool fExtractOnly              = false;
    368370    bool fEnableLogging            = false;
     371#ifdef VBOX_SIGNING_MODE
    369372    bool fEnableSilentCert         = true;
     373#endif
    370374    char szExtractPath[RTPATH_MAX] = {0};
    371375    char szMSIArgs[4096]           = {0};
     
    380384        { "-silent",            's', RTGETOPT_REQ_NOTHING },
    381385        { "/silent",            's', RTGETOPT_REQ_NOTHING },
     386#ifdef VBOX_SIGNING_MODE
    382387        { "--no-silent-cert",   'c', RTGETOPT_REQ_NOTHING },
    383388        { "-no-silent-cert",    'c', RTGETOPT_REQ_NOTHING },
    384389        { "/no-silent-cert",    'c', RTGETOPT_REQ_NOTHING },
     390#endif
    385391        { "--logging",          'l', RTGETOPT_REQ_NOTHING },
    386392        { "-logging",           'l', RTGETOPT_REQ_NOTHING },
     
    418424                break;
    419425
     426#ifdef VBOX_SIGNING_MODE
    420427            case 'c':
    421428                fEnableSilentCert = false;
    422429                break;
     430#endif
    423431
    424432            case 'l':
     
    558566            }
    559567
     568#ifdef VBOX_SIGNING_MODE
    560569            /*
    561570             * If --silent command line option is specified, do force public
     
    575584                }
    576585            }
    577 
     586#endif
    578587            /* Do actions on files. */
    579588            for (BYTE k = 0; k < pHeader->byCntPkgs; k++)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette