Skip to content

Commit c773fc0

Browse files
committed
Closes #155 - note on #156 - [ci] ensure that PkgInfo is created/present in macos app bundle
1 parent b1ed914 commit c773fc0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/build-ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,16 @@ jobs:
516516
exit 1
517517
fi
518518
519+
# Verify PkgInfo is present
520+
echo "🔎 Checking for PkgInfo in the app bundle..."
521+
if [[ -f "${{env.APP_NAME}}.app/PkgInfo" ]]; then
522+
echo "✅ PkgInfo exists."
523+
else
524+
echo "❌ PkgInfo is missing! Creating it now..."
525+
echo "APPL????" > "${{env.APP_NAME}}.app/PkgInfo"
526+
ls -l "${{env.APP_NAME}}.app/PkgInfo" # Verify it's created
527+
echo "✅ PkgInfo has been successfully created."
528+
fi
519529
520530
# Run macdeployqt to bundle the app
521531
echo "🚀 Running macdeployqt to create macOS bundle..."

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ elseif(APPLE AND NOT IOS)
231231
MACOSX_BUNDLE_ICON_FILE "socnetv.icns"
232232
)
233233

234+
# 🔧 Ensure PkgInfo is explicitly created in the app bundle
235+
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
236+
COMMAND echo -n "APPL????" > "${CMAKE_BINARY_DIR}/${TARGET_NAME}.app/PkgInfo"
237+
COMMENT "🔍 Ensuring PkgInfo exists in the macOS app bundle"
238+
)
234239

235240
# Install the main app bundle
236241
install(TARGETS ${TARGET_NAME}

0 commit comments

Comments
 (0)