File: build_against_sdk_02-copy-deps-to-bindingdir.ps1

package info (click to toggle)
node-mapnik 3.5.14%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,824 kB
  • ctags: 1,976
  • sloc: cpp: 21,377; xml: 921; sh: 271; makefile: 72; python: 27; lisp: 10
file content (40 lines) | stat: -rw-r--r-- 1,457 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$msg_prefix='====================== '

Try{

    Write-Output "copy binding libs"
    Write-Output "from: $env:MAPNIK_SDK"
    Write-Output "to: $env:NODEMAPNIK_BINDING_DIR"

    Copy-Item $env:MAPNIK_SDK\bin\shapeindex.exe $env:NODEMAPNIK_BINDING_DIR\ -ErrorAction Stop
    Copy-Item $env:MAPNIK_SDK\bin\mapnik-index.exe $env:NODEMAPNIK_BINDING_DIR\ -ErrorAction Stop

    $deps = Get-ChildItem -Path $env:MAPNIK_SDK\lib -Filter *.dll | % { $_.FullName }

	##COPY DEPENDENCIES TO BINDING DIR
	Write-Output "$msg_prefix copying dependencies to binding dir:"
	foreach($dep in $deps){
    	Write-Output $dep
        Copy-Item $dep $env:NODEMAPNIK_BINDING_DIR -ErrorAction Stop
	}

	###COPY FONTS AND INPUT PLUGINS TO BINDING DIR
    $srcDir="$env:MAPNIK_SDK\lib\mapnik\"
    $destDir="$env:NODEMAPNIK_BINDING_DIR\mapnik\"
	Write-Output "$msg_prefix copying fonts and input plugins to binding dir:"
	Write-Output "$srcDir --> $destDir"
    Copy-Item -Path $srcDir -Destination $destDir -Force -Recurse -ErrorAction Stop

    ##COPY GDAL AND PROJ TO BINDING DIR
    $srcDir="$env:MAPNIK_SDK\share"
    $destDir="$env:NODEMAPNIK_BINDING_DIR\share"
	Write-Output "$msg_prefix copying gdal and proj to binding dir:"
	Write-Output "$srcDir --> $destDir"
    Copy-Item -Path $srcDir -Destination $destDir -Force -Recurse -ErrorAction Stop

}
Catch {
	Write-Output "`n`n$msg_prefix`n!!!!EXCEPTION!!!`n$msg_prefix`n`n"
	Write-Output "$_.Exception.Message`n"
	Exit 1
}