Debian Codegraph @

util/vc90crt.py

raw
1 import os
2 import platform
3 import shutil
4
5 import winmanifest
6
7 name = "Microsoft.VC90.CRT"
8
9
10 def vc90crt_find_files():
11 if platform.architecture()[0] == "64bit":
12 arch = "amd64"
13 else:
14 arch = "x86"
15 return winmanifest.Manifest(
16 processorArchitecture=arch,
17 name=name,
18 publicKeyToken="1fc8b3b9a1e18e3b",
19 version=[9, 0, 30729, 9625],
20 ).find_files()
21
22
23 def vc90crt_copy_files(dest_dir):
24 if not os.path.exists(dest_dir):
25 os.makedirs(dest_dir)
26 for filename in vc90crt_find_files():
27 dest = os.path.join(
28 dest_dir,
29 name + ".manifest"
30 if filename.endswith(".manifest")
31 else os.path.basename(filename),
32 )
33 if not os.path.exists(dest):
34 shutil.copy2(filename, dest)