mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
Remove 32bit leftovers
This commit is contained in:
parent
4ee0061154
commit
49328849f5
1 changed files with 14 additions and 57 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"
|
||||||
|
|
@ -174,27 +166,14 @@ Function AutoUninstallIfNeeded
|
||||||
|
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
; --- 32-bit uninstall ---
|
SetRegView 64
|
||||||
SetRegView 32
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
||||||
|
|
||||||
StrCmp $R0 "" done32
|
StrCmp $R0 "" done64
|
||||||
DetailPrint "Removing previous version (32-bit)..."
|
DetailPrint "Removing previous version (64-bit)..."
|
||||||
ExecWait '$R0'
|
ExecWait '$R0'
|
||||||
|
|
||||||
done32:
|
done64:
|
||||||
|
|
||||||
; --- 64-bit uninstall ---
|
|
||||||
${If} ${RunningX64}
|
|
||||||
SetRegView 64
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
|
||||||
|
|
||||||
StrCmp $R0 "" done64
|
|
||||||
DetailPrint "Removing previous version (64-bit)..."
|
|
||||||
ExecWait '$R0'
|
|
||||||
|
|
||||||
done64:
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
@ -243,45 +222,23 @@ ${EndIf}
|
||||||
${If} $PortableMode = 0
|
${If} $PortableMode = 0
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
# uninstall 32bit version
|
SetRegView 64
|
||||||
SetRegView 32
|
|
||||||
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||||
StrCmp $R0 "" done32
|
StrCmp $R0 "" done64
|
||||||
|
|
||||||
${If} $ReinstallMode = 0
|
${If} $ReinstallMode = 0
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
|
||||||
Abort
|
Abort
|
||||||
${Else}
|
${Else}
|
||||||
Goto uninst32
|
Goto uninst64
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
uninst32:
|
uninst64:
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ExecWait "$R0"
|
ExecWait "$R0"
|
||||||
|
|
||||||
done32:
|
done64:
|
||||||
|
|
||||||
# uninstall 64bit version
|
|
||||||
${If} ${NSIS_IS_64_BIT} == 1
|
|
||||||
SetRegView 64
|
|
||||||
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
|
||||||
StrCmp $R0 "" done64
|
|
||||||
|
|
||||||
${If} $ReinstallMode = 0
|
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
|
|
||||||
Abort
|
|
||||||
${Else}
|
|
||||||
Goto uninst64
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
uninst64:
|
|
||||||
ClearErrors
|
|
||||||
ExecWait "$R0"
|
|
||||||
|
|
||||||
done64:
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
${Else}
|
${Else}
|
||||||
Abort
|
Abort
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue