summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/windowsstore/Install.cmake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cmake/scripts/windowsstore/Install.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/scripts/windowsstore/Install.cmake b/cmake/scripts/windowsstore/Install.cmake
new file mode 100644
index 0000000..a0522d3
--- /dev/null
+++ b/cmake/scripts/windowsstore/Install.cmake
@@ -0,0 +1,10 @@
+# Fix UWP addons security issue caused by empty __init__.py Python Lib files packaged with Kodi
+set(uwp_pythonlibinit_filepattern "${DEPENDS_PATH}/bin/Python/Lib/__init__.py")
+file(GLOB_RECURSE uwp_pythonlibinit_foundfiles "${uwp_pythonlibinit_filepattern}")
+foreach(uwp_pythonlibinit_file ${uwp_pythonlibinit_foundfiles})
+ file(SIZE "${uwp_pythonlibinit_file}" uwp_pythonlibinit_filesize)
+ if(${uwp_pythonlibinit_filesize} EQUAL 0)
+ message("Adding hash comment character in the following empty file: ${uwp_pythonlibinit_file}")
+ file(APPEND ${uwp_pythonlibinit_file} "#")
+ endif()
+endforeach()