Automating Windows setup for development

Hi! I have made a Powershell script that sets up a GHC build environment on Windows from scratch. It's at https://github.com/melted/getghc. It largely follows the instructions at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. It has no dependencies aside from Powershell 3.0. The reason I made it was to make it easier to set up a build bot on a clean machine. But it's probably generally useful for people who want to develop GHC on Windows. Usage: - Put the script in an empty directory - Run it - Hope for the best Potential problems: - If Python 2.7 is already installed and not on the path, the script wont install it, and msys wont pick up the path. Solution: Add the path to python in the control panel. - Powershell wont run unsigned scripts by default. The error message will give a hint how to disable that. I will add a signed version as soon as I can figure out how. Niklas

This is really cool, thanks!
If you wouldn't mind, perhaps that page should be updated (the MSYS2
page) to point to your Powershell script. That would be really useful
and make it much easier to find for people who don't follow the
mailing list.
On Mon, Apr 21, 2014 at 8:03 PM, Niklas Larsson
Hi!
I have made a Powershell script that sets up a GHC build environment on Windows from scratch. It's at https://github.com/melted/getghc. It largely follows the instructions at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. It has no dependencies aside from Powershell 3.0.
The reason I made it was to make it easier to set up a build bot on a clean machine. But it's probably generally useful for people who want to develop GHC on Windows.
Usage: - Put the script in an empty directory - Run it - Hope for the best
Potential problems: - If Python 2.7 is already installed and not on the path, the script wont install it, and msys wont pick up the path. Solution: Add the path to python in the control panel. - Powershell wont run unsigned scripts by default. The error message will give a hint how to disable that. I will add a signed version as soon as I can figure out how.
Niklas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/

This reminds me: the instructions shouldn't be recommending that people add GHC's own mingw tools to their PATH. The build should work without that, and indeed we want to know if the build is using gcc from PATH because that's a bug (and could cause real problems). Cheers, Simon On 22/04/2014 02:12, Austin Seipp wrote:
This is really cool, thanks!
If you wouldn't mind, perhaps that page should be updated (the MSYS2 page) to point to your Powershell script. That would be really useful and make it much easier to find for people who don't follow the mailing list.
On Mon, Apr 21, 2014 at 8:03 PM, Niklas Larsson
wrote: Hi!
I have made a Powershell script that sets up a GHC build environment on Windows from scratch. It's at https://github.com/melted/getghc. It largely follows the instructions at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. It has no dependencies aside from Powershell 3.0.
The reason I made it was to make it easier to set up a build bot on a clean machine. But it's probably generally useful for people who want to develop GHC on Windows.
Usage: - Put the script in an empty directory - Run it - Hope for the best
Potential problems: - If Python 2.7 is already installed and not on the path, the script wont install it, and msys wont pick up the path. Solution: Add the path to python in the control panel. - Powershell wont run unsigned scripts by default. The error message will give a hint how to disable that. I will add a signed version as soon as I can figure out how.
Niklas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

We have a case at work when we have to add GHC mingw to PATH. I don't know if it's ghc related or cabal. For instance, We can't build cabal-install with a ld more recent than GHC mingw one. We tried with ld version 2.4. GHC 7.8.2 use a version like 2.2. Build ends with: "Setup.exe: command not found" whereas Setup.exe is located in current directory When we add GHC mingw to PATH, everything is working properly Regards, Yorick On 04/22/2014 04:08 PM, Simon Marlow wrote:
This reminds me: the instructions shouldn't be recommending that people add GHC's own mingw tools to their PATH. The build should work without that, and indeed we want to know if the build is using gcc from PATH because that's a bug (and could cause real problems).
Cheers, Simon
On 22/04/2014 02:12, Austin Seipp wrote:
This is really cool, thanks!
If you wouldn't mind, perhaps that page should be updated (the MSYS2 page) to point to your Powershell script. That would be really useful and make it much easier to find for people who don't follow the mailing list.
On Mon, Apr 21, 2014 at 8:03 PM, Niklas Larsson
wrote: Hi!
I have made a Powershell script that sets up a GHC build environment on Windows from scratch. It's at https://github.com/melted/getghc. It largely follows the instructions at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. It has no dependencies aside from Powershell 3.0.
The reason I made it was to make it easier to set up a build bot on a clean machine. But it's probably generally useful for people who want to develop GHC on Windows.
Usage: - Put the script in an empty directory - Run it - Hope for the best
Potential problems: - If Python 2.7 is already installed and not on the path, the script wont install it, and msys wont pick up the path. Solution: Add the path to python in the control panel. - Powershell wont run unsigned scripts by default. The error message will give a hint how to disable that. I will add a signed version as soon as I can figure out how.
Niklas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I'll put it on the trac page as soon as I have updated it a bit. I found
out how to rewrite the downloading so windows 7 don't have to have an
upgraded powershell, I'll do that tomorrow.
2014-04-22 3:12 GMT+02:00 Austin Seipp
This is really cool, thanks!
If you wouldn't mind, perhaps that page should be updated (the MSYS2 page) to point to your Powershell script. That would be really useful and make it much easier to find for people who don't follow the mailing list.
Hi!
I have made a Powershell script that sets up a GHC build environment on Windows from scratch. It's at https://github.com/melted/getghc. It largely follows the instructions at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. It has no dependencies aside from Powershell 3.0.
The reason I made it was to make it easier to set up a build bot on a clean machine. But it's probably generally useful for people who want to develop GHC on Windows.
Usage: - Put the script in an empty directory - Run it - Hope for the best
Potential problems: - If Python 2.7 is already installed and not on the path, the script wont install it, and msys wont pick up the path. Solution: Add the path to
On Mon, Apr 21, 2014 at 8:03 PM, Niklas Larsson
wrote: python in the control panel. - Powershell wont run unsigned scripts by default. The error message will give a hint how to disable that. I will add a signed version as soon as I can figure out how.
Niklas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Regards,
Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/

Looking forward to trying this. Last time I tried to build on Windows I
couldn't make it work and just gave up.
On Tue, Apr 22, 2014 at 1:00 PM, Niklas Larsson
I'll put it on the trac page as soon as I have updated it a bit. I found out how to rewrite the downloading so windows 7 don't have to have an upgraded powershell, I'll do that tomorrow.
2014-04-22 3:12 GMT+02:00 Austin Seipp
: This is really cool, thanks!
If you wouldn't mind, perhaps that page should be updated (the MSYS2 page) to point to your Powershell script. That would be really useful and make it much easier to find for people who don't follow the mailing list.
On Mon, Apr 21, 2014 at 8:03 PM, Niklas Larsson
wrote: Hi!
I have made a Powershell script that sets up a GHC build environment on Windows from scratch. It's at https://github.com/melted/getghc. It largely follows the instructions at
has no dependencies aside from Powershell 3.0.
The reason I made it was to make it easier to set up a build bot on a clean machine. But it's probably generally useful for people who want to develop GHC on Windows.
Usage: - Put the script in an empty directory - Run it - Hope for the best
Potential problems: - If Python 2.7 is already installed and not on the path, the script wont install it, and msys wont pick up the path. Solution: Add the path to
https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. It python
in the control panel. - Powershell wont run unsigned scripts by default. The error message will give a hint how to disable that. I will add a signed version as soon as I can figure out how.
Niklas
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Regards,
Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (5)
-
Austin Seipp
-
jared simpson
-
Niklas Larsson
-
Simon Marlow
-
Yorick Laupa