root/tags/gajim-0.11.4/gajim.iss

Revision 9099, 2.9 kB (checked in by asterix, 7 months ago)

update version to 0.11.4

Line 
1 [Setup]
2 AppName=Gajim
3 AppVerName=Gajim version 0.11.4
4 OutputBaseFilename=gajim-0.11.4-1
5 DefaultDirName={pf}\Gajim
6 DefaultGroupName=Gajim
7 UninstallDisplayIcon={app}\src\Gajim.exe
8 Compression=lzma
9 SolidCompression=yes
10 SetupIconFile=data\pixmaps\gajim.ico
11
12 [Components]
13 Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
14
15 [Tasks]
16 Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; Components: main
17 Name: removeprevious; Description: "Remove previously installed version"; GroupDescription: "Previous install:"; Components: main; Check: IsAlreadyInstalled('Gajim');
18
19 [Files]
20 Source: "dist\*.pyd"; DestDir: "{app}\src"
21 Source: "dist\*.dll"; DestDir: "{app}\src"
22 Source: "dist\*.zip"; DestDir: "{app}\src"
23 Source: "COPYING"; DestDir: "{app}"
24 Source: "THANKS"; DestDir: "{app}"
25 Source: "AUTHORS"; DestDir: "{app}"
26 Source: "dist\gajim.exe"; DestDir: "{app}\src"; components: main
27 Source: "dist\history_manager.exe"; DestDir: "{app}\src"; components: main
28 Source: "data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
29 Source: "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]
35 Name: "{group}\Gajim"; Filename: "{app}\src\Gajim.exe"; WorkingDir: "{app}\src"
36 Name: "{group}\History Manager"; Filename: "{app}\src\history_manager.exe"; WorkingDir: "{app}\src"
37 Name: "{group}\Uninstall Gajim"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"
38 Name: "{userdesktop}\Gajim"; Filename: "{app}\src\gajim.exe"; WorkingDir: "{app}\src"; IconFilename: "{app}\data\pixmaps\gajim.ico"; Components: main; Tasks: desktopicon
39
40 [Run]
41 Filename: "{app}\src\gajim.exe"; Description: "Launch application"; Flags: postinstall nowait skipifsilent
42
43 [Code]
44
45 function GetUninstallPath( AppID: String ): String;
46 var
47    sPrevPath: String;
48 begin
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;
57 end;
58
59 function IsAlreadyInstalled( AppID: String ): Boolean;
60 var
61         sPrevPath: String;
62 begin
63   sPrevPath := GetUninstallPath( AppID );
64
65
66   if ( Length(sPrevPath) > 0 ) then
67     Result:=true
68   else
69     Result:=false;
70  end;
71
72 procedure CurStepChanged(CurStep: TSetupStep);
73 var
74         sUninstPath: String;
75         sPrevID: String;
76         ResultCode: Integer;
77 begin
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;
89 end;
Note: See TracBrowser for help on using the browser.