forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGRASS-Packager.bat.tmpl
108 lines (83 loc) · 4.8 KB
/
GRASS-Packager.bat.tmpl
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
rem -----------------------------------------------------------------------------------------------------------------------
rem Self Contained GRASS Automated Packager
rem -----------------------------------------------------------------------------------------------------------------------
rem Edited by: Marco Pasetti
rem Revised for OSGeo4W by: Colin Nielsen, Helmut Kudrnovsky, and Martin Landa
rem Last Update: $Id$
rem -----------------------------------------------------------------------------------------------------------------------
@echo off
rem --------------------------------------------------------------------------------------------------------------------------
rem Set the script variables
rem --------------------------------------------------------------------------------------------------------------------------
set PACKAGE_DIR=.\GRASS-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@-Package
set OSGEO4W_BLD_DIR=C:\OSGeo4W
if exist C:\OSGeo4W_grass@GRASS_VERSION_MAJOR@ (
set OSGEO4W_PKG_DIR=C:\OSGeo4W_grass@GRASS_VERSION_MAJOR@
) else (
set OSGEO4W_PKG_DIR=C:\OSGeo4W
)
set MSYS_BLD_DIR=C:\msys64\mingw64
set GRASS_PREFIX=%OSGEO4W_BLD_DIR%\apps\grass\grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Remove the previous package and create a new PACKAGE_DIR
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
if exist %PACKAGE_DIR% rmdir /S/Q %PACKAGE_DIR%
mkdir %PACKAGE_DIR%
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy %GRASS_PREFIX% content to PACKAGE_DIR
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
xcopy %GRASS_PREFIX% %PACKAGE_DIR% /S/V/F/I
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy extrabins to PACKAGE_DIR\extrabin
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
mkdir %PACKAGE_DIR%\extrabin
mkdir %PACKAGE_DIR%\extrabin\gdalplugins
copy %OSGEO4W_PKG_DIR%\bin\* %PACKAGE_DIR%\extrabin
xcopy %OSGEO4W_PKG_DIR%\bin\gdalplugins\* %PACKAGE_DIR%\extrabin\gdalplugins /S/V/F/I
rem msvcrt2019
del %PACKAGE_DIR%\extrabin\*140*.dll
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy 'Windows batchfiles for use with R' (GRASS-R-integration) from source to PACKAGE_DIR\extrabin
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
copy .\external\rbatch\* %PACKAGE_DIR%\extrabin
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy shared PROJ.4 files to PACKAGE_DIR\proj
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
if not exist "%PACKAGE_DIR%\share" mkdir %PACKAGE_DIR%\share
mkdir %PACKAGE_DIR%\share\proj
xcopy %OSGEO4W_PKG_DIR%\share\proj %PACKAGE_DIR%\share\proj /S/V/F/I
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy shared GDAL files to PACKAGE_DIR\share\gdal
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
mkdir %PACKAGE_DIR%\share\gdal
xcopy %OSGEO4W_PKG_DIR%\share\gdal %PACKAGE_DIR%\share\gdal /S/V/F/I
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy Python content to PACKAGE_DIR\Python3
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
mkdir %PACKAGE_DIR%\Python39
xcopy %OSGEO4W_PKG_DIR%\apps\Python39\* %PACKAGE_DIR%\Python39 /S/V/F/I
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Copy env.bat
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.
copy env.bat %PACKAGE_DIR%\etc
@echo.
@echo -----------------------------------------------------------------------------------------------------------------------
@echo Packaging Completed
@echo -----------------------------------------------------------------------------------------------------------------------
@echo.