VirtualBox

Changeset 32232 in vbox for trunk/src


Ignore:
Timestamp:
Sep 3, 2010 8:54:56 AM (14 years ago)
Author:
vboxsync
Message:

Windows Guest Additions installer: Bugfix for .onSelChange (required for WDDM driver), put MUI settings in a define for better debugging (enabled by default as it was before).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi

    r31634 r32232  
    5454!endif
    5555
    56 ; Use modern UI (MUI)
    57 !include "MUI.nsh"
    58 
    59 ; MUI Settings
    60 !define MUI_WELCOMEFINISHPAGE_BITMAP "$%VBOX_BRAND_WIN_ADD_INST_DLGBMP%"
    61 !define MUI_ABORTWARNING
    62 !define MUI_WELCOMEPAGE_TITLE_3LINES "Welcome to the ${PRODUCT_NAME} Additions Setup"
    63 
    64 ; API defines
    65 !define SM_CLEANBOOT 67
    66 
    67 ; Icons
    68 !if $%BUILD_TARGET_ARCH% == "x86"       ; 32-bit
    69   !define MUI_ICON "$%VBOX_NSIS_ICON_FILE%"
    70   !define MUI_UNICON "$%VBOX_NSIS_ICON_FILE%"
    71 !else   ; 64-bit
    72   !define MUI_ICON "$%VBOX_WINDOWS_ADDITIONS_ICON_FILE%"
    73   !define MUI_UNICON "$%VBOX_WINDOWS_ADDITIONS_ICON_FILE%"
    74 !endif
    75 
    76 ; Welcome page
    77 !insertmacro MUI_PAGE_WELCOME
    78 ; License page
    79 !insertmacro MUI_PAGE_LICENSE "$(VBOX_LICENSE)"
    80 !define MUI_LICENSEPAGE_RADIOBUTTONS
    81 ; Directory page
    82 !insertmacro MUI_PAGE_DIRECTORY
    83 ; Components Page
    84 !insertmacro MUI_PAGE_COMPONENTS
    85 ; Instfiles page
    86 !insertmacro MUI_PAGE_INSTFILES
    87 
    88 !ifndef _DEBUG
    89   !define MUI_FINISHPAGE_TITLE_3LINES   ; Have a bit more vertical space for text
    90   !insertmacro MUI_PAGE_FINISH          ; Only show in release mode - useful information for debugging!
    91 !endif
    92 
    93 ; Uninstaller pages
    94 !insertmacro MUI_UNPAGE_INSTFILES
    95 
    96 ; Define languages we will use
    97 !insertmacro MUI_LANGUAGE "English"
    98 !insertmacro MUI_LANGUAGE "French"
    99 !insertmacro MUI_LANGUAGE "German"
    100 
    101 ; Set branding text which appears on the horizontal line at the bottom
    102 BrandingText "VirtualBox Windows Additions"
    103 
    104 ; Set license language
    105 LicenseLangString VBOX_LICENSE ${LANG_ENGLISH} "$%VBOX_BRAND_LICENSE_RTF%"
    106 
    107 ; If license files not available (OSE / PUEL) build, then use the English one as default.
    108 !ifdef VBOX_BRAND_fr_FR_LICENSE_RTF
    109  LicenseLangString VBOX_LICENSE ${LANG_FRENCH} "$%VBOX_BRAND_fr_FR_LICENSE_RTF%"
    110 !else
    111  LicenseLangString VBOX_LICENSE ${LANG_FRENCH} "$%VBOX_BRAND_LICENSE_RTF%"
    112 !endif
    113 !ifdef VBOX_BRAND_de_DE_LICENSE_RTF
    114  LicenseLangString VBOX_LICENSE ${LANG_GERMAN} "$%VBOX_BRAND_de_DE_LICENSE_RTF%"
    115 !else
    116  LicenseLangString VBOX_LICENSE ${LANG_GERMAN} "$%VBOX_BRAND_LICENSE_RTF%"
    117 !endif
    118 
    119 !insertmacro MUI_RESERVEFILE_LANGDLL
    120 ; MUI end ------
     56; Set Modern UI (MUI) as default
     57!define USE_MUI
     58
     59!ifdef USE_MUI
     60  ; Use modern UI, version 2
     61  !include "MUI2.nsh"
     62
     63  ; MUI Settings
     64  !define MUI_WELCOMEFINISHPAGE_BITMAP "$%VBOX_BRAND_WIN_ADD_INST_DLGBMP%"
     65  !define MUI_ABORTWARNING
     66  !define MUI_WELCOMEPAGE_TITLE_3LINES "Welcome to the ${PRODUCT_NAME} Additions Setup"
     67
     68  ; API defines
     69  !define SM_CLEANBOOT 67
     70
     71  ; Icons
     72  !if $%BUILD_TARGET_ARCH% == "x86"       ; 32-bit
     73    !define MUI_ICON "$%VBOX_NSIS_ICON_FILE%"
     74    !define MUI_UNICON "$%VBOX_NSIS_ICON_FILE%"
     75  !else   ; 64-bit
     76    !define MUI_ICON "$%VBOX_WINDOWS_ADDITIONS_ICON_FILE%"
     77    !define MUI_UNICON "$%VBOX_WINDOWS_ADDITIONS_ICON_FILE%"
     78  !endif
     79
     80  ; Welcome page
     81  !insertmacro MUI_PAGE_WELCOME
     82  ; License page
     83  !insertmacro MUI_PAGE_LICENSE "$(VBOX_LICENSE)"
     84  !define MUI_LICENSEPAGE_RADIOBUTTONS
     85  ; Directory page
     86  !insertmacro MUI_PAGE_DIRECTORY
     87  ; Components Page
     88  !insertmacro MUI_PAGE_COMPONENTS
     89  ; Instfiles page
     90  !insertmacro MUI_PAGE_INSTFILES
     91
     92  !ifndef _DEBUG
     93    !define MUI_FINISHPAGE_TITLE_3LINES   ; Have a bit more vertical space for text
     94    !insertmacro MUI_PAGE_FINISH          ; Only show in release mode - useful information for debugging!
     95  !endif
     96
     97  ; Uninstaller pages
     98  !insertmacro MUI_UNPAGE_INSTFILES
     99
     100  ; Define languages we will use
     101  !insertmacro MUI_LANGUAGE "English"
     102  !insertmacro MUI_LANGUAGE "French"
     103  !insertmacro MUI_LANGUAGE "German"
     104
     105  ; Set branding text which appears on the horizontal line at the bottom
     106  BrandingText "VirtualBox Windows Additions"
     107
     108  ; Set license language
     109  LicenseLangString VBOX_LICENSE ${LANG_ENGLISH} "$%VBOX_BRAND_LICENSE_RTF%"
     110
     111  ; If license files not available (OSE / PUEL) build, then use the English one as default.
     112  !ifdef VBOX_BRAND_fr_FR_LICENSE_RTF
     113    LicenseLangString VBOX_LICENSE ${LANG_FRENCH} "$%VBOX_BRAND_fr_FR_LICENSE_RTF%"
     114  !else
     115    LicenseLangString VBOX_LICENSE ${LANG_FRENCH} "$%VBOX_BRAND_LICENSE_RTF%"
     116  !endif
     117  !ifdef VBOX_BRAND_de_DE_LICENSE_RTF
     118    LicenseLangString VBOX_LICENSE ${LANG_GERMAN} "$%VBOX_BRAND_de_DE_LICENSE_RTF%"
     119  !else
     120    LicenseLangString VBOX_LICENSE ${LANG_GERMAN} "$%VBOX_BRAND_LICENSE_RTF%"
     121  !endif
     122
     123  !insertmacro MUI_RESERVEFILE_LANGDLL
     124!else ; !USE_MUI
     125    XPStyle on
     126    Page license
     127    Page components
     128    Page directory
     129    Page instfiles
     130!endif
    121131
    122132; Language files
     
    820830!endif ; VBOX_WITH_CROGL
    821831
    822 ;Assign language strings to sections
    823 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
    824   !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(VBOX_COMPONENT_MAIN_DESC)
    825   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $(VBOX_COMPONENT_AUTOLOGON_DESC)
    826 !if $%VBOX_WITH_CROGL% == "1"
    827   !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(VBOX_COMPONENT_D3D_DESC)
    828 !endif
    829 !insertmacro MUI_FUNCTION_DESCRIPTION_END
     832!ifdef USE_MUI
     833  ;Assign language strings to sections
     834  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
     835    !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(VBOX_COMPONENT_MAIN_DESC)
     836    !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $(VBOX_COMPONENT_AUTOLOGON_DESC)
     837  !if $%VBOX_WITH_CROGL% == "1"
     838    !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(VBOX_COMPONENT_D3D_DESC)
     839  !endif
     840  !insertmacro MUI_FUNCTION_DESCRIPTION_END
     841!endif ; USE_MUI
    830842
    831843Section -Content
     
    870882
    871883SectionEnd
     884
     885; !!! NOTE: This function *has* to be right under the last section; otherwise it does
     886;           *not* get called! Don't ask me why ... !!!
     887Function .onSelChange
     888
     889  Push $0
     890
     891  ; Section: D3D
     892  SectionGetFlags ${SEC03} $0
     893
     894  ${If} $0 == ${SF_SELECTED}
     895    ; If we're not in safe mode, print a warning and don't install D3D support
     896    ${If} $g_iSystemMode == '0'
     897        IntOp $0 $0 & ${SECTION_OFF} ; Unselect section again
     898        SectionSetFlags ${SEC03} $0
     899        MessageBox MB_ICONINFORMATION|MB_OK $(VBOX_COMPONENT_D3D_NO_SM) /SD IDOK
     900        Return
     901    ${EndIf}
     902  ${EndIf}
     903
     904  Pop $0
     905
     906FunctionEnd
    872907
    873908; This function is called when a critical error occured
     
    950985!endif
    951986
     987!ifdef USE_MUI
    952988  ; Display language selection dialog (will be hidden in silent mode!)
    953989  !ifdef VBOX_INSTALLER_ADD_LANGUAGES
    954990    !insertmacro MUI_LANGDLL_DISPLAY
    955991  !endif
     992!endif
    956993
    957994  ; Do some checks before we actually start ...
     
    10611098FunctionEnd
    10621099
    1063 Function .onSelChange
    1064 
    1065   Push $0
    1066 
    1067   ; Section: D3D
    1068   SectionGetFlags ${SEC03} $0
    1069 
    1070   ${If} $0 == ${SF_SELECTED}
    1071     ; If we're not in safe mode, print a warning and don't install D3D support
    1072     ${If} $g_iSystemMode == '0'
    1073         IntOp $0 $0 & ${SECTION_OFF} ; Unselect section again
    1074         SectionSetFlags ${SEC03} $0
    1075         MessageBox MB_ICONINFORMATION|MB_OK $(VBOX_COMPONENT_D3D_NO_SM) /SD IDOK
    1076         Return
    1077     ${EndIf}
    1078   ${EndIf}
    1079 
    1080   Pop $0
    1081 
    1082 FunctionEnd
    1083 
    10841100Section Uninstall
    10851101
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