]> git.lyx.org Git - lyx.git/blobdiff - development/scons/scons_utils.py
- new documentation
[lyx.git] / development / scons / scons_utils.py
index 1a200f0186abfd02d81ea783fe63a2c1c43c09a3..e377be94be5e5bf88a43eb095bd4f5e38d23b856 100644 (file)
@@ -80,10 +80,13 @@ def createResFromIcon(env, icon_file, rc_file):
     ''' create a rc file with icon, and return res file (windows only) '''
     if os.name == 'nt':
         rc_name = env.File(rc_file).abspath
+        dir = os.path.split(rc_name)[0]
+        if not os.path.isdir(dir):
+            os.makedirs(dir)
         rc = open(rc_name, 'w')
         print >> rc, 'IDI_ICON1  ICON DISCARDABLE "%s"' % \
             os.path.join(env.Dir('$TOP_SRCDIR').abspath, 'development', 'win32',
-                'packaging', 'icons', icon_file)
+                'packaging', 'icons', icon_file).replace('\\', '\\\\')
         rc.close()
         return env.RES(rc_name)
     else: