mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-27 01:39:22 +00:00 
			
		
		
		
	Enabled donet key file in dist scripts
This commit is contained in:
		
							parent
							
								
									6f874c5c1d
								
							
						
					
					
						commit
						d5954e829b
					
				
					 2 changed files with 22 additions and 4 deletions
				
			
		|  | @ -23,6 +23,7 @@ VERBOSE=True | |||
| DIST_DIR='dist' | ||||
| FORCE_MK=False | ||||
| DOTNET_ENABLED=True | ||||
| DOTNET_KEY_FILE=None | ||||
| JAVA_ENABLED=True | ||||
| GIT_HASH=False | ||||
| 
 | ||||
|  | @ -52,13 +53,14 @@ def display_help(): | |||
|     print("  -b <sudir>, --build=<subdir>  subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).") | ||||
|     print("  -f, --force                   force script to regenerate Makefiles.") | ||||
|     print("  --nodotnet                    do not include .NET bindings in the binary distribution files.") | ||||
|     print("  --dotnet-key=<file>           sign the .NET assembly with the private key in <file>.") | ||||
|     print("  --nojava                      do not include Java bindings in the binary distribution files.") | ||||
|     print("  --githash                     include git hash in the Zip file.") | ||||
|     exit(0) | ||||
| 
 | ||||
| # Parse configuration option for mk_make script | ||||
| def parse_options(): | ||||
|     global FORCE_MK, JAVA_ENABLED, GIT_HASH, DOTNET_ENABLED | ||||
|     global FORCE_MK, JAVA_ENABLED, GIT_HASH, DOTNET_ENABLED, DOTNET_KEY_FILE | ||||
|     path = BUILD_DIR | ||||
|     options, remainder = getopt.gnu_getopt(sys.argv[1:], 'b:hsf', ['build=',  | ||||
|                                                                    'help', | ||||
|  | @ -66,6 +68,7 @@ def parse_options(): | |||
|                                                                    'force', | ||||
|                                                                    'nojava', | ||||
|                                                                    'nodotnet', | ||||
|                                                                    'dotnet-key=', | ||||
|                                                                    'githash' | ||||
|                                                                    ]) | ||||
|     for opt, arg in options: | ||||
|  | @ -80,7 +83,9 @@ def parse_options(): | |||
|         elif opt in ('-f', '--force'): | ||||
|             FORCE_MK = True | ||||
|         elif opt == '--nodotnet': | ||||
|             DOTNET_ENABLED = False             | ||||
|             DOTNET_ENABLED = False | ||||
|         elif opt == '--dotnet-key': | ||||
|             DOTNET_KEY_FILE = arg | ||||
|         elif opt == '--nojava': | ||||
|             JAVA_ENABLED = False | ||||
|         elif opt == '--githash': | ||||
|  | @ -98,11 +103,14 @@ def mk_build_dir(path): | |||
|     if not check_build_dir(path) or FORCE_MK: | ||||
|         opts = ["python", os.path.join('scripts', 'mk_make.py'), "-b", path, "--staticlib"] | ||||
|         if DOTNET_ENABLED: | ||||
|             opts.append('--dotnet')             | ||||
|             opts.append('--dotnet') | ||||
|             if not DOTNET_KEY_FILE is None: | ||||
|                 opts.append('--dotnet-key=' + DOTNET_KEY_FILE) | ||||
|         if JAVA_ENABLED: | ||||
|             opts.append('--java') | ||||
|         if GIT_HASH: | ||||
|             opts.append('--githash=%s' % mk_util.git_hash()) | ||||
|             opts.append('--git-describe')) | ||||
|         if subprocess.call(opts) != 0: | ||||
|             raise MKException("Failed to generate build directory at '%s'" % path) | ||||
|      | ||||
|  | @ -171,6 +179,7 @@ def mk_dist_dir(): | |||
|     dist_path = os.path.join(DIST_DIR, get_z3_name()) | ||||
|     mk_dir(dist_path) | ||||
|     mk_util.DOTNET_ENABLED = DOTNET_ENABLED | ||||
|     mk_util.DOTNET_KEY_FILE = DOTNET_KEY_FILE | ||||
|     mk_util.JAVA_ENABLED = JAVA_ENABLED | ||||
|     mk_unix_dist(build_path, dist_path) | ||||
|     if is_verbose(): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue