opentrack: fix desktop icon & window title (#486900)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
diff --git a/gui/init.cpp b/gui/init.cpp
|
||||
index 1647b050db0efe76028000939a7ca8e4047116b7..9114c31c51a69294e0803c15008a824e18da7a09 100644
|
||||
--- a/gui/init.cpp
|
||||
+++ b/gui/init.cpp
|
||||
@@ -315,6 +315,10 @@ int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> co
|
||||
add_win32_path();
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_LINUX
|
||||
+ app.setDesktopFileName("opentrack");
|
||||
+#endif
|
||||
+
|
||||
QDir::setCurrent(OPENTRACK_BASE_PATH);
|
||||
|
||||
set_qt_style();
|
||||
@@ -40,6 +40,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
meta.license = lib.licenses.free;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# calls `app.setDesktopFileName("opentrack");` - distros that don't wrap the binary apparently don't need this.
|
||||
./desktop-filename.patch
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -64,13 +69,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "OPENTRACK_COMMIT" "opentrack-${finalAttrs.version}")
|
||||
(lib.cmakeBool "SDK_WINE" withWine)
|
||||
(lib.cmakeFeature "SDK_ARUCO_LIBPATH" "${finalAttrs.aruco}/lib/libaruco.a")
|
||||
(lib.cmakeFeature "SDK_XPLANE" finalAttrs.xplaneSdk.outPath)
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dt $out/share/icons/hicolor/256x256 $src/gui/images/opentrack.png
|
||||
install -Dt $out/share/icons/hicolor/256x256/apps ../gui/images/opentrack.png
|
||||
'';
|
||||
|
||||
# manually wrap just the main binary
|
||||
|
||||
Reference in New Issue
Block a user