mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
installer: fix http://bugzilla.lyx.org/show_bug.cgi?id=5506
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27455 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fa3ea10057
commit
42fded69af
@ -228,7 +228,7 @@ Function .onInit
|
||||
${endif}
|
||||
|
||||
# printer settings, needed to install the Metafile2eps printer
|
||||
!insertmacro PrinterInit
|
||||
!insertmacro PrinterInit # macro from InstallThirdPartyProgs.nsh
|
||||
|
||||
# default settings
|
||||
# these can be reset to "all" in section SecAllUsers
|
||||
|
@ -223,7 +223,7 @@ Function .onInit
|
||||
${endif}
|
||||
|
||||
# printer settings, needed to install the Metafile2eps printer
|
||||
!insertmacro PrinterInit
|
||||
!insertmacro PrinterInit # macro from InstallThirdPartyProgs.nsh
|
||||
|
||||
# default settings
|
||||
# these can be reset to "all" in section SecAllUsers
|
||||
|
@ -112,12 +112,20 @@ FunctionEnd
|
||||
#--------------------------------
|
||||
|
||||
!macro AppPreSuff AppPre AppSuff
|
||||
# the APPDATA path has always the following structure:
|
||||
# the APPDATA path for a local user has for WinXP and 2000 the following structure:
|
||||
# C:\Documents and Settings\username\Application Data
|
||||
# for Win Vista the structure is:
|
||||
# C:\Users\username\AppData\Roaming
|
||||
# this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre"
|
||||
# and the "Application Data" substring into the variable "AppSuff"
|
||||
|
||||
SetShellVarContext current # switch temoprarily to local user
|
||||
StrCpy $String "$APPDATA"
|
||||
Var /GLOBAL APPDATemp
|
||||
StrCpy $APPDATemp "$APPDATA"
|
||||
${if} $ProductRootKey == "HKLM"
|
||||
SetShellVarContext all # move back to all users
|
||||
${endif}
|
||||
StrCpy $Search "\"
|
||||
Call StrPoint # search for the first "\"
|
||||
IntOp $Pointer $Pointer + 1 # jump after the "\"
|
||||
@ -125,7 +133,7 @@ FunctionEnd
|
||||
StrCpy $0 $Pointer
|
||||
Call StrPoint # search for the second "\"
|
||||
IntOp $0 $0 + $Pointer # $0 is now the pointer to the second "\" in the APPDATA string
|
||||
StrCpy ${AppPre} $APPDATA $0 # save the part before the second "\"
|
||||
StrCpy ${AppPre} $APPDATemp $0 # save the part before the second "\"
|
||||
IntOp $Pointer $Pointer + 1 # jump after the "\"
|
||||
StrCpy $String $String "" $Pointer # cut off the part before the second "\"
|
||||
Call StrPoint # search for the third "\"
|
||||
@ -257,12 +265,19 @@ FunctionEnd
|
||||
#--------------------------------
|
||||
|
||||
!macro UnAppPreSuff AppPre AppSuff
|
||||
# the APPDATA path has always the following structure:
|
||||
# the APPDATA path for a local user has for WinXP and 2000 the following structure:
|
||||
# C:\Documents and Settings\username\Application Data
|
||||
# for Win Vista the structure is:
|
||||
# C:\Users\username\AppData\Roaming
|
||||
# this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre"
|
||||
# and the "Application Data" substring into the variable "AppSuff"
|
||||
|
||||
SetShellVarContext current # switch temoprarily to local user
|
||||
StrCpy $String "$APPDATA"
|
||||
StrCpy $APPDATemp "$APPDATA"
|
||||
${if} $Answer == "yes" # then user has admin priviledges
|
||||
SetShellVarContext all # move back to all users
|
||||
${endif}
|
||||
StrCpy $Search "\"
|
||||
Call un.StrPoint # search for the first "\"
|
||||
IntOp $Pointer $Pointer + 1 # jump after the "\"
|
||||
@ -270,7 +285,7 @@ FunctionEnd
|
||||
StrCpy $0 $Pointer
|
||||
Call un.StrPoint # search for the second "\"
|
||||
IntOp $0 $0 + $Pointer # $0 is now the pointer to the second "\" in the APPDATA string
|
||||
StrCpy ${AppPre} $APPDATA $0 # save the part before the second "\"
|
||||
StrCpy ${AppPre} $APPDATemp $0 # save the part before the second "\"
|
||||
IntOp $Pointer $Pointer + 1 # jump after the "\"
|
||||
StrCpy $String $String "" $Pointer # cut off the part before the second "\"
|
||||
Call un.StrPoint # search for the third "\"
|
||||
|
Loading…
Reference in New Issue
Block a user