root/branches/gajim_0.11.2/gajim.iss

Revision 8987, 2.9 kB (checked in by asterix, 12 months ago)

windows files for 0.11.3

Line 
1[Setup]
2AppName=Gajim
3AppVerName=Gajim version 0.11.3
4OutputBaseFilename=gajim-0.11.3-1
5DefaultDirName={pf}\Gajim
6DefaultGroupName=Gajim
7UninstallDisplayIcon={app}\src\Gajim.exe
8Compression=lzma
9SolidCompression=yes
10SetupIconFile=data\pixmaps\gajim.ico
11
12[Components]
13Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
14
15[Tasks]
16Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; Components: main
17Name: removeprevious; Description: "Remove previously installed version"; GroupDescription: "Previous install:"; Components: main; Check: IsAlreadyInstalled('Gajim');
18
19[Files]
20Source: "dist\*.pyd"; DestDir: "{app}\src"
21Source: "dist\*.dll"; DestDir: "{app}\src"
22Source: "dist\*.zip"; DestDir: "{app}\src"
23Source: "COPYING"; DestDir: "{app}"
24Source: "THANKS"; DestDir: "{app}"
25Source: "AUTHORS"; DestDir: "{app}"
26Source: "dist\gajim.exe"; DestDir: "{app}\src"; components: main
27Source: "dist\history_manager.exe"; DestDir: "{app}\src"; components: main
28Source: "data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
29Source: "po\*.mo"; DestDir: "{app}\po"; Flags: recursesubdirs
30;Source: "gtk\*"; DestDir: "{app}\src\gtk"; Flags: recursesubdirs
31;Source: "gtk\bin\xmlparse.dll"; DestDir: "{app}\src"
32;Source: "gtk\bin\xmltok.dll"; DestDir: "{app}\src"
33
34[Icons]
35Name: "{group}\Gajim"; Filename: "{app}\src\Gajim.exe"; WorkingDir: "{app}\src"
36Name: "{group}\History Manager"; Filename: "{app}\src\history_manager.exe"; WorkingDir: "{app}\src"
37Name: "{group}\Uninstall Gajim"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"
38Name: "{userdesktop}\Gajim"; Filename: "{app}\src\gajim.exe"; WorkingDir: "{app}\src"; IconFilename: "{app}\data\pixmaps\gajim.ico"; Components: main; Tasks: desktopicon
39
40[Run]
41Filename: "{app}\src\gajim.exe"; Description: "Launch application"; Flags: postinstall nowait skipifsilent
42
43[Code]
44
45function GetUninstallPath( AppID: String ): String;
46var
47   sPrevPath: String;
48begin
49  sPrevPath := '';
50  if not RegQueryStringValue( HKLM,
51    'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+AppID+'_is1',
52    'UninstallString', sPrevpath) then
53    RegQueryStringValue( HKCU, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+AppID+'_is1' ,
54      'UninstallString', sPrevpath);
55
56  Result := sPrevPath;
57end;
58
59function IsAlreadyInstalled( AppID: String ): Boolean;
60var
61        sPrevPath: String;
62begin
63  sPrevPath := GetUninstallPath( AppID );
64
65
66  if ( Length(sPrevPath) > 0 ) then
67    Result:=true
68  else
69    Result:=false;
70 end;
71
72procedure CurStepChanged(CurStep: TSetupStep);
73var
74        sUninstPath: String;
75        sPrevID: String;
76        ResultCode: Integer;
77begin
78  if CurStep = ssInstall then
79  begin
80    sPrevID := 'Gajim';
81    sUninstPath := GetUninstallPath( sprevID );
82
83    if ( Length(sUninstPath) > 0 ) then
84    begin
85      sUninstPath := RemoveQuotes(sUninstPath);
86      Exec( RemoveQuotes(sUninstPath), '/silent', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
87    end;
88  end;
89end;
Note: See TracBrowser for help on using the browser.