mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-27 16:32:20 -07:00
Remove 32-bit code
This commit is contained in:
parent
7d867b9745
commit
a3169eab96
1 changed files with 84 additions and 136 deletions
|
|
@ -64,14 +64,6 @@ ${If} ${NSIS_IS_64_BIT} == 1 #NSIS 64bit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
StrCpy $NormalDestDir "$ProgramFiles64\Cockatrice"
|
StrCpy $NormalDestDir "$ProgramFiles64\Cockatrice"
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
${Else} #NSIS 32bit
|
|
||||||
${If} ${RunningX64}
|
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION \
|
|
||||||
"You are about to install a 32-bit version of Cockatrice on a 64-bit Windows system.$\n\
|
|
||||||
We advise you to use the correct 64-bit installer instead to get around potential issues.$\n$\n\
|
|
||||||
Download from our webpage: https://cockatrice.github.io"
|
|
||||||
${EndIf}
|
|
||||||
StrCpy $NormalDestDir "$ProgramFiles\Cockatrice"
|
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
StrCpy $PortableDestDir "$Desktop\CockatricePortable"
|
StrCpy $PortableDestDir "$Desktop\CockatricePortable"
|
||||||
|
|
@ -156,7 +148,6 @@ ${If} $8 != "admin"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
Function SetModeDestinationFromInstdir
|
Function SetModeDestinationFromInstdir
|
||||||
${If} $PortableMode = 0
|
${If} $PortableMode = 0
|
||||||
StrCpy $NormalDestDir $InstDir
|
StrCpy $NormalDestDir $InstDir
|
||||||
|
|
@ -175,27 +166,14 @@ Function AutoUninstallIfNeeded
|
||||||
|
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
; --- 32-bit uninstall ---
|
|
||||||
SetRegView 32
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
|
||||||
|
|
||||||
StrCmp $R0 "" done32
|
|
||||||
DetailPrint "Removing previous version (32-bit)..."
|
|
||||||
ExecWait '$R0'
|
|
||||||
|
|
||||||
done32:
|
|
||||||
|
|
||||||
; --- 64-bit uninstall ---
|
|
||||||
${If} ${RunningX64}
|
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
||||||
|
|
||||||
StrCmp $R0 "" done64
|
StrCmp $R0 "" done64
|
||||||
DetailPrint "Removing previous version (64-bit)..."
|
DetailPrint "Removing previous version..."
|
||||||
ExecWait '$R0'
|
ExecWait '$R0'
|
||||||
|
|
||||||
done64:
|
done64:
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
@ -244,27 +222,6 @@ ${EndIf}
|
||||||
${If} $PortableMode = 0
|
${If} $PortableMode = 0
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
# uninstall 32bit version
|
|
||||||
SetRegView 32
|
|
||||||
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
|
||||||
StrCmp $R0 "" done32
|
|
||||||
|
|
||||||
${If} $ReinstallMode = 0
|
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
|
|
||||||
Abort
|
|
||||||
${Else}
|
|
||||||
Goto uninst32
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
uninst32:
|
|
||||||
ClearErrors
|
|
||||||
ExecWait "$R0"
|
|
||||||
|
|
||||||
done32:
|
|
||||||
|
|
||||||
# uninstall 64bit version
|
|
||||||
${If} ${NSIS_IS_64_BIT} == 1
|
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||||
|
|
@ -282,7 +239,6 @@ ${If} $PortableMode = 0
|
||||||
ExecWait "$R0"
|
ExecWait "$R0"
|
||||||
|
|
||||||
done64:
|
done64:
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
${Else}
|
${Else}
|
||||||
Abort
|
Abort
|
||||||
|
|
@ -345,14 +301,6 @@ ${If} $PortableMode = 0
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@"
|
||||||
|
|
||||||
IfFileExists "$INSTDIR\vc_redist.x86.exe" VcRedist86Exists PastVcRedist86Check
|
|
||||||
VcRedist86Exists:
|
|
||||||
ExecWait '"$INSTDIR\vc_redist.x86.exe" /passive /norestart'
|
|
||||||
DetailPrint "Wait to ensure unlock of vc_redist file after installation..."
|
|
||||||
Sleep 3000
|
|
||||||
Delete "$INSTDIR\vc_redist.x86.exe"
|
|
||||||
PastVcRedist86Check:
|
|
||||||
|
|
||||||
IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check
|
IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check
|
||||||
VcRedist64Exists:
|
VcRedist64Exists:
|
||||||
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
|
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue