]> git.lyx.org Git - lyx.git/commitdiff
Revert "Revert "Check for old "LyX 2.3" user directory when configuring.""
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 30 Sep 2018 17:51:30 +0000 (13:51 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 8 Dec 2018 16:02:41 +0000 (11:02 -0500)
This reverts commit b66cf5aecd04518243d90058c6243b9cd90eebce.

lib/configure.py

index c317e79399d2cb4aa72a8694d1a5ad9fdb167aff..c16064a58fbf18d80e89dfddf91a9ca4ffe46cb6 100644 (file)
@@ -181,6 +181,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