root/branches/gajim_0.10/gajim.iss

Revision 6431, 2.7 kB (checked in by asterix, 2 years ago)

update iss file for windows build for 0.10.1

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