From ba4af1a890f3d2990d86a36a2fbbb16ad2c774cf Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 21 Oct 2022 19:54:10 -0400 Subject: [PATCH 1/3] fix: make jars path specific to prism Signed-off-by: seth --- CMakeLists.txt | 2 +- launcher/Application.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 131d3e53c..97bad31b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,7 +249,7 @@ if(UNIX AND APPLE) elseif(UNIX) set(BINARY_DEST_DIR "bin") set(LIBRARY_DEST_DIR "lib${LIB_SUFFIX}") - set(JARS_DEST_DIR "share/jars") + set(JARS_DEST_DIR "share/${Launcher_APP_BINARY_NAME}") set(LAUNCHER_DESKTOP_DEST_DIR "share/applications" CACHE STRING "Path to the desktop file directory") set(LAUNCHER_METAINFO_DEST_DIR "share/metainfo" CACHE STRING "Path to the metainfo directory") set(LAUNCHER_ICON_DEST_DIR "share/icons/hicolor/scalable/apps" CACHE STRING "Path to the scalable icon directory") diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 6ffec1ae4..babf824aa 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -1571,7 +1571,7 @@ QString Application::getJarPath(QString jarFile) { QStringList potentialPaths = { #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) - FS::PathCombine(m_rootPath, "share/jars"), + FS::PathCombine(m_rootPath, "share/" + BuildConfig.LAUNCHER_NAME), #endif FS::PathCombine(m_rootPath, "jars"), FS::PathCombine(applicationDirPath(), "jars") From 4a2b25e841224441c0dcaa81bcbd0f716d64201e Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 21 Oct 2022 21:29:28 -0400 Subject: [PATCH 2/3] fix: use correct variable for jars path Signed-off-by: seth --- buildconfig/BuildConfig.cpp.in | 1 + buildconfig/BuildConfig.h | 1 + launcher/Application.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index 50e5e8a4b..fc68326cf 100644 --- a/buildconfig/BuildConfig.cpp.in +++ b/buildconfig/BuildConfig.cpp.in @@ -42,6 +42,7 @@ Config::Config() { // Name and copyright LAUNCHER_NAME = "@Launcher_Name@"; + LAUNCHER_APP_BINARY_NAME = "@Launcher_APP_BINARY_NAME@"' LAUNCHER_DISPLAYNAME = "@Launcher_DisplayName@"; LAUNCHER_COPYRIGHT = "@Launcher_Copyright@"; LAUNCHER_DOMAIN = "@Launcher_Domain@"; diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h index ef384ed20..13ccdaa18 100644 --- a/buildconfig/BuildConfig.h +++ b/buildconfig/BuildConfig.h @@ -44,6 +44,7 @@ class Config { public: Config(); QString LAUNCHER_NAME; + QString LAUNCHER_APP_BINARY_NAME; QString LAUNCHER_DISPLAYNAME; QString LAUNCHER_COPYRIGHT; QString LAUNCHER_DOMAIN; diff --git a/launcher/Application.cpp b/launcher/Application.cpp index babf824aa..97f757f7c 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -1571,7 +1571,7 @@ QString Application::getJarPath(QString jarFile) { QStringList potentialPaths = { #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) - FS::PathCombine(m_rootPath, "share/" + BuildConfig.LAUNCHER_NAME), + FS::PathCombine(m_rootPath, "share/" + BuildConfig.LAUNCHER_APP_BINARY_NAME), #endif FS::PathCombine(m_rootPath, "jars"), FS::PathCombine(applicationDirPath(), "jars") From 2592c690213506c3cdfbc441c20f13ef7cf3eb23 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 21 Oct 2022 21:37:31 -0400 Subject: [PATCH 3/3] semicolon fail i was off by one key :( Signed-off-by: seth --- buildconfig/BuildConfig.cpp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index fc68326cf..b8fa51339 100644 --- a/buildconfig/BuildConfig.cpp.in +++ b/buildconfig/BuildConfig.cpp.in @@ -42,7 +42,7 @@ Config::Config() { // Name and copyright LAUNCHER_NAME = "@Launcher_Name@"; - LAUNCHER_APP_BINARY_NAME = "@Launcher_APP_BINARY_NAME@"' + LAUNCHER_APP_BINARY_NAME = "@Launcher_APP_BINARY_NAME@"; LAUNCHER_DISPLAYNAME = "@Launcher_DisplayName@"; LAUNCHER_COPYRIGHT = "@Launcher_Copyright@"; LAUNCHER_DOMAIN = "@Launcher_Domain@";