Skip to content

Commit 754ef9b

Browse files
authored
Merge pull request dnGrep#1304 from doug24/1278-remove-everything-dlls
1278 fix for winget validation
2 parents 28a6c0f + 79c34c8 commit 754ef9b

10 files changed

Lines changed: 37 additions & 31 deletions

File tree

AssemblyVersionCommon.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// by using '*'
1313
//
1414
// NOTE: Given our build, this is the canonical spot to set the product version number.
15-
[assembly: AssemblyVersion("4.4.0.0")]
16-
[assembly: AssemblyInformationalVersion("4.4.0.0")]
17-
[assembly: AssemblyFileVersion("4.4.0.0")]
15+
[assembly: AssemblyVersion("4.5.0.0")]
16+
[assembly: AssemblyInformationalVersion("4.5.0.0")]
17+
[assembly: AssemblyFileVersion("4.5.0.0")]

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 4.4.{build}.0
1+
version: 4.5.{build}.0
22
branches:
33
only:
44
- master
@@ -16,7 +16,7 @@ assembly_info:
1616
assembly_file_version: '{version}'
1717
assembly_informational_version: '{version}'
1818
install:
19-
- ps: ./dotnet-install.ps1 -Channel 9.0 -Version 9.0.202
19+
- ps: ./dotnet-install.ps1 -Channel 9.0 -Version 9.0.203
2020
before_build:
2121
- cmd: nuget restore
2222
- ps: ./make-msix.ps1

dnGREP.Everything/EverythingSearch.cs

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4+
using System.Reflection;
45

56
namespace dnGREP.Everything
67
{
@@ -18,23 +19,36 @@ public static bool IsAvailable
1819
{
1920
try
2021
{
21-
uint major = NativeMethods.Everything_GetMajorVersion();
22-
uint minor = NativeMethods.Everything_GetMinorVersion();
23-
uint revision = NativeMethods.Everything_GetRevision();
22+
// Check if the Everything DLL is available in the same directory as the executable.
23+
// It is not included with dnGrep, it must be installed separately by the user.
24+
var dllFile = Path.Combine(
25+
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty,
26+
NativeMethods.EverythingDLL);
2427

25-
// we need version 1.4.1 or higher
26-
if (major < 1)
28+
if (!File.Exists(dllFile))
29+
{
2730
isAvailable = false;
28-
else if (major > 1)
29-
isAvailable = true;
31+
}
3032
else
3133
{
32-
if (minor < 4)
34+
uint major = NativeMethods.Everything_GetMajorVersion();
35+
uint minor = NativeMethods.Everything_GetMinorVersion();
36+
uint revision = NativeMethods.Everything_GetRevision();
37+
38+
// we need version 1.4.1 or higher
39+
if (major < 1)
3340
isAvailable = false;
34-
else if (minor > 4)
41+
else if (major > 1)
3542
isAvailable = true;
3643
else
37-
isAvailable = revision >= 1;
44+
{
45+
if (minor < 4)
46+
isAvailable = false;
47+
else if (minor > 4)
48+
isAvailable = true;
49+
else
50+
isAvailable = revision >= 1;
51+
}
3852
}
3953
}
4054
catch (Exception)

dnGREP.Everything/NativeMethods.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ internal static class NativeMethods
88
{
99
#pragma warning disable SYSLIB1054
1010

11+
// Do not include the Everything32.dll or Everything64.dll in the project,
12+
// MSI or portable zip, it must be installed separately by the user.
1113
#if x86
12-
private const string EverythingDLL = "Everything32.dll";
14+
internal const string EverythingDLL = "Everything32.dll";
1315
#else
14-
private const string EverythingDLL = "Everything64.dll";
16+
internal const string EverythingDLL = "Everything64.dll";
1517
#endif
1618

1719
internal const uint EVERYTHING_OK = 0; // The operation completed successfully.
-95.5 KB
Binary file not shown.
-86 KB
Binary file not shown.

dnGREP.Setup/Fragments/AppFragment.wxs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
<Component Id="cmp2D32460505F046C6A24B8F46AF2F6FD0" Guid="{373CEBBF-8D67-4648-A4CF-65E1BAD7CC83}">
6161
<File Id="fil2E6C049FE36844CFA597FA46C2B17344" KeyPath="yes" Source="$(var.PublishDir)\dnGREP.Everything.pdb" />
6262
</Component>
63+
<!-- Do not include Everything32.dll or Everything64.dll in the MSI, it must
64+
be installed separately by the user. -->
6365
<Component Id="cmpE75E380769873171E1689F576B0BBBD1" Guid="{B7C5DBF9-8740-4677-8D55-E9C01BF58028}">
6466
<File Id="filE4BA9060B65A733C63D86942A6474C5E" KeyPath="yes" Source="$(var.PublishDir)\dnGREP.exe" />
6567
<!-- Store the installation dir for future updates -->
@@ -79,9 +81,6 @@
7981
<Component Id="cmp7FB095CD79B0456CBE2B08103FC384F3" Guid="{26AADCD2-37DF-41C1-8EED-ED7D375781C8}">
8082
<File Id="fil5903B951748F47648D6C78498970D642" KeyPath="yes" Source="$(var.PublishDir)\dnGREP.runtimeconfig.json" />
8183
</Component>
82-
<Component Id="cmp2026EEE4D24E41B4BF43B79B16CE7A4E" Guid="{392076A3-06CF-4212-941B-DD82FB72075D}">
83-
<File Id="filA5A20558D688414DA4A216589F40877A" KeyPath="yes" Source="$(var.PublishDir)\Everything$(var.App.PlatformShort).dll" />
84-
</Component>
8584
<Component Id="cmp0E16CB47C3F6B22E2FFDD2CC515AD1C8" Guid="{499E357F-9822-4945-A800-82BF6979E072}">
8685
<File Id="fil6D3D5546417727749907FC9E19D97FF8" KeyPath="yes" Source="$(var.PublishDir)\ICSharpCode.AvalonEdit.dll" />
8786
</Component>
@@ -275,7 +274,6 @@
275274
<ComponentRef Id="cmp40521BA90501425EAE4F9E951AF1C60B" />
276275
<ComponentRef Id="cmp882BA74D47644877B0CE35ADA1A69FC8" />
277276
<ComponentRef Id="cmp7FB095CD79B0456CBE2B08103FC384F3" />
278-
<ComponentRef Id="cmp2026EEE4D24E41B4BF43B79B16CE7A4E" />
279277
<ComponentRef Id="cmp0E16CB47C3F6B22E2FFDD2CC515AD1C8" />
280278
<ComponentRef Id="cmpC9374D90A25A4EE284CA32161DF04748" />
281279
<ComponentRef Id="cmp44E877FEA07944F7936BAF12F57254B8" />

dnGREP.Setup/Fragments/Dotnet.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
<File Id="filD101FC4DA814CAB2847D9DA443BA18C2" KeyPath="yes" Source="$(var.PublishDir)\mscordaccore.dll" />
8282
</Component>
8383
<Component Id="cmpE115ABDFD132AD880024EE2939D54BF1" Guid="{3060FE5D-6F21-43CB-A584-57BD23D9FDF9}">
84-
<File Id="fil50ADE2B6BA6A9BAD2A38D1A83A3227E4" KeyPath="yes" Source="$(var.PublishDir)\mscordaccore_$(var.Platform.Id)_$(var.Platform.Id)_9.0.325.11113.dll" />
84+
<File Id="fil50ADE2B6BA6A9BAD2A38D1A83A3227E4" KeyPath="yes" Source="$(var.PublishDir)\mscordaccore_$(var.Platform.Id)_$(var.Platform.Id)_9.0.425.16305.dll" />
8585
</Component>
8686
<Component Id="cmp8919AF6C6904B98D882508E0D18E868B" Guid="{FAC75B35-5646-4042-8BBB-B7FD5AEE4476}">
8787
<File Id="filA9E828B55293AF9546D153D082D8422A" KeyPath="yes" Source="$(var.PublishDir)\mscordbi.dll" />

dnGREP.Setup/Variables.wxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?endif ?>
1515
<!-- Version number. Should be overwritten during build. Revision is NOT used by Windows Installer during upgrade procedure. -->
1616
<?define MajorVersion="4" ?>
17-
<?define MinorVersion="4" ?>
17+
<?define MinorVersion="5" ?>
1818
<?define BuildVersion="0" ?>
1919
<?define Revision="0" ?>
2020
<!-- Full version number to display -->

dnGREP.WPF/dnGREP.WPF.csproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,6 @@
220220
<ItemGroup Condition="'$(Platform)'=='x86'">
221221
<SevenZipFiles Include="$(SolutionDir)\Dependencies\7z32.dll" />
222222
</ItemGroup>
223-
<ItemGroup Condition="'$(Platform)'=='x64'">
224-
<EverythingFiles Include="$(SolutionDir)\dnGREP.Everything\x64\Everything64.dll" />
225-
</ItemGroup>
226-
<ItemGroup Condition="'$(Platform)'=='x86'">
227-
<EverythingFiles Include="$(SolutionDir)\dnGREP.Everything\x86\Everything32.dll" />
228-
</ItemGroup>
229223
<ItemGroup>
230224
<OpenXmlPluginFiles Include="$(SolutionDir)\dnGREP.OpenXmlEngine\bin\$(Platform)\$(Configuration)\$(TargetFramework)\dnGREP.Engines.OpenXml.plugin" />
231225
<OpenXmlPluginFiles Include="$(SolutionDir)\dnGREP.OpenXmlEngine\bin\$(Platform)\$(Configuration)\$(TargetFramework)\dnGREP.Engines.OpenXml.dll" />
@@ -265,7 +259,6 @@
265259
</ItemGroup>
266260
<Target Name="CopyExtraFiles" AfterTargets="AfterBuild">
267261
<Copy SourceFiles="@(SevenZipFiles)" DestinationFolder="bin\$(Platform)\$(Configuration)\$(TargetFramework)" SkipUnchangedFiles="true" />
268-
<Copy SourceFiles="@(EverythingFiles)" DestinationFolder="bin\$(Platform)\$(Configuration)\$(TargetFramework)" SkipUnchangedFiles="true" />
269262
<Copy SourceFiles="@(OpenXmlPluginFiles)" DestinationFolder="bin\$(Platform)\$(Configuration)\$(TargetFramework)\Plugins\OpenXmlSearch" SkipUnchangedFiles="true" />
270263
<Copy SourceFiles="@(PDFPluginFiles)" DestinationFolder="bin\$(Platform)\$(Configuration)\$(TargetFramework)\Plugins\PdfSearch" SkipUnchangedFiles="true" />
271264
<Copy SourceFiles="@(XPDFFiles)" DestinationFolder="bin\$(Platform)\$(Configuration)\$(TargetFramework)\Plugins\PdfSearch\xpdf" SkipUnchangedFiles="true" />
@@ -275,7 +268,6 @@
275268
</Target>
276269
<Target Name="PublishExtraFiles" AfterTargets="AfterBuild" Condition="'$(Configuration)' == 'Release'">
277270
<Copy SourceFiles="@(SevenZipFiles)" DestinationFolder="$(SolutionDir)\publish\win-$(Platform)" />
278-
<Copy SourceFiles="@(EverythingFiles)" DestinationFolder="$(SolutionDir)\publish\win-$(Platform)" />
279271
<Copy SourceFiles="@(OpenXmlPluginFiles)" DestinationFolder="$(SolutionDir)\publish\win-$(Platform)\Plugins\OpenXmlSearch" />
280272
<Copy SourceFiles="@(PDFPluginFiles)" DestinationFolder="$(SolutionDir)\publish\win-$(Platform)\Plugins\PdfSearch" />
281273
<Copy SourceFiles="@(XPDFFiles)" DestinationFolder="$(SolutionDir)\publish\win-$(Platform)\Plugins\PdfSearch\xpdf" />

0 commit comments

Comments
 (0)