From 76ad87d4642e2e07e1fcbd35bf53e1ac0acbbe5a Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 7 May 2024 11:30:13 +0200 Subject: [PATCH] CMAKE: Do not strip lines when creating python resources --- cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake | 4 +++- src/Mod/BIM/Resources/create_qrc.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake b/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake index 146bd70949..6500b464ab 100644 --- a/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake +++ b/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake @@ -262,7 +262,9 @@ MACRO(PYSIDE_WRAP_RC outfiles) # we follow the tool command with in-place sed. ADD_CUSTOM_COMMAND(OUTPUT "${outfile}" COMMAND "${PYSIDE_RCC_EXECUTABLE}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}" - COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}" + # The line below sometimes catches unwanted lines too - but there is no date in the file + # anymore with Qt5 RCC, so commenting it out for now... + #COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}" MAIN_DEPENDENCY "${infile}" ) endif() diff --git a/src/Mod/BIM/Resources/create_qrc.py b/src/Mod/BIM/Resources/create_qrc.py index 9981492620..05c9a5c8e6 100755 --- a/src/Mod/BIM/Resources/create_qrc.py +++ b/src/Mod/BIM/Resources/create_qrc.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + import os txt = "\n \n" cdir = os.path.dirname(__file__)