1
0
Fork 0

(svn r22909) -Fix-ish [FS#4749]: let Windows 2000 and XP without service pack 3 use the win9x binary/installer; the newer MSVC compiler of the compile farm does not support those versions of Windows anymore

release/1.2
rubidium 2011-09-08 20:06:12 +00:00
parent db12a5f703
commit fb24ab71d0
3 changed files with 18 additions and 20 deletions

View File

@ -57,6 +57,7 @@ Var CDDRIVE
; Modern interface settings ; Modern interface settings
!include "MUI2.nsh" !include "MUI2.nsh"
!include "InstallOptions.nsh" !include "InstallOptions.nsh"
!include "WinVer.nsh"
!define MUI_ABORTWARNING !define MUI_ABORTWARNING
!define MUI_WELCOMEPAGE_TITLE_3LINES !define MUI_WELCOMEPAGE_TITLE_3LINES
@ -518,17 +519,17 @@ hasCD:
FunctionEnd FunctionEnd
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
; Determine windows version, returns "win9x" if Win9x/Me or "winnt" on the stack ; Determine windows version, returns "win9x" if Win9x/Me/2000/XP SP2- or "winnt" for the rest on the stack
Function GetWindowsVersion Function GetWindowsVersion
ClearErrors ClearErrors
StrCpy $R0 "winnt"
GetVersion::WindowsPlatformId
Pop $R0
IntCmp $R0 2 WinNT 0
StrCpy $R0 "win9x" StrCpy $R0 "win9x"
WinNT: ${If} ${IsNT}
ClearErrors ${If} ${IsWinXP}
${AndIf} ${AtLeastServicePack} 3
${OrIf} ${AtLeastWin2003}
StrCpy $R0 "winnt"
${EndIf}
${EndIf}
Push $R0 Push $R0
FunctionEnd FunctionEnd
@ -540,12 +541,12 @@ Function CheckProcessorArchitecture
IntCmp $R0 64 Win64 0 IntCmp $R0 64 Win64 0
ClearErrors ClearErrors
IntCmp ${APPBITS} 64 0 Done IntCmp ${APPBITS} 64 0 Done
MessageBox MB_OKCANCEL|MB_ICONSTOP "You are trying to install the 64-bit OpenTTD on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the 64-bit OpenTTD on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
GoTo Done GoTo Done
Win64: Win64:
ClearErrors ClearErrors
IntCmp ${APPBITS} 64 Done 0 IntCmp ${APPBITS} 64 Done 0
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "You are trying to install the 32-bit OpenTTD on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONINFORMATION "You are trying to install the 32-bit OpenTTD on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
GoTo Done GoTo Done
Abort: Abort:
Quit Quit
@ -560,12 +561,12 @@ Function CheckWindowsVersion
StrCmp $R0 "win9x" 0 WinNT StrCmp $R0 "win9x" 0 WinNT
ClearErrors ClearErrors
StrCmp ${APPARCH} "win9x" Done 0 StrCmp ${APPARCH} "win9x" Done 0
MessageBox MB_OKCANCEL|MB_ICONSTOP "You are trying to install the Windows 2000, XP, Vista and 7 version on Windows 95, 98 or ME. This is will not work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the Windows XP SP3, Vista and 7 version on Windows 95, 98, ME, 2000 and XP without SP3. This is will not work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
GoTo Done GoTo Done
WinNT: WinNT:
ClearErrors ClearErrors
StrCmp ${APPARCH} "win9x" 0 Done StrCmp ${APPARCH} "win9x" 0 Done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98 and ME version on Windows 2000, XP, Vista or 7. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98, 2000 and XP without SP3 version on Windows XP SP3, Vista or 7. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
Abort: Abort:
Quit Quit
Done: Done:
@ -674,8 +675,7 @@ WelcomeToSetup:
ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion"
; Gets the older version then displays it in a message box ; Gets the older version then displays it in a message box
MessageBox MB_OK|MB_ICONINFORMATION \ MessageBox MB_OK|MB_ICONINFORMATION \
"Welcome to ${APPNAMEANDVERSION} Setup.$\n \ "Welcome to ${APPNAMEANDVERSION} Setup.$\nThis will allow you to upgrade from version $OLDVERSION."
This will allow you to upgrade from version $OLDVERSION."
SectionSetFlags ${Section2} 0x80 ; set bit 7 SectionSetFlags ${Section2} 0x80 ; set bit 7
SectionSetFlags ${Section3} 0x80 ; set bit 7 SectionSetFlags ${Section3} 0x80 ; set bit 7
SectionSetFlags ${Section4} 0x80 ; set bit 7 SectionSetFlags ${Section4} 0x80 ; set bit 7
@ -686,8 +686,7 @@ VersionsAreEqual:
ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString"
IfFileExists "$UninstallString" "" FinishCallback IfFileExists "$UninstallString" "" FinishCallback
MessageBox MB_YESNO|MB_ICONQUESTION \ MessageBox MB_YESNO|MB_ICONQUESTION \
"Setup detected ${APPNAMEANDVERSION} on your system. This is the same version that this program will install.$\n \ "Setup detected ${APPNAMEANDVERSION} on your system. This is the same version that this program will install.$\nAre you trying to uninstall it?" \
Are you trying to uninstall it?" \
IDYES DoUninstall IDNO FinishCallback IDYES DoUninstall IDNO FinishCallback
DoUninstall: ; You have the same version as this installer. This allows you to uninstall. DoUninstall: ; You have the same version as this installer. This allows you to uninstall.
Exec "$UninstallString" Exec "$UninstallString"
@ -695,8 +694,7 @@ DoUninstall: ; You have the same version as this installer. This allows you to
InstallerIsOlder: InstallerIsOlder:
MessageBox MB_OK|MB_ICONSTOP \ MessageBox MB_OK|MB_ICONSTOP \
"You have a newer version of ${APPNAME}.$\n \ "You have a newer version of ${APPNAME}.$\nSetup will now exit."
Setup will now exit."
Quit Quit
FinishCallback: FinishCallback:

View File

@ -1,5 +1,5 @@
!define APPBITS 32 ; Define number of bits for the architecture !define APPBITS 32 ; Define number of bits for the architecture
!define EXTRA_VERSION "2000, XP, Vista and 7" !define EXTRA_VERSION "XP SP3, Vista and 7"
!define APPARCH "win32" ; Define the application architecture !define APPARCH "win32" ; Define the application architecture
!define BINARY_DIR "${PATH_ROOT}objs\win32\Release" !define BINARY_DIR "${PATH_ROOT}objs\win32\Release"
InstallDir "$PROGRAMFILES32\OpenTTD\" InstallDir "$PROGRAMFILES32\OpenTTD\"

View File

@ -1,5 +1,5 @@
!define APPBITS 32 ; Define number of bits for the architecture !define APPBITS 32 ; Define number of bits for the architecture
!define EXTRA_VERSION "95, 98 and ME" !define EXTRA_VERSION "95, 98, ME, 2000 and XP without SP3"
!define APPARCH "win9x" ; Define the application architecture !define APPARCH "win9x" ; Define the application architecture
!define BINARY_DIR "${PATH_ROOT}bin" !define BINARY_DIR "${PATH_ROOT}bin"
InstallDir "$PROGRAMFILES32\OpenTTD\" InstallDir "$PROGRAMFILES32\OpenTTD\"