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

后端 未结 2 863
野趣味
野趣味 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

    0 讨论(0)
  • 2021-02-19 13:35

    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. 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.

    0 讨论(0)
提交回复
热议问题