Skip to content

Commit

Permalink
update path for win distributions
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Jan 30, 2024
1 parent bef67f8 commit f7ed4ad
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/mk_win_dist_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ def get_z3_name(arch):
def get_build_dir(arch):
return ARCHITECTURES[arch]

def get_build_dist_path(arch):
def get_build_dist(arch):
return os.path.join(get_build_dir(arch), DIST_DIR)

def get_bin_path(arch):
def get_build_dist_path(arch):
return os.path.join(get_build_dir(arch), DIST_DIR, get_z3_name(arch))

def get_bin_dist_path(arch):
return os.path.join(get_build_dist_path(arch), "bin")

def get_dist_path(arch):
Expand Down Expand Up @@ -234,7 +237,7 @@ def mk_build_dir(arch):
cmd.append(' -DZ3_USE_LIB_GMP=OFF')
cmd.append(' -DZ3_BUILD_LIBZ3_SHARED=ON')
cmd.append(' -DCMAKE_BUILD_TYPE=RelWithDebInfo')
cmd.append(' -DCMAKE_INSTALL_PREFIX=' + DIST_DIR)
cmd.append(' -DCMAKE_INSTALL_PREFIX=' + os.path.join(DIST_DIR, get_z3_name(arch)))
cmd.append(' -G "Ninja"')
cmd.append(' ../..\n')
cmds.append("".join(cmd))
Expand Down Expand Up @@ -302,7 +305,7 @@ def mk_zip(arch):
mk_dir(dist_path)
zfname = os.path.join(dist_path, '%s.zip' % dist_name)
zipout = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
os.chdir(build_dist)
os.chdir(get_build_dist(arch))
for root, dirs, files in os.walk("."):
for f in files:
if is_verbose():
Expand Down Expand Up @@ -347,7 +350,7 @@ def check_root(root):
vs_runtime_files.append(fname)
if not vs_runtime_files:
raise MKException("Did not find any runtime files to include")
bin_dist_path = get_bin_path(arch)
bin_dist_path = get_bin_dist_path(arch)
for f in vs_runtime_files:
shutil.copy(f, bin_dist_path)
if is_verbose():
Expand Down Expand Up @@ -375,7 +378,7 @@ def cp_pdb(arch):
if is_verbose():
print("copy pdb")
build_dir = get_build_dir(arch)
bin_path = get_bin_path(arch)
bin_path = get_bin_dist_path(arch)
mk_dir(bin_path)
for f in os.listdir(build_dir):
if f.endswith("pdb"):
Expand Down

0 comments on commit f7ed4ad

Please sign in to comment.