Skip to content

Commit 4e59ab0

Browse files
committed
Package system runtime dependencies into Windows distribution.
1 parent 1a6b6c4 commit 4e59ab0

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
6060

6161
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
6262
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
63+
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py i686-pc-mingw32/stage3/bin
6364
@$(call E, ISCC: $@)
6465
$(Q)"$(CFG_ISCC)" $<
6566
endif

src/etc/copy-runtime-deps.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python
2+
# xfail-license
3+
4+
# Copies Rust runtime dependencies to the specified directory
5+
6+
import snapshot, sys, os, shutil
7+
8+
def copy_runtime_deps(dest_dir):
9+
for path in snapshot.get_winnt_runtime_deps():
10+
shutil.copy(path, dest_dir)
11+
12+
lic_dest = os.path.join(dest_dir, "third-party")
13+
shutil.rmtree(lic_dest) # copytree() won't overwrite existing files
14+
shutil.copytree(os.path.join(os.path.dirname(__file__), "third-party"), lic_dest)
15+
16+
copy_runtime_deps(sys.argv[1])

src/etc/pkg/rust.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ DisableStartupPrompt=true
1919

2020
OutputDir=.\
2121
SourceDir=.\
22-
OutputBaseFilename=rust-{#CFG_VERSION}-install
22+
OutputBaseFilename=rust-{#CFG_VERSION_WIN}-install
2323
DefaultDirName={pf32}\Rust
2424

2525
Compression=lzma2/ultra

0 commit comments

Comments
 (0)