-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.py
60 lines (43 loc) · 1.81 KB
/
install.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
from glob import glob
import fnmatch
import os
import shutil
def installFile(fromPath, toPath):
print('Copying "' + fromPath + '"...')
if not os.path.exists(os.path.dirname(toPath)):
os.makedirs(os.path.dirname(toPath))
shutil.copy(os.path.abspath(fromPath), toPath)
if __name__ == '__main__':
languages = [ 'en_US' ]
versions = [ 'Flash CS5.5', 'Flash CC 2015', 'Animate CC 2015' ]
userpath = os.getenv('LOCALAPPDATA') + '\\Adobe\\'
for v in versions:
for l in languages:
install = os.path.join(userpath, v, l)
if not os.path.exists(install):
continue
print('Installing at "' + install + '".')
target_iris = os.path.join(install, 'Configuration', 'IrisBuild')
if not os.path.exists(target_iris):
os.makedirs(target_iris)
# Shared library
target_libs = os.path.join(install, 'Configuration', 'External Libraries')
if not os.path.exists(target_libs):
os.makedirs(target_libs)
if os.path.exists('output\\windows\\x64\\Release\\IrisBuild.dll'):
installFile('output\\windows\\x64\\Release\\IrisBuild.dll', target_libs)
elif os.path.exists('output\\windows\\Win32\\Release\\IrisBuild.dll'):
installFile('output\\windows\\Win32\\Release\\IrisBuild.dll', target_libs)
# Scripts
target_commands = os.path.join(install, 'Configuration', 'Commands')
if not os.path.exists(target_commands):
os.makedirs(target_commands)
for f in glob('scripts\\commands\\*.jsfl'):
installFile(f, os.path.abspath(target_commands + '\\' + os.path.basename(f)))
# GUI
target_gui = os.path.join(install, 'Configuration', 'WindowSWF')
if not os.path.exists(target_gui):
os.makedirs(target_gui)
installFile('build\\IrisBuildGUI.swf', target_gui)
for f in glob('scripts\\gui\\jsfl\\*.jsfl'):
installFile(f, os.path.abspath(target_iris + '\\jsfl\\' + os.path.basename(f)))