Skip to content

Commit

Permalink
Bug report tool (#8633)
Browse files Browse the repository at this point in the history
* added diagnostic tool project

* Add copy to a temp folder, escape private info and zip it

* Added diagnostic tool to installer

* zip folder path as cmd argument

* renamed project to BugReportTool

* do not use precompile headers for release

* Added zip lib

* Added license

* Delete old zip source files

* Use fork version while PR is not merged

* fix spelling

* exclude deps folder from spell checking

* exclude only zip

* removed redundant configuration from zip project

* fix spelling

* Add error handling to implementation

* Added build of BugReportTool.sln to pipeline

* Delete redundant info from BugReportTool.vcxproj

* Deleted submodule

* Added submodule

* fix build

* Restore nuget packages for BugReportTool.sln on CI

* spelling fix

* Use SettingsAPI

* changed git submodule

* added new sensitive info

* Removed zip project

* use json.h, add date to zipfolder, handle zip is not created

* fix spelling

* delete bad_alloc catch

* add new sensative info

* report monitor info

* report windows version

* fix spelling

* delete platform specific configuration

* fix output
  • Loading branch information
mykhailopylyp authored Dec 22, 2020
1 parent 063e704 commit 321a722
Show file tree
Hide file tree
Showing 17 changed files with 624 additions and 88 deletions.
49 changes: 34 additions & 15 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ CDeclaration
cdpx
cdpxwin
CENTERALIGN
Cfg
cfg
Cfg
changecursor
Changemove
charset
Expand Down Expand Up @@ -317,8 +317,8 @@ constexpr
contentdialog
contentfiles
CONTEXTHELP
CONTEXTMENU
contextmenu
CONTEXTMENU
CONTEXTMENUHANDLER
CONTROLL
CONTROLPARENT
Expand Down Expand Up @@ -362,6 +362,7 @@ crutkas
CSearch
CSettings
csharp
CSIDL
csignal
cso
csproj
Expand Down Expand Up @@ -397,6 +398,7 @@ cxxopts
CYMK
CYSMICON
cz
cziplib
Dac
dacl
DARKBLUE
Expand All @@ -407,12 +409,13 @@ DARKRED
DARKTEAL
DARKYELLOW
Dataflows
Datavalue
DATAW
davidegiacometti
Dayof
Dbg
DBLEPSILON
DBLCLKS
DBLEPSILON
DCOM
dcomp
DComposition
Expand Down Expand Up @@ -653,14 +656,14 @@ ENU
enum
ENUMITEMS
EOAC
EOL
eol
EOL
epicgames
ERASEBKGND
EREOF
EResize
ERRORLEVEL
errorlevel
ERRORLEVEL
ERRORMESSAGE
ERRORTITLE
esize
Expand Down Expand Up @@ -710,6 +713,7 @@ fancyzones
FANCYZONESDRAWLAYOUTTEST
FANCYZONESEDITOR
Farbraum
FARPROC
Favicon
fbdc
fcharset
Expand Down Expand Up @@ -767,6 +771,7 @@ FULLNAME
fullscreen
func
fwlink
fwrite
fx
fxcop
gabime
Expand Down Expand Up @@ -860,8 +865,8 @@ HLSL
hmenu
hmodule
hmon
HMONITOR
hmonitor
HMONITOR
HOLDENTER
HOLDESC
homljgmgpmcbpjbnjpfijnhipfkiclkd
Expand Down Expand Up @@ -975,6 +980,7 @@ IInput
IInspectable
IIO
IItem
IJson
IList
ILogon
IMAGEHLP
Expand Down Expand Up @@ -1239,6 +1245,7 @@ LPNMHDR
LPNMHEADER
LPNMLISTVIEW
LPOLESTR
LPOSVERSIONINFOEXW
LPPOINT
lprc
LPRECT
Expand Down Expand Up @@ -1298,6 +1305,7 @@ MBUTTON
MBUTTONDBLCLK
MBUTTONDOWN
MBUTTONUP
mday
Mdb
MDICHILD
MDL
Expand Down Expand Up @@ -1325,6 +1333,7 @@ millis
mimetype
Minimizeallwindows
MINIMIZEBOX
miniz
MINMAXINFO
Miracast
mixin
Expand Down Expand Up @@ -1384,6 +1393,7 @@ msrc
mst
msvc
msvcp
msvs
MTND
Mul
multiline
Expand Down Expand Up @@ -1499,7 +1509,9 @@ npm
npmjs
npos
NResize
ntdll
NTFS
NTSTATUS
nuget
nullopt
nullptr
Expand Down Expand Up @@ -1552,6 +1564,7 @@ oss
ostr
ostream
ostringstream
OSVERSIONINFOEXW
osx
otating
ouicompat
Expand Down Expand Up @@ -1692,8 +1705,8 @@ propkey
propvarutil
Prt
prui
PRVPANE
prvpane
PRVPANE
psapi
PSECURITY
psfgao
Expand Down Expand Up @@ -1827,8 +1840,8 @@ roslyn
royvou
rpc
RRF
RSHIFT
rshift
RSHIFT
Rsp
rst
Rstrtmgr
Expand Down Expand Up @@ -1885,13 +1898,14 @@ Sekan
SENDCHANGE
sendinput
sendvirtualinput
sensative
serializationexception
serializer
serizalization
serverside
SETCONTEXT
SETCURSOR
setcursor
SETCURSOR
SETFOCUS
SETFOREGROUND
SETICON
Expand Down Expand Up @@ -1922,8 +1936,8 @@ SHELLDLL
shellex
SHELLEXECUTEINFO
SHELLEXECUTEINFOW
Shellscalingapi
shellscalingapi
Shellscalingapi
Shelveset
SHFILEINFO
SHGFI
Expand Down Expand Up @@ -1977,8 +1991,8 @@ sketchapp
SKIPDOTNETINSTALL
SKIPOWNPROCESS
sku
Skype
SKYBLUE
Skype
SLGP
Slideshow
sln
Expand Down Expand Up @@ -2101,8 +2115,8 @@ SYSDEADCHAR
SYSICONINDEX
SYSKEY
syskeydown
SYSKEYUP
syskeyup
SYSKEYUP
syslog
SYSMENU
systemd
Expand Down Expand Up @@ -2250,12 +2264,13 @@ uninstalling
uninstantiated
Uniq
uniquifier
Uniquifies
uniquifies
Uniquifies
unittests
unk
unknwn
UNLEN
unlicense
Unmap
UNORM
Unpublish
Expand Down Expand Up @@ -2361,8 +2376,8 @@ wcslen
wcsncmp
wcsnicmp
wdp
WDS
wds
WDS
wdupenv
weakme
webapp
Expand All @@ -2379,13 +2394,14 @@ Whichdoes
whitespaces
WIC
Wifi
wifstream
wih
wiki
wikipedia
wil
wildcards
WINAPI
winapi
WINAPI
winauto
wincolor
windef
Expand Down Expand Up @@ -2430,6 +2446,7 @@ wixproj
wixtoolset
WIXUI
WKSG
wmain
wmi
WMKEYDOWN
WMKEYUP
Expand All @@ -2454,6 +2471,7 @@ wox
wparam
wpf
wpr
wprintf
wprp
wregex
WResize
Expand Down Expand Up @@ -2522,6 +2540,7 @@ Zc
ZEROINIT
zh
ZIndex
zipfolder
zm
zom
zonable
Expand Down
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[submodule "deps/spdlog"]
path = deps/spdlog
url = https://github.com/gabime/spdlog.git

[submodule "deps/cxxopts"]
path = deps/cxxopts
url = https://github.com/jarro2783/cxxopts.git

[submodule "deps/expected-lite"]
path = deps/expected-lite
url = https://github.com/martinmoene/expected-lite.git
[submodule "deps/cziplib"]
path = deps/cziplib
url = https://github.com/kuba--/zip.git
19 changes: 19 additions & 0 deletions .pipelines/ci/templates/build-powertoys-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ steps:
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true

- task: NuGetCommand@2
displayName: Restore NuGet packages for BugReportTool.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: src\bug-report\BugReportTool\BugReportTool.sln
restoreDirectory: '$(Build.SourcesDirectory)\src\bug-report\BugReportTool\packages'

- task: VSBuild@1
displayName: 'Build BugReportTool.sln'
inputs:
solution: '**\BugReportTool.sln'
vsVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true

- task: NuGetCommand@2
displayName: Restore NuGet packages for PowerToysSetup.sln
inputs:
Expand Down
27 changes: 27 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,31 @@ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

### zip
**Source**: https://github.com/kuba--/zip

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>

1 change: 1 addition & 0 deletions deps/cziplib
Submodule cziplib added at f9e095
11 changes: 10 additions & 1 deletion installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
<Product Id="*"
<?define BugReportToolDir="$(var.RepoDir)src\bug-report\BugReportTool\x64\$(var.Configuration)\" ?>

<Product Id="*"
Name="PowerToys (Preview)"
Language="1033"
Version="$(var.Version)"
Expand Down Expand Up @@ -46,6 +48,7 @@
<ComponentGroupRef Id="CoreComponents" />
<ComponentGroupRef Id="ResourcesComponents" />
<ComponentGroupRef Id="LauncherComponents" />
<ComponentRef Id="BugReportTool"/>
</Feature>
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" />

Expand Down Expand Up @@ -205,6 +208,7 @@
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="PowerToys">
<Directory Id="SvgsInstallFolder" Name="svgs"/>
<Directory Id="BugReportToolFolder" Name="BugReportTool"/>
<Directory Id="ModulesInstallFolder" Name="modules">
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)" />
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)"/>
Expand Down Expand Up @@ -336,6 +340,11 @@
<?endforeach?>
</Component>
</DirectoryRef>
<DirectoryRef Id="BugReportToolFolder" FileSource="$(var.BugReportToolDir)">
<Component Id="BugReportTool" Guid="0F8E3E9F-2E86-4660-A3BF-AE4DD431B93C" Win64="yes">
<File Source="$(var.BugReportToolDir)BugReportTool.exe" />
</Component>
</DirectoryRef>
<DirectoryRef Id="SvgsInstallFolder" FileSource="$(var.BinX64Dir)svgs\">
<Component Id="PowerToysSvgs" Guid="7C4D4EED-9338-423D-992C-DCE02F3E2D35" Win64="yes">
<File Source="$(var.BinX64Dir)svgs\0.svg" />
Expand Down
Loading

1 comment on commit 321a722

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New misspellings found, please review:

  • eport
To accept these changes, run the following commands
perl -e '
my @expect_files=qw('".github/actions/spell-check/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"actionrunner aeed Bokmal btn commonmdflag contextmenu cpprestsdk fbdc lowlevelkb MAKELANGID msvs notificationsdll should've SKIPDOTNETINSTALL SNAPED uniquifies walkthrough WCF webcam wifstream wordpress XPath "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^($re)(?:$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spell-check/expect.txt";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"BOKMAL Btn CONTEXTMENU eport NOTIFICATIONSDLL Uniquifies Webcam xpath "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
git add .github/actions/spell-check || echo '... you want to ensure .github/actions/spell-check/expect.txt is added to your repository...'

Please sign in to comment.