Commit Graph

1816 Commits

Author SHA1 Message Date
dmex 9467d5f646 Improve DPI handling, icon scaling, metrics (#2894) 2026-05-02 09:13:06 +10:00
dmex a6443d07c0 Remove global PhSystemDpi, PhSmallIconSize, PhLargeIconSize
Eliminate the main-window-DPI globals that bleed across dialogs on
secondary monitors. Window-aware code now passes its own DPI:

- Delete PhSystemDpi, PhSmallIconSize, PhLargeIconSize and
  PhGuiSupportUpdateSystemMetrics; remove the mainwnd.c invocation
  on WM_DPICHANGED.
- PhGetApplicationIcon and PhGetStockApplicationIcon now require a
  WindowDpi parameter; PhGetApplicationIconEx is folded into
  PhGetApplicationIcon. PhGetStockApplicationIcon keeps the shared
  icon contract via a 4-slot DPI-keyed cache so multiple monitors
  coexist without thrash.
- All ~50 callers updated to source DPI from their owning window
  (PhGetWindowDpi for hwnd-bearing call sites; PhGetTaskbarDpi for
  the tray icon; PhGetSystemDpi for window-class registration and
  parentless task dialogs).
- PhSetApplicationWindowIcon now thin-wraps PhSetApplicationWindowIconEx
  with PhGetWindowDpi(hwnd), so the 63 legacy call sites get
  per-window-DPI icons without per-site edits.
- srvprv.c and mainwnd.c read PhProcessImageListWindowDpi instead
  of PhSystemDpi/PhSmallIconSize.X for service and process icons.
2026-04-26 22:49:05 +10:00
dmex 9c2fac0b5a CustomBuildTool: Optimize hashing, Add support for third-party update check
Major refactor and feature additions across CustomBuildTool:

- Replace synchronous JsonSerializer.Deserialize usages with JsonSerializer.DeserializeAsync (passing CancellationToken) for HTTP/KeyVault/NuGet/GitHub responses to avoid blocking and improve cancellation handling.
- Optimize ECDSA hashing: use ReadOnlySpan, static SHA{256,384,512}.HashData fast-paths and allocation-free IncrementalHash fallback; consolidate incremental helper.
- Add BuildThirdParty.cs: new utility to verify vendored third-party library versions against GitHub releases, with various helpers (version parsing, GitHub queries, regexes).
- Add CLI command -check-thirdparty and register it in Program.cs to run version checks.
- Harden BuildAzure.GetAzureADToken: build form body as bytes, zero secret memory, and send as ByteArrayContent.
- Revise Build logic and file handling: normalize Path.Join usage, normalize path separators in MSIX mapping, improve BuildChecksumsFile collection logic, validate exe presence before export checks, and dedupe file lists before checksum computation.
- Update BuildHttpClient.CreateHttpClient settings and use DeserializeAsync in SendMessage; adjust MaxAutomaticRedirections removal.
- Misc fixes: environment block parsing loop fix, safer registry value handling, reorder search-path logic, add Regex Using and GeneratedRegex helpers, add CA1416 platform-suppression, and small csproj cleanup.

These changes improve async/cancellation behavior, memory safety, hashing performance, and add a new third-party checking feature.
2026-04-26 13:57:20 +10:00
dmex 3a2cf31e69 thirdparty: Update miniz and maxminddb 2026-04-26 13:50:54 +10:00
dmex e8d344eb6e maxminddb 1.13.3 2026-04-26 06:20:39 +10:00
dmex aad6e1433d Update clrtableimports.cpp 2026-04-23 13:54:43 +10:00
dmex e6c80e78a7 Update dia3.h 2026-04-23 13:54:20 +10:00
dmex ab1d3e3206 peview: add null checks and fix resource releases 2026-04-23 07:38:23 +10:00
dmex e3972f1495 phlib-test: Update to latest SDK 2026-04-18 23:59:02 +10:00
dmex fedc43b6a1 Fix typos and improve HTTP2 handling 2026-04-17 14:40:13 +10:00
dmex ad45c616e4 Fix error checking 2026-04-17 14:33:07 +10:00
dmex 05b46cfb6a Opt out dotnet telemetry; Add CLI aliases 2026-04-17 11:31:55 +10:00
Johnny Shaw 8325c84a34 cbt disable dyndata session key check 2026-04-16 19:02:47 -06:00
Johnny Shaw b8fc422953 cbt fix dyndata command 2026-04-16 18:59:40 -06:00
dmex 8526c189d1 CustomBuildTool: Add System.CommandLine support and tab completion 2026-04-17 03:58:37 +10:00
dmex d2765ce25e Add phnt.vcxitems and import into projects
Add phnt.vcxitems as a Shared Items project that centralizes PHNT headers and include directory. Import the new phnt.vcxitems and remove hardcoded phnt include paths. Also add the phnt project entry to the .sln and .slnx, and clean up an extraneous suffix from the VisualStudioVersion line in the solution file.
2026-04-13 15:42:31 +10:00
dmex 1394fefbed Remove legacy compatibility hack (3039832f2e) 2026-04-12 12:01:38 +10:00
dmex 7ff04762e2 Fix bounds, safety checks, and sort types
- Add SysInfoMinimumGraphHeight and SysInfoScrollEnabled settings.
- Remove redundant TreeNew_NodesStructured calls to avoid extra re-structuring.
- Fix off-by-one checks on hybridProcessorTypeList (use >=).
- Add null/empty checks before indexing directory lists in CLR metadata handling.
- Use PhShowStatusHR and correct failure logic when CLR table enumeration fails.
- Replace mutable PVOID sortFunctions arrays with CONST _CoreCrtSecureSearchSortCompareFunction and use the correct function pointer type for sortFunction in several peview tree callbacks.
- Replace SetWindowLongPtr reset with PhSetWindowProcedure for prop sheet cleanup.
- Change dwCountElems type to ULONG in pdb printing.
2026-04-11 00:57:41 +10:00
dmex 6ef5cfcef0 Update util.c 2026-04-08 14:44:20 +10:00
dmex d1708bc4b5 Update Build.cs 2026-04-08 10:24:51 +10:00
dmex 77b60a8138 Bump HTTP version to 3.0 for a release request, tidy MSIX packaging steps, and refactor CMake build
Add routines to download GitHub IP ranges and Azure service tags and return address prefixes Bump HTTP version to 3.0 for a release request, tidy MSIX packaging steps, and update author year.
2026-04-08 10:24:41 +10:00
dmex 3095f6d554 CustomSetupTool: Improve handling and clean up installer/update 2026-04-08 10:18:18 +10:00
dmex 6300cb44b2 Rename types 2026-04-08 10:13:59 +10:00
dmex e72e027368 Update CustomBuildTool.csproj 2026-04-04 16:47:57 +11:00
dmex 0cc728c593 Update Program.cs 2026-04-04 16:47:56 +11:00
dmex 49c84cae74 peview: pretty print manifest 2026-04-04 12:47:24 +11:00
dmex 282d5d01f5 Update clrtableimports.cpp 2026-04-03 23:27:55 +11:00
dmex b5f2f81220 Update strings.c 2026-04-01 13:18:23 +11:00
dmex 34016e27d9 Apply SAL annotations fixes and add annotations 2026-04-01 12:11:37 +11:00
dmex 72e4ee5207 Fix pointer casts and Windows strncasecmp macro
Add explicit (char**) casts for end-pointer arguments to strtod/strtoull/vasprintf to avoid incompatible pointer-type warnings and ensure correct behavior across compilers. Change the strncasecmp fallback to detect _WIN32 (covering MSVC and MinGW) and update the comment.
2026-03-31 12:40:45 +11:00
Copilot 536c5c5a2b Fix potential index out of bounds exception in Zip.cs (#2866) 2026-03-29 18:12:40 +11:00
dmex 364c33c410 CustomBuildTool: Update to latest SDK 2026-03-29 04:13:24 +11:00
dmex 49a3e9ea1a Update util.c 2026-03-25 05:36:31 +11:00
dmex 5ac8b564c7 Update expprp.c 2026-03-25 05:35:49 +11:00
dmex 263414ca33 Update cfgprp.c 2026-03-25 05:35:44 +11:00
dmex 6f0c75c3d5 peview: Add PDB symbol tree 2026-03-22 22:52:44 +11:00
dmex 3a6e971277 CustomBuildTool: Fix nuget warning 2026-03-22 12:20:21 +11:00
dmex 68604bf4b4 BuildTools: Add initial nuget versioning 2026-03-22 11:41:30 +11:00
dmex bae2ca3b41 Update comments and tidy up 2026-03-22 11:31:16 +11:00
Johnny Shaw 363b3dd152 cbt fix build warnings 2026-03-14 08:08:00 -06:00
dmex fab60971d5 Update printbuf.c 2026-03-14 16:42:49 +11:00
dmex ffd18e8d65 Fix cmake, build tools 2026-03-14 16:27:43 +11:00
dmex 1b49e19ec4 BuildTools: Update to latest SDK 2026-03-14 15:37:27 +11:00
dmex e2d683d8f9 Fix utf-8 issue with json-c when strict-json enabled 2026-03-14 11:00:28 +11:00
dmex fd1f6d9077 Update plugin build from using sdk copies of phnt headers to the actual phnt directory 2026-03-13 02:33:55 +11:00
dmex 2ccde72102 Add Windows SDK/EWDK fallback for build scripts 2026-03-07 01:27:07 +11:00
dmex 0e270a053a Improve parameter name, type-safety, and SAL annotation consistency 2026-03-07 01:24:03 +11:00
dmex 516ddd25cd Update main.c 2026-03-02 05:26:55 +11:00
dmex 2b3e1b6eca CustomSetupTool: Add workaround for missing LocalDumps key 2026-03-02 05:26:55 +11:00
dmex 0cf5df3b6b Add extra relocations to PvEnumerateDynamicRelocationEntries 2026-02-26 12:47:50 +11:00