← All tasks
cpphorsicq/DIE-engine #186Not a task: not reproduced

macos bundle is generated with empty name, version, and icon metadata

envgap__horsicq__DIE-engine-186

01 / FAILURE SIGNATURE

As reported upstream

i could not find a dedicated issue or pr for the blank fields. there is one earlier symptom in [this #125 comment](https://github.com/horsicq/Detect-It-Easy/issues/125#issuecomment-2813263452), where the macos crash report shows:
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
fbb95127cea59c6cbb76ab0e332259fe6730aa47
Manifest
src/gui/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

horsicq/DIE-engine #186 · read the original issue
hey, after applying only the three separate compile fixes needed to reach packaging, the relevant die-engine cmake and plist sources were still unmodified. both die.app and diel.app were then produced with empty primary bundle metadata.

the generated plist contains empty values for:

- CFBundleIconFile
- CFBundleName
- CFBundleShortVersionString
- CFBundleVersion

both main.icns and lite.icns are already copied into their respective Contents/Resources directories, but CFBundleIconFile is empty in both generated plists, so neither bundle references its icon.

the current [gui cmake target](https://github.com/horsicq/DIE-engine/blob/7cf0ddc3611e0fa7d3fe6b9486f1457884542b6c/src/gui/CMakeLists.txt#L74-L90) sets MACOSX_BUNDLE, the identifier, and OUTPUT_NAME, but it does not set the normal cmake bundle name/version/icon properties.

there is an existing [Info.plist.in](https://github.com/horsicq/DIE-engine/blob/7cf0ddc3611e0fa7d3fe6b9486f1457884542b6c/res/macos/Info.plist.in), but enabling it unchanged would also be wrong because it writes CFBundleExecutable as DetectItEasy while the produced executable is named die.

i could not find a dedicated issue or pr for the blank fields. there is one earlier symptom in [this #125 comment](https://github.com/horsicq/Detect-It-Easy/issues/125#issuecomment-2813263452), where the macos crash report shows:

~~~text
Identifier: com.yourcompany.DiE
Version: ???
~~~

but that comment does not diagnose the cmake metadata problem.

i think the fix is to set the per-target cmake bundle properties for both gui variants, including:

- MACOSX_BUNDLE_BUNDLE_NAME
- MACOSX_BUNDLE_SHORT_VERSION_STRING
- MACOSX_BUNDLE_BUNDLE_VERSION
- MACOSX_BUNDLE_ICON_FILE

both icons can remain marked with MACOSX_PACKAGE_LOCATION Resources. the missing part is setting MACOSX_BUNDLE_ICON_FILE to main.icns for die and lite.icns for diel. if a custom template is needed, CFBundleExecutable should come from MACOSX_BUNDLE_EXECUTABLE_NAME rather than a separate project-name variable.

relevant cmake documentation:

- [MACOSX_BUNDLE_INFO_PLIST](https://cmake.org/cmake/help/latest/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html)
- [MACOSX_PACKAGE_LOCATION](https://cmake.org/cmake/help/latest/prop_sf/MACOSX_PACKAGE_LOCATION.html)

it would also be useful for the artifact job to assert that the name, identifier, short version, build version, and icon field are all non-empty before packaging.

thanks.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]