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

后端 未结 2 893
野趣味
野趣味 2021-02-19 12:48

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 fro

2条回答
  •  一生所求
    2021-02-19 13:33

    I'm from the future. I'm using Haskell Platform's Windows installer as Mikhail Glushenkov said.

    So you would have to change the computers settings then? – PyRulez

    You can also set environment variables with CMD.exe's SET command. (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. 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. I'd recommend that you save it to a .bat file

    TL:DR; extract the Haskell Platform create shell.bat next to bin/ lib/ et al and paste this into it;

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

    Now run shell.bat and that prompt will be able to find Haskell. Since you can take shell.bat with you - it should be easier to plug-in to a new lab-machine and get working

提交回复
热议问题