-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathmake_install_folder_dotnet.py
38 lines (30 loc) · 1.49 KB
/
make_install_folder_dotnet.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
import os
import shutil
import sys
import install_tools as it
it.base_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),'..')
it.path_to_install_folder = os.path.join(it.base_path,'install_dotnet')
it.path_to_app = it.path_to_install_folder
it.path_to_copyright_header = os.path.join(os.path.dirname(os.path.abspath(__file__)),'copyright_header.txt')
it.path_to_sources = os.path.join(it.base_path,'source')
it.path_to_objects = os.path.join(os.path.join(it.base_path,'source'), 'x64')
excluded_modules = ['MRCommonPlugins', 'MRCuda', 'MRViewer', 'MRMeshViewer', 'MRTest', 'MRTestC','c-sharp-examples']
def create_directories():
os.makedirs(it.path_to_app,exist_ok=True)
os.makedirs(os.path.join(it.path_to_app, 'Debug'),exist_ok=True)
os.makedirs(os.path.join(it.path_to_app, 'Release'),exist_ok=True)
it.create_directories = create_directories
def copy_app():
configs = ['Debug','Release'];
for config in configs:
path_to_objects = os.path.join(it.path_to_objects,config)
objFolder = os.walk(path_to_objects)
path_to_app = os.path.join(it.path_to_app,config)
for address, dirs, files in objFolder:
for file in files:
if ((file.endswith('.dll') and not any(map(file.startswith, excluded_modules)))):
src = os.path.join(address,file)
dst = os.path.join(path_to_app,file)
shutil.copyfile(src, dst)
it.copy_app = copy_app
it.main()