diff --git a/crates/rattler/resources/README.txt b/crates/rattler/resources/README.txt new file mode 100644 index 000000000..cb3c20fb7 --- /dev/null +++ b/crates/rattler/resources/README.txt @@ -0,0 +1,15 @@ +# The Python launchers + +To launch Python entrypoints on Windows, we need a corresponding executable (shebangs do not work on Windows). + +For this reason, we use the same `cli-32.exe` and `cli-64.exe` files as found in `conda`. +These entry points are signed by Anaconda Inc. + +They were taken at the following commit: be5da40dc6f18de7d0690afa1fefff13955ef4ab from the conda git repository () + +The hashes are: + +- `cli-32.exe`: `0170dda609519c088b1e4619a1e1d15a01701a6c514bb55f99a85fcbbd541631` + - source in conda/conda: https://github.com/conda/conda/blob/be5da40dc6f18de7d0690afa1fefff13955ef4ab/conda/shell/cli-32.exe +- `cli-64.exe`: `92c15cccdeecc3856c69dd7d47fe01d8d7782b6f4ada1dbd86790a5e702ea73f` + - source in conda/conda: https://github.com/conda/conda/blob/be5da40dc6f18de7d0690afa1fefff13955ef4ab/conda/shell/cli-64.exe diff --git a/crates/rattler/resources/cli-32.exe b/crates/rattler/resources/cli-32.exe new file mode 100644 index 000000000..4e6d4af28 Binary files /dev/null and b/crates/rattler/resources/cli-32.exe differ diff --git a/crates/rattler/resources/cli-64.exe b/crates/rattler/resources/cli-64.exe new file mode 100644 index 000000000..c62a80ce3 Binary files /dev/null and b/crates/rattler/resources/cli-64.exe differ diff --git a/crates/rattler/resources/launcher64.exe b/crates/rattler/resources/launcher64.exe deleted file mode 100644 index 675e6bf37..000000000 Binary files a/crates/rattler/resources/launcher64.exe and /dev/null differ diff --git a/crates/rattler/src/install/entry_point.rs b/crates/rattler/src/install/entry_point.rs index 761a2aa5f..8e4015125 100644 --- a/crates/rattler/src/install/entry_point.rs +++ b/crates/rattler/src/install/entry_point.rs @@ -12,8 +12,8 @@ use std::{fs::File, io, io::Write, path::Path}; /// Get the bytes of the windows launcher executable. pub fn get_windows_launcher(platform: &Platform) -> &'static [u8] { match platform { - Platform::Win32 => unimplemented!("32 bit windows is not supported for entry points"), - Platform::Win64 => include_bytes!("../../resources/launcher64.exe"), + Platform::Win32 => include_bytes!("../../resources/cli-32.exe"), + Platform::Win64 => include_bytes!("../../resources/cli-64.exe"), Platform::WinArm64 => unimplemented!("arm64 windows is not supported for entry points"), _ => panic!("unsupported platform"), }