76
78
Source: "locale\*.*"; DestDir: {app}\locale; Flags: recursesubdirs; Components: main
77
79
Source: "installer\_lib\*.*"; DestDir: {app}\_lib; Flags: recursesubdirs; Components: libs
82
; TODO: create special uninstall function in Code section to recursively delete pyc/pyo files
84
Type: files; Name: {app}\*.pyc
85
Type: files; Name: {app}\lib\*.pyc
86
Type: files; Name: {app}\lib\extra\*.pyc
87
Type: files; Name: {app}\lib\tests\*.pyc
88
Type: files; Name: {app}\*.pyo
89
Type: files; Name: {app}\lib\*.pyo
90
Type: files; Name: {app}\lib\extra\*.pyo
91
Type: files; Name: {app}\lib\tests\*.pyo
80
Root: HKLM; Subkey: "Software\QBzr\QBzr"; Flags: uninsdeletekey
81
Root: HKLM; Subkey: "Software\QBzr\QBzr"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
94
Root: HKLM; Subkey: "Software\QBzr"; Flags: uninsdeletekey
95
Root: HKLM; Subkey: "Software\QBzr"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
98
{Function detects system-wide installation of bzr: either bzr.exe or python-based}
99
function GetBzrPath(): String;
102
PythonVersions: TArrayOfString;
109
{Check bzr.exe presence}
110
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Bazaar', 'InstallPath', BzrPath) then begin
114
{Get list of all installed python versions}
115
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'Software\Python\PythonCore', PythonVersions) then begin
116
{Iterate over installed pythons and check if there is installed bzrlib}
117
for Ix := 0 to GetArrayLength(PythonVersions)-1 do begin
118
PythonKey := 'Software\Python\PythonCore\' + PythonVersions[Ix] + '\InstallPath'
119
if RegQueryStringValue(HKEY_LOCAL_MACHINE, PythonKey, '', PythonPath) then begin
120
Path := AddBackslash(PythonPath) + 'Lib\site-packages\bzrlib'
121
if DirExists(Path) then begin
128
Result := BzrlibPath;
132
{Function determines best possible PATH to install QBzr.
133
At first it tries to find system-wide installation (either bzr.exe or python-based)
134
then checks BZR_PLUGIN_PATH,
135
if all above fails then it suggests install to %APPDATA%\bazaar\2.0
137
function GetDirName(Param: String): String;
141
EnvBzrPluginPath: String;
144
Path := ExpandConstant('{userappdata}\bazaar\2.0\plugins\qbzr');
145
BzrPath := GetBzrPath();
146
if BzrPath <> '' then begin
147
Path := AddBackslash(BzrPath) + 'plugins\qbzr';
149
EnvBzrPluginPath := GetEnv('BZR_PLUGIN_PATH')
150
Ix := Pos(';', EnvBzrPluginPath)
152
EnvBzrPluginPath := Copy(EnvBzrPluginPath, 1, Ix-1)
153
if EnvBzrPluginPath <> '' then
154
Path := AddBackslash(EnvBzrPluginPath) + 'qbzr';