VirtualBox

vbox的更動 59404 路徑 trunk/src/VBox/Installer


忽略:
時間撮記:
2016-1-19 上午10:10:39 (9 年 以前)
作者:
vboxsync
訊息:

Forward-ported r104938, r104943, r104950, r104952, r104953, r104987, r104988, r104990 from 5.0:

  • VBoxStub: Lazy import DLLs not in the KnownDlls list (and then some) and check that we don't accidentally add new imports as time goes by.
  • VBoxStub: the dlls have export names, so use them instead of the ordinals.
  • VBoxDef2LazyLoad fixes and error reporting, fixed missing VBoxCheckImports dependency during use in VBoxStub.
  • iprt/initterm.h,vbox-img,VBoxStub: Introduced RTR3INIT_FLAGS_STANDALONE_APP for statically linked applications that are expected to run outside the normal VirtualBox installation directory and need to be on their toes wrt dynamic library search paths. (Only windows, really.) Also, _always_ initialize IPRT first, don't ever do anything before that unless it 104% must be done there.
  • RTR3INIT_FLAGS_STANDALONE_APP trumps concerns about Vista GUI
位置:
trunk
檔案:
新增 5 筆資料
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk

  • trunk/src/VBox

  • trunk/src/VBox/Installer/win/Stub/Makefile.kmk

    r56299 r59404  
    3838 VBoxStub_LIBS = \
    3939        $(VBOX_LIB_RUNTIME_STATIC) \
    40         $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Msi.lib
     40       $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
     41 VBoxStub_LDFLAGS = \
     42        -DelayLoad:comctl32.dll
     43 VBoxStub_POST_CMDS = $(VBOX_CHECK_IMPORTS) --image $(out) ntdll.dll kernel32.dll
     44 VBoxStub_LNK_DEPS  = $(VBOX_CHECK_IMPORTS)
    4145
    4246 VBoxStub.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
     
    4852
    4953  VBoxStub_SOURCES  += VBoxStubCertUtil.cpp
    50   VBoxStub_LIBS     += crypt32.lib
    5154  VBoxStub.cpp_DEPS += $(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h
    5255  VBoxStub.cpp_INCS += $(VBoxStub_0_OUTDIR)
     
    7679        $(APPEND) -t $@ 'APP_MANIFEST RT_MANIFEST "$(subst /,\\,$(VBOX_STUB_MANIFEST_FILE))"'
    7780
     81 # Dynamic import no. 1: MSI.DLL
     82 VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/MsiLazyLoad.asm
     83 $$(VBoxStub_0_OUTDIR)/MsiLazyLoad.asm: $(PATH_SUB_CURRENT)/msi.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
     84        $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@)
     85        $(QUIET)$(RM) -f -- "$@"
     86        $(VBOX_DEF_2_LAZY_LOAD) --system --library MSI.DLL --output "$@" $(filter %.def, $^)
     87
     88 # Dynamic import no. 2: CRYPTO32.DLL
     89 VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/Crypt32LazyLoad.asm
     90 $$(VBoxStub_0_OUTDIR)/Crypt32LazyLoad.asm: $(PATH_SUB_CURRENT)/crypt32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
     91        $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@)
     92        $(QUIET)$(RM) -f -- "$@"
     93        $(VBOX_DEF_2_LAZY_LOAD) --system --library CRYPT32.DLL --output "$@" $(filter %.def, $^)
     94
     95 # Dynamic import no. 3: WS2_32.DLL
     96 VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/Ws232LazyLoad.asm
     97 $$(VBoxStub_0_OUTDIR)/Ws232LazyLoad.asm: $(PATH_SUB_CURRENT)/ws2_32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
     98        $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@)
     99        $(QUIET)$(RM) -f -- "$@"
     100        $(VBOX_DEF_2_LAZY_LOAD) --system --library WS2_32.DLL --output "$@" $(filter %.def, $^)
     101
     102 # Dynamic import no. 4: USER32.DLL
     103 VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/User32LazyLoad.asm
     104 $$(VBoxStub_0_OUTDIR)/User32LazyLoad.asm: $(PATH_SUB_CURRENT)/user32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
     105        $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@)
     106        $(QUIET)$(RM) -f -- "$@"
     107        $(VBOX_DEF_2_LAZY_LOAD) --system --library USER32.DLL --output "$@" $(filter %.def, $^)
     108
     109 # Dynamic import no. 5: SHELL32.DLL
     110 VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/Shell32LazyLoad.asm
     111 $$(VBoxStub_0_OUTDIR)/Shell32LazyLoad.asm: $(PATH_SUB_CURRENT)/shell32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
     112        $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@)
     113        $(QUIET)$(RM) -f -- "$@"
     114        $(VBOX_DEF_2_LAZY_LOAD) --system --library SHELL32.DLL --output "$@" $(filter %.def, $^)
     115
    78116
    79117endif # x86 only
  • trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp

    r58556 r59404  
    802802    int argc    = __argc;
    803803
    804     /* Check if we're already running and jump out if so. */
    805     /* Do not use a global namespace ("Global\\") for mutex name here, will blow up NT4 compatibility! */
     804    /*
     805     * Init IPRT. This is _always_ the very first thing we do.
     806     */
     807    int vrc = RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_STANDALONE_APP);
     808    if (RT_FAILURE(vrc))
     809        return RTMsgInitFailure(vrc);
     810
     811    /*
     812     * Check if we're already running and jump out if so.
     813     *
     814     * Note! Do not use a global namespace ("Global\\") for mutex name here,
     815     *       will blow up NT4 compatibility!
     816     */
    806817    HANDLE hMutexAppRunning = CreateMutex(NULL, FALSE, "VBoxStubInstaller");
    807818    if (   hMutexAppRunning != NULL
     
    812823        hMutexAppRunning = NULL;
    813824        return RTEXITCODE_FAILURE;
    814     }
    815 
    816     /* Init IPRT. */
    817     int vrc = RTR3InitExe(argc, &argv, 0);
    818     if (RT_FAILURE(vrc))
    819     {
    820         /* Close the mutex for this application instance. */
    821         CloseHandle(hMutexAppRunning);
    822         hMutexAppRunning = NULL;
    823         return RTMsgInitFailure(vrc);
    824825    }
    825826
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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