aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfn2006 <usernamefn2006alreadyused@protonmail.com>2022-10-29 16:10:18 +0100
committerfn2006 <usernamefn2006alreadyused@protonmail.com>2022-10-29 16:42:37 +0100
commitb142a6da5b2ae433ce8164c7be0a3c3870131414 (patch)
tree65731782357964e7bf2498c628a25d0770b00584
parent1c0139c5f41592ba2b60465496f54097bf43e02b (diff)
downloadPrismLauncher-b142a6da5b2ae433ce8164c7be0a3c3870131414.tar.gz
PrismLauncher-b142a6da5b2ae433ce8164c7be0a3c3870131414.tar.bz2
PrismLauncher-b142a6da5b2ae433ce8164c7be0a3c3870131414.zip
fix hardcoded svg
Signed-off-by: fn2006 <usernamefn2006alreadyused@protonmail.com>
-rw-r--r--buildconfig/BuildConfig.cpp.in1
-rw-r--r--buildconfig/BuildConfig.h1
-rw-r--r--launcher/Application.cpp2
-rw-r--r--program_info/CMakeLists.txt1
4 files changed, 4 insertions, 1 deletions
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index b8fa5133..1262ce8e 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -49,6 +49,7 @@ Config::Config()
LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@";
LAUNCHER_GIT = "@Launcher_Git@";
LAUNCHER_DESKTOPFILENAME = "@Launcher_DesktopFileName@";
+ LAUNCHER_SVGFILENAME = "@Launcher_SVGFileName@";
USER_AGENT = "@Launcher_UserAgent@";
USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index 13ccdaa1..4a309073 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -51,6 +51,7 @@ class Config {
QString LAUNCHER_CONFIGFILE;
QString LAUNCHER_GIT;
QString LAUNCHER_DESKTOPFILENAME;
+ QString LAUNCHER_SVGFILENAME;
/// The major version number.
int VERSION_MAJOR;
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index f6b41850..c6814abf 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -1177,7 +1177,7 @@ void Application::setIconTheme(const QString& name)
QIcon Application::getThemedIcon(const QString& name)
{
if(name == "logo") {
- return QIcon(":/org.prismlauncher.PrismLauncher.svg"); // FIXME: Make this a BuildConfig variable
+ return QIcon(":/" + BuildConfig.LAUNCHER_SVGFILENAME);
}
return QIcon::fromTheme(name);
}
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index 61949e13..b0507816 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -22,6 +22,7 @@ set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_VERSION_NAME}" PARENT_
set(Launcher_ConfigFile "prismlauncher.cfg" PARENT_SCOPE)
set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher" PARENT_SCOPE)
set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
+set(Launcher_SVGFileName "org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
set(Launcher_Desktop "program_info/org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
set(Launcher_MetaInfo "program_info/org.prismlauncher.PrismLauncher.metainfo.xml" PARENT_SCOPE)