root/branches/mbutscher/work/wikidpad_unicode.iss @ 275

Revision 275, 13.7 kB (checked in by mbutscher, 2 years ago)

branches/stable-2.1:
* Internal: Bug fixed: Error in error handling for plugins
* Internal: Bug fixed: Some functions in plugins were not registered

for calling

* Bug fixed: WikidPad can't be closed if volume access lost during session

branches/mbutscher/work:
* Internal: Bug fixed: Error in error handling for plugins
* Internal: Bug fixed: Some functions in plugins were not registered

for calling

* Grammar change to forbid bold and italics to span over a heading
* Bug fixed: WikidPad can't be closed if volume access lost during session

Line 
1[Files]
2Source: dist\WikidPad.exe; DestDir: {app}; Flags: replacesameversion ignoreversion
3Source: dist\appbase.css; DestDir: {app}
4Source: dist\extensions\*.py; DestDir: {app}\extensions\; Flags: recursesubdirs ignoreversion
5Source: dist\icons\*.gif; DestDir: {app}\icons\; Flags: onlyifdoesntexist
6Source: dist\icons\pwiki.ico; DestDir: {app}\icons\; Flags: onlyifdoesntexist
7Source: dist\WikidPadHelp\*; DestDir: {app}\WikidPadHelp\; Flags: recursesubdirs ignoreversion
8Source: dist\license.txt; DestDir: {app}
9Source: dist\python26.dll; DestDir: {app}
10Source: dist\sqlite3.dll; DestDir: {app}
11Source: dist\wxmsw28uh_adv_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
12Source: dist\wxmsw28uh_core_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
13Source: dist\wxmsw28uh_html_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
14Source: dist\wxmsw28uh_stc_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
15Source: dist\wxmsw28uh_xrc_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
16Source: dist\wxbase28uh_net_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
17Source: dist\wxbase28uh_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
18Source: dist\wxbase28uh_xml_vc.dll; DestDir: {app}; Check: ShouldInstallWxRuntime
19Source: dist\_ctypes.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion
20Source: dist\_hashlib.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion
21Source: dist\pyexpat.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion
22Source: dist\_sqlite3.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion
23Source: dist\_socket.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion
24Source: dist\select.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion
25Source: dist\wx._controls_.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
26Source: dist\wx._core_.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
27Source: dist\wx._gdi_.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
28Source: dist\wx._grid.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
29Source: dist\wx._html.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
30Source: dist\wx._misc_.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
31Source: dist\wx._stc.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
32Source: dist\wx._windows_.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
33Source: dist\wx._xrc.pyd; DestDir: {app}; Flags: replacesameversion ignoreversion; Check: ShouldInstallWxRuntime
34Source: dist\WikidPad.xrc; DestDir: {app}
35Source: dist\WikidPad_*.po; DestDir: {app}; Flags: ignoreversion sortfilesbyextension
36Source: dist\langlist.txt; DestDir: {app}; Flags: replacesameversion ignoreversion
37Source: dist\gadfly.zip; DestDir: {app}; Flags: nocompression
38Source: dist\library.zip; DestDir: {app}; Flags: nocompression
39Source: WikidPad-winport.config; DestDir: {app}; DestName: WikidPad.config; Flags: onlyifdoesntexist; Check: PortableInstall
40Source: Microsoft.VC90.CRT.manifest; DestDir: {app}
41Source: winBinAdditions\msvcp90.dll; DestDir: {app}
42Source: winBinAdditions\msvcr90.dll; DestDir: {app}
43Source: winBinAdditions\msvcm90.dll; DestDir: {app}
44Source: winBinAdditions\gdiplus.dll; DestDir: {app}
45[Dirs]
46Name: {app}\extensions
47Name: {app}\icons
48Name: {app}\WikidPadHelp
49Name: {app}\WikidPadHelp\data
50Name: {app}\WikidPadHelp\files
51Name: {app}\export
52[Setup]
53#define verStr "2.2beta04_1"
54#define verNo "002.002.104.001"
55
56SolidCompression=true
57AppName=WikidPad
58AppVerName=WikidPad {#verStr}
59DefaultDirName={pf}\WikidPad
60DefaultGroupName=WikidPad
61AppID={{22A83C29-58A8-4CAB-8EDC-918D74F8429E}
62VersionInfoVersion={#verNo}
63VersionInfoTextVersion=WikidPad {#verStr}
64LicenseFile=license.txt
65AllowNoIcons=true
66ShowLanguageDialog=yes
67Compression=lzma/ultra
68OutputBaseFilename=WikidPad-{#verStr}
69InternalCompressLevel=ultra
70AppCopyright=© 2005-2011 Jason Horman, Michael Butscher, Gerhard Reitmayr
71UsePreviousAppDir=true
72PrivilegesRequired=none
73CreateUninstallRegKey=not PortableInstall
74Uninstallable=not PortableInstall
75[INI]
76Filename: {app}\binInst.ini; Section: Main; Key: CurrVersion; String: {#verNo}; Flags: createkeyifdoesntexist uninsdeleteentry uninsdeletesectionifempty
77Filename: {app}\binInst.ini; Section: Main; Key: wxVersion; String: 002.008.010.001; Flags: createkeyifdoesntexist uninsdeleteentry uninsdeletesectionifempty; Check: ShouldInstallWxRuntime
78Filename: {app}\binInst.ini; Section: Main; Key: portableInstall; String: 0; Flags: uninsdeleteentry uninsdeletesectionifempty; Check: not PortableInstall
79Filename: {app}\binInst.ini; Section: Main; Key: portableInstall; String: 1; Flags: uninsdeleteentry uninsdeletesectionifempty; Check: PortableInstall
80[Icons]
81Name: {code:IconDest|Dummy}\WikidPad; Filename: {app}\WikidPad.exe; IconFilename: {app}\icons\pwiki.ico; IconIndex: 0; Check: not PortableInstall
82Name: {code:IconDest|Dummy}\{cm:UninstallProgram, WikidPad}; Filename: {uninstallexe}; Check: not PortableInstall
83[Registry]
84Root: HKCR; SubKey: .wiki; ValueType: string; ValueData: wikidPadFile; Flags: uninsdeletekey; Tasks: assocWiki; Check: GlobalRegClasses
85Root: HKCR; SubKey: wikidPadFile; ValueType: string; ValueData: WikidPad File; Flags: uninsdeletekey; Tasks: assocWiki; Check: GlobalRegClasses
86Root: HKCR; SubKey: wikidPadFile\Shell\Open\Command; ValueType: string; ValueData: """{app}\WikidPad.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: assocWiki; Check: GlobalRegClasses
87Root: HKCR; Subkey: wikidPadFile\DefaultIcon; ValueType: string; ValueData: {app}\icons\pwiki.ico,0; Flags: uninsdeletevalue; Tasks: assocWiki; Check: GlobalRegClasses
88Root: HKCR; Subkey: wiki; ValueType: string; ValueData: URL:WikidPad Protocol; Flags: uninsdeletekey; Tasks: assocWikiUrl; Check: GlobalRegClasses
89Root: HKCR; Subkey: wiki; ValueType: string; ValueName: URL Protocol; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: GlobalRegClasses
90Root: HKCR; Subkey: wiki\shell; ValueType: string; ValueData: open; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: GlobalRegClasses
91Root: HKCR; Subkey: wiki\DefaultIcon; ValueType: string; ValueData: {app}\icons\pwiki.ico,0; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: GlobalRegClasses
92Root: HKCR; Subkey: wiki\shell\open\command; ValueType: string; ValueData: """{app}\WikidPad.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: GlobalRegClasses
93
94Root: HKCU; Subkey: Software\Classes\.wiki; ValueType: string; ValueData: wikidPadFile; Flags: uninsdeletekey; Check: UserRegClasses
95Root: HKCU; SubKey: Software\Classes\wikidPadFile; ValueType: string; ValueData: WikidPad File; Flags: uninsdeletekey; Tasks: assocWiki; Check: UserRegClasses
96Root: HKCU; SubKey: Software\Classes\wikidPadFile\Shell\Open\Command; ValueType: string; ValueData: """{app}\WikidPad.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: assocWiki; Check: UserRegClasses
97Root: HKCU; Subkey: Software\Classes\wikidPadFile\DefaultIcon; ValueType: string; ValueData: {app}\icons\pwiki.ico,0; Flags: uninsdeletevalue; Tasks: assocWiki; Check: UserRegClasses
98Root: HKCU; Subkey: Software\Classes\wiki; ValueType: string; ValueData: URL:WikidPad Protocol; Flags: uninsdeletekey; Tasks: assocWikiUrl; Check: UserRegClasses
99Root: HKCU; Subkey: Software\Classes\wiki; ValueType: string; ValueName: URL Protocol; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: UserRegClasses
100Root: HKCU; Subkey: Software\Classes\wiki\shell; ValueType: string; ValueData: open; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: UserRegClasses
101Root: HKCU; Subkey: Software\Classes\wiki\DefaultIcon; ValueType: string; ValueData: {app}\icons\pwiki.ico,0; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: UserRegClasses
102Root: HKCU; Subkey: Software\Classes\wiki\shell\open\command; ValueType: string; ValueData: """{app}\WikidPad.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: assocWikiUrl; Check: UserRegClasses
103
104[Tasks]
105Name: assocWiki; Description: Associate WikidPad with .wiki files; Check: not PortableInstall
106Name: assocWikiUrl; Description: "Handle URLs with ""wiki:"" by WikidPad"; Check: not PortableInstall
107[InstallDelete]
108Name: {app}\regexpr.cache; Type: files
109Name: {app}\zlib.pyd; Type: files
110Name: {app}\extensions\WikiSyntax.py; Type: files
111
112[UninstallDelete]
113Name: {app}\regexpr.cache; Type: files
114Name: {app}\binInst.ini; Type: files
115Name: {app}\WikidPad_*.xrc; Type: files
116Name: {app}\extensions\*.pyc; Type: filesandordirs
117Name: {app}\extensions\*.pyo; Type: filesandordirs
118Name: {app}\extensions\wikidPadParser\*.pyc; Type: filesandordirs
119Name: {app}\extensions\wikidPadParser\*.pyo; Type: filesandordirs
120[Run]
121Filename: {app}\WikidPad.exe; WorkingDir: {app}; Description: Start WikidPad; Flags: postinstall skipifsilent nowait
122[LangOptions]
123LanguageID=$0000
124[Code]
125var
126  PortableModeQuestion: TInputOptionWizardPage;
127  UserModeQuestion: TInputOptionWizardPage;
128  NotAdminMessage: TOutputMsgWizardPage;
129
130
131function PortableInstall: Boolean;
132begin
133  result := PortableModeQuestion.SelectedValueIndex = 1
134end;
135
136
137function ShouldAskForUsermode: Boolean;
138begin
139  result := UsingWinNT and IsAdminLoggedOn;
140end;
141
142procedure InitializeWizard;
143begin
144  PortableModeQuestion := CreateInputOptionPage(wpLicense,
145    'Portable installation?',
146    'Install in portable mode, e.g. on a USB stick (to uninstall, just delete the created folder)',
147    '',
148    True, False);
149  PortableModeQuestion.Add('Standard installation');
150  PortableModeQuestion.Add('Portable installation (no uninstaller, no file associations)');
151
152  PortableModeQuestion.SelectedValueIndex := 0;
153
154
155  if ShouldAskForUsermode then begin
156    UserModeQuestion := CreateInputOptionPage(PortableModeQuestion.ID,
157      'Installation mode',
158      'You install as admin, choose for whom you want to install',
159      'Install WikidPad for',
160      True, False);
161    UserModeQuestion.Add('All Users');
162    UserModeQuestion.Add('Current User');
163
164    UserModeQuestion.SelectedValueIndex := 0;
165  end
166  else if UsingWinNT then begin
167    NotAdminMessage := CreateOutputMsgPage(PortableModeQuestion.ID,
168      'Not in admin mode', 'You should install as admin',
169      'This program can be installed for all users if you run it as administrator. ' +
170      'You can now abort the setup and log in as administrator.'#13#13 +
171      'If you cannot or don''t want to do that, you can just continue and install ' +
172      'it for current user only.'#13#13 +
173      'If you continue, be aware that the installer maybe can''t ' +
174      'install in the suggested default directory. You may receive an ' +
175      'error message if you try that.');
176  end
177end;
178
179function IsUserModePage(PageID: Integer): Boolean;
180begin
181  if ShouldAskForUsermode then begin
182    result := UserModeQuestion.ID = PageID;
183  end
184  else if UsingWinNT then
185    result := NotAdminMessage.ID = PageID;
186end;
187
188
189function ShouldSkipPage(PageID: Integer): Boolean;
190begin
191  if PortableInstall then begin
192    result := IsUserModePage(PageID) or (PageID = wpSelectProgramGroup);
193  end
194  else
195    result := false;
196end;
197
198
199function IconDest(Param: String): String;
200begin
201  if ShouldAskForUsermode() and (UserModeQuestion.SelectedValueIndex = 0) then
202    // All users
203    Result := ExpandConstant('{commonprograms}\{groupname}')
204  else
205    // Current user
206    Result := ExpandConstant('{userprograms}\{groupname}');
207end;
208
209
210function GlobalRegClasses: Boolean;
211// Returns true iff registry entries should go to global HK_CR root.
212// If false, they go to HK_CU\Software\Classes (or nowhere in portable mode)
213begin
214  if PortableInstall then begin
215    Result := false;
216    exit;
217  end;
218
219  if ShouldAskForUsermode() and (UserModeQuestion.SelectedValueIndex = 0) then
220    Result := true
221  else
222    Result := not UsingWinNT;  // On Win 98/ME, it should always return true
223end;
224
225
226function UserRegClasses: Boolean;
227// Returns true iff registry entries should go to HK_CU\Software\Classes
228begin
229  if PortableInstall then begin
230    Result := false;
231    exit;
232  end;
233
234  Result := not GlobalRegClasses;
235end;
236
237
238function ShouldInstallWxRuntime: Boolean;
239// Returns true iff wxWidgets runtime should be installed.
240begin
241  Result := not GetIniBool('PreventInstall', 'wxPy2_8_10_1', false,
242      ExpandConstant('{app}\binInst.ini'));
243end;
244
245
246
247function MemoAppend(Memo, NewContent, NewLine: String): String;
248begin
249  if NewContent <> '' then
250    result := Memo + NewContent + NewLine + NewLine
251  else
252    result := Memo;
253end;
254
255
256
257function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
258    MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
259var
260  Answer: String;
261
262begin
263  Answer := '';
264
265  Answer := MemoAppend(Answer, MemoUserInfoInfo, NewLine);
266  Answer := MemoAppend(Answer, MemoDirInfo, NewLine);
267  Answer := MemoAppend(Answer, MemoTypeInfo, NewLine);
268  Answer := MemoAppend(Answer, MemoComponentsInfo, NewLine);
269
270  if not PortableInstall then
271    Answer := MemoAppend(Answer, MemoGroupInfo, NewLine);
272
273  Answer := MemoAppend(Answer, MemoTasksInfo, NewLine);
274
275  Result := Answer;
276end;
277
278
279procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
280var
281  resultCode: Integer;
282begin
283  // Call our function just before the actual uninstall process begins
284  if CurUninstallStep = usUninstall then
285  begin
286    if MsgBox('Do you also want to remove your personal settings?',
287        mbConfirmation, MB_YESNO) = idYes then
288    begin
289      Exec(ExpandConstant('{app}/WikidPad.exe'), '--deleteconfig',
290          ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, resultCode);
291    end;
292  end;
293end;
Note: See TracBrowser for help on using the browser.