Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows archive #779

Open
3052 opened this issue Aug 10, 2024 · 7 comments
Open

windows archive #779

3052 opened this issue Aug 10, 2024 · 7 comments

Comments

@3052
Copy link

3052 commented Aug 10, 2024

Motivation

I dont trust exe since it can run any command on my system

Proposed solution

offer an archive instead such as Zip or Zst - current link:

https://www.swift.org/install/windows/

other languages have archive with the built tools:

https://go.dev/dl/go1.22.6.windows-amd64.zip

Alternatives considered

No response

Additional information

No response

@AnthonyLatsis
Copy link
Contributor

cc @compnerd

@xedin Could you transfer this please?

@compnerd
Copy link
Member

@AnthonyLatsis i assume that you want to move this to installer-scripts?

@compnerd
Copy link
Member

@3052 we actually do need that functionality - we register things into the environment and perform other computational work. The swift toolchain is not entirely extract and go (at least not if you want the "install and go" experience).

@3052
Copy link
Author

3052 commented Aug 10, 2024

I currently use the Go programming language, and as shown above "installation" doesn't need any interaction with the host PC. I know other languages like Python and PHP, Rust, Zig, D, C, JavaScript are the same. I think the bar should be high for justifying permanent environment modification by an installer.

can you give more information?

@AnthonyLatsis
Copy link
Contributor

To swift-org-website actually, but I am happy to leave it up to your judgement. In case the specified installer extension is hardcoded, note that the hypertext also says "exe".

@compnerd
Copy link
Member

@AnthonyLatsis sure, I can move it to swift-org-website; I was thinking that installer-scripts made sense since this would require some new scripts for building the installer.

@compnerd
Copy link
Member

@3052 Swift makes a few different decisions than those other languages.

For example, the language is setup to do a system wide installation of the runtime allowing a shared installation of the runtime, similar to how Microsoft handles the C/C++ language runtimes. PHP, JavaScript do not have a language runtime per se, all the modules are re-distributed. Go and Rust do not have a sharable language runtime, it is always statically linked. C obviously needs the language runtime, and on Windows, that is distributed by Microsoft as the language redistributables. I do not know how D deals with this.

The Swift compiler is transitioning to Swift from C/C++ and the developer tools are generally written in Swift. As a result, they depend on the language runtime, which is dynamically linked and requires that to be in Path.

Because we want to ease the use of Swift and not require something like Visual Studio or mandate the use of something like VSDevCmd.bat, we inject a few environment variables to support locating the software developer kit. Microsoft requires manual scanning of a large number of paths which change between each release to provide compatibility.

You can find the installer sources at https://github.com/swiftlang/swift-installer-scripts if you want to look through them yourself.

@compnerd compnerd transferred this issue from swiftlang/swift Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants