1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
; Script for Inno Setup installer
; [[[cog cog.outl('; This script created by Cog from bzr.iss.cog source') ]]]
; [[[end]]]
; Cog is http://www.nedbatchelder.com/code/cog/
[Setup]
AppName=Bazaar
; [[[cog
; # Python 2.5 compatibility code
; import os
; import sys
; cwd = os.getcwd()
; if cwd not in sys.path:
; sys.path.insert(0, cwd)
; #/Python 2.5 compatibility code
;
; import bzrlib
; try:
; VERSION = bzrlib.__version__
; AppVerName = 'Bazaar %s' % VERSION
; OutputBaseFilename = 'bzr-setup-%s' % VERSION
; except:
; VERSION = ''
; AppVerName = 'Bazaar'
; OutputBaseFilename = 'bzr-setup'
;
; cog.outl('AppVerName=%s' % AppVerName)
; cog.outl('OutputBaseFilename=%s' % OutputBaseFilename)
; ]]]
AppVerName=Bazaar
OutputBaseFilename=bzr-setup
; [[[end]]]
DefaultDirName={pf}\Bazaar
DefaultGroupName=Bazaar
SolidCompression=yes
OutputDir="..\"
SourceDir="..\..\win32_bzr.exe"
SetupIconFile="..\bzr.ico"
InfoBeforeFile="..\tools\win32\info.txt"
VersionInfoCompany="Canonical Ltd."
VersionInfoCopyright="Canonical Ltd., 2005-2007"
VersionInfoDescription="Installer for stand-alone bzr.exe"
; [[[cog
; import bzrlib
; version_number = []
; for i in bzrlib.version_info[:3]:
; try:
; i = int(i)
; except ValueError:
; i = 0
; version_number.append(i)
; # incremental build number
; from tools.win32.file_version import *
; try:
; version_prev = get_file_version(OutputBaseFilename + '.exe')
; except (FileNotFound, VersionNotAvailable):
; pass
; else:
; if version_number == list(version_prev[:3]):
; version_number.append((version_prev[-1]+1) % 65536)
; version_str = '.'.join(str(i) for i in version_number)
; cog.outl('VersionInfoVersion="%s"' % version_str)
; ]]]
; [[[end]]]
AppComments="Bazaar: Friendly distributed version control system"
AppPublisher="Canonical Ltd."
AppPublisherURL="http://www.bazaar-vcs.org"
AppSupportURL="http://www.bazaar-vcs.org/BzrSupport"
AppUpdatesURL="http://www.bazaar-vcs.org/WindowsDownloads"
; [[[cog cog.outl('AppVersion=%s' % VERSION) ]]]
; [[[end]]]
ChangesEnvironment=yes
PrivilegesRequired=none
[Files]
Source: "*.*"; DestDir: "{app}"; Flags: ignoreversion;
Source: "lib\*.*"; DestDir: "{app}\lib"; Flags: createallsubdirs ignoreversion recursesubdirs;
Source: "doc\*.*"; DestDir: "{app}\doc"; Flags: createallsubdirs ignoreversion recursesubdirs;
; [[[cog
; try:
; import pycurl
; except ImportError:
; ca_path = None
; else:
; supported = pycurl.version_info()[8]
; if 'https' in supported:
; from bzrlib.transport.http.ca_bundle import get_ca_path
; ca_path = get_ca_path()
; if ca_path:
; cog.outl('Source: "%s"; DestDir: "{app}"; Components: cabundle' % ca_path)
; else:
; cog.msg('You have pycurl with SSL support, '
; 'but CA Bundle (curl-ca-bundle.crt) not found!')
; ]]]
; [[[end]]]
[Components]
Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
; [[[cog
; if ca_path:
; cog.outl('Name: "cabundle"; '
; 'Description: "CA certificates for SSL support"; '
; 'Types: full custom')
; ]]]
; [[[end]]]
[Dirs]
Name: "{userappdata}\bazaar\2.0"
[Icons]
Name: "{group}\Documentation index"; Filename: "{app}\doc\index.htm"; WorkingDir: "{app}\doc";
Name: "{group}\Bazaar Home Page"; Filename: "{app}\bazaar.url"; Comment: "http://www.bazaar-vcs.org";
Name: "{group}\Start Bzr in cmd shell"; Filename: "{cmd}"; Parameters: "/K start_bzr.bat"; WorkingDir: "{app}"; IconFilename: "{app}\bzr.exe"; Comment: "Open new Bzr session";
Name: "{group}\Uninstall Bzr"; Filename: "{uninstallexe}"; IconFileName: "{sys}\shell32.dll"; IconIndex: 101; Comment: "Remove Bzr completely";
[Tasks]
Name: Path; Description: "Add {app} directory to PATH environment variable";
Name: Shell; Description: "Add Bzr context menu to shell"; Flags: unchecked
[Run]
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--start-bzr"; Flags: skipifdoesntexist runhidden;
; [[[cog
; import os
; if os.path.isfile('win32_bzr.exe/lib/win32ui.pyd'): # pywin32 mfc wrapper
; cog.outl('Filename: "{app}\bzr_postinstall.exe"; '
; 'Parameters: "--check-mfc71"; '
; 'Flags: skipifdoesntexist skipifsilent runhidden;')
; ]]]
; [[[end]]]
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--add-path"; Tasks: Path; Flags: skipifdoesntexist skipifsilent runhidden;
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--add-shell-menu"; Tasks: Shell; Flags: skipifdoesntexist skipifsilent runhidden;
[UninstallRun]
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--delete-path --delete-shell-menu --silent"; Flags: skipifdoesntexist runhidden;
|