commit 1fe6352d4f75776d40b17f714af772e97a039409
Author: Richard Kimberly Heck <[email protected]>
Date:   Fri Sep 28 21:42:49 2018 -0400

    Check for old "LyX 2.3" user directory when configuring.
    
    This is due to the bad packaging in the early 2.3.x installers. We
    normally do not use version suffixes on Windows, but did.
    
    (cherry picked from commit b738aa53d13780a4e271459d72171700cba304fa)
---
 lib/configure.py |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 05ee457..3db23f6 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -186,6 +186,22 @@ def checkUpgrade():
                 return
 
 
+def checkUpgradeWin():
+    ''' Check for upgrade from previous version '''
+    cwd = os.getcwd()
+    basename = os.path.basename(cwd)
+    if basename != "LyX":
+        return
+    lyxrc = os.path.join(cwd, outfile)
+    if os.path.isfile(lyxrc):
+        return
+    olddir = os.path.join(os.path.dirname(cwd), "LyX2.3")
+    if not os.path.isdir(oldir):
+        return
+    logger.info('Copying ' + olddir + ' into ' + cwd)
+    copy_tree(olddir, cwd, True)
+
+
 def createDirectories():
     ''' Create the build directories if necessary '''
     for dir in ['bind', 'clipart', 'doc', 'examples', 'images', 'kbd',
@@ -1840,6 +1856,8 @@ Options:
     setEnviron()
     if sys.platform == 'darwin' and len(version_suffix) > 0:
         checkUpgrade()
+    if os.name == 'nt':
+        checkUpgradeWin()
     createDirectories()
     dtl_tools = checkDTLtools()
     ## Write the first part of outfile

Reply via email to