173 print() |
173 print() |
174 print("The file given to the -f option must be valid Python code" |
174 print("The file given to the -f option must be valid Python code" |
175 " defining a") |
175 " defining a") |
176 print("dictionary called 'cfg' with the keys 'ericDir', 'ericPixDir'," |
176 print("dictionary called 'cfg' with the keys 'ericDir', 'ericPixDir'," |
177 " 'ericIconDir',") |
177 " 'ericIconDir',") |
178 print("'ericDTDDir', 'ericCSSDir', 'ericStylesDir', 'ericDocDir'," |
178 print("'ericDTDDir', 'ericCSSDir', 'ericStylesDir', 'ericThemesDir',") |
179 " 'ericExamplesDir',") |
179 print(" 'ericDocDir', ericExamplesDir',") |
180 print("'ericTranslationsDir', 'ericTemplatesDir', 'ericCodeTemplatesDir',") |
180 print("'ericTranslationsDir', 'ericTemplatesDir', 'ericCodeTemplatesDir',") |
181 print("'ericOthersDir','bindir', 'mdir' and 'apidir.") |
181 print("'ericOthersDir','bindir', 'mdir' and 'apidir.") |
182 print("These define the directories for the installation of the various" |
182 print("These define the directories for the installation of the various" |
183 " parts of eric.") |
183 " parts of eric.") |
184 |
184 |
535 |
535 |
536 # Cleanup the install directories |
536 # Cleanup the install directories |
537 for name in ['ericExamplesDir', 'ericDocDir', 'ericDTDDir', |
537 for name in ['ericExamplesDir', 'ericDocDir', 'ericDTDDir', |
538 'ericCSSDir', 'ericIconDir', 'ericPixDir', |
538 'ericCSSDir', 'ericIconDir', 'ericPixDir', |
539 'ericTemplatesDir', 'ericCodeTemplatesDir', |
539 'ericTemplatesDir', 'ericCodeTemplatesDir', |
540 'ericOthersDir', 'ericStylesDir', 'ericDir']: |
540 'ericOthersDir', 'ericStylesDir', 'ericThemesDir', |
|
541 'ericDir']: |
541 if os.path.exists(getConfig(name)): |
542 if os.path.exists(getConfig(name)): |
542 shutil.rmtree(getConfig(name), True) |
543 shutil.rmtree(getConfig(name), True) |
543 |
544 |
544 # Cleanup translations |
545 # Cleanup translations |
545 for name in glob.glob( |
546 for name in glob.glob( |
755 ['*.css']) |
756 ['*.css']) |
756 copyTree( |
757 copyTree( |
757 os.path.join(eric7SourceDir, "Styles"), |
758 os.path.join(eric7SourceDir, "Styles"), |
758 cfg['ericStylesDir'], |
759 cfg['ericStylesDir'], |
759 ['*.qss', '*.ehj']) |
760 ['*.qss', '*.ehj']) |
|
761 copyTree( |
|
762 os.path.join(eric7SourceDir, "Themes"), |
|
763 cfg['ericThemesDir'], |
|
764 ['*.qss', '*.ethj']) |
760 copyTree( |
765 copyTree( |
761 os.path.join(eric7SourceDir, "i18n"), |
766 os.path.join(eric7SourceDir, "i18n"), |
762 cfg['ericTranslationsDir'], |
767 cfg['ericTranslationsDir'], |
763 ['*.qm']) |
768 ['*.qm']) |
764 copyTree( |
769 copyTree( |
1213 'ericPixDir': os.path.join(ericdir, "pixmaps"), |
1218 'ericPixDir': os.path.join(ericdir, "pixmaps"), |
1214 'ericIconDir': os.path.join(ericdir, "icons"), |
1219 'ericIconDir': os.path.join(ericdir, "icons"), |
1215 'ericDTDDir': os.path.join(ericdir, "DTDs"), |
1220 'ericDTDDir': os.path.join(ericdir, "DTDs"), |
1216 'ericCSSDir': os.path.join(ericdir, "CSSs"), |
1221 'ericCSSDir': os.path.join(ericdir, "CSSs"), |
1217 'ericStylesDir': os.path.join(ericdir, "Styles"), |
1222 'ericStylesDir': os.path.join(ericdir, "Styles"), |
|
1223 'ericThemesDir': os.path.join(ericdir, "Themes"), |
1218 'ericDocDir': os.path.join(ericdir, "Documentation"), |
1224 'ericDocDir': os.path.join(ericdir, "Documentation"), |
1219 'ericExamplesDir': os.path.join(ericdir, "Examples"), |
1225 'ericExamplesDir': os.path.join(ericdir, "Examples"), |
1220 'ericTranslationsDir': os.path.join(ericdir, "i18n"), |
1226 'ericTranslationsDir': os.path.join(ericdir, "i18n"), |
1221 'ericTemplatesDir': os.path.join(ericdir, "DesignerTemplates"), |
1227 'ericTemplatesDir': os.path.join(ericdir, "DesignerTemplates"), |
1222 'ericCodeTemplatesDir': os.path.join(ericdir, 'CodeTemplates'), |
1228 'ericCodeTemplatesDir': os.path.join(ericdir, 'CodeTemplates'), |
1279 """ 'ericPixDir': r'{1}',\n""" |
1285 """ 'ericPixDir': r'{1}',\n""" |
1280 """ 'ericIconDir': r'{2}',\n""" |
1286 """ 'ericIconDir': r'{2}',\n""" |
1281 """ 'ericDTDDir': r'{3}',\n""" |
1287 """ 'ericDTDDir': r'{3}',\n""" |
1282 """ 'ericCSSDir': r'{4}',\n""" |
1288 """ 'ericCSSDir': r'{4}',\n""" |
1283 """ 'ericStylesDir': r'{5}',\n""" |
1289 """ 'ericStylesDir': r'{5}',\n""" |
1284 """ 'ericDocDir': r'{6}',\n""" |
1290 """ 'ericThemesDir': r'{6}',\n""" |
1285 """ 'ericExamplesDir': r'{7}',\n""" |
1291 """ 'ericDocDir': r'{7}',\n""" |
1286 """ 'ericTranslationsDir': r'{8}',\n""" |
1292 """ 'ericExamplesDir': r'{8}',\n""" |
1287 """ 'ericTemplatesDir': r'{9}',\n""" |
1293 """ 'ericTranslationsDir': r'{9}',\n""" |
1288 """ 'ericCodeTemplatesDir': r'{10}',\n""" |
1294 """ 'ericTemplatesDir': r'{10}',\n""" |
1289 """ 'ericOthersDir': r'{11}',\n""" |
1295 """ 'ericCodeTemplatesDir': r'{11}',\n""" |
1290 """ 'bindir': r'{12}',\n""" |
1296 """ 'ericOthersDir': r'{12}',\n""" |
1291 """ 'mdir': r'{13}',\n""" |
1297 """ 'bindir': r'{13}',\n""" |
1292 """ 'apidir': r'{14}',\n""" |
1298 """ 'mdir': r'{14}',\n""" |
1293 """ 'apis': {15},\n""" |
1299 """ 'apidir': r'{15}',\n""" |
1294 """{16}""" |
1300 """ 'apis': {16},\n""" |
|
1301 """{17}""" |
1295 """}}\n""" |
1302 """}}\n""" |
1296 """\n""" |
1303 """\n""" |
1297 """def getConfig(name):\n""" |
1304 """def getConfig(name):\n""" |
1298 """ '''\n""" |
1305 """ '''\n""" |
1299 """ Module function to get a configuration value.\n""" |
1306 """ Module function to get a configuration value.\n""" |
1312 """ '"{{0}}" is not a valid configuration value'""" |
1319 """ '"{{0}}" is not a valid configuration value'""" |
1313 """.format(name))\n""" |
1320 """.format(name))\n""" |
1314 ).format( |
1321 ).format( |
1315 cfg['ericDir'], cfg['ericPixDir'], cfg['ericIconDir'], |
1322 cfg['ericDir'], cfg['ericPixDir'], cfg['ericIconDir'], |
1316 cfg['ericDTDDir'], cfg['ericCSSDir'], |
1323 cfg['ericDTDDir'], cfg['ericCSSDir'], |
1317 cfg['ericStylesDir'], cfg['ericDocDir'], |
1324 cfg['ericStylesDir'], cfg['ericThemesDir'], cfg['ericDocDir'], |
1318 cfg['ericExamplesDir'], cfg['ericTranslationsDir'], |
1325 cfg['ericExamplesDir'], cfg['ericTranslationsDir'], |
1319 cfg['ericTemplatesDir'], |
1326 cfg['ericTemplatesDir'], |
1320 cfg['ericCodeTemplatesDir'], cfg['ericOthersDir'], |
1327 cfg['ericCodeTemplatesDir'], cfg['ericOthersDir'], |
1321 cfg['bindir'], cfg['mdir'], |
1328 cfg['bindir'], cfg['mdir'], |
1322 cfg['apidir'], sorted(apis), |
1329 cfg['apidir'], sorted(apis), |