zsims / hunt-and-peck

Simple vimium/vimperator style navigation for Windows applications based on the UI Automation framework.
593 stars 54 forks source link

Unable to Compile #10

Closed coltoneakins closed 7 years ago

coltoneakins commented 7 years ago

System Information

Microsoft Windows 7 Professional 6.1.7601 Service Pack 1 Build 7601 x64-based PC

Visual Studio Information

Microsoft Visual Studio Community 2017 Version 15.2 (26430.14) Release VisualStudio.15.Release/15.2.0+26430.14 Microsoft .NET Framework Version 4.6.01590

Installed Version: Community

Visual Basic 2017 00369-60000-00001-AA507 Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA507 Microsoft Visual C# 2017

Visual F# 4.1 00369-60000-00001-AA507 Microsoft Visual F# 4.1

Common Azure Tools 1.9 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

NuGet Package Manager 4.2.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Raw Compilation Output

` 1>------ Build started: Project: hap, Configuration: Debug Any CPU ------ 1>C:\Users\ceakins\VisualStudioCommunity\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2547,5): warning MSB3284: Cannot get the file path for type library "930299ce-9965-4dec-b0f4-a54848d4b667" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

1>C:\Users\ceakins\VisualStudioCommunity\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2547,5): warning MSB3284: Cannot get the file path for type library "6271895b-e67f-4dee-b68b-bf74ace07753" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(35,29,35,53): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_ObjectModelPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(36,29,36,52): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_AnnotationPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(37,29,37,47): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_TextPattern2Id'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(38,29,38,48): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_StylesPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(39,29,39,53): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_SpreadsheetPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(40,29,40,57): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_SpreadsheetItemPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(41,29,41,52): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_TransformPattern2Id'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(42,29,42,51): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_TextChildPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(43,29,43,46): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_DragPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(44,29,44,52): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_DropTargetPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(45,29,45,50): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_TextEditPatternId'

1>C:\Users\ceakins\hunt-and-peck-master\hunt-and-peck-master\src\hap\Services\UiAutomationPatternIds.cs(46,29,46,58): error CS0117: 'UIA_PatternIds' does not contain a definition for 'UIA_CustomNavigationPatternId' ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== `

Not sure if this helps, but the compilation was successful according to someone from ##csharp IRC on Freenode using VS 2015. Unable to obtain his/her system information, however.

zsims commented 7 years ago

Thanks for raising this. I'll take a look.

zsims commented 7 years ago

I've raised a branch that removes the COM reference you're missing, it shouldn't be needed. Not sure if it'll fix the other errors the PIA assemblies are generated with tlbimp at compile time.

If you have time, can you please try this branch: https://github.com/zsims/hunt-and-peck/tree/priv-ref . If not, no dramas :)

coltoneakins commented 7 years ago

Tried to build with the new branch; still unsuccessful (see compilation log below). However, I think it is safe to say that the problem lies somewhere with my setup (and not with this projects code--not to say it was ever in question). So, I am closing this issue.

""" Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_ObjectModelPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 35 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_AnnotationPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 36 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_TextPattern2Id' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 37 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_StylesPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 38 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_SpreadsheetPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 39 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_SpreadsheetItemPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 40 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_TransformPattern2Id' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 41 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_TextChildPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 42 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_DragPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 43 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_DropTargetPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 44 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_TextEditPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 45 Active Error CS0117 'UIA_PatternIds' does not contain a definition for 'UIA_CustomNavigationPatternId' hap C:\Users\ceakins\hunt-and-peck-priv-ref\hunt-and-peck-priv-ref\src\hap\Services\UiAutomationPatternIds.cs 46 Active Warning Cannot get the file path for type library "930299ce-9965-4dec-b0f4-a54848d4b667" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) hap
Warning The referenced component 'UIA' could not be found. hap
"""

zsims commented 7 years ago

No worries, thanks for trying it out -- much appreciated. UIA has certainly changed since Windows 7. I'll look at setting up a VM to have a poke.

extratype commented 7 years ago

Just remove those missing patterns to make it work. https://github.com/zsims/hunt-and-peck/blob/master/src/hap/Services/UiAutomationPatternIds.cs#L35 ~ https://github.com/zsims/hunt-and-peck/blob/master/src/hap/Services/UiAutomationPatternIds.cs#L46

coltoneakins commented 7 years ago

Deleted lines 35 through 46 which deleted the following patterns:

UIA_ObjectModelPatternId UIA_AnnotationPatternId UIA_TextPattern2Id UIA_StylesPatternId UIA_SpreadsheetPatternId UIA_SpreadsheetItemPatternId UIA_TransformPattern2Id UIA_TextChildPatternId UIA_DragPatternId UIA_DropTargetPatternId UIA_TextEditPatternId UIA_CustomNavigationPatternId

Build successful.

Thanks all for the help.