mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
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.
This commit is contained in:
parent
0cbde8a834
commit
b738aa53d1
@ -181,6 +181,22 @@ def checkUpgrade():
|
|||||||
return
|
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():
|
def createDirectories():
|
||||||
''' Create the build directories if necessary '''
|
''' Create the build directories if necessary '''
|
||||||
for dir in ['bind', 'clipart', 'doc', 'examples', 'images', 'kbd',
|
for dir in ['bind', 'clipart', 'doc', 'examples', 'images', 'kbd',
|
||||||
@ -1840,6 +1856,8 @@ Options:
|
|||||||
setEnviron()
|
setEnviron()
|
||||||
if sys.platform == 'darwin' and len(version_suffix) > 0:
|
if sys.platform == 'darwin' and len(version_suffix) > 0:
|
||||||
checkUpgrade()
|
checkUpgrade()
|
||||||
|
if os.name == 'nt':
|
||||||
|
checkUpgradeWin()
|
||||||
createDirectories()
|
createDirectories()
|
||||||
dtl_tools = checkDTLtools()
|
dtl_tools = checkDTLtools()
|
||||||
## Write the first part of outfile
|
## Write the first part of outfile
|
||||||
|
Loading…
Reference in New Issue
Block a user