From 34aa2c5c968a5b6fe942d70d8b812c4cf3abfe22 Mon Sep 17 00:00:00 2001 From: Simon Chopin Date: Sat, 27 Jul 2019 15:07:36 +0200 Subject: [PATCH] Refresh the license display patches They have been partially obsoleted by the following pull request upstream: https://github.com/obsproject/obs-studio/pull/1435 --- debian/patches/0001-Use-common-license.patch | 28 +++++++++++-------- ...Add-SONAME.patch => 0006-Add-SONAME.patch} | 0 ...not-display-license-on-first-startup.patch | 22 --------------- debian/patches/series | 3 +- 4 files changed, 17 insertions(+), 36 deletions(-) rename debian/patches/{0007-Add-SONAME.patch => 0006-Add-SONAME.patch} (100%) delete mode 100644 debian/patches/0006-Do-not-display-license-on-first-startup.patch diff --git a/debian/patches/0001-Use-common-license.patch b/debian/patches/0001-Use-common-license.patch index d9c1450..15168f0 100644 --- a/debian/patches/0001-Use-common-license.patch +++ b/debian/patches/0001-Use-common-license.patch @@ -8,18 +8,22 @@ copy UI/window-license-agreement.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -diff --git a/UI/window-license-agreement.cpp b/UI/window-license-agreement.cpp -index a7a5f3b..60cad40 100644 ---- a/UI/window-license-agreement.cpp -+++ b/UI/window-license-agreement.cpp -@@ -13,9 +13,7 @@ OBSLicenseAgreement::OBSLicenseAgreement(QWidget *parent) +--- a/UI/window-basic-about.cpp ++++ b/UI/window-basic-about.cpp +@@ -149,15 +149,10 @@ + + void OBSAbout::ShowLicense() { - ui->setupUi(this); +- std::string path; ++ std::string path("/usr/share/common-licenses/GPL-2"); + QString error = "Error! File could not be read.\n\n \ + Go to: https://github.com/obsproject/obs-studio/blob/master/COPYING"; -- string path; -- if (!GetDataFilePath("license/gplv2.txt", path)) -- throw "Could not find license file"; -+ string path("/usr/share/common-licenses/GPL-2"); +- if (!GetDataFilePath("license/gplv2.txt", path)) { +- ui->textBrowser->setPlainText(error); +- return; +- } +- + BPtr text = os_quick_read_utf8_file(path.c_str()); - BPtr licenseText = os_quick_read_utf8_file(path.c_str()); - if (!licenseText || !*licenseText || strlen(licenseText) < 1000) + if (!text || !*text) { diff --git a/debian/patches/0007-Add-SONAME.patch b/debian/patches/0006-Add-SONAME.patch similarity index 100% rename from debian/patches/0007-Add-SONAME.patch rename to debian/patches/0006-Add-SONAME.patch diff --git a/debian/patches/0006-Do-not-display-license-on-first-startup.patch b/debian/patches/0006-Do-not-display-license-on-first-startup.patch deleted file mode 100644 index baad04b..0000000 --- a/debian/patches/0006-Do-not-display-license-on-first-startup.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Chris Lamb -Date: Mon, 19 Feb 2018 21:32:07 +0100 -Subject: Do not display license on first startup - ---- - UI/obs-app.cpp | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp -index 52b15a0..186128c 100644 ---- a/UI/obs-app.cpp -+++ b/UI/obs-app.cpp -@@ -1216,8 +1216,7 @@ bool OBSApp::OBSInit() - { - ProfileScope("OBSApp::OBSInit"); - -- bool licenseAccepted = config_get_bool(globalConfig, "General", -- "LicenseAccepted"); -+ bool licenseAccepted = true; - OBSLicenseAgreement agreement(nullptr); - - if (licenseAccepted || agreement.exec() == QDialog::Accepted) { diff --git a/debian/patches/series b/debian/patches/series index 066dbfb..cf59670 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,5 +3,4 @@ 0003-Use-path-in-usr-lib.patch 0004-Link-with-libm-and-libdl-to-fix-underlinking.patch 0005-Link-with-xcb-and-X-libraries-to-fix-underlinking.patch -0006-Do-not-display-license-on-first-startup.patch -0007-Add-SONAME.patch +0006-Add-SONAME.patch