mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	fixing mk-win-dist to include redist #1924
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									cea15c8780
								
							
						
					
					
						commit
						a000747605
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -257,11 +257,21 @@ def cp_vs_runtime(x64):
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        platform = "x86"
 | 
					        platform = "x86"
 | 
				
			||||||
    vcdir = os.environ['VCINSTALLDIR']
 | 
					    vcdir = os.environ['VCINSTALLDIR']
 | 
				
			||||||
    path  = '%sredist\\%s' % (vcdir, platform)
 | 
					    path  = '%sredist' % vcdir
 | 
				
			||||||
    vs_runtime_files = []
 | 
					    vs_runtime_files = []
 | 
				
			||||||
 | 
					    print("Walking %s" % path)
 | 
				
			||||||
 | 
					    # Everything changes with every release of VS
 | 
				
			||||||
 | 
					    # Prior versions of VS had DLLs under "redist\x64"
 | 
				
			||||||
 | 
					    # There are now several variants of redistributables
 | 
				
			||||||
 | 
					    # The naming convention defies my understanding so 
 | 
				
			||||||
 | 
					    # we use a "check_root" filter to find some hopefully suitable
 | 
				
			||||||
 | 
					    # redistributable.
 | 
				
			||||||
 | 
					    def check_root(root):
 | 
				
			||||||
 | 
					        return platform in root and "CRT" in root and "onecore" not in root and "debug" not in root
 | 
				
			||||||
    for root, dirs, files in os.walk(path):
 | 
					    for root, dirs, files in os.walk(path):
 | 
				
			||||||
        for filename in files:
 | 
					        for filename in files:
 | 
				
			||||||
            if fnmatch(filename, '*.dll'):
 | 
					            if fnmatch(filename, '*.dll') and check_root(root):
 | 
				
			||||||
 | 
					                print("Checking %s %s" % (root, filename))
 | 
				
			||||||
                for pat in VS_RUNTIME_PATS:
 | 
					                for pat in VS_RUNTIME_PATS:
 | 
				
			||||||
                    if pat.match(filename):
 | 
					                    if pat.match(filename):
 | 
				
			||||||
                        fname = os.path.join(root, filename)
 | 
					                        fname = os.path.join(root, filename)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue