mapbox / windows-builds

DEPRECATED! build scripts for mapnik dependencies, mapnik, node-mapnik, node, libosmiom, osmium-tool
38 stars 22 forks source link

Port scripts to powershell #24

Closed springmeyer closed 8 years ago

springmeyer commented 9 years ago

The scripts are batch because:

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:

wilhelmberg commented 9 years ago

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 commented 9 years ago

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

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

wilhelmberg commented 9 years ago

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

The last real need for a BAT file :smirk:

springmeyer commented 9 years ago

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 commented 9 years ago

You got me :smirk: . 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 commented 8 years ago

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