mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-14 12:25:11 +00:00
Scons: version_suffix windows fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14063 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
210dbf394f
commit
c8eb10bbef
@ -743,31 +743,31 @@ if 'install' in targets:
|
||||
#
|
||||
# executables (some of them may be none)
|
||||
#
|
||||
if env['ADD_SUFFIX_TO_EXECUTABLES']:
|
||||
program_suffix = env['PROGRAM_SUFFIX']
|
||||
if env['ADD_SUFFIX']:
|
||||
version_suffix = env['PROGRAM_SUFFIX']
|
||||
else:
|
||||
program_suffix = ''
|
||||
version_suffix = ''
|
||||
#
|
||||
# install lyx
|
||||
target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx%s' % program_suffix)
|
||||
target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx%s' % version_suffix)
|
||||
target = os.path.join(env['BIN_DEST_DIR'], target_name)
|
||||
env.InstallAs(target, lyx)
|
||||
Alias('install', target)
|
||||
# install lyx as lyx-qt3
|
||||
target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx-%s%s' % (frontend, program_suffix))
|
||||
target_name = os.path.split(str(lyx[0]))[1].replace('lyx', 'lyx-%s%s' % (frontend, version_suffix))
|
||||
target = os.path.join(env['BIN_DEST_DIR'], target_name)
|
||||
env.InstallAs(target, lyx)
|
||||
Alias('install', target)
|
||||
#
|
||||
# install tex2lyx
|
||||
target_name = os.path.split(str(tex2lyx[0]))[1].replace('tex2lyx', 'tex2lyx%s' % program_suffix)
|
||||
target_name = os.path.split(str(tex2lyx[0]))[1].replace('tex2lyx', 'tex2lyx%s' % version_suffix)
|
||||
target = os.path.join(env['BIN_DEST_DIR'], target_name)
|
||||
env.InstallAs(target, tex2lyx)
|
||||
Alias('install', target)
|
||||
#
|
||||
# install lyxclient, may not exist
|
||||
if client != None:
|
||||
target_name = os.path.split(str(client[0]))[1].replace('client', 'client%s' % program_suffix)
|
||||
target_name = os.path.split(str(client[0]))[1].replace('client', 'client%s' % version_suffix)
|
||||
target = os.path.join(env['BIN_DEST_DIR'], target_name)
|
||||
env.InstallAs(target, client)
|
||||
Alias('install', target)
|
||||
@ -783,19 +783,19 @@ if 'install' in targets:
|
||||
'$TOP_SRC_DIR/lib/lyx2lyx/lyx2lyx_version.py.in')
|
||||
Alias('install', dirs)
|
||||
# man
|
||||
env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyx' + env['PROGRAM_SUFFIX'] + '.1'),
|
||||
env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyx' + version_suffix + '.1'),
|
||||
env.subst('$TOP_SRC_DIR/lyx.man'))
|
||||
env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'tex2lyx' + env['PROGRAM_SUFFIX'] + '.1'),
|
||||
env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'tex2lyx' + version_suffix + '.1'),
|
||||
env.subst('$TOP_SRC_DIR/src/tex2lyx/tex2lyx.man'))
|
||||
env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyxclient' + env['PROGRAM_SUFFIX'] + '.1'),
|
||||
env.InstallAs(os.path.join(env['MAN_DEST_DIR'], 'lyxclient' + version_suffix + '.1'),
|
||||
env.subst('$TOP_SRC_DIR/src/client/lyxclient.man'))
|
||||
Alias('install', [os.path.join(env['MAN_DEST_DIR'], x + env['PROGRAM_SUFFIX'] + '.1') for
|
||||
Alias('install', [os.path.join(env['MAN_DEST_DIR'], x + version_suffix + '.1') for
|
||||
x in ['lyx', 'tex2lyx', 'lyxclient']])
|
||||
# locale files?
|
||||
# ru.gmo ==> ru/LC_MESSAGES/lyxSUFFIX.mo
|
||||
for gmo in gmo_files:
|
||||
lan = os.path.split(str(gmo))[1].split('.')[0]
|
||||
dest_file = os.path.join(env['LOCALE_DEST_DIR'], lan, 'LC_MESSAGES', 'lyx' + env['PROGRAM_SUFFIX'] + '.mo')
|
||||
dest_file = os.path.join(env['LOCALE_DEST_DIR'], lan, 'LC_MESSAGES', 'lyx' + version_suffix + '.mo')
|
||||
env.InstallAs(dest_file, gmo)
|
||||
Alias('install', dest_file)
|
||||
|
||||
|
@ -134,7 +134,6 @@ if os.name == 'nt':
|
||||
# If not specified, boost tries to figure out by itself, but it may fail.
|
||||
boost_posix = False
|
||||
packaging_method = 'windows'
|
||||
add_suffix_to_executables = False
|
||||
default_prefix = 'c:/program files/lyx'
|
||||
share_dir = 'Resources'
|
||||
man_dir = 'Resources/man/man1'
|
||||
@ -149,7 +148,6 @@ elif os.name == 'posix' and sys.platform != 'cygwin':
|
||||
default_with_x = True
|
||||
boost_posix = True
|
||||
packaging_method = 'posix'
|
||||
add_suffix_to_executables = True
|
||||
default_prefix = '/usr/local/'
|
||||
share_dir = 'share/lyx'
|
||||
man_dir = 'man/man1'
|
||||
@ -164,7 +162,6 @@ elif os.name == 'posix' and sys.platform == 'cygwin':
|
||||
default_with_x = True
|
||||
boost_posix = True
|
||||
packaging_method = 'posix'
|
||||
add_suffix_to_executables = True
|
||||
default_prefix = '/usr/local/'
|
||||
share_dir = 'share/lyx'
|
||||
man_dir = 'man/man1'
|
||||
@ -179,7 +176,6 @@ elif os.name == 'darwin':
|
||||
default_with_x = False
|
||||
boost_posix = True
|
||||
packaging_method = 'mac'
|
||||
add_suffix_to_executables = True
|
||||
# FIXME: where to install?
|
||||
default_prefix = '/usr/local/'
|
||||
share_dir = 'Resources'
|
||||
@ -195,7 +191,6 @@ else: # unsupported system
|
||||
default_with_x = True
|
||||
boost_posix = False
|
||||
packaging_method = 'posix'
|
||||
add_suffix_to_executables = True
|
||||
default_prefix = '/usr/local/'
|
||||
share_dir = 'share/lyx'
|
||||
man_dir = 'man/man1'
|
||||
@ -395,8 +390,13 @@ if env.has_key('version_suffix'):
|
||||
env['PROGRAM_SUFFIX'] = env['version_suffix']
|
||||
else:
|
||||
env['PROGRAM_SUFFIX'] = ''
|
||||
env['ADD_SUFFIX_TO_EXECUTABLES'] = add_suffix_to_executables
|
||||
env['SHARE_DIR'] = os.path.join(env['PREFIX'], share_dir + env['PROGRAM_SUFFIX'])
|
||||
|
||||
# whether or not add suffix to file and directory names
|
||||
env['ADD_SUFFIX'] = packaging_method != 'windows'
|
||||
if env['ADD_SUFFIX']:
|
||||
env['SHARE_DIR'] = os.path.join(env['PREFIX'], share_dir + env['PROGRAM_SUFFIX'])
|
||||
else:
|
||||
env['SHARE_DIR'] = os.path.join(env['PREFIX'], share_dir)
|
||||
env['LOCALE_DIR'] = os.path.join(env['PREFIX'], locale_dir)
|
||||
#
|
||||
# if dest_dir is different from prefix.
|
||||
@ -405,7 +405,10 @@ if env.has_key('exec_prefix'):
|
||||
env['BIN_DEST_DIR'] = env['exec_prefix']
|
||||
else:
|
||||
env['BIN_DEST_DIR'] = os.path.join(env['DEST_DIR'], 'bin')
|
||||
env['SHARE_DEST_DIR'] = os.path.join(env['DEST_DIR'], share_dir + env['PROGRAM_SUFFIX'])
|
||||
if env['ADD_SUFFIX']:
|
||||
env['SHARE_DEST_DIR'] = os.path.join(env['DEST_DIR'], share_dir + env['PROGRAM_SUFFIX'])
|
||||
else:
|
||||
env['SHARE_DEST_DIR'] = os.path.join(env['DEST_DIR'], share_dir)
|
||||
env['MAN_DEST_DIR'] = os.path.join(env['DEST_DIR'], man_dir)
|
||||
env['LOCALE_DEST_DIR'] = os.path.join(env['DEST_DIR'], locale_dir)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user