From 76ea67af54b16b855e1816afae9fb1f0add453ef Mon Sep 17 00:00:00 2001 From: Dogukan Karatas <61163577+dogukankaratas@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:47:06 +0100 Subject: [PATCH] dogukan/tekla2023 installer (#382) * build for 2023 * fix: Delete Assets/*.bmp from csproj as it is referenced in shproj now * updates the icon * fix: Revert changes to build.sh * adds notes --------- Co-authored-by: Alan Rynne --- Build/Consts.cs | 8 +++++++- .../Speckle.Connector.Tekla2023.csproj | 6 ------ .../Speckle.Connector.Tekla2024.csproj | 6 ------ .../Speckle.Connector.TeklaShared/Plugin/TeklaPlugin.cs | 4 ++-- .../SpeckleTeklaPanelHost.cs | 7 +++++-- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Build/Consts.cs b/Build/Consts.cs index 8fabcd0cf..93fb96031 100644 --- a/Build/Consts.cs +++ b/Build/Consts.cs @@ -41,7 +41,13 @@ public static class Consts new("Connectors/Autocad/Speckle.Connectors.Civil3d2025", "net8.0-windows") ] ), - new("tekla-structures", [new("Connectors/Tekla/Speckle.Connector.Tekla2024", "net48")]) + new( + "tekla-structures", + [ + new("Connectors/Tekla/Speckle.Connector.Tekla2023", "net48"), + new("Connectors/Tekla/Speckle.Connector.Tekla2024", "net48") + ] + ) }; } diff --git a/Connectors/Tekla/Speckle.Connector.Tekla2023/Speckle.Connector.Tekla2023.csproj b/Connectors/Tekla/Speckle.Connector.Tekla2023/Speckle.Connector.Tekla2023.csproj index 04402ca45..b3fcb0edd 100644 --- a/Connectors/Tekla/Speckle.Connector.Tekla2023/Speckle.Connector.Tekla2023.csproj +++ b/Connectors/Tekla/Speckle.Connector.Tekla2023/Speckle.Connector.Tekla2023.csproj @@ -48,12 +48,6 @@ - - - Always - - - diff --git a/Connectors/Tekla/Speckle.Connector.Tekla2024/Speckle.Connector.Tekla2024.csproj b/Connectors/Tekla/Speckle.Connector.Tekla2024/Speckle.Connector.Tekla2024.csproj index 5fe48282f..e25666ed0 100644 --- a/Connectors/Tekla/Speckle.Connector.Tekla2024/Speckle.Connector.Tekla2024.csproj +++ b/Connectors/Tekla/Speckle.Connector.Tekla2024/Speckle.Connector.Tekla2024.csproj @@ -47,12 +47,6 @@ - - - Always - - - diff --git a/Connectors/Tekla/Speckle.Connector.TeklaShared/Plugin/TeklaPlugin.cs b/Connectors/Tekla/Speckle.Connector.TeklaShared/Plugin/TeklaPlugin.cs index 901e2c479..87a7fc644 100644 --- a/Connectors/Tekla/Speckle.Connector.TeklaShared/Plugin/TeklaPlugin.cs +++ b/Connectors/Tekla/Speckle.Connector.TeklaShared/Plugin/TeklaPlugin.cs @@ -2,9 +2,9 @@ namespace Speckle.Connector.Tekla2024.Plugin; -[Plugin("Speckle (Beta)")] +[Plugin("Speckle")] [PluginUserInterface("Speckle.Connector.Tekla2024.SpeckleTeklaPanelHost")] -[InputObjectDependency(InputObjectDependency.NOT_DEPENDENT)] // See DevDocs/InputObjectDependency.NOT_DEPENDENT.png +[InputObjectDependency(InputObjectDependency.NOT_DEPENDENT)] public class TeklaPlugin : PluginBase { #pragma warning disable IDE1006 diff --git a/Connectors/Tekla/Speckle.Connector.TeklaShared/SpeckleTeklaPanelHost.cs b/Connectors/Tekla/Speckle.Connector.TeklaShared/SpeckleTeklaPanelHost.cs index 57247100d..1979989b5 100644 --- a/Connectors/Tekla/Speckle.Connector.TeklaShared/SpeckleTeklaPanelHost.cs +++ b/Connectors/Tekla/Speckle.Connector.TeklaShared/SpeckleTeklaPanelHost.cs @@ -24,10 +24,13 @@ public SpeckleTeklaPanelHost() this.Text = "Speckle (Beta)"; this.Name = "Speckle (Beta)"; + // CNX-790: Needs to be solved + string version = GetVersion().ToString()[1..]; // removes the 'v' from version + string resourcePath = $"Speckle.Connector.Tekla{version}.Resources.et_element_Speckle.bmp"; using ( Bitmap bmp = new Bitmap( - GetType().Assembly.GetManifestResourceStream("Speckle.Connector.Tekla2024.Resources.et_element_Speckle.bmp") - ?? throw new InvalidOperationException() + GetType().Assembly.GetManifestResourceStream(resourcePath) + ?? throw new InvalidOperationException($"Could not find resource: {resourcePath}") ) ) {