armory3d / armsdk

Single-clone Armory SDK
38 stars 30 forks source link

Add utility to print detailed version information to the console #56

Closed MoritzBrueckner closed 1 year ago

MoritzBrueckner commented 1 year ago

When users report issues there currently is no easy way of getting important information about the used version and possible changes made to the SDK, so this PR adds a button to the addon preferences for printing this information to the console.

For example, the output may look like this:

Testing if git is working...
Git test succeeded.
==============================
| SDK: Current commit        |
==============================
  main               1a9f666 Update submodules
* print-version-info c72cfe9 Add utility to print detailed version information to the console
==============================
| Submodules: Current commit |
==============================
 bd1b7dee1dbf76b22c056768297669ffe707949c Kha (flash_is_ugly-392-gbd1b7dee)
 de8f5ea2926c7f43600cfbc1cb61130fb87b3169 Kha/Backends/Kinc-hxcpp/khacpp (remotes/origin/main)
 a164418c98b822f7a4222d7549f9917f1cd34f03 Kha/Kinc (heads/main)
 bc82de155473e989c68136194358c4787d85bb49 Kha/Kinc/Tools/freebsd_x64 (krafix_73be85e68d667408c05a928b1327e76e7b863b98-25-gbc82de1)
 d1ac847eb7fdc3fdddea4c101f9b7625f0080434 Kha/Kinc/Tools/linux_arm (krafix_73be85e68d667408c05a928b1327e76e7b863b98-26-gd1ac847)
 718e7330bea9156a1fd603dc2e0da82df1bc268a Kha/Kinc/Tools/linux_arm64 (krafix_73be85e68d667408c05a928b1327e76e7b863b98-25-g718e733)
 f629e45a39c9a508690e9f9a32118f1985ce9ab7 Kha/Kinc/Tools/linux_x64 (krafix_73be85e68d667408c05a928b1327e76e7b863b98-33-gf629e45)
 b2b5303b914c9431df5046e886565a4d0c4e36a8 Kha/Kinc/Tools/macos (krafix_73be85e68d667408c05a928b1327e76e7b863b98-36-gb2b5303)
+8f812163844b8dde52758ecbaf01aa15ef6dbcd0 Kha/Kinc/Tools/windows_x64 (krafix_73be85e68d667408c05a928b1327e76e7b863b98-26-g8f81216)
 bcc8e2ea2c30a2f97c12cd7697ef6158b9de8f6a Kha/Tools/freebsd_x64 (haxe_22ccc57cebff9945e94ea42e8b33bd6a4325e3e7)
 ba8765ec3266603c1aa6a9d2d7f704d9614a941a Kha/Tools/khamake (remotes/Kode/main-7-gba8765e)
 e1f80ceb0bd377ac1130ea5d6d10ec2018e3e9e7 Kha/Tools/linux_arm (haxe_22ccc57cebff9945e94ea42e8b33bd6a4325e3e7)
 90f0e0717f08ff5bd7883ccd55cb414b192efd68 Kha/Tools/linux_arm64 (haxe_22ccc57cebff9945e94ea42e8b33bd6a4325e3e7)
 61a4aa98d349895d1e36b879edff9a5472c162f6 Kha/Tools/linux_x64 (haxe_22ccc57cebff9945e94ea42e8b33bd6a4325e3e7)
 459700accdeda95ed9555b005ecb36ae809c6eff Kha/Tools/macos (haxe_22ccc57cebff9945e94ea42e8b33bd6a4325e3e7)
 82dc965e9294d66f37ffcd2af3f18be03852d2c6 Kha/Tools/windows_x64 (heads/main)
 1a6cf9bbde71efb922356bacdbc89ebc38cf1747 Krom (heads/main)
+6ad27ceee6f8ab209b67c7bada8f6af204a1499d armory (21.06-931-g6ad27ceee)
 827d77dcec12bd70ee05032199300f2ae21194e0 iron (21.06-162-g827d77d)
 947dd3c6d15052734676656bd6d670555f03d568 lib/armory_tools (21.06-15-g947dd3c)
 7f4fea173803f4cdb0b5a12f96f3522e1bdf0cdd lib/haxebullet (20.12-2-g7f4fea1)
 1d5581e0e08fee8586f004a51eab265ae9cbe711 lib/haxerecast (19.12-2-g1d5581e)
 56b10bbf2c4189074dc1f5bcdefa0e55fd3d71ff lib/zui (21.06-70-g56b10bb)
 dd3f8981c42139707f6950ee6a6c66517ed0ed91 nodejs (heads/master)
==============================
| SDK: Modified files        |
==============================
 m Kha
 ? Krom
 M armory
 M armory.py
 ? lib/armory_tools
 m lib/haxebullet
?? .vscode/
?? Pipfile
?? Pipfile.lock
?? api/make.bat
==============================
| Submodules: Modified files |
==============================
Entering 'Kha'
 m Kinc
Entering 'Kha/Backends/Kinc-hxcpp/khacpp'
Entering 'Kha/Kinc'
 M Tools/windows_x64
Entering 'Kha/Kinc/Tools/freebsd_x64'
Entering 'Kha/Kinc/Tools/linux_arm'
Entering 'Kha/Kinc/Tools/linux_arm64'
Entering 'Kha/Kinc/Tools/linux_x64'
Entering 'Kha/Kinc/Tools/macos'
Entering 'Kha/Kinc/Tools/windows_x64'
 M kraffiti.exe
?? kraffiti_old.exe
Entering 'Kha/Tools/freebsd_x64'
Entering 'Kha/Tools/khamake'
Entering 'Kha/Tools/linux_arm'
Entering 'Kha/Tools/linux_arm64'
Entering 'Kha/Tools/linux_x64'
Entering 'Kha/Tools/macos'
Entering 'Kha/Tools/windows_x64'
Entering 'Krom'
?? kinc.dmp
?? stderr.txt
Entering 'armory'
 M Shaders/bloom_pass/bloom_pass.json
 M Sources/armory/renderpath/RenderPathDeferred.hx
 M blender/arm/make.py
 M blender/arm/make_renderpath.py
?? Shaders/bloom_pass/bloom.comp.glsl
?? Shaders/bloom_pass/downsample_pass.frag.glsl
?? Shaders/bloom_pass/upsample_pass.frag.glsl
?? Shaders/std/resample.glsl
?? Sources/armory/renderpath/Downsampler.hx
?? Sources/armory/renderpath/Upsampler.hx
Entering 'iron'
Entering 'lib/armory_tools'
?? mkdocs/make_reference.bat
Entering 'lib/haxebullet'
 M Sources/bullet/Bt.hx
Entering 'lib/haxerecast'
Entering 'lib/zui'
Entering 'nodejs'
Done.

Since there is a new button which didn't really fit into the current UI, I slightly changed it by moving the "Help" button somewhere else, I think it looks a bit cleaner now but there's still room for improvement:

grafik

luboslenco commented 1 year ago

Nice!

QuantumCoderQC commented 1 year ago

@ MoritzBrueckner Great work! This is a much needed feature : )