else:
env.Tool('mingw')
env.AppendUnique(CPPPATH = ['#c:/MinGW/include'])
+ # fix a scons winres bug (there is a missing space between ${RCINCPREFIX} and ${SOURCE.dir}
+ # in version 0.96.93
+ env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
+
# we differentiate between hard-coded options and default options
# hard-coded options are required and will always be there
if not succ:
# Under linux, I can test the following perfectly
# Under windows, lib names need to passed as libXXX4.a ...
- if platform_name == 'win32' and use_vc:
+ if platform_name == 'win32':
succ = conf.CheckLibWithHeader('QtCore4', 'QtGui/QApplication', 'c++', 'QApplication qapp();')
else:
succ = conf.CheckLibWithHeader('QtCore', 'QtGui/QApplication', 'c++', 'QApplication qapp();')
frontend_env = conf.Finish()
-if os.name == 'nt':
- # if under windows, create an rc file
- rc_file = frontend_env.File('$BUILDDIR/lyx.rc').abspath
- rc = open(rc_file, 'w')
- print >> rc, 'IDI_ICON1 ICON DISCARDABLE "%s"' % \
- os.path.join(frontend_env.Dir('$TOP_SRCDIR').abspath, 'development', 'win32',
- 'packaging', 'icons', 'lyx_32x32.ico')
- rc.close()
- frontend_env['ICON_RES'] = frontend_env.RES(rc_file)
-else:
- frontend_end['ICON_RES'] = []
-
#
# Report results
#
LIBS = ['support'] + intl_libs + system_libs +
socket_libs + boost_libraries + qtcore_lib,
source = ['$BUILDDIR/common/client/%s' % x for x in src_client_files] + \
- frontend_env['ICON_RES']
+ utils.createResFromIcon(frontend_env, 'lyx_32x32.ico', '$LOCALLIBPATH/client.rc')
)
Alias('client', frontend_env.Command(os.path.join('$BUILDDIR', os.path.split(str(client[0]))[1]),
client, [Copy('$TARGET', '$SOURCE')]))
target = '$BUILDDIR/common/tex2lyx/tex2lyx',
LIBS = ['support'] + boost_libraries + intl_libs + system_libs + qtcore_lib,
source = ['$BUILDDIR/common/tex2lyx/%s' % x for x in src_tex2lyx_files] + \
- frontend_env['ICON_RES'],
+ utils.createResFromIcon(frontend_env, 'lyx_32x32.ico', '$LOCALLIBPATH/tex2lyx.rc'),
CPPPATH = ['$BUILDDIR/common/tex2lyx', '$CPPPATH'],
LIBPATH = ['#$LOCALLIBPATH', '$LIBPATH'],
)
#
lyx = frontend_env.Program(
target = '$BUILDDIR/lyx',
- source = ['$BUILDDIR/common/main.C'] + frontend_env['ICON_RES'],
+ source = ['$BUILDDIR/common/main.C'] + \
+ utils.createResFromIcon(frontend_env, 'lyx_32x32.ico', '$LOCALLIBPATH/lyx.rc'),
LIBS = [
'lyxbase_pre',
'mathed',