diff --git a/scripts/mk_unix_dist.py b/scripts/mk_unix_dist.py index 48f4e49cf..60a7cbdca 100644 --- a/scripts/mk_unix_dist.py +++ b/scripts/mk_unix_dist.py @@ -22,6 +22,7 @@ BUILD_DIR='build-dist' VERBOSE=True DIST_DIR='dist' FORCE_MK=False +DOTNET_ENABLED=True JAVA_ENABLED=True GIT_HASH=False @@ -50,6 +51,7 @@ def display_help(): print(" -s, --silent do not print verbose messages.") print(" -b , --build= 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(" --nojava do not include Java bindings in the binary distribution files.") print(" --githash include git hash in the Zip file.") exit(0) @@ -76,6 +78,8 @@ def parse_options(): display_help() elif opt in ('-f', '--force'): FORCE_MK = True + elif opt == '--nodotnet': + DOTNET_ENABLED = False elif opt == '--nojava': JAVA_ENABLED = False elif opt == '--githash': @@ -92,6 +96,8 @@ def check_build_dir(path): 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, "--static"] + if DOTNET_ENABLED: + opts.append('--dotnet') if JAVA_ENABLED: opts.append('--java') if GIT_HASH: @@ -163,10 +169,8 @@ def mk_dist_dir(): build_path = BUILD_DIR dist_path = os.path.join(DIST_DIR, get_z3_name()) mk_dir(dist_path) - if JAVA_ENABLED: - # HACK: Propagate JAVA_ENABLED flag to mk_util - # TODO: fix this hack - mk_util.JAVA_ENABLED = JAVA_ENABLED + mk_util.DOTNET_ENABLED = DOTNET_ENABLED + mk_util.JAVA_ENABLED = JAVA_ENABLED mk_unix_dist(build_path, dist_path) if is_verbose(): print("Generated distribution folder at '%s'" % dist_path)