Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Visual Studio Redistributable. #771

Open
wants to merge 2 commits into
base: v2.0-dev
Choose a base branch
from
Open
Changes from all commits
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
16 changes: 15 additions & 1 deletion cmake/BuildRADE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ if (NOT download_pip_POPULATED)
FetchContent_Populate(download_pip)
endif (NOT download_pip_POPULATED)

# PyTorch needs the Visual Studio redistributable to be installed.
FetchContent_Declare(download_vsr
URL https://aka.ms/vs/16/release/vc_redist.x64.exe
DOWNLOAD_NO_EXTRACT TRUE)
if (NOT download_vsr_POPULATED)
FetchContent_Populate(download_vsr)
endif (NOT download_vsr_POPULATED)

# Per https://bnikolic.co.uk/blog/python/2022/03/14/python-embedwin.html
# there are some tweaks we need to make to the embeddable package first
# before FreeDV can use it. Additionally, renaming python312._pth does not
Expand Down Expand Up @@ -100,10 +108,16 @@ install(
DESTINATION bin/model19_check3/checkpoints
)

# Install VS Redistributable
install(
FILES ${download_vsr_SOURCE_DIR}/vc_redist.x64.exe
DESTINATION bin)

# Ensure that rade-setup.bat is executed by the installer,
# otherwise no packages will be installed.
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
"ExecShellWait '' '\$INSTDIR\\\\bin\\\\rade-setup.bat' ''")
"ExecWait '\\\"\$INSTDIR\\\\bin\\\\vc_redist.x64.exe\\\" /install /passive'
ExecShellWait '' '\$INSTDIR\\\\bin\\\\rade-setup.bat' ''")

# Make sure we fully clean up after Python on uninstall.
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
Expand Down
Loading