Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

Port scripts to powershell #24

Closed
2 tasks
springmeyer opened this issue Feb 18, 2015 · 6 comments
Closed
2 tasks

Port scripts to powershell #24

springmeyer opened this issue Feb 18, 2015 · 6 comments
Assignees

Comments

@springmeyer
Copy link

The scripts are batch because:

  • @springmeyer wanted to keep it simple and similar to mapnik-packaging (in that batch is fairly similiar to bash)
  • @springmeyer always struggles to install powershell and understand its permissions - it seems like it behaves differently on different machines

But those are both lousy reasons for sticking with batch, and now that @BergWerkGIS - who is experienced with powershell - is pushing hard on these scripts, let's switch to powershell where appropriate.

TODO:

  • Document clearly in the readme how to set up powershell and document any gochas and noob details for now to run scripts
  • Close this ticket and create new tickets for any scripts that should be ported (if discussion is needed) otherwise JFDI.
@wilhelmberg wilhelmberg self-assigned this Feb 18, 2015
@wilhelmberg
Copy link
Contributor

As discussed on chat, I will tackle this as time permits or on the fly when necessary.
I don't think there is a urgent need to do it right away.

P.S.: WRT PowerShell: With current OS (8.1, 2012) there shouldn't be anything more to do than just call it powershell <cmd>.
Maybe powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force

@springmeyer
Copy link
Author

Maybe powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force

Okay, can you add instruction to the readme and then close this out?

@wilhelmberg
Copy link
Contributor

No need to document, I just do it automatically, like so

The last real need for a BAT file 😏

@springmeyer
Copy link
Author

oh, so you are saying that that line is needed everytime before running a powershell script? And therefore wrapping powershell in bat is the best approach? I see this also at https://github.com/mapbox/windows-builds/blob/master/linktype.bat#L12.

@wilhelmberg
Copy link
Contributor

You got me 😏 . No, it's not necessary every time. Both occurrences are just quick hacks.
Will do it properly in settings.bat: check policy and adjust only if necessary, and do a proper bail out, if user is not allowed to change policy.

@wilhelmberg
Copy link
Contributor

Not going to go he Powershell route.

Decided to go with ScriptCs:
scripts/build.csx
[wip] for mapink: https://github.com/mapnik/mapnik-gyp/compare/new-win-build-scripts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants