source: tuxpaint/trunk/fuentes/win32/tuxpaint.iss @ 219

Last change on this file since 219 was 219, checked in by mabarracus, 4 years ago

added sources from trusty

File size: 20.5 KB
Line 
1;
2; This script needs the InnoSetup PreProcessor (ISPP) to compile correctly.
3; I downloaded a combined 'QuickStart Pack' from here:
4; http://www.jrsoftware.org/isdl.php#qsp
5;
6; The version string is extracted from the executable.
7;
8; As of 2011.06.15, this integrates OpenCandy advertising module.
9; However, by default, using "tuxpaint.iss", the standard Tux Paint installer
10; will be built.  Use "tuxpaint-opencandy.iss" (and you will need the
11; product key and secret, stored in a "tuxpaint-opencandy-secrets.iss" file;
12; Bill Kendrick has access to these), which sets up a #define and then
13; #include's this file, to produce an installer with OpenCandy built-in.
14; -bjk
15
16; Should we change this to Tux4Kids? -bjk 2011.06.15
17#define PublisherName "New Breed Software"
18#define PublisherURL  "{code:MyPublisherURL}"
19
20#define AppName       "Tux Paint"
21#define AppDirName    "TuxPaint"
22#define AppPrefix     "tuxpaint"
23#define AppRegKey     AppDirName
24#define AppRegValue   "Install_Dir"
25#define AppRegVersion "Version"
26
27#define AppGroupName  AppName
28#define AppExe        AppPrefix+".exe"
29#define AppConfigName AppName+" Config"
30#define AppConfigExe  AppPrefix+"-config.exe"
31#define AppReadme     "{code:MyReadme}"
32#define AppLicence    "{code:MyLicence}"
33
34#define BdistDir      ".\bdist"
35#define AppVersion    GetStringFileInfo(BdistDir+"\"+AppExe, "FileVersion")
36
37
38#ifdef OpenCandy
39#define OC_STR_MY_PRODUCT_NAME "Tux Paint"
40;// Note: Please change the registry path to match your company name
41;#define OC_STR_REGISTRY_PATH "Software\Tux Paint\OpenCandy"
42#define OC_OCSETUPHLP_FILE_PATH ".\OCSetupHlp.dll"
43#include 'tuxpaint-opencandy-secrets.iss'
44;#if OC_STR_MY_PRODUCT_NAME == "Open Candy Sample"
45;       #pragma warning "Do not forget to change the product name from 'Open Candy Sample' to your company's product name before releasing this installer."     
46;#endif
47;#if OC_STR_KEY == "1401d0bd8048e1f0f4628dbec1a73092"
48;       #pragma warning "Do not forget to change the test key '1401d0bd8048e1f0f4628dbec1a73092' to your company's product key before releasing this installer."
49;#endif
50;#if OC_STR_SECRET == "4564bdaf826bbe2115718d1643ecc19e"
51;       #pragma warning "Do not forget to change the test secret '4564bdaf826bbe2115718d1643ecc19e' to your company's product secret before releasing this installer."
52;#endif
53;#if OC_STR_REGISTRY_PATH == "Software\Your Company\OpenCandy"
54;       #pragma warning "Do not forget to change the test registry path 'Your Company' to your companies name before releasing this installer."
55;#endif
56;#if Pos(LowerCase("Software\OpenCandy"),LowerCase(OC_STR_REGISTRY_PATH)) != 0
57;       #pragma warning "ERROR, your registry path has OpenCandy before your company name. Please place your company name before OpenCandy. eg Software\Your Company\OpenCandy"
58;#endif
59#endif
60
61[Setup]
62AppName={#AppName}
63AppVerName={#AppName} {#AppVersion}
64AppPublisher={#PublisherName}
65AppPublisherURL={#PublisherURL}
66AppSupportURL={#PublisherURL}
67AppUpdatesURL={#PublisherURL}
68DefaultDirName={pf}\{#AppDirName}
69DefaultGroupName={#AppGroupName}
70OutputDir=.\
71;FIXME - It would be good if we showed the localized license -bjk 2011.06.15
72#ifdef OpenCandy
73  LicenseFile={#BdistDir}\docs\COPYING-OC.txt
74  OutputBaseFilename={#AppPrefix}-{#AppVersion}-win32-installer-opencandy
75#else
76  LicenseFile={#BdistDir}\docs\COPYING.txt
77  OutputBaseFilename={#AppPrefix}-{#AppVersion}-win32-installer
78#endif
79SetupIconFile={#BdistDir}\data\images\tuxpaint-installer.ico
80Compression=lzma
81SolidCompression=yes
82PrivilegesRequired=admin
83
84[Languages]
85Name: "bra"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
86Name: "cat"; MessagesFile: "compiler:Languages\Catalan.isl"
87Name: "cze"; MessagesFile: "compiler:Languages\Czech.isl"
88Name: "dan"; MessagesFile: "compiler:Languages\Danish.isl"
89Name: "dut"; MessagesFile: "compiler:Languages\Dutch.isl"
90Name: "eng"; MessagesFile: "compiler:Default.isl"
91Name: "esp"; MessagesFile: "compiler:Languages\Spanish.isl"
92Name: "fin"; MessagesFile: "compiler:Languages\Finnish.isl"
93Name: "fre"; MessagesFile: "compiler:Languages\French.isl"
94Name: "ger"; MessagesFile: "compiler:Languages\German.isl"
95Name: "gla"; MessagesFile: "compiler:Languages\ScottishGaelic.isl"
96Name: "gre"; MessagesFile: "compiler:Languages\Greek.isl"
97Name: "heb"; MessagesFile: "compiler:Languages\Hebrew.isl"
98Name: "hun"; MessagesFile: "compiler:Languages\Hungarian.isl"
99Name: "ita"; MessagesFile: "compiler:Languages\Italian.isl"
100Name: "jpn"; MessagesFile: "compiler:Languages\Japanese.isl"
101Name: "nep"; MessagesFile: "compiler:Languages\Nepali.islu"
102Name: "nor"; MessagesFile: "compiler:Languages\Norwegian.isl"
103Name: "pol"; MessagesFile: "compiler:Languages\Polish.isl"
104Name: "por"; MessagesFile: "compiler:Languages\Portuguese.isl"
105Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"
106Name: "scc"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl"
107Name: "scl"; MessagesFile: "compiler:Languages\SerbianLatin.isl"
108Name: "slv"; MessagesFile: "compiler:Languages\Slovenian.isl"
109Name: "tur"; MessagesFile: "compiler:Languages\Turkish.isl"
110Name: "ukr"; MessagesFile: "compiler:Languages\Ukrainian.isl"
111
112; Additional, Unofficial translations
113Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl"
114Name: "alb"; MessagesFile: "compiler:Languages\Albanian.isl"
115Name: "arm"; MessagesFile: "compiler:Languages\Armenian.islu"
116Name: "ast"; MessagesFile: "compiler:Languages\Asturian.isl"
117Name: "baq"; MessagesFile: "compiler:Languages\Basque.isl"
118Name: "bel"; MessagesFile: "compiler:Languages\Belarusian.isl"
119Name: "bul"; MessagesFile: "compiler:Languages\Bulgarian.isl"
120Name: "chs"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
121Name: "cht"; MessagesFile: "compiler:Languages\ChineseTrad-2-5.1.11.isl"
122Name: "scr"; MessagesFile: "compiler:Languages\Croatian.isl"
123Name: "enb"; MessagesFile: "compiler:Languages\EnglishBritish.isl"
124Name: "epo"; MessagesFile: "compiler:Languages\Esperanto.isl"
125Name: "est"; MessagesFile: "compiler:Languages\Estonian.isl"
126Name: "gal"; MessagesFile: "compiler:Languages\Galician.isl"
127Name: "geo"; MessagesFile: "compiler:Languages\Georgian.islu"
128Name: "hin"; MessagesFile: "compiler:Languages\Hindi.islu"
129Name: "ice"; MessagesFile: "compiler:Languages\Icelandic.isl"
130Name: "ind"; MessagesFile: "compiler:Languages\Indonesian.isl"
131Name: "kor"; MessagesFile: "compiler:Languages\Korean.isl"
132Name: "kur"; MessagesFile: "compiler:Languages\Kurdish.isl"
133Name: "lav"; MessagesFile: "compiler:Languages\Latvian.isl"
134Name: "lit"; MessagesFile: "compiler:Languages\Lithuanian.isl"
135Name: "ltz"; MessagesFile: "compiler:Languages\Luxemburgish.isl"
136Name: "mac"; MessagesFile: "compiler:Languages\Macedonian.isl"
137Name: "may"; MessagesFile: "compiler:Languages\Malaysian.isl"
138Name: "mon"; MessagesFile: "compiler:Languages\Mongolian.isl"
139Name: "nno"; MessagesFile: "compiler:Languages\NorwegianNynorsk.isl"
140Name: "occ"; MessagesFile: "compiler:Languages\Occitan.isl"
141Name: "rum"; MessagesFile: "compiler:Languages\Romanian.isl"
142Name: "slo"; MessagesFile: "compiler:Languages\Slovak.isl"
143Name: "swe"; MessagesFile: "compiler:Languages\Swedish.isl"
144Name: "tai"; MessagesFile: "compiler:Languages\Thai.isl"
145Name: "vie"; MessagesFile: "compiler:Languages\Vietnamese.isl"
146
147
148[Tasks]
149Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
150
151[Files]
152Source: "{#BdistDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion
153Source: "{#BdistDir}\*.exe"; DestDir: "{app}"; Flags: ignoreversion
154Source: "{#BdistDir}\data\*"; DestDir: "{app}\data"; Excludes: "CVS"; Flags: ignoreversion recursesubdirs createallsubdirs
155Source: "{#BdistDir}\docs\*"; DestDir: "{app}\docs"; Excludes: "CVS,Makefile,*~"; Flags: ignoreversion recursesubdirs createallsubdirs
156Source: "{#BdistDir}\etc\*"; DestDir: "{app}\etc"; Flags: skipifsourcedoesntexist ignoreversion recursesubdirs createallsubdirs
157Source: "{#BdistDir}\lib\*"; DestDir: "{app}\lib"; Flags: skipifsourcedoesntexist ignoreversion recursesubdirs createallsubdirs
158Source: "{#BdistDir}\im\*"; DestDir: "{app}\im"; Flags: ignoreversion recursesubdirs createallsubdirs
159Source: "{#BdistDir}\plugins\*"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs
160Source: "{#BdistDir}\locale\*"; DestDir: "{app}\locale"; Excludes: "CVS"; Flags: ignoreversion recursesubdirs createallsubdirs
161Source: "{#BdistDir}\..\libdocs\*"; DestDir: "{app}\docs\libdocs"; Excludes: "CVS,Makefile,*~"; Flags: ignoreversion recursesubdirs createallsubdirs
162; NOTE: Don't use "Flags: ignoreversion" on any shared system files
163
164#ifdef OpenCandy
165        Source: "{#OC_OCSETUPHLP_FILE_PATH}"; Flags: dontcopy ignoreversion;
166#endif
167
168
169
170[INI]
171Filename: "{code:MyGroupDir}\{groupname}\{cm:ProgramOnTheWeb,{#AppName}}.url"; Section: "InternetShortcut"; Key: "URL"; String: "{#PublisherURL}"
172
173[Icons]
174Name: "{code:MyGroupDir}\{groupname}\Configure {#AppName}"; Filename: "{app}\{#AppConfigExe}"; Comment: "{#AppConfigName}"
175Name: "{code:MyGroupDir}\{groupname}\{#AppName} (Full Screen)"; Filename: "{app}\{#AppExe}"; Parameters: "--fullscreen native"; Comment: "Start {#AppName} in Fullscreen mode"
176Name: "{code:MyGroupDir}\{groupname}\{#AppName} (Windowed)"; Filename: "{app}\{#AppExe}"; Parameters: "--windowed"; Comment: "Start {#AppName} in a Window"
177Name: "{code:MyGroupDir}\{groupname}\Readme"; Filename: "{app}\{#AppReadme}"; Comment: "View ReadMe"
178Name: "{code:MyGroupDir}\{groupname}\Licence"; Filename: "{app}\{#AppLicence}"; Comment: "View License"
179Name: "{code:MyGroupDir}\{groupname}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\data\images\tuxpaint-installer.ico"; Comment: "Remove {#AppName}"
180Name: "{code:MyDesktopDir}\{#AppName}"; Filename: "{app}\{#AppExe}"; Tasks: desktopicon
181
182[Registry]
183Root: HKLM; Subkey: "SOFTWARE\{#AppRegKey}"; Flags: uninsdeletekey; ValueName: "{#AppRegValue}"; ValueType: string; ValueData: "{app}"; Check: AllUsers;
184Root: HKCU; Subkey: "SOFTWARE\{#AppRegKey}"; Flags: uninsdeletekey; ValueName: "{#AppRegValue}"; ValueType: string; ValueData: "{app}"; Check: ThisUserOnly;
185Root: HKLM; Subkey: "SOFTWARE\{#AppRegKey}"; Flags: uninsdeletekey; ValueName: "{#AppRegVersion}"; ValueType: string; ValueData: "{#AppVersion}"; Check: AllUsers;
186Root: HKCU; Subkey: "SOFTWARE\{#AppRegKey}"; Flags: uninsdeletekey; ValueName: "{#AppRegVersion}"; ValueType: string; ValueData: "{#AppVersion}"; Check: ThisUserOnly;
187
188[Run]
189Filename: "{app}\{#AppReadme}"; Description: "View the README file"; Flags: postinstall shellexec skipifsilent
190Filename: "{app}\{#AppConfigExe}"; Description: "{cm:LaunchProgram,{#AppConfigName}}"; Flags: nowait postinstall skipifsilent
191
192[UninstallDelete]
193Type: files; Name: "{code:MyGroupDir}\{groupname}\{cm:ProgramOnTheWeb,{#AppName}}.url"
194
195[code]
196#ifdef OpenCandy
197#include 'OCSetupHlp.iss'
198#endif
199
200const
201  CSIDL_PROFILE = $0028;
202  CSIDL_COMMON_PROGRAMS = $0017;
203  CSIDL_COMMON_DESKTOPDIRECTORY = $0019;
204var
205  InstallTypePageID: Integer;
206  CheckListBox2: TNewCheckListBox;
207#ifdef OpenCandy
208        OCtszInstallerLanguage: OCTString;
209#endif
210function Restricted(): Boolean;
211begin
212  Result := not (IsAdminLoggedOn() or IsPowerUserLoggedOn())
213end;
214
215function NotRestricted(): Boolean;
216begin
217  Result := not Restricted()
218end;
219
220function Is9xME(): Boolean;
221begin
222  Result := not UsingWinNT()
223end;
224
225function CurrentUserOnly(): Boolean;
226begin
227  Result := CheckListBox2.Checked[2]
228end;
229
230function ThisUserOnly(): Boolean;
231begin
232  Result := (Restricted() or CurrentUserOnly()) and UsingWinNT()
233end;
234
235function AllUsers(): Boolean;
236begin
237  Result := not ThisUserOnly()
238end;
239
240function MyAppDir(): String;
241var
242  Path: String;
243begin
244  Path := ExpandConstant('{reg:HKLM\SOFTWARE\{#AppRegKey},{#AppRegValue}|{pf}\{#AppDirName}}');
245  if ThisUserOnly() then
246  begin
247    Path := ExpandConstant('{reg:HKCU\SOFTWARE\{#AppRegKey},{#AppRegValue}|__MissingKey__}');
248    if Path = '__MissingKey__' then
249    begin
250      Path := GetShellFolderByCSIDL(CSIDL_PROFILE, True);
251      if Path = '' then
252        Path := RemoveBackslashUnlessRoot(ExtractFilePath(ExpandConstant('{userdocs}')));
253      Path := Path + '\Programs\{#AppDirName}'
254    end;
255  end;
256  Result := Path
257end;
258
259function MyGroupDir(Default: String): String;
260var
261  Path: String;
262begin
263  if ThisUserOnly() then
264    Path := ExpandConstant('{userprograms}')
265  else
266    Path := ExpandConstant('{commonprograms}');
267  Result := Path;
268end;
269
270function MyDesktopDir(Default: String): String;
271var
272  Path: String;
273begin
274  if ThisUserOnly() then
275    Path := ExpandConstant('{userdesktop}')
276  else
277    Path := ExpandConstant('{commondesktop}');
278  Result := Path;
279end;
280
281procedure CreateTheWizardPages;
282var
283  Page: TWizardPage;
284  Enabled, InstallAllUsers: Boolean;
285begin
286  Page := CreateCustomPage(wpLicense, 'Choose Installation Type', 'Who do you want to be able to use this program?');
287  InstallTypePageID := Page.ID;
288  Enabled := NotRestricted();
289  InstallAllUsers := NotRestricted();
290  CheckListBox2 := TNewCheckListBox.Create(Page);
291  CheckListBox2.Width := Page.SurfaceWidth;
292  CheckListBox2.Height := ScaleY(97);
293  CheckListBox2.BorderStyle := bsNone;
294  CheckListBox2.ParentColor := True;
295  CheckListBox2.MinItemHeight := WizardForm.TasksList.MinItemHeight;
296  CheckListBox2.ShowLines := False;
297  CheckListBox2.WantTabs := True;
298  CheckListBox2.Parent := Page.Surface;
299  CheckListBox2.AddGroup('Installation Type:', '', 0, nil);
300  CheckListBox2.AddRadioButton('All Users', '', 0, InstallAllUsers, Enabled, nil);
301  CheckListBox2.AddRadioButton('Current User Only', '', 0, not InstallAllUsers, True, nil);
302end;
303
304procedure CurPageChanged(CurPageID: Integer);
305begin
306  if CurPageID = wpSelectDir then
307  begin
308    WizardForm.DirEdit.Text := MyAppDir();
309  end;
310  begin
311   #ifdef OpenCandy
312         OpenCandyCurPageChanged(CurPageID);
313         #endif
314  end;
315end;
316
317function ShouldSkipPage(PageID: Integer): Boolean;
318begin
319  Result := (PageID = InstallTypePageID) and Is9xME();
320  begin
321   #ifdef OpenCandy
322         Result := OpenCandyShouldSkipPage(PageID);
323   #endif
324  end;
325end;
326
327#ifdef OpenCandy
328function NextButtonClick(CurPageID: Integer): Boolean;
329begin
330        Result := OpenCandyNextButtonClick(CurPageID);
331end;
332#endif
333
334function BackButtonClick(CurPageID: Integer): Boolean;
335begin
336        Result := true; // Allow action by default
337
338  #ifdef OpenCandy
339        OpenCandyBackButtonClick(CurPageID);
340        #endif
341end;
342
343procedure DeinitializeSetup();
344begin
345  #ifdef OpenCandy
346        OpenCandyDeinitializeSetup();
347        #endif
348end;
349
350procedure CurStepChanged(CurStep: TSetupStep);
351begin
352  #ifdef OpenCandy
353        OpenCandyCurStepChanged(CurStep);
354        #endif
355end;
356
357function Lang2Gettext(TwoLetter: Boolean): String;
358var
359  lang, lc: String;
360begin
361  lang := ActiveLanguage();
362
363  if lang = 'afr' then
364    lc := 'af'
365  else
366  if lang = 'alb' then
367    lc := 'sq'
368  else
369  if lang = 'arm' then
370    lc := 'hy'
371  else
372  if lang = 'ast' then
373    if TwoLetter = true then
374      lc := 'es'
375    else
376      lc := 'ast'
377  else
378  if lang = 'baq' then
379    lc := 'eu'
380  else
381  if lang = 'bel' then
382    lc := 'be'
383  else
384  if lang = 'bra' then
385    if TwoLetter = true then
386      lc := 'pt'
387    else
388      lc := 'pt_br'
389  else
390  if lang = 'bul' then
391    lc := 'bg'
392  else
393  if lang = 'cat' then
394    lc := 'ca'
395  else
396  if lang = 'chs' then
397    if TwoLetter = true then
398      lc := 'zh'
399    else
400      lc := 'zh_cn'
401  else
402  if lang = 'cht' then
403    if TwoLetter = true then
404      lc := 'zh'
405    else
406      lc := 'zh_tw'
407  else
408  if lang = 'cze' then
409    lc := 'cs'
410  else
411  if lang = 'dan' then
412    lc := 'da'
413  else
414  if lang = 'dut' then
415    lc := 'nl'
416  else
417  if lang = 'enb' then
418    if TwoLetter = true then
419      lc := 'en'
420    else
421      lc := 'en_gb'
422  else
423  if lang = 'epo' then
424    lc := 'eo'
425  else
426  if lang = 'esp' then
427    lc := 'es'
428  else
429  if lang = 'est' then
430    lc := 'et'
431  else
432  if lang = 'fin' then
433    lc := 'fi'
434  else
435  if lang = 'fre' then
436    lc := 'fr'
437  else
438  if lang = 'gal' then
439    lc := 'gl'
440  else
441  if lang = 'geo' then
442    lc := 'ka'
443  else
444  if lang = 'ger' then
445    lc := 'de'
446  else
447  if lang = 'gla' then
448    lc := 'gd'
449  else
450  if lang = 'gre' then
451    lc := 'el'
452  else
453  if lang = 'heb' then
454    lc := 'he'
455  else
456  if lang = 'hin' then
457    lc := 'hi'
458  else
459  if lang = 'hun' then
460    lc := 'hu'
461  else
462  if lang = 'ice' then
463    lc := 'is'
464  else
465  if lang = 'ind' then
466    lc := 'id'
467  else
468  if lang = 'ita' then
469    lc := 'it'
470  else
471  if lang = 'jpn' then
472    lc := 'ja'
473  else
474  if lang = 'kor' then
475    lc := 'ko'
476  else
477  if lang = 'kur' then
478    lc := 'ku'
479  else
480  if lang = 'lav' then
481    lc := 'lv'
482  else
483  if lang = 'lit' then
484    lc := 'lt'
485  else
486  if lang = 'ltz' then
487    lc := 'lb'
488  else
489  if lang = 'mac' then
490    lc := 'mk'
491  else
492  if lang = 'may' then
493    lc := 'ms'
494  else
495  if lang = 'mon' then
496    lc := 'mn'
497  else
498  if lang = 'nep' then
499    lc := 'ne'
500  else
501  if lang = 'nno' then
502    lc := 'nn'
503  else
504  if lang = 'nor' then
505    lc := 'nn'
506  else
507  if lang = 'occ' then
508    lc := 'oc'
509  else
510  if lang = 'pol' then
511    lc := 'pl'
512  else
513  if lang = 'por' then
514    lc := 'pt'
515  else
516  if lang = 'rum' then
517    lc := 'ro'
518  else
519  if lang = 'rus' then
520    lc := 'ru'
521  else
522  if lang = 'scc' then
523    lc := 'sr'
524  else
525  if lang = 'scl' then
526    if TwoLetter = true then
527      lc := 'sr'
528    else
529      lc := 'sr_latin'
530  else
531  if lang = 'scr' then
532    lc := 'hr'
533  else
534  if lang = 'slo' then
535    lc := 'sk'
536  else
537  if lang = 'swe' then
538    lc := 'sv'
539  else
540  if lang = 'tai' then
541    lc := 'th'
542  else
543  if lang = 'tur' then
544    lc := 'tr'
545  else
546  if lang = 'ukr' then
547    lc := 'uk'
548  else
549  if lang = 'vie' then
550    lc := 'vi'
551  else
552    lc := 'en';
553  Result := lc
554end;
555
556procedure InitializeWizard();
557begin
558  begin
559    CreateTheWizardPages; 
560  end
561#ifdef OpenCandy
562  OCtszInstallerLanguage := Lang2Gettext(true);
563        OpenCandyAsyncInit('{#OC_STR_MY_PRODUCT_NAME}', '{#OC_STR_KEY}', '{#OC_STR_SECRET}', OCtszInstallerLanguage, {#OC_INIT_MODE_NORMAL});
564  #endif
565end;
566
567function MyReadme(Default: String): String;
568var
569  lang, readme: String;
570begin
571  lang := Lang2Gettext(false);
572
573  if lang = 'gl' then
574    readme := 'gl\html\README.html'
575  else
576  if lang = 'it' then
577    readme := 'it\html\README.html'
578  else
579  if lang = 'ja' then
580    readme := 'ja\html\README.html'
581  else
582  if lang = 'nl' then
583    readme := 'nl\html\README.html'
584  else
585  if lang = 'ru' then
586    readme := 'ru\html\README.html'
587  else
588  if lang = 'zh_cn' then
589    readme := 'zh_cn\html\README.html'
590  else
591  if lang = 'zh_tw' then
592    readme := 'zh_tw\html\README.html'
593  else
594    readme := 'html\README.html';
595
596  Result := 'docs\'+readme
597end;
598
599function MyLicence(Default: String): String;
600var
601  lang, licence: String;
602begin
603  lang := Lang2Gettext(false);
604
605  if lang = 'pt_br' then
606    licence := 'pt_br\COPYING_pt_BR.txt'
607  else
608  if lang = 'ca' then
609    licence := 'ca\COPYING.txt'
610  else
611  if lang = 'cs' then
612    licence := 'cs\COPYING.txt'
613  else
614  if lang = 'da' then
615    licence := 'da\COPYING.txt'
616  else
617  if lang = 'nl' then
618    licence := 'nl\COPYING_nl.txt'
619  else
620  if lang = 'fr' then
621    licence := 'fr\COPIER.txt'
622  else
623  if lang = 'de' then
624    licence := 'de\KOPIE.txt'
625  else
626  if lang = 'it' then
627    licence := 'it\COPIATURA.txt'
628  else
629  if lang = 'pl' then
630    licence := 'pl\LICENCJA-GNU.txt'
631  else
632  if lang = 'es' then
633    licence := 'es\COPIADO.txt'
634  else
635    licence := 'COPYING.txt';
636
637  Result := 'docs\'+licence
638end;
639
640function MyPublisherURL(Default: String): String;
641var
642  lang: String;
643begin
644  lang := Lang2Gettext(false);
645
646  if lang = 'eng' then
647    lang := 'en_US'
648  else
649  if lang = 'enb' then
650    lang := 'en_GB'
651  else
652  if lang = 'cat' then
653    lang := 'ca_ES'
654  else
655  if lang = 'dan' then
656    lang := 'da_DK'
657  else
658  if lang = 'esp' then
659    lang := 'es_ES'
660  else
661  if lang = 'fin' then
662    lang := 'fi_FI'
663  else
664  if lang = 'fre' then
665    lang := 'fr_FR'
666  else
667  if lang = 'geo' then
668    lang := 'ka_GE'
669  else
670  if lang = 'gre' then
671    lang := 'el_GR'
672  else
673  if lang = 'ita' then
674    lang := 'it_IT'
675  else
676  if lang = 'jpn' then
677    lang := 'ja_JP'
678  else
679  if lang = 'mon' then
680    lang := 'mn_MN'
681  else
682  if lang = 'dut' then
683    lang := 'nl_NL'
684  else
685  if lang = 'nno' then
686    lang := 'nn_NO'
687  else
688  if lang = 'pol' then
689    lang := 'pl_PL'
690  else
691  if lang = 'rus' then
692    lang := 'ru_RU';
693
694  Result := 'http://www.tuxpaint.org/?lang='+lang
695end;
696
697#expr SaveToFile(AddBackslash(SourcePath) + 'Preprocessed.iss')
698
Note: See TracBrowser for help on using the repository browser.