pub unsafe extern "system" fn RustupInstall(hInstall: MSIHANDLE) -> UINT {
    let name = CString::new("RustupInstall").unwrap();
    let hr = WcaInitialize(hInstall, name.as_ptr());
    // For deferred custom actions, all data must be passed through the `CustomActionData` property
    let custom_action_data = get_property("CustomActionData");
    let parsed_ca_data = parse_custom_action_data(&custom_action_data);
    let path = PathBuf::from(parsed_ca_data.get("INSTALLLOCATION").unwrap());
    let bin_path = path.join("bin");
    let rustup_path = bin_path.join("rustup.exe");
    let exe_installed = rustup_path.exists();
    log(&format!("Hello World from RustupInstall, confirming that rustup.exe has been installed: {}! CustomActionData: {}", exe_installed, custom_action_data));
    log(&format!("Parsed CA data: {:?}", parsed_ca_data));
    for tool in TOOLS {
        let ref tool_path = bin_path.join(&format!("{}.exe", tool));
        ::rustup::utils::hardlink_file(&rustup_path, tool_path);
    }
    // TODO: install default toolchain and report progress to UI
    WcaFinalize(hr)
}
/// This is be run as a `deferred` action after `InstallFiles` on install and upgrade
This is be run as a `deferred` action after `InstallFiles` on install and upgrade
This is be run as a ` deferred ` action after ` InstallFiles ` on install and upgrade
pub unsafe extern "system" fn RustupInstall(hInstall: MSIHANDLE) -> UINT {
    let name = CString::new("RustupInstall").unwrap();
    let hr = WcaInitialize(hInstall, name.as_ptr());
    // For deferred custom actions, all data must be passed through the `CustomActionData` property
    let custom_action_data = get_property("CustomActionData");
    let parsed_ca_data = parse_custom_action_data(&custom_action_data);
    let path = PathBuf::from(parsed_ca_data.get("INSTALLLOCATION").unwrap());
    let bin_path = path.join("bin");
    let rustup_path = bin_path.join("rustup.exe");
    let exe_installed = rustup_path.exists();
    log(&format!("Hello World from RustupInstall, confirming that rustup.exe has been installed: {}! CustomActionData: {}", exe_installed, custom_action_data));
    log(&format!("Parsed CA data: {:?}", parsed_ca_data));
    for tool in TOOLS {
        let ref tool_path = bin_path.join(&format!("{}.exe", tool));
        ::rustup::utils::hardlink_file(&rustup_path, tool_path);
    }
    // TODO: install default toolchain and report progress to UI
    WcaFinalize(hr)
}
pub unsafe extern " " fn RustupInstall ( hInstall : MSIHANDLE ) -> UINT { let name = CString :: new ( " " ) . unwrap ( ) ; let hr = WcaInitialize ( hInstall , name . as_ptr ( ) ) ; // For deferred custom actions, all data must be passed through the `CustomActionData` property let custom_action_data = get_property ( " " ) ; let parsed_ca_data = parse_custom_action_data ( & custom_action_data ) ; let path = PathBuf :: from ( parsed_ca_data . get ( " " ) . unwrap ( ) ) ; let bin_path = path . join ( " " ) ; let rustup_path = bin_path . join ( " " ) ; let exe_installed = rustup_path . exists ( ) ; log ( & format ! ( " " exe_installed custom_action_data ) ) ; log ( & format ! ( " " parsed_ca_data ) ) ; for tool in TOOLS { let ref tool_path = bin_path . join ( & format ! ( " " tool ) ) ; :: rustup :: utils :: hardlink_file ( & rustup_path , tool_path ) ; } // TODO: install default toolchain and report progress to UI WcaFinalize ( hr ) }
This is be run as a `deferred` action after `InstallFiles` on install and upgrade
This is be run as a ` deferred ` action after ` InstallFiles ` on install and upgrade
hInstall
MSIHANDLE
hInstall
MSIHANDLE