Skip to content

Commit f51c5e0

Browse files
committed
attempt windows fix
1 parent 9c92842 commit f51c5e0

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

decoder_modules/ch_tetra_demodulator/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ if (NOT EXISTS "${ETSI_CODEC_MARKER}")
4545
endif ()
4646
find_program(ETSI_POWERSHELL_PROGRAM powershell)
4747
if (ETSI_POWERSHELL_PROGRAM)
48+
message("Before lowercasing:")
49+
execute_process(
50+
COMMAND "${ETSI_POWERSHELL_PROGRAM}" -NoProfile -ExecutionPolicy Bypass -Command
51+
"Get-ChildItem -LiteralPath '${ETSI_CODEC_DIR}' -Recurse | ForEach-Object { $_.FullName }"
52+
)
4853
execute_process(
4954
COMMAND "${ETSI_POWERSHELL_PROGRAM}" -NoProfile -ExecutionPolicy Bypass -Command
5055
"$root='${ETSI_CODEC_DIR}'; Get-ChildItem -LiteralPath $root -Recurse | Sort-Object FullName -Descending | ForEach-Object { $target=$_.FullName.ToLower(); if ($_.FullName -ne $target) { $tmp=$_.FullName + '.tmp_lowercase'; Rename-Item -LiteralPath $_.FullName -NewName $tmp -Force; Rename-Item -LiteralPath $tmp -NewName $target -Force } }"
@@ -53,6 +58,7 @@ if (NOT EXISTS "${ETSI_CODEC_MARKER}")
5358
if (NOT ETSI_LOWER_RESULT EQUAL 0)
5459
message(FATAL_ERROR "Failed to normalize ETSI codec filenames to lowercase.")
5560
endif ()
61+
message("After lowercasing:")
5662
endif ()
5763
else ()
5864
find_program(ETSI_UNZIP_PROGRAM unzip)
@@ -68,7 +74,7 @@ if (NOT EXISTS "${ETSI_CODEC_MARKER}")
6874
message(FATAL_ERROR "Failed to unzip ETSI codec archive.")
6975
endif ()
7076
endif ()
71-
message("Listing ETSI codec files (for case/structure diagnostics).")
77+
message("Final listing ETSI codec files (for case/structure diagnostics).")
7278
if (WIN32)
7379
if (ETSI_POWERSHELL_PROGRAM)
7480
execute_process(
@@ -94,6 +100,11 @@ if (NOT EXISTS "${ETSI_CODEC_MARKER}")
94100
COMMAND "${CMAKE_COMMAND}" -E rename "${ETSI_CODEC_DIR}/C-CODE" "${ETSI_CODEC_DIR}/c-code"
95101
)
96102
endif ()
103+
if (EXISTS "${ETSI_CODEC_DIR}/AMR-Code")
104+
execute_process(
105+
COMMAND "${CMAKE_COMMAND}" -E rename "${ETSI_CODEC_DIR}/AMR-Code" "${ETSI_CODEC_DIR}/amr-code"
106+
)
107+
endif ()
97108
file(STRINGS "${ETSI_CODEC_PATCH_DIR}/series" ETSI_PATCHES)
98109
if (EXISTS "${ETSI_CODEC_DIR}/etsi")
99110
set(ETSI_PATCH_STRIP "-p0")

0 commit comments

Comments
 (0)