简体   繁体   English

有没有办法在没有安装的情况下在Windows上安装Haskell? (复制+粘贴)

[英]Is there a way to get a Haskell setup on Windows without an installation? (Copy + paste)

I am programming on a school-given computer. 我在学校给定的计算机上编程。 I need to have a Haskell setup that does no installation (one I can drop on a flash drive and copy on to the C drive or just use from the flash drive perhaps). 我需要一个没有安装的Haskell设置(我可以将其放在闪存驱动器上并复制到C驱动器上,或者只是从闪存驱动器中使用)。

I already have Eclipse up and running, so if I could get it on Eclipse without leaving any impact on the system past the Eclipse directory, that would be very good as well. 我已经启动并运行了Eclipse,所以如果我能在Eclipse上获得它而不会对Eclipse目录之外的系统产生任何影响,那么这也是非常好的。

By no installation, I mean I have to be able to easily remove the program and roughly all traces without any uninstaller tool. 没有安装,我的意思是我必须能够轻松删除程序和大致所有跟踪没有任何卸载工具。 All uninstaller tools are likely blocked. 所有卸载程序工具都可能被阻止。

What are my options? 我有什么选择?

Haskell Platform 's Windows installer (of which I'm the maintainer) has a "portable install" option that just extracts the files to the given location and does not touch the registry or any system settings. Haskell平台的Windows安装程序(我是维护者)有一个“可移植安装”选项,它只是将文件提取到给定位置,而不会触及注册表或任何系统设置。 You can use it to install Haskell Platform to your flash drive, but you'll need to add GHC's location to the PATH manually. 您可以使用它将Haskell Platform安装到您的闪存驱动器,但您需要手动将GHC的位置添加到PATH。

I'm from the future. 我来自未来。 I'm using Haskell Platform 's Windows installer as Mikhail Glushenkov said . 正如Mikhail Glushenkov所说,我正在使用Haskell平台的Windows安装程序。

So you would have to change the computers settings then? 那么你必须改变计算机设置呢? – PyRulez - PyRulez

You can also set environment variables with CMD.exe 's SET command. 您还可以使用CMD.exeSET命令设置环境变量。 (What're they teaching you kids these days?) Once you've set PATH (or whatever) like this the value will persist for that session and any child sessions. (这些天他们教你的孩子是什么?)一旦你设置了这样的PATH (或其他),该会话和任何子会话的值将持续存在。 If you start an IDE from the shell - it should have those set (unless there's a previous instance ... maybe) so it should work within the constraints you gave. 如果你从shell启动一个IDE - 它应该有那些设置(除非有一个先前的实例......也许)所以它应该在你给出的约束内工作。 I'd recommend that you save it to a .bat file 我建议您将其保存为.bat文件

TL:DR ; TL:DR ; extract the Haskell Platform create shell.bat next to bin/ lib/ et al and paste this into it; 提取Haskell平台创建bin/ lib/ et al旁边的shell.bat并将其粘贴到其中;

@ECHO OFF
SET PATH=%~dp0/bin;%PATH%
CMD /K

Now run shell.bat and that prompt will be able to find Haskell. 现在运行shell.bat ,该提示符将能够找到Haskell。 Since you can take shell.bat with you - it should be easier to plug-in to a new lab-machine and get working 因为你可以随身携带shell.bat - 插入新的实验室机器并开始工作会更容易

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM