fn run(self, builder: &Builder) -> Option<PathBuf> {
        let host = self.host;

        if !host.contains("pc-windows-gnu") {
            return None;
        }

        builder.info(&format!("Dist mingw ({})", host));
        let name = pkgname(builder, "rust-mingw");
        let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
        let _ = fs::remove_dir_all(&image);
        t!(fs::create_dir_all(&image));

        // The first argument is a "temporary directory" which is just
        // thrown away (this contains the runtime DLLs included in the rustc package
        // above) and the second argument is where to place all the MinGW components
        // (which is what we want).
        make_win_dist(&tmpdir(builder), &image, host, &builder);

        let mut cmd = rust_installer(builder);
        cmd.arg("generate")
           .arg("--product-name=Rust-MinGW")
           .arg("--rel-manifest-dir=rustlib")
           .arg("--success-message=Rust-MinGW-is-installed.")
           .arg("--image-dir").arg(&image)
           .arg("--work-dir").arg(&tmpdir(builder))
           .arg("--output-dir").arg(&distdir(builder))
           .arg(format!("--package-name={}-{}", name, host))
           .arg("--component-name=rust-mingw")
           .arg("--legacy-manifest-dirs=rustlib,cargo");
        builder.run(&mut cmd);
        t!(fs::remove_dir_all(&image));
        Some(distdir(builder).join(format!("{}-{}.tar.gz", name, host)))
    }
/// Build the `rust-mingw` installer component.
///
/// This contains all the bits and pieces to run the MinGW Windows targets
/// without any extra installed software (e.g. we bundle gcc, libraries, etc).
Build the `rust-mingw` installer component.
This contains all the bits and pieces to run the MinGW Windows targets
without any extra installed software .
Build the ` rust - mingw ` installer component . This contains all the bits and pieces to run the MinGW Windows targets without any extra installed software .
fn run(self, builder: &Builder) -> Option<PathBuf> {
        let host = self.host;
        if !host.contains("pc-windows-gnu") {
            return None;
        }
        builder.info(&format!("Dist mingw ({})", host));
        let name = pkgname(builder, "rust-mingw");
        let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
        let _ = fs::remove_dir_all(&image);
        t!(fs::create_dir_all(&image));
        // The first argument is a "temporary directory" which is just
        // thrown away (this contains the runtime DLLs included in the rustc package
        // above) and the second argument is where to place all the MinGW components
        // (which is what we want).
        make_win_dist(&tmpdir(builder), &image, host, &builder);
        let mut cmd = rust_installer(builder);
        cmd.arg("generate")
           .arg("--product-name=Rust-MinGW")
           .arg("--rel-manifest-dir=rustlib")
           .arg("--success-message=Rust-MinGW-is-installed.")
           .arg("--image-dir").arg(&image)
           .arg("--work-dir").arg(&tmpdir(builder))
           .arg("--output-dir").arg(&distdir(builder))
           .arg(format!("--package-name={}-{}", name, host))
           .arg("--component-name=rust-mingw")
           .arg("--legacy-manifest-dirs=rustlib,cargo");
        builder.run(&mut cmd);
        t!(fs::remove_dir_all(&image));
        Some(distdir(builder).join(format!("{}-{}.tar.gz", name, host)))
    }
fn run ( self , builder : & Builder ) -> Option < PathBuf > { let host = self . host ; if ! host . contains ( " " ) { return None ; } builder . info ( & format ! ( " " host ) ) ; let name = pkgname ( builder , " " ) ; let image = tmpdir ( builder ) . join ( format ! ( " " name host ) ) ; let _ = fs :: remove_dir_all ( & image ) ; t ! ( fs create_dir_all ( image ) ) ; // The first argument is a "temporary directory" which is just // thrown away (this contains the runtime DLLs included in the rustc package // above) and the second argument is where to place all the MinGW components // (which is what we want). make_win_dist ( & tmpdir ( builder ) , & image , host , & builder ) ; let mut cmd = rust_installer ( builder ) ; cmd . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( " " ) . arg ( & image ) . arg ( " " ) . arg ( & tmpdir ( builder ) ) . arg ( " " ) . arg ( & distdir ( builder ) ) . arg ( format ! ( " " name host ) ) . arg ( " " ) . arg ( " " ) ; builder . run ( & mut cmd ) ; t ! ( fs remove_dir_all ( image ) ) ; Some ( distdir ( builder ) . join ( format ! ( " " name host ) ) ) }
Build the `rust-mingw` installer component.
Build the ` rust - mingw ` installer component .
self
builder
&Builder
self
builder
&Builder