Skip to content

Commit 7cc5392

Browse files
author
Gertjan Van den Broek
committed
added 2021 ISS file
1 parent 5ad2ce3 commit 7cc5392

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Setup_RevitPythonShell_2021.iss

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[Files]
2+
Source: "RevitPythonShell\bin\Release\2021\PythonConsoleControl.dll"; DestDir: "{app}"; Flags: replacesameversion
3+
Source: "RevitPythonShell\bin\Release\2021\RevitPythonShell.dll"; DestDir: "{app}"; Flags: replacesameversion
4+
Source: "RevitPythonShell\bin\Release\2021\RpsRuntime.dll"; DestDir: "{app}"; Flags: replacesameversion
5+
Source: "RevitPythonShell\bin\Release\2021\RevitPythonShell.addin"; DestDir: "{userappdata}\Autodesk\Revit\Addins\2021"; Flags: replacesameversion
6+
Source: "RevitPythonShell\bin\Release\2021\ICSharpCode.AvalonEdit.dll"; DestDir: "{app}"
7+
Source: "RevitPythonShell\bin\Release\2021\IronPython.dll"; DestDir: "{app}"
8+
Source: "RevitPythonShell\bin\Release\2021\IronPython.Modules.dll"; DestDir: "{app}"
9+
Source: "RevitPythonShell\bin\Release\2021\Microsoft.Scripting.Metadata.dll"; DestDir: "{app}"
10+
Source: "RevitPythonShell\bin\Release\2021\Microsoft.Dynamic.dll"; DestDir: "{app}"
11+
Source: "RevitPythonShell\bin\Release\2021\Microsoft.Scripting.dll"; DestDir: "{app}"
12+
Source: "RevitPythonShell\bin\Release\2021\DefaultConfig\RevitPythonShell.xml"; DestDir: "{userappdata}\RevitPythonShell\2021"; Flags: onlyifdoesntexist
13+
Source: "RevitPythonShell\bin\Release\2021\DefaultConfig\init.py"; DestDir: {userappdata}\RevitPythonShell\2021; Flags: confirmoverwrite;
14+
Source: "RevitPythonShell\bin\Release\2021\DefaultConfig\startup.py"; DestDir: {userappdata}\RevitPythonShell\2021; Flags: confirmoverwrite;
15+
16+
17+
[code]
18+
{ HANDLE INSTALL PROCESS STEPS }
19+
procedure CurStepChanged(CurStep: TSetupStep);
20+
var
21+
AddInFilePath: String;
22+
LoadedFile : TStrings;
23+
AddInFileContents: String;
24+
ReplaceString: String;
25+
SearchString: String;
26+
begin
27+
28+
if CurStep = ssPostInstall then
29+
begin
30+
31+
AddinFilePath := ExpandConstant('{userappdata}\Autodesk\Revit\Addins\2021\RevitPythonShell.addin');
32+
LoadedFile := TStringList.Create;
33+
SearchString := 'Assembly>RevitPythonShell.dll<';
34+
ReplaceString := 'Assembly>' + ExpandConstant('{app}') + '\RevitPythonShell.dll<';
35+
36+
try
37+
LoadedFile.LoadFromFile(AddInFilePath);
38+
AddInFileContents := LoadedFile.Text;
39+
40+
{ Only save if text has been changed. }
41+
if StringChangeEx(AddInFileContents, SearchString, ReplaceString, True) > 0 then
42+
begin;
43+
LoadedFile.Text := AddInFileContents;
44+
LoadedFile.SaveToFile(AddInFilePath);
45+
end;
46+
finally
47+
LoadedFile.Free;
48+
end;
49+
50+
end;
51+
end;
52+
53+
[Setup]
54+
AppName=RevitPythonShell for Autodesk Revit 2021
55+
AppVerName=RevitPythonShell for Autodesk Revit 2021
56+
RestartIfNeededByRun=false
57+
DefaultDirName={pf32}\RevitPythonShell\2021
58+
OutputBaseFilename=Setup_RevitPythonShell_2021
59+
ShowLanguageDialog=auto
60+
FlatComponentsList=false
61+
UninstallFilesDir={app}\Uninstall
62+
UninstallDisplayName=RevitPythonShell for Autodesk Revit 2021
63+
AppVersion=2021.0
64+
VersionInfoVersion=2021.0
65+
VersionInfoDescription=RevitPythonShell for Autodesk Revit 2021
66+
VersionInfoTextVersion=RevitPythonShell for Autodesk Revit 2021

0 commit comments

Comments
 (0)