1 #!/usr/bin/env python3 |
1 #!/usr/bin/env python3 |
2 # -*- coding: utf-8 -*- |
2 # -*- coding: utf-8 -*- |
3 |
3 |
4 # Copyright (c) 2004 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # Copyright (c) 2004 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
5 # |
5 # |
6 # This is the install script for eric5's translation files. |
6 # This is the install script for eric6's translation files. |
7 |
7 |
8 """ |
8 """ |
9 Installation script for the eric5 IDE translation files. |
9 Installation script for the eric6 IDE translation files. |
10 """ |
10 """ |
11 |
11 |
12 from __future__ import unicode_literals |
12 from __future__ import unicode_literals |
13 |
13 |
14 import sys |
14 import sys |
17 import glob |
17 import glob |
18 |
18 |
19 from PyQt5.QtCore import QDir |
19 from PyQt5.QtCore import QDir |
20 |
20 |
21 try: |
21 try: |
22 from eric5config import getConfig |
22 from eric6config import getConfig |
23 except ImportError: |
23 except ImportError: |
24 print("The eric5 IDE doesn't seem to be installed. Aborting.") |
24 print("The eric6 IDE doesn't seem to be installed. Aborting.") |
25 sys.exit(1) |
25 sys.exit(1) |
26 |
26 |
27 |
27 |
28 def getConfigDir(): |
28 def getConfigDir(): |
29 """ |
29 """ |
30 Global function to get the name of the directory storing the config data. |
30 Global function to get the name of the directory storing the config data. |
31 |
31 |
32 @return directory name of the config dir (string) |
32 @return directory name of the config dir (string) |
33 """ |
33 """ |
34 if sys.platform.startswith("win"): |
34 if sys.platform.startswith("win"): |
35 cdn = "_eric5" |
35 cdn = "_eric6" |
36 else: |
36 else: |
37 cdn = ".eric5" |
37 cdn = ".eric6" |
38 |
38 |
39 hp = QDir.homePath() |
39 hp = QDir.homePath() |
40 dn = QDir(hp) |
40 dn = QDir(hp) |
41 dn.mkdir(cdn) |
41 dn.mkdir(cdn) |
42 hp += "/" + cdn |
42 hp += "/" + cdn |