Skip to content

Commit 595b9f8

Browse files
committed
Bugfixes and sorted output
1 parent 1b32434 commit 595b9f8

14 files changed

Lines changed: 355 additions & 228 deletions

PSEverything.sln

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.31101.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27428.2011
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSEverything", "PSEverything\PSEverything.csproj", "{D488ED8A-1B48-40F9-A4C0-4B82C9B8D945}"
77
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSEverythingTests", "Tests\PSEverythingTests\PSEverythingTests.csproj", "{C66B6A58-A206-4A9C-8686-4B06DFB9B59B}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
@@ -15,8 +17,15 @@ Global
1517
{D488ED8A-1B48-40F9-A4C0-4B82C9B8D945}.Debug|Any CPU.Build.0 = Debug|Any CPU
1618
{D488ED8A-1B48-40F9-A4C0-4B82C9B8D945}.Release|Any CPU.ActiveCfg = Release|Any CPU
1719
{D488ED8A-1B48-40F9-A4C0-4B82C9B8D945}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{C66B6A58-A206-4A9C-8686-4B06DFB9B59B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{C66B6A58-A206-4A9C-8686-4B06DFB9B59B}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{C66B6A58-A206-4A9C-8686-4B06DFB9B59B}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{C66B6A58-A206-4A9C-8686-4B06DFB9B59B}.Release|Any CPU.Build.0 = Release|Any CPU
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE
2127
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {C3F1398B-4B8A-434F-85B0-7FAF1FE4940F}
30+
EndGlobalSection
2231
EndGlobal

PSEverything/Everything.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public static void SetRegEx(bool value)
3636
if (Is64Bit)
3737
NativeMethods64.Everything_SetRegex(value);
3838
else
39-
NativeMethods32.Everything_SetRegex(value);
40-
39+
NativeMethods32.Everything_SetRegex(value);
40+
4141
}
4242

4343
public static void SetMatchCase(bool value)
@@ -91,7 +91,7 @@ public static void SortResultsByPath()
9191

9292
public static void Query(bool wait)
9393
{
94-
var res = Is64Bit ? NativeMethods64.Everything_QueryW(wait) : NativeMethods32.Everything_QueryW(wait);
94+
var res = Is64Bit ? NativeMethods64.Everything_QueryW(wait) : NativeMethods32.Everything_QueryW(wait);
9595
if (!res)
9696
{
9797
var err = GetLastError();
@@ -125,16 +125,16 @@ public static string GetFullPathName(int index, StringBuilder buf)
125125
NativeMethods64.Everything_GetResultFullPathNameW(index, buf, buf.Capacity);
126126
else
127127
NativeMethods32.Everything_GetResultFullPathNameW(index, buf, buf.Capacity);
128-
128+
129129
return buf.ToString();
130130
}
131131

132132
public static void Cleanup()
133133
{
134134
if (Is64Bit)
135-
NativeMethods64.Everything_Cleanup();
135+
NativeMethods64.Everything_CleanUp();
136136
else
137-
NativeMethods32.Everything_Cleanup();
137+
NativeMethods32.Everything_CleanUp();
138138
}
139139

140140
public static string[] GetAllResults(int count)

PSEverything/NativeMethods32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ internal class NativeMethods32
9292
public static extern void Everything_Reset();
9393

9494
[DllImport(Everything32Dll)]
95-
public static extern void Everything_Cleanup();
95+
public static extern void Everything_CleanUp();
9696
}
9797
}

PSEverything/NativeMethods64.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ internal class NativeMethods64
4848

4949
[DllImport(Everything64Dll)]
5050
public static extern string Everything_GetSearchW();
51-
51+
5252
[DllImport(Everything64Dll)]
5353
public static extern int Everything_GetLastError();
5454

@@ -92,6 +92,6 @@ internal class NativeMethods64
9292
public static extern void Everything_Reset();
9393

9494
[DllImport(Everything64Dll)]
95-
public static extern void Everything_Cleanup ();
95+
public static extern void Everything_CleanUp ();
9696
}
9797
}

PSEverything/PSEverything.csproj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,26 @@
6868
<Link>LICENSE</Link>
6969
</Content>
7070
</ItemGroup>
71+
<ItemGroup>
72+
<Content Include="dll\Everything*.dll">
73+
<Link>%(Filename)%(Extension)</Link>
74+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
75+
</Content>
76+
</ItemGroup>
7177
<ItemGroup>
7278
<None Include="packages.config" />
7379
</ItemGroup>
7480
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
75-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
81+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7682
Other similar extension points exist, see Microsoft.Common.targets.
7783
<Target Name="BeforeBuild">
7884
</Target>
79-
85+
8086
-->
8187
<Target Name="AfterBuild">
8288
<ItemGroup>
8389
<ModuleFiles Include="$(TargetPath)" />
8490
<ModuleFiles Include="@(Content)" />
85-
<ModuleFiles Include="dll\Everything*.dll" />
8691
</ItemGroup>
8792
<PropertyGroup>
8893
<ModuleDir>$(TargetDir)\PSEverything</ModuleDir>

PSEverything/PSEverything.psd1

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'PSEverything.dll'
1313

1414
# Version number of this module.
15-
ModuleVersion = '2.2.2'
15+
ModuleVersion = '2.3.0'
1616

1717
# ID used to uniquely identify this module
1818
GUID = 'f262ec02-4a88-49e5-94da-e25aab9cbf7a'
@@ -32,37 +32,9 @@
3232
# Minimum version of the Windows PowerShell engine required by this module
3333
PowerShellVersion = '5.0.0'
3434

35-
# Name of the Windows PowerShell host required by this module
36-
# PowerShellHostName = ''
37-
38-
# Minimum version of the Windows PowerShell host required by this module
39-
# PowerShellHostVersion = ''
40-
4135
# Minimum version of Microsoft .NET Framework required by this module
4236
DotNetFrameworkVersion = '4.5'
4337

44-
# Minimum version of the common language runtime (CLR) required by this module
45-
# CLRVersion = ''
46-
47-
# Processor architecture (None, X86, Amd64) required by this module
48-
# ProcessorArchitecture = ''
49-
50-
# Modules that must be imported into the global environment prior to importing this module
51-
# RequiredModules = @()
52-
53-
# Assemblies that must be loaded prior to importing this module
54-
# RequiredAssemblies = @()
55-
56-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
57-
# ScriptsToProcess = @()
58-
59-
# Type files (.ps1xml) to be loaded when importing this module
60-
# TypesToProcess = @()
61-
62-
# Format files (.ps1xml) to be loaded when importing this module
63-
# FormatsToProcess = @()
64-
65-
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
6638

6739
# Functions to export from this module
6840
FunctionsToExport = ''
@@ -76,12 +48,6 @@
7648
# Aliases to export from this module
7749
AliasesToExport = 'se', 'sles'
7850

79-
# DSC resources to export from this module
80-
# DscResourcesToExport = @()
81-
82-
# List of all modules packaged with this module
83-
# ModuleList = @()
84-
8551
# List of all files packaged with this module
8652
FileList = 'Everything32.dll', 'Everything64.dll', 'LICENSE', 'PSEverything.dll', 'PSEverything.dll-Help.xml', 'PSEverything.psd1'
8753

@@ -99,35 +65,26 @@
9965
# A URL to the main website for this project.
10066
ProjectUri = 'https://github.com/powercode/PSEverything'
10167

102-
# A URL to an icon representing this module.
103-
# IconUri = ''
104-
10568
# ReleaseNotes of this module
10669
ReleaseNotes = @'
70+
2.3: Bug fixes. Sorted output.
10771
2.1: Upgrading to SDK matching 1.4.1.809b - Fixing hang when calling from Eleveated powershell
10872
to Everything.
109-
Now works with both eleveated and non-elevated processes as long as Everything is running as admin.
73+
Now works with both eleveated and non-elevated processes as long as Everything is running as admin.
11074
2.0:
11175
Implements tabcompletion.
11276
Quoting filter paths
11377
Requires PowerShell 5.0 or greater
11478
1.3.3:
115-
Really fixing issue where an error was written in Select-EverythingString when Search-Everything did not return any results
79+
Really fixing issue where an error was written in Select-EverythingString when Search-Everything did not return any results
11680
1.3.2:
117-
Fixing issue where an error was written in Select-EverythingString when Search-Everything did not return any results
81+
Fixing issue where an error was written in Select-EverythingString when Search-Everything did not return any results
11882
1.3.1:
11983
Bug fix for -Filter that didn't work in combination with non-global searches.
12084
'@
12185

12286
} # End of PSData hashtable
12387

12488
} # End of PrivateData hashtable
125-
126-
# HelpInfo URI of this module
127-
# HelpInfoURI = ''
128-
129-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
130-
# DefaultCommandPrefix = ''
131-
13289
}
13390

PSEverything/SearchEverythingCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ protected override void ProcessRecord()
235235
Everything.SetMatchCase(CaseSensitive);
236236
Everything.SetMatchWholeWord(MatchWholeWord);
237237
Everything.SetRegEx(!String.IsNullOrEmpty(RegularExpression));
238-
Everything.SortResultsByPath();
239238

240239
ulong skip = PagingParameters.Skip;
241240
if (skip > int.MaxValue)
@@ -267,9 +266,9 @@ protected override void ProcessRecord()
267266
WriteDebug("Search-Everything search pattern:" + searchPattern);
268267
Everything.SetSearch(searchPattern);
269268

270-
try {
269+
try {
271270
Everything.Query(true);
272-
271+
Everything.SortResultsByPath();
273272
int resCount = Everything.GetTotalNumberOfResults();
274273
if (PagingParameters.IncludeTotalCount)
275274
{

0 commit comments

Comments
 (0)