Skip to content

Commit

Permalink
first step towards an installer for RPS 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
daren-thomas committed Jul 13, 2017
1 parent a1fb78b commit a76eea4
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 1 deletion.
Binary file added Output/Setup_RevitPythonShell_2018.exe
Binary file not shown.
13 changes: 13 additions & 0 deletions PythonConsoleControl/PythonConsoleControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<PropertyGroup Condition="'$(Configuration)' == 'Debug 2017'">
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug 2018'">
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
Expand Down Expand Up @@ -89,6 +92,16 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2018|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug 2018\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\packages\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
Expand Down
Binary file added RequiredLibraries/Revit2018/RevitAPI.dll
Binary file not shown.
Binary file added RequiredLibraries/Revit2018/RevitAPIUI.dll
Binary file not shown.
9 changes: 8 additions & 1 deletion RevitPythonShell.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
VisualStudioVersion = 15.0.26228.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RevitPythonShell", "RevitPythonShell\RevitPythonShell.csproj", "{7E37F14E-D840-42F8-8CA6-90FFC5497972}"
ProjectSection(ProjectDependencies) = postProject
Expand All @@ -26,6 +26,7 @@ Global
Debug 2015|Any CPU = Debug 2015|Any CPU
Debug 2016|Any CPU = Debug 2016|Any CPU
Debug 2017|Any CPU = Debug 2017|Any CPU
Debug 2018|Any CPU = Debug 2018|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug 2014|Any CPU.ActiveCfg = Debug 2014|Any CPU
Expand All @@ -36,6 +37,8 @@ Global
{7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug 2016|Any CPU.Build.0 = Debug 2016|Any CPU
{7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug 2017|Any CPU.ActiveCfg = Debug 2017|Any CPU
{7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug 2017|Any CPU.Build.0 = Debug 2017|Any CPU
{7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug 2018|Any CPU.ActiveCfg = Debug 2018|Any CPU
{7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug 2018|Any CPU.Build.0 = Debug 2018|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2014|Any CPU.ActiveCfg = Debug|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2014|Any CPU.Build.0 = Debug|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2015|Any CPU.ActiveCfg = Debug 2015|Any CPU
Expand All @@ -44,6 +47,8 @@ Global
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2016|Any CPU.Build.0 = Debug 2016|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2017|Any CPU.ActiveCfg = Debug 2017|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2017|Any CPU.Build.0 = Debug 2017|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2018|Any CPU.ActiveCfg = Debug 2018|Any CPU
{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug 2018|Any CPU.Build.0 = Debug 2018|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2014|Any CPU.ActiveCfg = Debug 2014|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2014|Any CPU.Build.0 = Debug 2014|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2015|Any CPU.ActiveCfg = Debug 2015|Any CPU
Expand All @@ -52,6 +57,8 @@ Global
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2016|Any CPU.Build.0 = Debug 2016|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2017|Any CPU.ActiveCfg = Debug 2017|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2017|Any CPU.Build.0 = Debug 2017|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2018|Any CPU.ActiveCfg = Debug 2018|Any CPU
{C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug 2018|Any CPU.Build.0 = Debug 2018|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
27 changes: 27 additions & 0 deletions RevitPythonShell/RevitPythonShell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
<PropertyGroup Condition="'$(Configuration)' == 'Debug 2017'">
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug 2018'">
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
Expand Down Expand Up @@ -111,6 +114,16 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2018|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug 2018\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug 2014'">
<Reference Include="RevitAPI">
<HintPath>..\RequiredLibraries\Revit2014\RevitAPI.dll</HintPath>
Expand Down Expand Up @@ -143,6 +156,14 @@
<HintPath>..\RequiredLibraries\Revit2017\RevitAPIUI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug 2018'">
<Reference Include="RevitAPI">
<HintPath>..\RequiredLibraries\Revit2018\RevitAPI.dll</HintPath>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>..\RequiredLibraries\Revit2018\RevitAPIUI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\packages\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
Expand Down Expand Up @@ -172,9 +193,15 @@
<Reference Include="PythonConsoleControl">
<HintPath>..\PythonConsoleControl\bin\Debug 2017\PythonConsoleControl.dll</HintPath>
</Reference>
<Reference Include="PythonConsoleControl">
<HintPath>..\PythonConsoleControl\bin\Debug 2018\PythonConsoleControl.dll</HintPath>
</Reference>
<Reference Include="RpsRuntime">
<HintPath>..\RpsRuntime\bin\Debug 2017\RpsRuntime.dll</HintPath>
</Reference>
<Reference Include="RpsRuntime">
<HintPath>..\RpsRuntime\bin\Debug 2018\RpsRuntime.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
Expand Down
21 changes: 21 additions & 0 deletions RpsRuntime/RpsRuntime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
<PropertyGroup Condition="'$(Configuration)' == 'Debug 2017'">
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug 2018'">
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2014|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug 2014\</OutputPath>
Expand Down Expand Up @@ -69,6 +72,16 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2018|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug 2018\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug 2014'">
<Reference Include="RevitAPI">
<HintPath>..\RequiredLibraries\Revit2014\RevitAPI.dll</HintPath>
Expand Down Expand Up @@ -101,6 +114,14 @@
<HintPath>..\RequiredLibraries\Revit2017\RevitAPIUI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug 2018'">
<Reference Include="RevitAPI">
<HintPath>..\RequiredLibraries\Revit2018\RevitAPI.dll</HintPath>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>..\RequiredLibraries\Revit2018\RevitAPIUI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\packages\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
Expand Down
59 changes: 59 additions & 0 deletions Setup_RevitPythonShell_2018.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[Files]
Source: "RevitPythonShell\bin\Debug 2018\PythonConsoleControl.dll"; DestDir: "{app}"; Flags: replacesameversion
Source: "RevitPythonShell\bin\Debug 2018\RevitPythonShell.dll"; DestDir: "{app}"; Flags: replacesameversion
Source: "RevitPythonShell\bin\Debug 2018\RpsRuntime.dll"; DestDir: "{app}"; Flags: replacesameversion
Source: "packages\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll"; DestDir: "{app}"
Source: "RequiredLibraries\IronPython.dll"; DestDir: "{app}"
Source: "RequiredLibraries\IronPython.Modules.dll"; DestDir: "{app}"
Source: "RequiredLibraries\Microsoft.Scripting.Metadata.dll"; DestDir: "{app}"
Source: "RequiredLibraries\Microsoft.Dynamic.dll"; DestDir: "{app}"
Source: "RequiredLibraries\Microsoft.Scripting.dll"; DestDir: "{app}"
Source: "RevitPythonShell\RevitPythonShell.xml"; DestDir: "{userappdata}\RevitPythonShell2018"; Flags: onlyifdoesntexist
Source: RevitPythonShell\init.py; DestDir: {userappdata}\RevitPythonShell2018; Flags: confirmoverwrite;
Source: RevitPythonShell\startup.py; DestDir: {userappdata}\RevitPythonShell2018; Flags: confirmoverwrite;

[code]
{ HANDLE INSTALL PROCESS STEPS }
procedure CurStepChanged(CurStep: TSetupStep);
var
AddInFilePath: String;
AddInFileContents: String;
begin
if CurStep = ssPostInstall then
begin
{ GET LOCATION OF USER AppData (Roaming) }
AddInFilePath := ExpandConstant('{userappdata}\Autodesk\Revit\Addins\2018\RevitPythonShell2018.addin');
{ CREATE NEW ADDIN FILE }
AddInFileContents := '<?xml version="1.0" encoding="utf-16" standalone="no"?>' + #13#10;
AddInFileContents := AddInFileContents + '<RevitAddIns>' + #13#10;
AddInFileContents := AddInFileContents + ' <AddIn Type="Application">' + #13#10;
AddInFileContents := AddInFileContents + ' <Name>RevitPythonShell</Name>' + #13#10;
AddInFileContents := AddInFileContents + ' <Assembly>' + ExpandConstant('{app}') + '\RevitPythonShell.dll</Assembly>' + #13#10;
AddInFileContents := AddInFileContents + ' <AddInId>3a7a1d24-51ed-462b-949f-1ddcca12008d</AddInId>' + #13#10;
AddInFileContents := AddInFileContents + ' <FullClassName>RevitPythonShell.RevitPythonShellApplication</FullClassName>' + #13#10;
AddInFileContents := AddInFileContents + ' <VendorId>RIPS</VendorId>' + #13#10;
AddInFileContents := AddInFileContents + ' </AddIn>' + #13#10;
AddInFileContents := AddInFileContents + '</RevitAddIns>' + #13#10;
SaveStringToFile(AddInFilePath, AddInFileContents, False);
end;
end;
[Setup]
AppName=RevitPythonShell for Autodesk Revit 2018
AppVerName=RevitPythonShell for Autodesk Revit 2018
RestartIfNeededByRun=false
DefaultDirName={pf32}\RevitPythonShell2018
OutputBaseFilename=Setup_RevitPythonShell_2018
ShowLanguageDialog=auto
FlatComponentsList=false
UninstallFilesDir={app}\Uninstall
UninstallDisplayName=RevitPythonShell for Autodesk Revit 2018
AppVersion=2018.0
VersionInfoVersion=2018.0
VersionInfoDescription=RevitPythonShell for Autodesk Revit 2018
VersionInfoTextVersion=RevitPythonShell for Autodesk Revit 2018

0 comments on commit a76eea4

Please sign in to comment.