diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-24 12:28:27 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-27 11:14:21 -0500 |
| commit | eb53852d7ae6838e54525eb57df1d8ce8a722f9b (patch) | |
| tree | 7fa05bd6df1bce2e20d87c5fbacc1c658dc000aa /src/libs/dutil/WixToolset.DUtil/logutil.cpp | |
| parent | 6ee12a64cb75097a238e60d4fd0ea542e8312214 (diff) | |
| download | wix-eb53852d7ae6838e54525eb57df1d8ce8a722f9b.tar.gz wix-eb53852d7ae6838e54525eb57df1d8ce8a722f9b.tar.bz2 wix-eb53852d7ae6838e54525eb57df1d8ce8a722f9b.zip | |
Add longPathAware to Burn manifest to support long paths.
Fixes 3455
Diffstat (limited to '')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/logutil.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/logutil.cpp b/src/libs/dutil/WixToolset.DUtil/logutil.cpp index 88a90d8c..3a130b4e 100644 --- a/src/libs/dutil/WixToolset.DUtil/logutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/logutil.cpp | |||
| @@ -684,9 +684,10 @@ LExit: | |||
| 684 | extern "C" HRESULT DAPI LogHeader() | 684 | extern "C" HRESULT DAPI LogHeader() |
| 685 | { | 685 | { |
| 686 | HRESULT hr = S_OK; | 686 | HRESULT hr = S_OK; |
| 687 | WCHAR wzComputerName[MAX_PATH]; | 687 | WCHAR wzComputerName[MAX_COMPUTERNAME_LENGTH + 1] = { }; |
| 688 | DWORD cchComputerName = countof(wzComputerName); | 688 | DWORD cchComputerName = countof(wzComputerName); |
| 689 | WCHAR wzPath[MAX_PATH]; | 689 | LPWSTR sczPath = NULL; |
| 690 | LPCWSTR wzPath = NULL; | ||
| 690 | DWORD dwMajorVersion = 0; | 691 | DWORD dwMajorVersion = 0; |
| 691 | DWORD dwMinorVersion = 0; | 692 | DWORD dwMinorVersion = 0; |
| 692 | LPCSTR szLevel = LOGUTIL_UNKNOWN; | 693 | LPCSTR szLevel = LOGUTIL_UNKNOWN; |
| @@ -695,12 +696,19 @@ extern "C" HRESULT DAPI LogHeader() | |||
| 695 | // | 696 | // |
| 696 | // get the interesting data | 697 | // get the interesting data |
| 697 | // | 698 | // |
| 698 | if (!::GetModuleFileNameW(NULL, wzPath, countof(wzPath))) | 699 | |
| 700 | hr = PathForCurrentProcess(&sczPath, NULL); | ||
| 701 | if (FAILED(hr)) | ||
| 702 | { | ||
| 703 | wzPath = L""; | ||
| 704 | } | ||
| 705 | else | ||
| 699 | { | 706 | { |
| 700 | memset(wzPath, 0, sizeof(wzPath)); | 707 | wzPath = sczPath; |
| 708 | |||
| 709 | hr = FileVersion(wzPath, &dwMajorVersion, &dwMinorVersion); | ||
| 701 | } | 710 | } |
| 702 | 711 | ||
| 703 | hr = FileVersion(wzPath, &dwMajorVersion, &dwMinorVersion); | ||
| 704 | if (FAILED(hr)) | 712 | if (FAILED(hr)) |
| 705 | { | 713 | { |
| 706 | dwMajorVersion = 0; | 714 | dwMajorVersion = 0; |
| @@ -743,6 +751,7 @@ extern "C" HRESULT DAPI LogHeader() | |||
| 743 | hr = S_OK; | 751 | hr = S_OK; |
| 744 | 752 | ||
| 745 | ReleaseStr(sczCurrentDateTime); | 753 | ReleaseStr(sczCurrentDateTime); |
| 754 | ReleaseStr(sczPath); | ||
| 746 | 755 | ||
| 747 | return hr; | 756 | return hr; |
| 748 | } | 757 | } |
