]> git.lizzy.rs Git - rust.git/commitdiff
Package system runtime dependencies into Windows distribution.
authorVadim Chugunov <vadimcn@gmail.com>
Wed, 2 Oct 2013 18:40:50 +0000 (11:40 -0700)
committerVadim Chugunov <vadimcn@gmail.com>
Wed, 2 Oct 2013 18:40:50 +0000 (11:40 -0700)
mk/dist.mk
src/etc/copy-runtime-deps.py [new file with mode: 0644]
src/etc/pkg/rust.iss

index 4a980edf7673141df16ae7895f9c14c37e9b5f7e..beaa6dc52150b26cbf13d35f6cd4bb37f7063993 100644 (file)
@@ -60,6 +60,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
 
 $(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
             $(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
+       $(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py i686-pc-mingw32/stage3/bin
        @$(call E, ISCC: $@)
        $(Q)"$(CFG_ISCC)" $<
 endif
diff --git a/src/etc/copy-runtime-deps.py b/src/etc/copy-runtime-deps.py
new file mode 100644 (file)
index 0000000..16155a9
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# xfail-license
+
+# Copies Rust runtime dependencies to the specified directory
+
+import snapshot, sys, os, shutil
+
+def copy_runtime_deps(dest_dir):
+    for path in snapshot.get_winnt_runtime_deps():
+        shutil.copy(path, dest_dir)
+
+    lic_dest = os.path.join(dest_dir, "third-party")
+    shutil.rmtree(lic_dest) # copytree() won't overwrite existing files
+    shutil.copytree(os.path.join(os.path.dirname(__file__), "third-party"), lic_dest)
+
+copy_runtime_deps(sys.argv[1])
index 0375a041a39e97ab9a009b35fced5d015b0fd3e3..dc46f89121993e8350c1ba0584af7fce44a8b89d 100644 (file)
@@ -19,7 +19,7 @@ DisableStartupPrompt=true
 
 OutputDir=.\
 SourceDir=.\
-OutputBaseFilename=rust-{#CFG_VERSION}-install
+OutputBaseFilename=rust-{#CFG_VERSION_WIN}-install
 DefaultDirName={pf32}\Rust
 
 Compression=lzma2/ultra