summarylogtreecommitdiffstats
path: root/0002-Add-support-for-global-docs-to-readme_url.patch
blob: 3038bbb7a740e7e1425e64d5f7d571047e9fb2a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From b7c3e6c3b0a34b8aa5169fbac2454765187bedd1 Mon Sep 17 00:00:00 2001
From: Infernio <infernio@icloud.com>
Date: Sat, 10 Jun 2023 10:59:38 +0200
Subject: [PATCH 2/2] Add support for global docs to readme_url

Used for our globally installed Linux build.
---
 Mopy/bash/bolt.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Mopy/bash/bolt.py b/Mopy/bash/bolt.py
index 6fad4f3c5..91a3e82dd 100644
--- a/Mopy/bash/bolt.py
+++ b/Mopy/bash/bolt.py
@@ -2762,8 +2762,13 @@ def readme_url(mopy, advanced=False, skip_local=False):
     around only exists on Windows."""
     readme_name = (u'Wrye Bash Advanced Readme.html' if advanced else
                    u'Wrye Bash General Readme.html')
-    readme = mopy.join(u'Docs', readme_name)
-    skip_local = skip_local and os_name == 'nt' # Windows-only bug
+    is_windows = os_name == 'nt'
+    skip_local = skip_local and is_windows # Windows-only bug
+    if is_windows:
+        readme = mopy.join('Docs', readme_name)
+    else:
+        # Linux, use global docs
+        readme = GPath_no_norm('/usr/share/doc/wrye-bash').join(readme_name)
     if not skip_local and readme.is_file():
         readme = u'file:///' + readme.s.replace(u'\\', u'/')
     else:
-- 
2.43.0