1
0
Fork 0

(svn r14081) -Fix (r14075): WoW64 spoiled the 64 bits Windows detection and the installer for the 64 bits binary installed in the wrong directory. Thanks to michi_cc and glx for testing.

release/0.7
rubidium 2008-08-15 23:00:56 +00:00
parent c10691faff
commit a8e85f00c9
4 changed files with 9 additions and 7 deletions

View File

@ -31,7 +31,6 @@ VIAddVersionKey "LegalCopyright" " "
Name "${APPNAMEANDVERSION} ${APPBITS} bits version ${EXTRA_VERSION}" Name "${APPNAMEANDVERSION} ${APPBITS} bits version ${EXTRA_VERSION}"
; NOTE: Keep trailing backslash! ; NOTE: Keep trailing backslash!
InstallDir "$PROGRAMFILES\OpenTTD\"
InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder"
OutFile "openttd-${APPVERSION}-${APPARCH}.exe" OutFile "openttd-${APPVERSION}-${APPARCH}.exe"
CRCCheck force CRCCheck force
@ -395,8 +394,9 @@ Function GetWindowsVersion
ClearErrors ClearErrors
StrCpy $R0 "winnt" StrCpy $R0 "winnt"
ReadRegStr $R1 HKLM "SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion" CurrentVersion GetVersion::WindowsPlatformId
IfErrors 0 WinNT Pop $R0
IntCmp $R0 2 WinNT 0
StrCpy $R0 "win9x" StrCpy $R0 "win9x"
WinNT: WinNT:
ClearErrors ClearErrors
@ -406,10 +406,9 @@ FunctionEnd
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
; Check whether we're not running an installer for 64 bits on 32 bits and vice versa ; Check whether we're not running an installer for 64 bits on 32 bits and vice versa
Function CheckProcessorArchitecture Function CheckProcessorArchitecture
cpudesc::tell GetVersion::WindowsPlatformArchitecture
Pop $0 ;full identification string in $0 Pop $R0
StrCpy $1 $0 2, 56 ;pull out the architecture IntCmp $R0 64 Win64 0
StrCmp $1 "00" 0 Win64
ClearErrors ClearErrors
IntCmp ${APPBITS} 64 0 Done IntCmp ${APPBITS} 64 0 Done
MessageBox MB_OKCANCEL|MB_ICONSTOP "You want to install the 64 bits OpenTTD on a 32 bits 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_OKCANCEL|MB_ICONSTOP "You want to install the 64 bits OpenTTD on a 32 bits Operating System. This is not going to work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort

View File

@ -2,3 +2,4 @@
!define EXTRA_VERSION "for Windows 2000, XP and Vista" !define EXTRA_VERSION "for Windows 2000, XP and Vista"
!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\"

View File

@ -2,3 +2,4 @@
!define EXTRA_VERSION "for Windows XP and Vista" !define EXTRA_VERSION "for Windows XP and Vista"
!define APPARCH "win64" ; Define the application architecture !define APPARCH "win64" ; Define the application architecture
!define BINARY_DIR "${PATH_ROOT}objs\x64\Release" !define BINARY_DIR "${PATH_ROOT}objs\x64\Release"
InstallDir "$PROGRAMFILES64\OpenTTD\"

View File

@ -2,3 +2,4 @@
!define EXTRA_VERSION "for Windows 95, 98 and ME" !define EXTRA_VERSION "for Windows 95, 98 and ME"
!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\"