Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
handle new Windows zip
  • Loading branch information
rheiland committed Mar 9, 2025
commit 119905db98e48507e49cae06e469036abe94891a
25 changes: 4 additions & 21 deletions beta/setup_libroadrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def reminder_dynamic_link_path_linux():
rr_file = ""
url = ""

workflow_v2 = True
if os_type.lower() == 'darwin':
reminder_dynamic_link_path_macos()
if "ARM64" in platform.uname().version:
Expand All @@ -58,9 +57,8 @@ def reminder_dynamic_link_path_linux():
rr_file = "roadrunner_macos_x86_64.zip"
url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/" + rr_file
elif os_type.lower().startswith("win"):
workflow_v2 = False
rr_file = "roadrunner-win64-vs14-cp35m.zip"
url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.4.18/" + rr_file + "/download"
rr_file = "roadrunner_win_x86_64.zip"
url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/" + rr_file
elif os_type.lower().startswith("linux"):
reminder_dynamic_link_path_linux()
rr_file = "roadrunner_ubuntu_24.zip"
Expand All @@ -69,11 +67,7 @@ def reminder_dynamic_link_path_linux():
print("Your operating system seems to be unsupported. Please submit a ticket at https://sourceforge.net/p/physicell/tickets/ ")
sys.exit(1)

print("url=",url)
if workflow_v2:
fname = url.split('/')[-1]
else:
fname = url.split('/')[-2]
fname = url.split('/')[-1]
print("fname=",fname)

print('libRoadRunner will now be installed into this location:')
Expand Down Expand Up @@ -138,7 +132,6 @@ def download_cb(blocknum, blocksize, totalsize):
try:
with zipfile.ZipFile(rr_file) as zf:
zf.extractall('.')
os.rename("roadrunner-win64-vs14-cp35m", new_dir_name)
except:
print('error unzipping the file')
exit(1)
Expand All @@ -147,18 +140,8 @@ def download_cb(blocknum, blocksize, totalsize):
print(f'unzipping (uncompressing) {rr_file}')
with zipfile.ZipFile(rr_file) as zf:
zf.extractall('.')
# os.rename("roadrunner_macos_arm64", new_dir_name) # new workflow has this name
except:
print('error unzipping the file')
exit(1)

print('Done.\n')

# # LIBRR_DIR := /Users/heiland/libroadrunner/roadrunner-osx-10.9-cp36m
# print("Replace the following variables in your PhysiCell Makefile with these:\n")
# #print("LIBRR_DIR := /Users/heiland/libroadrunner/roadrunner-osx-10.9-cp36m")
# print("LIBRR_DIR := " + rrlib_dir)
# if os_type == 'Windows':
# print("LIBRR_LIBS := " + rrlib_dir + "/bin\n")
# else:
# print("LIBRR_LIBS := " + rrlib_dir + "/lib\n")
print('Done.\n')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also clean up the downloaded zip file for the user?

Loading