mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
fix: rename LAUNCHER_DISABLE_GLVULKAN to PRISMLAUNCHER_DISABLE_GLVULKAN
for consistency with other env vars this also introduces LAUNCHER_ENVNAME in BuildConfig/program_info for rebranded configurations Signed-off-by: DioEgizio <dioegizio@protonmail.com>
This commit is contained in:
parent
9f5f1bcf10
commit
bf42cfdcf2
2
.github/actions/package/linux/action.yml
vendored
2
.github/actions/package/linux/action.yml
vendored
|
|
@ -91,7 +91,7 @@ runs:
|
||||||
find "$INSTALL_APPIMAGE_DIR" -name '*gamemode*' -exec rm {} +
|
find "$INSTALL_APPIMAGE_DIR" -name '*gamemode*' -exec rm {} +
|
||||||
|
|
||||||
#disable OpenGL and Vulkan launcher features until https://github.com/VHSgunzo/sharun/issues/35
|
#disable OpenGL and Vulkan launcher features until https://github.com/VHSgunzo/sharun/issues/35
|
||||||
echo "LAUNCHER_DISABLE_GLVULKAN=1" > "$INSTALL_APPIMAGE_DIR"/.env
|
echo "PRISMLAUNCHER_DISABLE_GLVULKAN=1" > "$INSTALL_APPIMAGE_DIR"/.env
|
||||||
#makes the launcher use portals for file picking
|
#makes the launcher use portals for file picking
|
||||||
echo "QT_QPA_PLATFORMTHEME=xdgdesktopportal" > "$INSTALL_APPIMAGE_DIR"/.env
|
echo "QT_QPA_PLATFORMTHEME=xdgdesktopportal" > "$INSTALL_APPIMAGE_DIR"/.env
|
||||||
ln -s org.prismlauncher.PrismLauncher.metainfo.xml "$INSTALL_APPIMAGE_DIR"/share/metainfo/org.prismlauncher.PrismLauncher.appdata.xml
|
ln -s org.prismlauncher.PrismLauncher.metainfo.xml "$INSTALL_APPIMAGE_DIR"/share/metainfo/org.prismlauncher.PrismLauncher.appdata.xml
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ Config::Config()
|
||||||
LAUNCHER_GIT = "@Launcher_Git@";
|
LAUNCHER_GIT = "@Launcher_Git@";
|
||||||
LAUNCHER_APPID = "@Launcher_AppID@";
|
LAUNCHER_APPID = "@Launcher_AppID@";
|
||||||
LAUNCHER_SVGFILENAME = "@Launcher_SVGFileName@";
|
LAUNCHER_SVGFILENAME = "@Launcher_SVGFileName@";
|
||||||
|
LAUNCHER_ENVNAME = "@Launcher_ENVName@";
|
||||||
|
|
||||||
USER_AGENT = "@Launcher_UserAgent@";
|
USER_AGENT = "@Launcher_UserAgent@";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ class Config {
|
||||||
QString LAUNCHER_GIT;
|
QString LAUNCHER_GIT;
|
||||||
QString LAUNCHER_APPID;
|
QString LAUNCHER_APPID;
|
||||||
QString LAUNCHER_SVGFILENAME;
|
QString LAUNCHER_SVGFILENAME;
|
||||||
|
QString LAUNCHER_ENVNAME;
|
||||||
|
|
||||||
/// The major version number.
|
/// The major version number.
|
||||||
int VERSION_MAJOR;
|
int VERSION_MAJOR;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include <QOffscreenSurface>
|
#include <QOffscreenSurface>
|
||||||
#include <QOpenGLFunctions>
|
#include <QOpenGLFunctions>
|
||||||
#include <QProcessEnvironment>
|
#include <QProcessEnvironment>
|
||||||
|
#include "BuildConfig.h"
|
||||||
|
|
||||||
#ifndef Q_OS_MACOS
|
#ifndef Q_OS_MACOS
|
||||||
#include <QVulkanInstance>
|
#include <QVulkanInstance>
|
||||||
|
|
@ -31,7 +32,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
bool vulkanInfo(QStringList& out)
|
bool vulkanInfo(QStringList& out)
|
||||||
{
|
{
|
||||||
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("LAUNCHER_DISABLE_GLVULKAN")).isEmpty()) {
|
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("%1_DISABLE_GLVULKAN").arg(BuildConfig.LAUNCHER_ENVNAME)).isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifndef Q_OS_MACOS
|
#ifndef Q_OS_MACOS
|
||||||
|
|
@ -57,7 +58,7 @@ bool vulkanInfo(QStringList& out)
|
||||||
|
|
||||||
bool openGlInfo(QStringList& out)
|
bool openGlInfo(QStringList& out)
|
||||||
{
|
{
|
||||||
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("LAUNCHER_DISABLE_GLVULKAN")).isEmpty()) {
|
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("%1_DISABLE_GLVULKAN").arg(BuildConfig.LAUNCHER_ENVNAME)).isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QOpenGLContext ctx;
|
QOpenGLContext ctx;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
LAUNCHER_NAME=@Launcher_APP_BINARY_NAME@
|
LAUNCHER_NAME=@Launcher_APP_BINARY_NAME@
|
||||||
|
LAUNCHER_ENVNAME=@Launcher_ENVName@
|
||||||
LAUNCHER_DIR="$(dirname "$(readlink -f "$0")")"
|
LAUNCHER_DIR="$(dirname "$(readlink -f "$0")")"
|
||||||
echo "Launcher Dir: ${LAUNCHER_DIR}"
|
echo "Launcher Dir: ${LAUNCHER_DIR}"
|
||||||
|
|
||||||
|
|
@ -23,7 +24,7 @@ export QT_QPA_PLATFORMTHEME=xdgdesktopportal
|
||||||
|
|
||||||
# disable OpenGL and Vulkan launcher features on sharun until https://github.com/VHSgunzo/sharun/issues/35
|
# disable OpenGL and Vulkan launcher features on sharun until https://github.com/VHSgunzo/sharun/issues/35
|
||||||
if [[ -f "${LAUNCHER_DIR}/sharun" ]]; then
|
if [[ -f "${LAUNCHER_DIR}/sharun" ]]; then
|
||||||
export LAUNCHER_DISABLE_GLVULKAN=1
|
export ${LAUNCHER_ENVNAME}_DISABLE_GLVULKAN=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Just to be sure...
|
# Just to be sure...
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
#include "rainbow.h"
|
#include "rainbow.h"
|
||||||
#include "ui/dialogs/skins/draw/BoxGeometry.h"
|
#include "ui/dialogs/skins/draw/BoxGeometry.h"
|
||||||
#include "ui/dialogs/skins/draw/Scene.h"
|
#include "ui/dialogs/skins/draw/Scene.h"
|
||||||
|
#include "BuildConfig.h"
|
||||||
|
|
||||||
SkinOpenGLWindow::SkinOpenGLWindow(SkinProvider* parent, QColor color)
|
SkinOpenGLWindow::SkinOpenGLWindow(SkinProvider* parent, QColor color)
|
||||||
: QOpenGLWindow(), QOpenGLFunctions(), m_baseColor(color), m_parent(parent)
|
: QOpenGLWindow(), QOpenGLFunctions(), m_baseColor(color), m_parent(parent)
|
||||||
|
|
@ -331,7 +332,7 @@ void SkinOpenGLWindow::setElytraVisible(bool visible)
|
||||||
|
|
||||||
bool SkinOpenGLWindow::hasOpenGL()
|
bool SkinOpenGLWindow::hasOpenGL()
|
||||||
{
|
{
|
||||||
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("LAUNCHER_DISABLE_GLVULKAN")).isEmpty()) {
|
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("%1_DISABLE_GLVULKAN").arg(BuildConfig.LAUNCHER_ENVNAME)).isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,13 @@ endif()
|
||||||
set(Launcher_CommonName "PrismLauncher")
|
set(Launcher_CommonName "PrismLauncher")
|
||||||
set(Launcher_DisplayName "Prism Launcher")
|
set(Launcher_DisplayName "Prism Launcher")
|
||||||
set(Launcher_AppID "org.prismlauncher.PrismLauncher")
|
set(Launcher_AppID "org.prismlauncher.PrismLauncher")
|
||||||
|
set(Launcher_ENVName "PRISMLAUNCHER")
|
||||||
set(Launcher_Domain "prismlauncher.org")
|
set(Launcher_Domain "prismlauncher.org")
|
||||||
set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher")
|
set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher")
|
||||||
|
|
||||||
set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
|
set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
|
||||||
set(Launcher_DisplayName "${Launcher_DisplayName}" PARENT_SCOPE)
|
set(Launcher_DisplayName "${Launcher_DisplayName}" PARENT_SCOPE)
|
||||||
|
set(Launcher_ENVName "${Launcher_ENVName}" PARENT_SCOPE)
|
||||||
set(Launcher_Domain "${Launcher_Domain}" PARENT_SCOPE)
|
set(Launcher_Domain "${Launcher_Domain}" PARENT_SCOPE)
|
||||||
set(Launcher_Git "${Launcher_Git}" PARENT_SCOPE)
|
set(Launcher_Git "${Launcher_Git}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue