forked from seeebek/EliteOCR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.py
82 lines (70 loc) · 1.75 KB
/
make.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
from subprocess import call
from shutil import copy, copytree, rmtree, move
try:
rmtree("./dist/bin/")
print "bin deleted"
except:
print "bin not deleted"
try:
retcode = call("pyinstaller --onedir EliteOCR.spec")
print ""
print "pyinstaller finished with code: " + str(retcode)
except:
print "pyinstaller error"
"""
try:
rmtree("./dist/tessdata/")
print "tessdata deleted"
except:
print "tessdata not deleted"
"""
try:
copytree("./tessdata/", "./dist/tessdata/")
print "tessdata copied"
except:
print "tessdata not copied"
try:
copytree("./tessdata/", "./dist/EliteOCR/tessdata/")
print "tessdata copied to bin"
except:
print "tessdata not copied to bin"
try:
copytree("./translations/", "./dist/EliteOCR/translations/")
print "translations copied"
except:
print "translations not copied"
try:
copytree("./nn_scripts/", "./dist/EliteOCR/nn_scripts/")
print "nn_scripts copied"
except:
print "nn_scripts not copied"
try:
copytree("./plugins/", "./dist/EliteOCR/plugins/")
print "plugins copied"
except:
print "plugins not copied"
try:
copytree("./help/", "./dist/EliteOCR/help/")
print "help copied"
except:
print "help not copied"
try:
copy("./commodities.json", "./dist/EliteOCR/commodities.json")
print "commodities copied"
except:
print "commodities not copied"
try:
copy("./LICENSE", "./dist/LICENSE")
print "LICENSE copied"
except:
print "LICENSE not copied"
try:
copy("./README.md", "./dist/README.md")
print "README.md copied"
except:
print "README.md not copied"
try:
move("./dist/EliteOCR/", "./dist/bin/")
print "EliteOCR renamed to bin"
except:
print "EliteOCR not renamed"