Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
codestackdev committed Jun 19, 2019
2 parents 540e9e0 + 1f0eb66 commit a2b5b76
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 20 deletions.
10 changes: 5 additions & 5 deletions Installer/AddInReg.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</Class>
<File Id="fil4320846A83E1D6A9BFA99753384C2099" KeyPath="yes" Source="$(var.SourceOutDir)\CodeStack.Sw.MyToolbar.dll" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="Class" Value="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="CodeBase" Value="file:///[#fil4320846A83E1D6A9BFA99753384C2099]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="Class" Value="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="CodeBase" Value="file:///[#fil4320846A83E1D6A9BFA99753384C2099]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="Class" Value="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="CodeBase" Value="file:///[#fil4320846A83E1D6A9BFA99753384C2099]" Type="string" Action="write" />
</Component>
Expand Down
12 changes: 6 additions & 6 deletions Installer/Addin11.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="cmp88292F68F35EB8F79623221F5580BB75" Guid="{58ACFA48-9D5F-4FD8-B5B8-ABEB3ED83825}">
<Component Id="cmp88292F68F35EB8F79623221F5580BB75" Guid="{0E132737-CABA-4F85-9841-A71208CDBF12}">
<Class Id="{63496B16-E9AD-4D3A-8473-99D124A1672B}" Context="InprocServer32" Description="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Description="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" />
</Class>
<File Id="fil4320846A83E1D6A9BFA99753384C2099" KeyPath="yes" Source="$(var.SourceOutDir)\CodeStack.Sw.MyToolbar.dll" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="Class" Value="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.0.0.0" Name="CodeBase" Value="file:///[#fil4320846A83E1D6A9BFA99753384C2099]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="Class" Value="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32\2.1.0.0" Name="CodeBase" Value="file:///[#fil4320846A83E1D6A9BFA99753384C2099]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="Class" Value="CodeStack.Sw.MyToolbar.MyToolbarSwAddin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="Assembly" Value="CodeStack.Sw.MyToolbar, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{63496B16-E9AD-4D3A-8473-99D124A1672B}\InprocServer32" Name="CodeBase" Value="file:///[#fil4320846A83E1D6A9BFA99753384C2099]" Type="string" Action="write" />
</Component>
Expand Down
2 changes: 1 addition & 1 deletion Installer/Product.wxs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="MyToolbar" Language="1033" Version="2.0.0.0" Manufacturer="CodeStack" UpgradeCode="{61EB1313-A362-41AC-A3D5-F50D43CE74D8}">
<Product Id="*" Name="MyToolbar" Language="1033" Version="2.1.0.0" Manufacturer="CodeStack" UpgradeCode="{61EB1313-A362-41AC-A3D5-F50D43CE74D8}">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of MyToolbar is already installed." />
Expand Down
4 changes: 2 additions & 2 deletions MyToolbar/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
[assembly: AssemblyCopyright("Copyright(C) 2019 www.codestack.net")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: ComVisible(false)]
[assembly: ApplicationInfo(typeof(AppInfo),
nameof(AppInfo.WorkingDir), nameof(AppInfo.Title), nameof(AppInfo.Icon))]
Expand Down
29 changes: 24 additions & 5 deletions MyToolbar/Services/MacroEntryPointsExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Collections.Generic;
using System.Linq;
using System;
using System.IO;

namespace CodeStack.Sw.MyToolbar.Services
{
Expand Down Expand Up @@ -47,6 +48,8 @@ public int Compare(MacroEntryPoint x, MacroEntryPoint y)
}
}

private const string VSTA_FILE_EXT = ".dll";

private readonly ISldWorks m_App;

public MacroEntryPointsExtractor(ISldWorks app)
Expand All @@ -63,16 +66,32 @@ public MacroEntryPoint[] GetEntryPoints(string macroPath)
{
return methods.Select(m =>
{
var ep = m.Split('.');
return new MacroEntryPoint()
if (IsVstaMacro(macroPath))
{
return new MacroEntryPoint()
{
SubName = m
};
}
else
{
ModuleName = ep[0],
SubName = ep[1]
};
var ep = m.Split('.');
return new MacroEntryPoint()
{
ModuleName = ep[0],
SubName = ep[1]
};
}
}).OrderBy(e => e, new EntryPointComparer()).ToArray();
}

return null;
}

public bool IsVstaMacro(string macroPath)
{
return Path.GetExtension(macroPath).Equals(VSTA_FILE_EXT,
StringComparison.CurrentCultureIgnoreCase);
}
}
}
9 changes: 8 additions & 1 deletion MyToolbar/Structs/MacroEntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ public override int GetHashCode()

public override string ToString()
{
return $"{ModuleName}.{SubName}";
if (!string.IsNullOrEmpty(ModuleName))
{
return $"{ModuleName}.{SubName}";
}
else
{
return SubName;
}
}
}
}

0 comments on commit a2b5b76

Please sign in to comment.