Hello! I am working on snapping Yuzu and have built a snapcraft.yaml. The build is successful, but the application is rendered without fonts unless I symlink these directories
ln -s /snap/yuzu/current/usr/share/fonts ~/snap/yuzu/current/.local/share/
How can this be corrected? TIA
There’s a few issues with your snapcraft file,
- It looks like you’re using the Snapcraft Desktop Helper templates but I can’t work out where the
bin/desktop-launch
is coming from, it’s also not used for the main yuzu
binary. In any case, the kde-neon
extension is likely preferable, you can use it like this
apps:
yuzu:
command: bin/yuzu
extensions: [kde-neon]
cmd:
command: bin/yuzu-cmd
extensions: [kde-neon]
The extension is expected to handle font integration and so is likely the direct answer to your question. However,
- You’re not making use of the
cmake
plugin when you probably should be. dump
is inappropriate in this instance and you likely want:
yuzu:
after: [pip-deps]
source: .
plugin: cmake
cmake-parameters:
- -DYUZU_USE_QT_WEB_ENGINE=ON
- -DCMAKE_C_COMPILER=gcc-10
- -DCMAKE_CXX_COMPILER=g++-10
cmake-generator: Ninja
- The extension actually effects the build. As such, I’d recommend re-evaluating your staged and build packages. For the build packages you should likely consider starting with none. You’ll have essentials such as Git, GCC, etc, by default, and keep in mind if you remove GCC10, Ubuntu defaults to GCC 9, so be sure to adapt the
cmake-parameters
above! After starting with the minimal environment, add packages satisfying the dependencies CMake identifies missing packages one at a time. Similarly, you want to likely remove the stage-snaps
construct, as the extension will automatically handle this for you too.
With the stage packages, I’d recommend again starting with none, and Snapcraft will provide a list of missing packages when it finalizes the build.
The reason for this is to try and reduce the potential conflict between the extension and Ubuntu specific packages, as well as to eliminate on filesize, downloads, etc. While there’s often no harm in adding most packages, it reduces the number of variables if you’re minimising what’s included, and a lot of them will be handled by the extension.
Thank you for the information! The bin/desktop-launch
was an error in the commit as I was looking at options and saw that was legacy.
Trying to build it with the cmake plugin fails due to what I assume are issues with what I assume are dependency errors because of how libraries are imported in the upstream project:
CMake Error at src/input_common/CMakeLists.txt:1 (add_library):
Target "input_common" links to target "OpenSSL::Crypto" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at src/tests/CMakeLists.txt:1 (add_executable):
Target "tests" links to target "OpenSSL::SSL" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
Would that make sense to use that same override-build
scriptlet but with the cmake
plugin?