diff options
| author | crueter <crueter@eden-emu.dev> | 2026-03-26 07:59:53 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-03-26 07:59:53 +0100 |
| commit | 93472023e22a2b98175979643ebcd498a1f4308f (patch) | |
| tree | 305891f4c4cf558cbc36b784ed983e5f41e5373a | |
| parent | 9cb700165634a271437abed723a53888eeb6be9c (diff) | |
[cmake] Fix macOS frameworks, and icon set usage (#3782)
- The Xcode generator /mandates/ that you pass in the `.icon` directory
into the build system, where it can then compose the asset itself.
- Assets.car and eden.icns were improperly handled; they are now
automatically generated and should properly be applied as needed. I
will need someone on Tahoe to confirm, however, as I am on Sequoia.
- Added some missing frameworks, ported from the KosmicKrisp branch.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3782
| -rwxr-xr-x | .ci/actool.sh | 22 | ||||
| -rw-r--r-- | CMakeLists.txt | 8 | ||||
| -rw-r--r-- | dist/Assets.car | bin | 2346888 -> 2008328 bytes | |||
| -rw-r--r-- | dist/eden.icns | bin | 342825 -> 70246 bytes | |||
| -rw-r--r-- | dist/eden.icon/Assets/dev.eden_emu.eden.svg | 230 | ||||
| -rw-r--r-- | dist/eden.icon/icon.json | 37 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 29 |
7 files changed, 313 insertions, 13 deletions
diff --git a/.ci/actool.sh b/.ci/actool.sh new file mode 100755 index 0000000000..5be658d2bb --- /dev/null +++ b/.ci/actool.sh @@ -0,0 +1,22 @@ +#!/bin/sh -e + +# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +# SPDX-License-Identifier: GPL-3.0-or-later + +# SPDX-FileCopyrightText: Copyright 2026 crueter +# SPDX-License-Identifier: GPL-3.0-or-later + +_svg=dev.eden_emu.eden.svg +_icon=dist/eden.icon +_composed="$_icon/Assets/$_svg" +_svg="dist/$_svg" + +rm "$_composed" +cp "$_svg" "$_composed" + +xcrun actool "$_icon" \ + --compile dist \ + --platform macosx \ + --minimum-deployment-target 11.0 \ + --app-icon eden \ + --output-partial-info-plist /dev/null diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f74d561cf..f2edd31d04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -486,10 +486,10 @@ endfunction() # ============================================= if (APPLE) - # Umbrella framework for everything GUI-related - find_library(COCOA_LIBRARY Cocoa REQUIRED) - find_library(IOKIT_LIBRARY IOKit REQUIRED) - set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) + foreach(fw Carbon Metal Cocoa IOKit CoreVideo CoreMedia) + find_library(${fw}_LIBRARY ${fw} REQUIRED) + list(APPEND PLATFORM_LIBRARIES ${${fw}_LIBRARY}) + endforeach() elseif (WIN32) # Target Windows 10 add_compile_definitions(_WIN32_WINNT=0x0A00 WINVER=0x0A00) diff --git a/dist/Assets.car b/dist/Assets.car Binary files differindex eb54881fac..9ae9bca8a4 100644 --- a/dist/Assets.car +++ b/dist/Assets.car diff --git a/dist/eden.icns b/dist/eden.icns Binary files differindex 680800951d..82529ba224 100644 --- a/dist/eden.icns +++ b/dist/eden.icns diff --git a/dist/eden.icon/Assets/dev.eden_emu.eden.svg b/dist/eden.icon/Assets/dev.eden_emu.eden.svg new file mode 100644 index 0000000000..f88b52f625 --- /dev/null +++ b/dist/eden.icon/Assets/dev.eden_emu.eden.svg @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + width="512" + height="512" + fill="none" + viewBox="0 0 512 512" + version="1.1" + id="svg7" + sodipodi:docname="base.svg.2026_01_12_14_43_47.0.svg" + inkscape:version="1.4.2 (ebf0e94, 2025-05-08)" + inkscape:export-filename="base.svg.2026_01_12_14_43_47.0.svg" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs7"> + <linearGradient + id="linearGradient1" + inkscape:collect="always"> + <stop + style="stop-color:#ff2e88;stop-opacity:0.5;" + offset="0" + id="stop3" /> + <stop + style="stop-color:#bf42f6;stop-opacity:0.5;" + offset="0.44631511" + id="stop4" /> + <stop + style="stop-color:#5da5ed;stop-opacity:0.5;" + offset="0.90088946" + id="stop2" /> + </linearGradient> + <linearGradient + id="linearGradient138" + inkscape:collect="always"> + <stop + style="stop-color:#ff2e88;stop-opacity:1;" + offset="0" + id="stop152" /> + <stop + style="stop-color:#bf42f6;stop-opacity:1;" + offset="0.44971901" + id="stop137" /> + <stop + style="stop-color:#5da5ed;stop-opacity:1;" + offset="0.89793283" + id="stop138" /> + </linearGradient> + <linearGradient + id="swatch37" + inkscape:swatch="solid"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop37" /> + </linearGradient> + <linearGradient + id="swatch28" + inkscape:swatch="solid"> + <stop + style="stop-color:#252525;stop-opacity:1;" + offset="0" + id="stop28" /> + </linearGradient> + <linearGradient + id="swatch27" + inkscape:swatch="solid"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop27" /> + </linearGradient> + <linearGradient + id="swatch15" + inkscape:swatch="solid"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop16" /> + </linearGradient> + <linearGradient + id="linearGradient14" + inkscape:swatch="gradient"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop14" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop15" /> + </linearGradient> + <linearGradient + id="swatch9" + inkscape:swatch="solid"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop10" /> + </linearGradient> + <linearGradient + id="swatch8" + inkscape:swatch="solid"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop9" /> + </linearGradient> + <rect + x="22.627417" + y="402.76802" + width="521.34025" + height="248.94868" + id="rect24" /> + <linearGradient + id="linearGradient11" + inkscape:collect="always"> + <stop + style="stop-color:#ff2e88;stop-opacity:1;" + offset="0" + id="stop11" /> + <stop + style="stop-color:#bf42f6;stop-opacity:1;" + offset="0.44971901" + id="stop154" /> + <stop + style="stop-color:#5da5ed;stop-opacity:1;" + offset="0.89793283" + id="stop12" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient138" + id="linearGradient6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.118028,0,0,1.116699,-46.314723,-42.388667)" + x1="270.39996" + y1="40.000019" + x2="270.39996" + y2="494.39996" + spreadMethod="pad" /> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath18"> + <circle + style="opacity:1;mix-blend-mode:normal;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.8382;stroke-opacity:0.566238;paint-order:stroke fill markers" + id="circle18" + cx="-246.8315" + cy="246.8338" + inkscape:label="Circle" + r="191.89999" /> + </clipPath> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath22"> + <circle + style="opacity:1;mix-blend-mode:normal;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.8382;stroke-opacity:0.566238;paint-order:stroke fill markers" + id="circle22" + cx="256" + cy="256" + inkscape:label="Circle" + r="191.89999" /> + </clipPath> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11" + id="linearGradient27" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-6.9401139e-5,-2.8678628)" + x1="256.00012" + y1="102.94693" + x2="256.00012" + y2="409.05307" /> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath128"> + <circle + style="fill:none;fill-opacity:1;stroke:#03ffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1" + id="circle128" + cx="256" + cy="256" + r="192" /> + </clipPath> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1" + id="linearGradient2" + x1="256" + y1="64" + x2="256" + y2="448" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3229974,0,0,1.3214002,-82.687336,-82.290326)" /> + </defs> + <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#000000" + borderopacity="0.25" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + inkscape:zoom="1.4142136" + inkscape:cx="261.62951" + inkscape:cy="230.87036" + inkscape:window-width="1920" + inkscape:window-height="1008" + inkscape:window-x="1080" + inkscape:window-y="351" + inkscape:window-maximized="1" + inkscape:current-layer="svg7" /> + <path + id="path8-7" + style="display:inline;mix-blend-mode:multiply;fill:url(#linearGradient6);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2);stroke-width:3.9666;stroke-dasharray:none;stroke-opacity:0.566238;paint-order:stroke fill markers" + inkscape:label="Circle" + d="M 256,2.2792898 A 254.0155,253.71401 0 0 0 150.68475,25.115202 c 19.54414,1.070775 38.74692,5.250294 51.56848,11.647658 14.14361,7.056691 28.63804,19.185961 39.4212,29.347551 h 40.60981 c 1.03847,-0.68139 2.10297,-1.36938 3.1938,-2.05957 5.45602,-15.78533 14.79164,-43.183497 19.49612,-57.0097682 A 254.0155,253.71401 0 0 0 256,2.2792898 Z m 61.57106,7.567234 -18.26098,46.1544672 c 7.79702,-4.13918 16.35655,-7.87447 25.20671,-10.87081 23.1229,-7.828433 43.96931,-10.170904 54.94058,-10.868226 A 254.0155,253.71401 0 0 0 317.57106,9.8465238 Z m 65.39277,26.4001532 c -9.68256,4.806644 -33.05532,16.642034 -55.68217,29.863734 H 424.4677 A 254.0155,253.71401 0 0 0 382.96383,36.246677 Z M 113.90698,45.690231 A 254.0155,253.71401 0 0 0 87.532302,66.110411 H 194.2739 c -1.47402,-0.80231 -2.35141,-1.25949 -2.35141,-1.25949 l 10.4496,-11.83348 -38.40568,7.01234 c 0,1e-5 -12.21537,-4.60266 -40.17313,-12.27223 -3.45336,-0.94731 -6.75329,-1.61824 -9.8863,-2.06732 z m -36.803618,30.18635 a 254.0155,253.71401 0 0 0 -34.88372,43.090929 h 59.976738 c 18.11461,-12.04145 40.14252,-22.882149 62.31266,-24.534159 52.93006,-3.9444 70.16538,1.86342 70.16538,1.86342 0,0 -4.612,-4.8206 -14.51938,-13.36656 -2.72366,-2.34942 -6.0844,-4.77373 -9.52455,-7.05363 z m 174.472868,0 c 4.57322,4.7186 7.29716,7.83565 7.29716,7.83565 0,0 3.53501,-3.18484 9.62532,-7.83565 z m 60.27649,0 c -21.56573,15.45339 -25.4703,27.979669 -25.4703,27.979669 0,0 54.83326,-19.215729 100.70543,-0.31228 11.63986,4.79661 21.58481,10.13159 29.94832,15.42354 h 52.74419 A 254.0155,253.71401 0 0 0 434.89664,75.876581 Z M 36.250648,128.73367 A 254.0155,253.71401 0 0 0 16.372095,171.82459 H 147.45478 c 1.45695,-2.5815 3.06539,-5.08648 4.83979,-7.48982 14.23694,-19.28301 27.92088,-30.0088 36.86047,-35.6011 h -30.25323 c -5.87346,0.93472 -12.04945,1.99094 -18.28166,3.16937 -30.12936,5.69727 -81.157618,22.78945 -81.157618,22.78945 0,0 11.47125,-12.39249 29.11369,-25.95882 z m 265.630492,0 c 33.48676,11.2434 52.42799,26.78443 62.7752,43.09092 h 130.97157 a 254.0155,253.71401 0 0 0 -19.87856,-43.09092 h -44.81136 c 14.85233,11.5863 21.59948,20.9854 21.59948,20.9854 0,0 -33.5226,-12.37087 -66.0646,-20.9854 z m -45.96641,16.27007 c -1.00419,0.0106 -10.12705,0.72026 -44.98966,20.64729 -3.12132,1.78406 -6.25434,3.86182 -9.37468,6.17356 h 41.81911 c 7.17181,-17.34774 12.64083,-26.82085 12.64083,-26.82085 0,0 -0.0287,-7.1e-4 -0.0957,0 z m 14.18088,0.0465 c 0,0 -3.31228,9.32762 -7.30492,26.77438 h 51.78554 C 287.6577,146.14158 270.09561,145.0502 270.09561,145.0502 Z M 13.152456,181.59075 A 254.0155,253.71401 0 0 0 3.927651,224.68167 H 134.1447 c 0.56161,-12.72411 2.67825,-28.50188 8.61499,-43.09092 z m 176.661504,0 c -14.27121,13.10564 -27.60733,29.58761 -37.56073,43.09092 h 73.3721 c 4.47018,-16.79061 9.35068,-31.26371 13.86562,-43.09092 z m 70.85787,0 c -2.41384,11.76417 -4.9032,26.20707 -6.94831,43.09092 H 360.4832 c -8.32133,-10.88917 -20.66988,-26.17008 -36.35141,-43.09092 z m 109.17313,0 c 6.63611,15.24089 6.92441,30.5373 5.57882,43.09092 h 132.64857 a 254.0155,253.71401 0 0 0 -9.22481,-43.09092 z M 2.90181,234.44783 A 254.0155,253.71401 0 0 0 1.984498,255.9933 254.0155,253.71401 0 0 0 2.90181,277.53876 h 211.89923 c 2.25762,-15.52555 5.14325,-29.93448 8.3385,-43.09093 h -77.8863 c -6.46396,9.27617 -10.33076,15.56549 -10.33076,15.56549 0,0 -0.82623,-6.14945 -0.9354,-15.56549 z m 249.72093,0 c -1.3692,13.09684 -2.4456,27.49209 -3.02068,43.09093 h 259.49613 a 254.0155,253.71401 0 0 0 0.91731,-21.54546 254.0155,253.71401 0 0 0 -0.91731,-21.54547 H 374.02584 c -0.445,2.5469 -0.90878,4.89768 -1.32817,7.01751 0,0 -1.69726,-2.53821 -4.94056,-7.01751 z M 3.927651,287.30493 a 254.0155,253.71401 0 0 0 9.224805,43.09091 H 214.04393 c -1.29238,-15.40742 -1.57503,-30.04388 -0.41861,-43.09091 z m 245.385009,0 c -0.30355,13.54349 -0.22032,27.92598 0.36951,43.09091 h 249.16537 a 254.0155,253.71401 0 0 0 9.22481,-43.09091 z M 16.369511,340.16201 a 254.0155,253.71401 0 0 0 19.878554,43.09091 H 221.4677 c -2.69781,-14.4523 -4.96108,-29.01285 -6.4832,-43.09091 z m 233.842379,0 c 1.15864,15.47765 3.81286,29.83979 7.51679,43.09091 h 218.02325 a 254.0155,253.71401 0 0 0 19.87856,-43.09091 z M 42.217052,393.01909 a 254.0155,253.71401 0 0 0 34.88372,43.09093 H 233.09561 c -3.40902,-13.67281 -6.76794,-28.2531 -9.73902,-43.09093 z m 218.490958,0 c 5.34985,16.15926 12.22007,30.51982 19.68733,43.09093 h 154.50389 a 254.0155,253.71401 0 0 0 34.88371,-43.09093 z M 87.529722,445.87618 a 254.0155,253.71401 0 0 0 166.229968,63.8208 c -3.67805,-12.0825 -10.85464,-35.49828 -18.18088,-63.8208 z m 199.010328,0 c 17.5887,26.43772 36.99259,43.60598 47.33592,51.61309 a 254.0155,253.71401 0 0 0 90.59431,-51.61309 z" /> + <path + id="path27" + style="display:inline;mix-blend-mode:multiply;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient27);stroke-width:3;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" + d="m 318.98012,441.7375 c -9.87518,-6.73978 -64.39137,-49.0272 -67.68975,-127.81978 -3.69298,-88.21893 15.36468,-141.91029 15.36468,-141.91029 0,0 16.00378,0.99513 39.80316,26.53195 23.79939,25.53753 37.74965,46.43102 37.74965,46.43102 3.91262,-19.79992 12.84563,-66.32402 -60.72865,-87.55523 0,0 12.82326,-5.38883 39.3925,-3.81382 26.56907,1.57572 81.6822,21.93799 81.6822,21.93799 0,0 -14.79766,-20.63773 -49.47063,-34.94295 -34.67291,-14.30533 -76.1182,0.23644 -76.1182,0.23644 0,0 3.86959,-12.43127 27.22669,-26.38478 23.35718,-13.9537 49.27409,-26.501533 49.27409,-26.501533 0,0 -21.97854,-0.26548 -47.67725,8.44535 -6.68948,2.267506 -13.15863,5.094213 -19.05208,8.226563 l 16.05803,-40.634103 -4.4617,-1.89059 -5.1305,-0.95965 c 0,0 -11.24072,33.12428 -16.92051,49.576513 -12.13137,7.68489 -20.11005,14.87735 -20.11005,14.87735 0,0 -21.90573,-25.09227 -42.79668,-35.527803 -26.03412,-13.00525 -86.88249,-13.90359 -94.0044,10.401173 0,0 13.56804,-7.884703 34.70032,-2.080917 21.13214,5.803997 30.3644,9.287307 30.3644,9.287307 l 29.02989,-5.30681 -7.89811,8.95527 c 0,0 13.8496,7.21324 21.33822,13.68063 7.48859,6.46722 10.9757,10.11472 10.9757,10.11472 0,0 -13.02739,-4.39388 -53.03507,-1.40893 -40.00771,2.98473 -79.40016,45.60209 -79.40016,45.60209 0,0 38.57037,-12.93531 61.34393,-17.24677 22.77354,-4.31126 44.52166,-6.46757 44.52166,-6.46757 0,0 -17.23298,5.97003 -35.69792,31.00932 -18.46522,25.03987 -13.13146,64.83866 -13.13146,64.83866 0,0 29.33874,-47.7577 57.44675,-63.84249 28.10798,-16.08527 34.0799,-15.6238 34.0799,-15.6238 0,0 -22.56785,39.13486 -31.39017,101.98268 -8.03005,57.2039 26.77689,163.75449 31.1572,178.89699" + sodipodi:nodetypes="cscsccscscscsccccccscscccscscscscscsc" + inkscape:label="MainOutline" + clip-path="url(#clipPath128)" + transform="matrix(1.3229974,0,0,1.3214002,-82.687282,-82.278451)" /> +</svg> diff --git a/dist/eden.icon/icon.json b/dist/eden.icon/icon.json new file mode 100644 index 0000000000..1f1e7da516 --- /dev/null +++ b/dist/eden.icon/icon.json @@ -0,0 +1,37 @@ +{ + "fill" : { + "automatic-gradient" : "srgb:0.00000,0.00000,0.00000,1.00000" + }, + "groups" : [ + { + "layers" : [ + { + "fill" : "none", + "image-name" : "dev.eden_emu.eden.svg", + "name" : "dev.eden_emu.eden", + "position" : { + "scale" : 1.8, + "translation-in-points" : [ + 0, + 0 + ] + } + } + ], + "shadow" : { + "kind" : "neutral", + "opacity" : 0.5 + }, + "translucency" : { + "enabled" : true, + "value" : 0.5 + } + } + ], + "supported-platforms" : { + "circles" : [ + "watchOS" + ], + "squares" : "shared" + } +}
\ No newline at end of file diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 79642711ac..1ed1fdff2a 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -362,16 +362,27 @@ target_sources(yuzu ${LANGUAGES} ${THEMES}) +# TODO(crueter): Move Assets.car/icon/icns handling to its own Module. if (APPLE) - # Normal icns - set(MACOSX_ICON "${CMAKE_SOURCE_DIR}/dist/eden.icns") - set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - target_sources(yuzu PRIVATE ${MACOSX_ICON}) - - # Liquid glass - set(MACOSX_LIQUID_GLASS_ICON "${CMAKE_SOURCE_DIR}/dist/Assets.car") - set_source_files_properties(${MACOSX_LIQUID_GLASS_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - target_sources(yuzu PRIVATE ${MACOSX_LIQUID_GLASS_ICON}) + # Xcode will automatically generate the Assets.car and icns file for us. + set(_dist "${CMAKE_SOURCE_DIR}/dist") + if (CMAKE_GENERATOR MATCHES "Xcode") + set(_icons "${_dist}/eden.icon") + + set_target_properties(eden PROPERTIES + XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME eden + MACOSX_BUNDLE_ICON_FILE eden + # Also force xcode to manage signing for us. + XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED ON + XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED ON) + # Otherwise, we'll use our own. + else() + set(_icons "${_dist}/eden.icns" "${_dist}/Assets.car") + endif() + + set_source_files_properties(${_icons} PROPERTIES + MACOSX_PACKAGE_LOCATION Resources) + target_sources(yuzu PRIVATE ${_icons}) set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE TRUE) set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) |
