Closed wkjarosz closed 7 months ago
Many thanks for your contribution!
Your PR was merged, but I had to do some modifications, so it was merged in another branch.
Summary of the changes I did:
At the moment, you can customize an application like this:
➜ hello_imgui_demodocking git:(master) ✗ tree ios/
ios/
├── Info.plist
└── icons/
└── Icon.png
➜ hello_imgui_demodocking git:(master) ✗ tree macos/
macos/
├── Info.plist
└── icon.icns
---- Note / possible future evolution ---
In the future, I hope it will be possible to only provide icon.png and icon.icns will be created from it by Cmake.
And the customization would be done like this:
➜ hello_imgui_demodocking git:(master) ✗ tree -F assets_docking
assets_docking/
├── app_settings/
│ ├── apple/
│ │ ├── Info.ios.plist
│ │ ├── Info.macos.plist
│ │ └── Info.plist
│ └── icon.png # this icon would be used for any platform (linux, windows, macOs, iOS, emscripten)
├── fonts/ # (it would have to be transformed into different formats)
It is now in the master branch
fixes #71
Some additional info:
hello_imgui_add_app
assumes that the plist file is inmacos/Info.plist
and the icon is inmacos/${HELLO_IMGUI_BUNDLE_ICON_FILE}
.${HELLO_IMGUI_BUNDLE_ICON_FILE}
defaults toicon.icns
instead of the empty string to make this work.ios
andmacos
subdirectories, perhaps it would make sense to introduce some variables so the parent project can informhello_imgui_add_app
where to find these. i didn't do this since it would require changes beyond the scope of #71, but perhaps this is something you can consider for the future.hello_imgui_bundle_assets_from_folder
for IOS/MACOS now puts things intoResources/assets/${asset_dir}
. This makes the asset/font loading work on macOS, but am not sure if its correct for IOS, and I've never dealt with IOS so can't test easily.glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES
hint entirely since for both bundles and non-bundles the glfw's default behavior should work fine.