mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
This reverts commit d84db2d463
.
This commit is contained in:
parent
00453f5f96
commit
b92ba32781
2 changed files with 2 additions and 46 deletions
|
@ -57,7 +57,7 @@ CRCCheck force
|
|||
ShowInstDetails show
|
||||
ShowUninstDetails show
|
||||
|
||||
RequestExecutionLevel user
|
||||
RequestExecutionLevel admin
|
||||
|
||||
Var SHORTCUTS
|
||||
|
||||
|
@ -66,7 +66,6 @@ Var SHORTCUTS
|
|||
!include "InstallOptions.nsh"
|
||||
!include "WinVer.nsh"
|
||||
!include "x64.nsh"
|
||||
!include "UAC.nsh"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
@ -92,8 +91,7 @@ ManifestDPIAware true
|
|||
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run ${APPNAMEANDVERSION} now!"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\${OPENRCT2_EXE}"
|
||||
!define MUI_FINISHPAGE_LINK "Visit the OpenRCT2 site for more information"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}"
|
||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||
|
@ -110,35 +108,6 @@ ManifestDPIAware true
|
|||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
|
||||
!macro Init thing
|
||||
uac_tryagain:
|
||||
!insertmacro UAC_RunElevated
|
||||
${Switch} $0
|
||||
${Case} 0
|
||||
${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
|
||||
${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
|
||||
${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
|
||||
MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "This ${thing} requires admin privileges, try again" /SD IDNO IDYES uac_tryagain IDNO 0
|
||||
${EndIf}
|
||||
;fall-through and die
|
||||
${Case} 1223
|
||||
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "This ${thing} requires admin privileges, aborting!"
|
||||
Quit
|
||||
${Case} 1062
|
||||
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Logon service not running, aborting!"
|
||||
Quit
|
||||
${Default}
|
||||
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0"
|
||||
Quit
|
||||
${EndSwitch}
|
||||
|
||||
SetShellVarContext all
|
||||
!macroend
|
||||
|
||||
Function PageFinishRun
|
||||
!insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\${OPENRCT2_EXE}" "" "" ""
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------------------------------------
|
||||
; (Core) OpenRCT2 install section. Copies all internal game data
|
||||
Section "!OpenRCT2" Section1
|
||||
|
@ -485,7 +454,6 @@ Var UninstallString
|
|||
;-----------------------------------------------------------------------------------
|
||||
; NSIS Initialize function, determine if we are going to install/upgrade or uninstall
|
||||
Function .onInit
|
||||
!insertmacro Init "installer"
|
||||
StrCpy $SHORTCUTS "OpenRCT2"
|
||||
|
||||
SectionSetFlags 0 17
|
||||
|
@ -507,8 +475,4 @@ FinishCallback:
|
|||
; Call CheckProcessorArchitecture
|
||||
; Call CheckWindowsVersion
|
||||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
!insertmacro Init "uninstaller"
|
||||
FunctionEnd
|
||||
; eof
|
||||
|
|
|
@ -44,14 +44,6 @@ if (${env:OPENRCT2_ORG_TOKEN} -and -not $testing)
|
|||
7z x nsisxtra.zip > $null
|
||||
Check-ExitCode
|
||||
cp FindProcDLL.dll "C:\ProgramData\chocolatey\lib\nsis.portable\tools\nsis-3.0b1\Plugins\x86-ansi"
|
||||
|
||||
Write-Host "Downloading UAC plugin for NSIS..." -ForegroundColor Cyan
|
||||
curl "http://nsis.sourceforge.net/mediawiki/images/8/8f/UAC.zip" -OutFile uac.zip
|
||||
Check-ExitCode
|
||||
7z x uac.zip > $null
|
||||
Check-ExitCode
|
||||
cp UAC.nsh "C:\ProgramData\chocolatey\lib\nsis.portable\tools\nsis-3.0b1\Includes"
|
||||
cp Plugins "C:\ProgramData\chocolatey\lib\nsis.portable\tools\nsis-3.0b1" -Recurse -Force
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue