author | Tero Marttila <terom@fixme.fi> |
Fri, 19 Dec 2008 02:25:44 +0200 | |
branch | terom-mini |
changeset 10442 | 7089fa402bfd |
parent 10399 | 129857a93786 |
permissions | -rw-r--r-- |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
1 |
!define APPNAME "OpenTTD" ; Define application name |
10399
129857a93786
(svn r14650) -Merge: changelog etc. changes from the 0.6 branch.
rubidium
parents:
10334
diff
changeset
|
2 |
!define APPVERSION "0.6.3" ; Define application version |
129857a93786
(svn r14650) -Merge: changelog etc. changes from the 0.6 branch.
rubidium
parents:
10334
diff
changeset
|
3 |
!define INSTALLERVERSION 53 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!! |
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
4 |
!include ${VERSION_INCLUDE} |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
5 |
|
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
6 |
!define APPURLLINK "http://www.openttd.org" |
9558
71f4ab48b90e
(svn r13578) -Merge: documentation updates from the 0.6 branch.
rubidium
parents:
8672
diff
changeset
|
7 |
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
8 |
!define APPVERSIONINTERNAL "${APPVERSION}.0" ; Needs to be of the format X.X.X.X |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
9 |
|
6169
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
10 |
!define MUI_ICON "..\..\..\media\openttd.ico" |
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
11 |
!define MUI_UNICON "..\..\..\media\openttd.ico" |
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
12 |
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
13 |
!define MUI_HEADERIMAGE |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
14 |
!define MUI_HEADERIMAGE_BITMAP "top.bmp" |
0 | 15 |
|
16 |
BrandingText "OpenTTD Installer" |
|
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
17 |
SetCompressor LZMA |
0 | 18 |
|
19 |
; Version Info |
|
20 |
Var AddWinPrePopulate |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
21 |
VIProductVersion "${APPVERSIONINTERNAL}" |
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
22 |
VIAddVersionKey "ProductName" "OpenTTD Installer ${APPBITS} bits version ${EXTRA_VERSION}" |
0 | 23 |
VIAddVersionKey "Comments" "Installs ${APPNAMEANDVERSION}" |
24 |
VIAddVersionKey "CompanyName" "OpenTTD Developers" |
|
25 |
VIAddVersionKey "FileDescription" "Installs ${APPNAMEANDVERSION}" |
|
26 |
VIAddVersionKey "ProductVersion" "${APPVERSION}" |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
27 |
VIAddVersionKey "InternalName" "InstOpenTTD-${APPARCH}" |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
28 |
VIAddVersionKey "FileVersion" "${APPVERSION}-${APPARCH}" |
0 | 29 |
VIAddVersionKey "LegalCopyright" " " |
30 |
; Main Install settings |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
31 |
Name "${APPNAMEANDVERSION} ${APPBITS} bits version ${EXTRA_VERSION}" |
0 | 32 |
|
33 |
; NOTE: Keep trailing backslash! |
|
34 |
InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
35 |
OutFile "openttd-${APPVERSION}-${APPARCH}.exe" |
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
36 |
CRCCheck force |
0 | 37 |
|
38 |
ShowInstDetails show |
|
39 |
ShowUninstDetails show |
|
40 |
||
41 |
Var SHORTCUTS |
|
42 |
Var CDDRIVE |
|
43 |
||
44 |
; Modern interface settings |
|
45 |
!include "MUI.nsh" |
|
46 |
||
47 |
!define MUI_ABORTWARNING |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
48 |
!define MUI_WELCOMEPAGE_TITLE_3LINES |
0 | 49 |
!insertmacro MUI_PAGE_WELCOME |
50 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
51 |
!define MUI_LICENSEPAGE_RADIOBUTTONS |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
52 |
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT "I &accept this agreement" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
53 |
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE "I &do not accept this agreement" |
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
54 |
!insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING" |
0 | 55 |
|
56 |
!insertmacro MUI_PAGE_COMPONENTS |
|
57 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
58 |
;--------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
59 |
; Custom page for finding TTDLX CD |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
60 |
Page custom SelectCDEnter SelectCDExit ": TTD folder" |
0 | 61 |
|
62 |
!insertmacro MUI_PAGE_DIRECTORY |
|
63 |
||
64 |
;Start Menu Folder Page Configuration |
|
65 |
!define MUI_STARTMENUPAGE_DEFAULTFOLDER $SHORTCUTS |
|
66 |
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKEY_LOCAL_MACHINE" |
|
67 |
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" |
|
68 |
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Shortcut Folder" |
|
69 |
||
70 |
!insertmacro MUI_PAGE_STARTMENU "OpenTTD" $SHORTCUTS |
|
71 |
||
72 |
!insertmacro MUI_PAGE_INSTFILES |
|
73 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
74 |
;----------------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
75 |
; New custom page to show UNICODE and MSLU information |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
76 |
Page custom ShowWarningsPage |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
77 |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
78 |
!define MUI_FINISHPAGE_TITLE_3LINES |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
79 |
!define MUI_FINISHPAGE_RUN_TEXT "Run ${APPNAMEANDVERSION} now!" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
80 |
!define MUI_FINISHPAGE_RUN "$INSTDIR\openttd.exe" |
6170
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
81 |
!define MUI_FINISHPAGE_LINK "Visit the OpenTTD site for latest news, FAQs and downloads" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
82 |
!define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}" |
0 | 83 |
!define MUI_FINISHPAGE_NOREBOOTSUPPORT |
84 |
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt" |
|
1821 | 85 |
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED |
6745
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
86 |
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBack |
0 | 87 |
|
88 |
!insertmacro MUI_PAGE_FINISH |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
89 |
!define MUI_PAGE_HEADER_TEXT "Uninstall ${APPNAMEANDVERSION}" |
0 | 90 |
!insertmacro MUI_UNPAGE_CONFIRM |
91 |
!insertmacro MUI_UNPAGE_INSTFILES |
|
92 |
||
93 |
; Set languages (first is default language) |
|
94 |
!insertmacro MUI_LANGUAGE "English" |
|
95 |
!insertmacro MUI_RESERVEFILE_LANGDLL |
|
96 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
97 |
;-------------------------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
98 |
; (Core) OpenTTD install section. Copies all internal game data |
0 | 99 |
Section "!OpenTTD" Section1 |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
100 |
; Overwrite files by default, but don't complain on failure |
0 | 101 |
SetOverwrite try |
102 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
103 |
; Define root variable relative to installer |
0 | 104 |
!define PATH_ROOT "..\..\..\" |
105 |
||
106 |
; Copy language files |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
107 |
SetOutPath "$INSTDIR\lang\" |
6169
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
108 |
File ${PATH_ROOT}bin\lang\*.lng |
0 | 109 |
|
110 |
; Copy data files |
|
111 |
SetOutPath "$INSTDIR\data\" |
|
6169
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
112 |
File ${PATH_ROOT}bin\data\*.grf |
10046
97d4f53904ee
(svn r14206) -Fix (r14197): why don't people just compile a trunk checkout and do we have to think about adding everything to those pesky precompiled binaries?
rubidium
parents:
9960
diff
changeset
|
113 |
File ${PATH_ROOT}bin\data\*.obg |
6169
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
114 |
File ${PATH_ROOT}bin\data\opntitle.dat |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
115 |
; Copy scenario files (don't choke if they don't exist) |
1157
0047fb918f48
(svn r1658) -Update readme and windows installer for 0.3.6
darkvater
parents:
801
diff
changeset
|
116 |
SetOutPath "$INSTDIR\scenario\" |
6169
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
117 |
File /nonfatal ${PATH_ROOT}bin\scenario\*.scn |
0 | 118 |
|
6170
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
119 |
; Copy heightmap files (don't choke if they don't exist) |
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
120 |
SetOutPath "$INSTDIR\scenario\heightmap\" |
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
121 |
File /nonfatal ${PATH_ROOT}bin\scenario\heightmap\*.* |
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
122 |
|
10329
e7801276a827
(svn r14580) -Fix [FS#2404]: scripts directory not being copied into bundles.
rubidium
parents:
10046
diff
changeset
|
123 |
; Copy the scripts |
e7801276a827
(svn r14580) -Fix [FS#2404]: scripts directory not being copied into bundles.
rubidium
parents:
10046
diff
changeset
|
124 |
SetOutPath "$INSTDIR\scripts\" |
e7801276a827
(svn r14580) -Fix [FS#2404]: scripts directory not being copied into bundles.
rubidium
parents:
10046
diff
changeset
|
125 |
File ${PATH_ROOT}bin\scripts\*.* |
e7801276a827
(svn r14580) -Fix [FS#2404]: scripts directory not being copied into bundles.
rubidium
parents:
10046
diff
changeset
|
126 |
|
0 | 127 |
; Copy the rest of the stuff |
128 |
SetOutPath "$INSTDIR\" |
|
129 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
130 |
; Copy text files |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
131 |
File ${PATH_ROOT}changelog.txt |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
132 |
File ${PATH_ROOT}COPYING |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
133 |
File ${PATH_ROOT}readme.txt |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
134 |
File ${PATH_ROOT}known-bugs.txt |
0 | 135 |
|
136 |
; Copy executable |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
137 |
File /oname=openttd.exe ${BINARY_DIR}\openttd.exe |
0 | 138 |
|
139 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
140 |
; Delete old files from the main dir. they are now placed in data/ and lang/ |
0 | 141 |
Delete "$INSTDIR\*.lng" |
142 |
Delete "$INSTDIR\*.grf" |
|
10046
97d4f53904ee
(svn r14206) -Fix (r14197): why don't people just compile a trunk checkout and do we have to think about adding everything to those pesky precompiled binaries?
rubidium
parents:
9960
diff
changeset
|
143 |
Delete "$INSTDIR\*.obg" |
0 | 144 |
Delete "$INSTDIR\sample.cat" |
145 |
Delete "$INSTDIR\ttd.exe" |
|
146 |
||
147 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
148 |
; Create the Registry Entries |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
149 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Comments" "Visit ${APPURLLINK}" |
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
150 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayIcon" "$INSTDIR\openttd.exe,0" |
0 | 151 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayName" "OpenTTD ${APPVERSION}" |
152 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" "${APPVERSION}" |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
153 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "HelpLink" "${APPURLLINK}" |
0 | 154 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" "$INSTDIR" |
155 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Publisher" "OpenTTD" |
|
156 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder" "$SHORTCUTS" |
|
157 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" "$INSTDIR\uninstall.exe" |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
158 |
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "URLInfoAbout" "${APPURLLINK}" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
159 |
; This key sets the Version DWORD that new installers will check against |
0 | 160 |
WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" ${INSTALLERVERSION} |
161 |
||
162 |
!insertmacro MUI_STARTMENU_WRITE_BEGIN "OpenTTD" |
|
163 |
CreateShortCut "$DESKTOP\OpenTTD.lnk" "$INSTDIR\openttd.exe" |
|
164 |
CreateDirectory "$SMPROGRAMS\$SHORTCUTS" |
|
165 |
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\OpenTTD.lnk" "$INSTDIR\openttd.exe" |
|
166 |
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Uninstall.lnk" "$INSTDIR\uninstall.exe" |
|
167 |
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Readme.lnk" "$INSTDIR\Readme.txt" |
|
168 |
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Changelog.lnk" "$INSTDIR\Changelog.txt" |
|
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
169 |
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" "$INSTDIR\known-bugs.txt" |
0 | 170 |
!insertmacro MUI_STARTMENU_WRITE_END |
171 |
SectionEnd |
|
172 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
173 |
;---------------------------------------------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
174 |
; TTDLX files install section. Copies all needed TTDLX files from CD or install dir |
0 | 175 |
Section "Copy Game Graphics" Section2 |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
176 |
; Let's copy the files with size approximation |
0 | 177 |
SetOutPath "$INSTDIR\gm" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
178 |
CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\gm\" 1028 |
0 | 179 |
SetOutPath "$INSTDIR\data\" |
180 |
CopyFiles "$CDDRIVE\sample.cat" "$INSTDIR\data\sample.cat" 1566 |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
181 |
; Copy Windows files |
0 | 182 |
CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\data\trg1r.grf" 2365 |
183 |
CopyFiles "$CDDRIVE\trgcr.grf" "$INSTDIR\data\trgcr.grf" 260 |
|
184 |
CopyFiles "$CDDRIVE\trghr.grf" "$INSTDIR\data\trghr.grf" 400 |
|
185 |
CopyFiles "$CDDRIVE\trgir.grf" "$INSTDIR\data\trgir.grf" 334 |
|
186 |
CopyFiles "$CDDRIVE\trgtr.grf" "$INSTDIR\data\trgtr.grf" 546 |
|
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
187 |
; Copy DOS files |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
188 |
CopyFiles "$CDDRIVE\trg1.grf" "$INSTDIR\data\trg1.grf" 2365 |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
189 |
CopyFiles "$CDDRIVE\trgc.grf" "$INSTDIR\data\trgc.grf" 260 |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
190 |
CopyFiles "$CDDRIVE\trgh.grf" "$INSTDIR\data\trgh.grf" 400 |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
191 |
CopyFiles "$CDDRIVE\trgi.grf" "$INSTDIR\data\trgi.grf" 334 |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
192 |
CopyFiles "$CDDRIVE\trgt.grf" "$INSTDIR\data\trgt.grf" 546 |
0 | 193 |
SetOutPath "$INSTDIR\" |
194 |
SectionEnd |
|
195 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
196 |
;------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
197 |
; Install the uninstaller (option is hidden) |
0 | 198 |
Section -FinishSection |
199 |
WriteUninstaller "$INSTDIR\uninstall.exe" |
|
200 |
SectionEnd |
|
201 |
||
202 |
; Modern install component descriptions |
|
203 |
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
|
204 |
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "OpenTTD is a fully functional clone of TTD and is very playable." |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
205 |
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Copies the game graphics. Requires TTD (for Windows)." |
0 | 206 |
!insertmacro MUI_FUNCTION_DESCRIPTION_END |
207 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
208 |
;----------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
209 |
; Uninstall section, deletes all installed files |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
210 |
Section "Uninstall" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
211 |
MessageBox MB_YESNO|MB_ICONQUESTION \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
212 |
"Remove the save game folders located at $\"$INSTDIR\save?$\"$\n \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
213 |
If you choose Yes, your saved games will be deleted." \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
214 |
IDYES RemoveSavedGames IDNO NoRemoveSavedGames |
0 | 215 |
RemoveSavedGames: |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
216 |
Delete "$INSTDIR\save\autosave\*" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
217 |
RMDir "$INSTDIR\save\autosave" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
218 |
Delete "$INSTDIR\save\*" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
219 |
RMDir "$INSTDIR\save" |
0 | 220 |
NoRemoveSavedGames: |
221 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
222 |
MessageBox MB_YESNO|MB_ICONQUESTION \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
223 |
"Remove the scenario folders located at $\"$INSTDIR\scenario?$\"$\n \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
224 |
If you choose Yes, your scenarios will be deleted." \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
225 |
IDYES RemoveScen IDNO NoRemoveScen |
31
85a8c911441c
(svn r32) -Fix [1007277] Windows Installer Fixes for bugs [991118] and [991102]. (lucaspiller)
darkvater
parents:
0
diff
changeset
|
226 |
RemoveScen: |
6170
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
227 |
Delete "$INSTDIR\scenario\heightmap*" |
abff1cff6903
(svn r8929) -Codechange: [win32] Give the installer a slightly more verbose link at the final screen and also copy any heightmaps to the desination directory.
Darkvater
parents:
6169
diff
changeset
|
228 |
RMDir "$INSTDIR\scenario\heightmap" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
229 |
Delete "$INSTDIR\scenario\*" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
230 |
RMDir "$INSTDIR\scenario" |
31
85a8c911441c
(svn r32) -Fix [1007277] Windows Installer Fixes for bugs [991118] and [991102]. (lucaspiller)
darkvater
parents:
0
diff
changeset
|
231 |
NoRemoveScen: |
85a8c911441c
(svn r32) -Fix [1007277] Windows Installer Fixes for bugs [991118] and [991102]. (lucaspiller)
darkvater
parents:
0
diff
changeset
|
232 |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
233 |
; Remove from registry... |
0 | 234 |
!insertmacro MUI_STARTMENU_GETFOLDER "OpenTTD" $SHORTCUTS |
235 |
ReadRegStr $SHORTCUTS HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder" |
|
236 |
||
237 |
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" |
|
238 |
||
239 |
; Delete self |
|
240 |
Delete "$INSTDIR\uninstall.exe" |
|
241 |
||
242 |
; Delete Shortcuts |
|
243 |
Delete "$DESKTOP\OpenTTD.lnk" |
|
244 |
Delete "$SMPROGRAMS\$SHORTCUTS\OpenTTD.lnk" |
|
245 |
Delete "$SMPROGRAMS\$SHORTCUTS\Uninstall.lnk" |
|
246 |
Delete "$SMPROGRAMS\$SHORTCUTS\Readme.lnk" |
|
247 |
Delete "$SMPROGRAMS\$SHORTCUTS\Changelog.lnk" |
|
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
248 |
Delete "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" |
0 | 249 |
|
250 |
; Clean up OpenTTD dir |
|
251 |
Delete "$INSTDIR\changelog.txt" |
|
252 |
Delete "$INSTDIR\readme.txt" |
|
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
253 |
Delete "$INSTDIR\known-bugs.txt" |
0 | 254 |
Delete "$INSTDIR\openttd.exe" |
250
733e18ca6e93
(svn r251) -Project ready for 0.3.4 release. Updated installer, readme and fileinformation
darkvater
parents:
32
diff
changeset
|
255 |
Delete "$INSTDIR\COPYING" |
0 | 256 |
Delete "$INSTDIR\INSTALL.LOG" |
257 |
Delete "$INSTDIR\crash.log" |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
258 |
Delete "$INSTDIR\crash.dmp" |
0 | 259 |
Delete "$INSTDIR\openttd.cfg" |
1166
b63b1732a1b9
(svn r1668) -Fixed windows installer (autorail.grf) and a changelog typo
darkvater
parents:
1157
diff
changeset
|
260 |
Delete "$INSTDIR\hs.dat" |
1841
1f3f4039dc85
(svn r2346) - Fix: Have the windows installer also delete any spritecache.xx files on uninstall
Darkvater
parents:
1821
diff
changeset
|
261 |
Delete "$INSTDIR\cached_sprites.*" |
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
262 |
Delete "$INSTDIR\save\autosave\network*.tmp" ; temporary network file |
0 | 263 |
|
264 |
; Data files |
|
265 |
Delete "$INSTDIR\data\opntitle.dat" |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
266 |
|
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
267 |
Delete "$INSTDIR\data\2ccmap.grf" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
268 |
Delete "$INSTDIR\data\airports.grf" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
269 |
Delete "$INSTDIR\data\autorail.grf" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
270 |
Delete "$INSTDIR\data\canalsw.grf" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
271 |
Delete "$INSTDIR\data\dosdummy.grf" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
272 |
Delete "$INSTDIR\data\elrailsw.grf" |
2946
f2b2379f3964
(svn r3502) - Update appropiate files with release information for 0.4.5
Darkvater
parents:
1848
diff
changeset
|
273 |
Delete "$INSTDIR\data\nsignalsw.grf" |
0 | 274 |
Delete "$INSTDIR\data\openttd.grf" |
6169
68de0fd4c517
(svn r8927) -Codechange: [win32] Update the installer to use the new paths after the makefilerewrite and add roadstops.grf to the uninstaller.
Darkvater
parents:
6168
diff
changeset
|
275 |
Delete "$INSTDIR\data\roadstops.grf" |
250
733e18ca6e93
(svn r251) -Project ready for 0.3.4 release. Updated installer, readme and fileinformation
darkvater
parents:
32
diff
changeset
|
276 |
Delete "$INSTDIR\data\trkfoundw.grf" |
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
277 |
Delete "$INSTDIR\data\openttdd.grf" |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
278 |
Delete "$INSTDIR\data\openttdw.grf" |
10046
97d4f53904ee
(svn r14206) -Fix (r14197): why don't people just compile a trunk checkout and do we have to think about adding everything to those pesky precompiled binaries?
rubidium
parents:
9960
diff
changeset
|
279 |
Delete "$INSTDIR\data\orig_win.obg" |
97d4f53904ee
(svn r14206) -Fix (r14197): why don't people just compile a trunk checkout and do we have to think about adding everything to those pesky precompiled binaries?
rubidium
parents:
9960
diff
changeset
|
280 |
Delete "$INSTDIR\data\orig_dos.obg" |
97d4f53904ee
(svn r14206) -Fix (r14197): why don't people just compile a trunk checkout and do we have to think about adding everything to those pesky precompiled binaries?
rubidium
parents:
9960
diff
changeset
|
281 |
Delete "$INSTDIR\data\orig_dos_de.obg" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
282 |
|
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
283 |
Delete "$INSTDIR\data\sample.cat" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
284 |
; Windows Data files |
0 | 285 |
Delete "$INSTDIR\data\trg1r.grf" |
286 |
Delete "$INSTDIR\data\trghr.grf" |
|
287 |
Delete "$INSTDIR\data\trgtr.grf" |
|
288 |
Delete "$INSTDIR\data\trgcr.grf" |
|
289 |
Delete "$INSTDIR\data\trgir.grf" |
|
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
290 |
; Dos Data files |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
291 |
Delete "$INSTDIR\data\trg1.grf" |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
292 |
Delete "$INSTDIR\data\trgh.grf" |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
293 |
Delete "$INSTDIR\data\trgt.grf" |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
294 |
Delete "$INSTDIR\data\trgc.grf" |
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
295 |
Delete "$INSTDIR\data\trgi.grf" |
0 | 296 |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
297 |
; Music |
0 | 298 |
Delete "$INSTDIR\gm\*.gm" |
299 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
300 |
; Language files |
0 | 301 |
Delete "$INSTDIR\lang\*.lng" |
302 |
||
10329
e7801276a827
(svn r14580) -Fix [FS#2404]: scripts directory not being copied into bundles.
rubidium
parents:
10046
diff
changeset
|
303 |
; Scripts |
10334
88a42d6f712e
(svn r14585) -Fix (r14580): File mask for the script directory was wrong in the Win32 install script.
michi_cc
parents:
10329
diff
changeset
|
304 |
Delete "$INSTDIR\scripts\*.*" |
10329
e7801276a827
(svn r14580) -Fix [FS#2404]: scripts directory not being copied into bundles.
rubidium
parents:
10046
diff
changeset
|
305 |
|
0 | 306 |
; Remove remaining directories |
307 |
RMDir "$SMPROGRAMS\$SHORTCUTS\Extras\" |
|
308 |
RMDir "$SMPROGRAMS\$SHORTCUTS" |
|
309 |
RMDir "$INSTDIR\gm" |
|
310 |
RMDir "$INSTDIR\lang" |
|
311 |
RMDir "$INSTDIR\data" |
|
312 |
RMDir "$INSTDIR" |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
313 |
|
0 | 314 |
SectionEnd |
315 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
316 |
;------------------------------------------------------------ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
317 |
; Custom page function to find the TTDLX CD/install location |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
318 |
Function SelectCDEnter |
0 | 319 |
SectionGetFlags ${Section2} $0 |
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
320 |
IntOp $1 $0 & 0x80 ; bit 7 set by upgrade, no need to copy files |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
321 |
IntCmp $1 1 DoneCD ; Upgrade doesn't need copy files |
1215
b314a2e81968
(svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
darkvater
parents:
1166
diff
changeset
|
322 |
|
0 | 323 |
IntOp $0 $0 & 1 |
324 |
IntCmp $0 1 NoAbort |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
325 |
Abort |
0 | 326 |
NoAbort: |
327 |
||
328 |
GetTempFileName $R0 |
|
329 |
!insertmacro MUI_HEADER_TEXT "Locate TTD" "Setup needs the location of Transport Tycoon Deluxe in order to continue." |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
330 |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "CDFinder.ini" "CDFinder" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
331 |
|
0 | 332 |
ClearErrors |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
333 |
; Now, let's populate $CDDRIVE |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
334 |
ReadRegStr $R0 HKLM "SOFTWARE\Fish Technology Group\Transport Tycoon Deluxe" "HDPath" |
0 | 335 |
IfErrors NoTTD |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
336 |
StrCmp $CDDRIVE "" 0 Populated |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
337 |
StrCpy $CDDRIVE $R0 |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
338 |
Populated: |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
339 |
StrCpy $AddWinPrePopulate "Setup has detected your TTD folder. Don't change the folder. Simply press Next." |
0 | 340 |
Goto TruFinish |
341 |
NoTTD: |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
342 |
StrCpy $AddWinPrePopulate "Setup couldn't find TTD. Please enter the path where the graphics files from TTD are stored and press Next to continue." |
0 | 343 |
TruFinish: |
344 |
ClearErrors |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
345 |
!insertmacro MUI_INSTALLOPTIONS_WRITE "CDFinder" "Field 2" "State" $CDDRIVE ; TTDLX path |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
346 |
!insertmacro MUI_INSTALLOPTIONS_WRITE "CDFinder" "Field 3" "Text" $AddWinPrePopulate ; Caption |
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
347 |
DoneCD: |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
348 |
; Initialize the dialog *AFTER* we've changed the text otherwise we won't see the changes |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
349 |
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "CDFinder" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
350 |
!insertmacro MUI_INSTALLOPTIONS_SHOW |
0 | 351 |
FunctionEnd |
352 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
353 |
;---------------------------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
354 |
; Custom page function when 'next' is selected for the TTDLX path |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
355 |
Function SelectCDExit |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
356 |
!insertmacro MUI_INSTALLOPTIONS_READ $CDDRIVE "CDFinder" "Field 2" "State" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
357 |
; If trg1r.grf does not exist at the path, retry with DOS version |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
358 |
IfFileExists $CDDRIVE\trg1r.grf "" DosCD |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
359 |
IfFileExists $CDDRIVE\trgir.grf "" NoCD |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
360 |
IfFileExists $CDDRIVE\sample.cat hasCD NoCD |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
361 |
DosCD: |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
362 |
IfFileExists $CDDRIVE\TRG1.GRF "" NoCD |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
363 |
IfFileExists $CDDRIVE\TRGI.GRF "" NoCD |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
364 |
IfFileExists $CDDRIVE\SAMPLE.CAT hasCD NoCD |
0 | 365 |
NoCD: |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
366 |
MessageBox MB_OK "Setup cannot continue without the Transport Tycoon Deluxe Location!" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
367 |
Abort |
0 | 368 |
hasCD: |
369 |
FunctionEnd |
|
370 |
||
6745
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
371 |
;---------------------------------------------------------------------------------- |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
372 |
; Disable the "Back" button on finish page if the installer is run on Win9x systems |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
373 |
Function DisableBack |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
374 |
Call GetWindowsVersion |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
375 |
Pop $R0 |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
376 |
StrCmp $R0 "win9x" 0 WinNT |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
377 |
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnabled" "0" |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
378 |
WinNT: |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
379 |
ClearErrors |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
380 |
FunctionEnd |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
381 |
|
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
382 |
;---------------------------------------------------------------------------------- |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
383 |
; Custom page function to show notices for running OpenTTD (only for win32 systems) |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
384 |
; We have extracted this custom page as Notice in the .onInit function |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
385 |
Function ShowWarningsPage |
6745
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
386 |
Call GetWindowsVersion |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
387 |
Pop $R0 |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
388 |
; Don't show the UNICODE notice if the installer is run on Win9x systems |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
389 |
StrCmp $R0 "win9x" 0 WinNT |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
390 |
Abort |
238ec04a86d4
(svn r9980) -Merge: Windows Installer changes in 0.5 (r9864).
rubidium
parents:
6744
diff
changeset
|
391 |
WinNT: |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
392 |
!insertmacro MUI_HEADER_TEXT "Installation Complete" "Important notices for OpenTTD usage." |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
393 |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "notice.ini" "Notice" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
394 |
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "Notice" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
395 |
ClearErrors |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
396 |
!insertmacro MUI_INSTALLOPTIONS_SHOW |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
397 |
FunctionEnd |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
398 |
|
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
399 |
;------------------------------------------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
400 |
; Determine windows version, returns "win9x" if Win9x/Me or "winnt" on the stack |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
401 |
Function GetWindowsVersion |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
402 |
ClearErrors |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
403 |
StrCpy $R0 "winnt" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
404 |
|
9926
5b6693363ae1
(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.
rubidium
parents:
9920
diff
changeset
|
405 |
GetVersion::WindowsPlatformId |
5b6693363ae1
(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.
rubidium
parents:
9920
diff
changeset
|
406 |
Pop $R0 |
5b6693363ae1
(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.
rubidium
parents:
9920
diff
changeset
|
407 |
IntCmp $R0 2 WinNT 0 |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
408 |
StrCpy $R0 "win9x" |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
409 |
WinNT: |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
410 |
ClearErrors |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
411 |
Push $R0 |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
412 |
FunctionEnd |
0 | 413 |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
414 |
;------------------------------------------------------------------------------- |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
415 |
; Check whether we're not running an installer for 64 bits on 32 bits and vice versa |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
416 |
Function CheckProcessorArchitecture |
9926
5b6693363ae1
(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.
rubidium
parents:
9920
diff
changeset
|
417 |
GetVersion::WindowsPlatformArchitecture |
5b6693363ae1
(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.
rubidium
parents:
9920
diff
changeset
|
418 |
Pop $R0 |
5b6693363ae1
(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.
rubidium
parents:
9920
diff
changeset
|
419 |
IntCmp $R0 64 Win64 0 |
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
420 |
ClearErrors |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
421 |
IntCmp ${APPBITS} 64 0 Done |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
422 |
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 |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
423 |
GoTo Done |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
424 |
Win64: |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
425 |
ClearErrors |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
426 |
IntCmp ${APPBITS} 64 Done 0 |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
427 |
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "You want to install the 32 bits OpenTTD on a 64 bits Operating System. This is not adviced, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
428 |
GoTo Done |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
429 |
Abort: |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
430 |
Quit |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
431 |
Done: |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
432 |
FunctionEnd |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
433 |
|
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
434 |
|
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
435 |
;------------------------------------------------------------------------------- |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
436 |
; Check whether we're not running an installer for NT on 9x and vice versa |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
437 |
Function CheckWindowsVersion |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
438 |
Call GetWindowsVersion |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
439 |
Pop $R0 |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
440 |
StrCmp $R0 "win9x" 0 WinNT |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
441 |
ClearErrors |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
442 |
StrCmp ${APPARCH} "win9x" Done 0 |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
443 |
MessageBox MB_OKCANCEL|MB_ICONSTOP "You want to install the Windows 2000, XP and Vista 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 |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
444 |
GoTo Done |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
445 |
WinNT: |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
446 |
ClearErrors |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
447 |
StrCmp ${APPARCH} "win9x" 0 Done |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
448 |
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "You want to install the Windows 95, 98 and ME version on Windows 2000, XP or Vista. This is not adviced, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
449 |
Abort: |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
450 |
Quit |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
451 |
Done: |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
452 |
FunctionEnd |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
453 |
|
0 | 454 |
Var OLDVERSION |
455 |
Var UninstallString |
|
456 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
457 |
;----------------------------------------------------------------------------------- |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
458 |
; NSIS Initialize function, determin if we are going to install/upgrade or uninstall |
0 | 459 |
Function .onInit |
460 |
StrCpy $SHORTCUTS "OpenTTD" |
|
461 |
||
462 |
SectionSetFlags 0 17 |
|
463 |
||
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
464 |
; Starts Setup - let's look for an older version of OpenTTD |
0 | 465 |
ReadRegDWORD $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" |
466 |
||
467 |
IfErrors ShowWelcomeMessage ShowUpgradeMessage |
|
468 |
ShowWelcomeMessage: |
|
469 |
ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
470 |
; In the event someone still has OpenTTD 0.1, this will detect that (that installer used a string instead of dword entry) |
0 | 471 |
IfErrors FinishCallback |
472 |
||
473 |
ShowUpgradeMessage: |
|
474 |
IntCmp ${INSTALLERVERSION} $R8 VersionsAreEqual InstallerIsOlder WelcomeToSetup |
|
475 |
WelcomeToSetup: |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
476 |
; An older version was found. Let's let the user know there's an upgrade that will take place. |
0 | 477 |
ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" |
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
478 |
; Gets the older version then displays it in a message box |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
479 |
MessageBox MB_OK|MB_ICONINFORMATION \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
480 |
"Welcome to ${APPNAMEANDVERSION} Setup.$\n \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
481 |
This will allow you to upgrade from version $OLDVERSION." |
801
7b6cb481359c
(svn r1271) -Fix: set eol-style to native on missing files
darkvater
parents:
254
diff
changeset
|
482 |
SectionSetFlags ${Section2} 0x80 ; set bit 7 |
0 | 483 |
Goto FinishCallback |
484 |
||
485 |
VersionsAreEqual: |
|
486 |
ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" |
|
487 |
IfFileExists "$UninstallString" "" FinishCallback |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
488 |
MessageBox MB_YESNO|MB_ICONQUESTION \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
489 |
"Setup detected ${APPNAMEANDVERSION} on your system. That's the version this program will install.$\n \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
490 |
Are you trying to uninstall it?" \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
491 |
IDYES DoUninstall IDNO FinishCallback |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
492 |
DoUninstall: ; You have the same version as this installer. This allows you to uninstall. |
0 | 493 |
Exec "$UninstallString" |
494 |
Quit |
|
495 |
||
496 |
InstallerIsOlder: |
|
6168
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
497 |
MessageBox MB_OK|MB_ICONSTOP \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
498 |
"You have a newer version of ${APPNAME}.$\n \ |
91640fd48876
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
Darkvater
parents:
5965
diff
changeset
|
499 |
Setup will now exit." |
0 | 500 |
Quit |
501 |
||
502 |
FinishCallback: |
|
503 |
ClearErrors |
|
9920
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
504 |
Call CheckProcessorArchitecture |
21ce1e2f0e43
(svn r14075) -Codechange: make the windows installer more platform aware and warn when the to-be-installed binary isn't the recommended one (or won't work at all).
rubidium
parents:
9558
diff
changeset
|
505 |
Call CheckWindowsVersion |
0 | 506 |
FunctionEnd |
507 |
; eof |
|
508 |