]> git.lyx.org Git - features.git/commitdiff
fix user privileges check
authorJoost Verburg <joostverburg@users.sourceforge.net>
Tue, 22 Apr 2008 18:27:25 +0000 (18:27 +0000)
committerJoost Verburg <joostverburg@users.sourceforge.net>
Tue, 22 Apr 2008 18:27:25 +0000 (18:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24452 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/packaging/installer/gui/external.nsh

index 4fc2f2e24eb249284b52acf1ab92b474d1740e8e..7c6aee5357a4497b7845bec728bbc3a0a269935c 100644 (file)
@@ -76,21 +76,37 @@ Var ComponentSize
   Pop $ExternalPage.NoInstall
   nsDialogs::OnClick /NOUNLOAD $ExternalPage.NoInstall $ExternalPage.RadioButton.Click
   
+  !if ${COMPONENT} != LaTeX
+  # ImageMagick and Ghostscript require Administrator or
+  # power user privileges for installation
+  ${If} $MultiUser.Privileges != "Admin"
+  ${AndIf} $MultiUser.Privileges != "Power"
+    EnableWindow $ExternalPage.Setup 0
+  ${EndIf}
+  !endif
+  
   # Set the state of the controls to the previous user selection (or the default)
 
   ${If} $${COMPONENT}State == ""
     # Page is displayed for the first time, set the default
     ${If} $Path${COMPONENT} == ""
-    !if ${COMPONENT} != LaTeX
-    # ImageMagick and Ghostscript require Administrator or
-    # power user privileges for installation
-    ${andif} $MultiUser.Privileges != "User"
-    ${andif} $MultiUser.Privileges != "Guest"
-    !endif    
+      !if ${COMPONENT} != LaTeX
+      # ImageMagick and Ghostscript require Administrator or
+      # power user privileges for installation
+      # Setup won't be checked because it's disabled
+      ${If} $MultiUser.Privileges != "User"
+      ${AndIf} $MultiUser.Privileges != "Guest"
+      !endif 
+      
       ${NSD_SetState} $ExternalPage.Setup ${BST_CHECKED}
+      
+      !if ${COMPONENT} != LaTeX
+      ${Else}
+        ${NSD_SetState} $ExternalPage.NoInstall ${BST_CHECKED}
+      ${EndIf}
+      !endif
     ${Else}
       ${NSD_SetState} $ExternalPage.Existing ${BST_CHECKED}
-      EnableWindow $ExternalPage.Setup 0
     ${EndIf}
   ${Else} 
     ${NSD_SetState} $ExternalPage.Setup $${COMPONENT}Setup.State
@@ -98,6 +114,7 @@ Var ComponentSize
     ${NSD_SetState} $ExternalPage.NoInstall $${COMPONENT}NoInstall.State
   ${EndIf}
   
+  
   Call ExternalRadioButtonClick
   
   nsDialogs::Show