/[xulu]/trunk/initXulu.bat
ViewVC logotype

Annotation of /trunk/initXulu.bat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18 - (hide annotations)
Sat Feb 28 14:17:27 2009 UTC (15 years, 9 months ago) by mojays
File MIME type: text/plain
File size: 7808 byte(s)
Test commit for mailing list
1 mojays 18 @echo off
2 mojays 7 rem =====================================================================
3     rem Initializes the XULU folder structure after the first SVN checkout
4     rem by copying default configuration files from the "defaults" folder
5     rem to their expected location.
6     rem
7     rem The default behavior is only to copy not existing files. If you
8 mojays 8 rem want to completely reset you configuration (in case of a partially
9 mojays 7 rem deleted or damaged configuration) you can use the command parameter
10     rem "/reset" to overwrite all files with their default.
11     rem
12     rem Summery:
13     rem - copy "DefaultProperties" to main folder
14     rem - copy Eclipse configuration to main folder
15     rem - .classpath
16     rem - .project
17     rem - copy "startXulu.bat" to main folder
18     rem - copy XULU registry files to main folder
19     rem - registry.xif
20     rem - registry_arrayGrid.xif
21     rem - registry_ProxyGrid.xif
22     rem - XULU plugin configurations
23     rem - plugin\GeoModelCodeGenerator\* to plugin folder
24     rem - plugin\GTVisualisationColorMapPlugin\* to plugin folder
25     rem - plugin\LoggerPlugin\* to plugin folder
26     rem - plugin\RasterCalculator\* to plugin folder
27     rem =====================================================================
28    
29     setlocal
30    
31 mojays 8 rem *** Folder where to find the defaults ***
32 mojays 7 set SOURCE_DIR=defaults
33    
34 mojays 8 if "%1"=="/?" goto help_mess
35 mojays 7 rem *** Reset mode >> Overwrite without confirm ***
36     if "%1"=="/init" (set COPY_PARAM=/Y) else set COPY_PARAM=/-Y
37     if "%1"=="/init" goto overwrite
38     rem *** Update mode >> Overwrite with confirm ***
39     if "%1"=="/reset" goto overwrite
40     rem *** Default mode >> only copy not existing files ***
41     goto no_overwrite
42    
43 mojays 8 rem ************************ Print help message ************************
44     :help_mess
45     echo.
46     echo. "initXulu.bat [/update | /init | /reset]"
47     echo.
48     echo. Initializes the XULU folder structure after the first checkout
49     echo. or after main releases (e.g. new plugins). The following options
50     echo. are available:
51     echo.
52     echo. /update Updates only not existing files
53     echo. /reset Updates all files but prompts for overwrite
54     echo. /init Updates all files WITHOUT prompting for overwrite
55     echo. Only recommended after a destroyed configuration
56     echo.
57     echo. Default is: /update
58     echo.
59     goto finish
60    
61    
62 mojays 7 rem ************************** Update routine **************************
63     :no_overwrite
64     echo.
65     echo.The XULU configuration will be updated with new files...
66     echo.*** DefaultProperties ***
67     if not exist DefaultProperties (copy %SOURCE_DIR%\DefaultProperties .) else echo. 'DefaultProperties' skipped!
68     if not exist XuluProperties (copy %SOURCE_DIR%\XuluProperties .) else echo. 'XuluProperties' skipped!
69     echo.*** Eclipse configuration ***
70     if not exist .classpath (copy %SOURCE_DIR%\.classpath .) else echo. '.classpath' skipped!
71     if not exist .project (copy %SOURCE_DIR%\.project .) else echo. '.project' skipped!
72     echo.*** startXulu.bat ***
73     if not exist startXulu.bat (copy %SOURCE_DIR%\startXulu.bat .) else echo. 'startXulu.bat' skipped!
74     if not exist startXulu.sh (copy %SOURCE_DIR%\startXulu.sh .) else echo. 'startXulu.sh' skipped!
75     echo.*** sample XULU registry files ***
76     if not exist registry.xif (copy %SOURCE_DIR%\registry.xif .) else echo. 'registry.xif' skipped!
77     if not exist registry_arrayGrid.xif (copy %SOURCE_DIR%\registry_arrayGrid.xif .) else echo. 'registry_arrayGrid.xif' skipped!
78     if not exist registry_ProxyGrid.xif (copy %SOURCE_DIR%\registry_ProxyGrid.xif .) else echo. 'registry_ProxyGrid.xif' skipped!
79     echo.*** Plugin folder ***
80     if not exist plugin (mkdir plugin) else echo. 'plugin' folder already exists!
81     echo.*** Template files for GeoModelCodeGenerator plugin ***
82     set DDIR=plugin\GeoModelCodeGenerator
83     set SDIR=%SOURCE_DIR%\%DDIR%
84     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
85     if not exist %DDIR%\ModelContentManager.tpl (copy %SDIR%\ModelContentManager.tpl %DDIR%) else echo. 'ModelContentManager.tpl' skipped!
86     if not exist %DDIR%\StepModel.tpl (copy %SDIR%\StepModel.tpl %DDIR%) else echo. 'StepModel.tpl' skipped!
87     if not exist %DDIR%\XuluModel.tpl (copy %SDIR%\XuluModel.tpl %DDIR%) else echo. 'XuluModel.tpl' skipped!
88     echo.*** Template files for GTVisualisationColorMapPlugin ***
89     set DDIR=plugin\GTVisualisationColorMapPlugin
90     set SDIR=%SOURCE_DIR%\%DDIR%
91     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
92     if not exist %DDIR%\gtcolormaps.xif (copy %SDIR%\gtcolormaps.xif %DDIR%) else echo. 'gtcolormaps.xif' skipped!
93     echo.*** Template files for LoggerPlugin ***
94     set DDIR=plugin\LoggerPlugin
95     set SDIR=%SOURCE_DIR%\%DDIR%
96     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
97     if not exist %DDIR%\log4j.cfg (copy %SDIR%\log4j.cfg %DDIR%) else echo. 'log4j.cfg' skipped!
98     echo.*** Template files for LoggerPlugin ***
99     set DDIR=plugin\RasterCalculator
100     set SDIR=%SOURCE_DIR%\%DDIR%
101     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
102     if not exist %DDIR%\default_filter.inp (copy %SDIR%\default_filter.inp %DDIR%) else echo. 'default_filter.inp' skipped!
103    
104     goto finish
105    
106     rem ************************ Overwrite routine *************************
107     :overwrite
108     echo.
109     echo.The XULU configuration will be completly reset!!
110     echo.*** DefaultProperties ***
111     copy %SOURCE_DIR%\DefaultProperties . %COPY_PARAM%
112     copy %SOURCE_DIR%\XuluProperties . %COPY_PARAM%
113     echo.*** Eclipse configuration ***
114     copy %SOURCE_DIR%\.classpath . %COPY_PARAM%
115     copy %SOURCE_DIR%\.project . %COPY_PARAM%
116     echo.*** startXulu.bat ***
117     copy %SOURCE_DIR%\startXulu.bat . %COPY_PARAM%
118     copy %SOURCE_DIR%\startXulu.sh . %COPY_PARAM%
119     echo.*** sample XULU registry files ***
120     copy %SOURCE_DIR%\registry.xif . %COPY_PARAM%
121     copy %SOURCE_DIR%\registry_arrayGrid.xif . %COPY_PARAM%
122     copy %SOURCE_DIR%\registry_ProxyGrid.xif . %COPY_PARAM%
123     echo.*** Plugin folder ***
124     if not exist plugin (mkdir plugin) else echo. 'plugin' folder already exists!
125     echo.*** Template files for GeoModelCodeGenerator plugin ***
126     set DDIR=plugin\GeoModelCodeGenerator
127     set SDIR=%SOURCE_DIR%\%DDIR%
128     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
129     copy %SDIR%\ModelContentManager.tpl %DDIR% %COPY_PARAM%
130     copy %SDIR%\StepModel.tpl %DDIR% %COPY_PARAM%
131     copy %SDIR%\XuluModel.tpl %DDIR% %COPY_PARAM%
132     echo.*** Template files for GTVisualisationColorMapPlugin ***
133     set DDIR=plugin\GTVisualisationColorMapPlugin
134     set SDIR=%SOURCE_DIR%\%DDIR%
135     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
136     copy %SDIR%\gtcolormaps.xif %DDIR% %COPY_PARAM%
137     echo.*** Template files for LoggerPlugin ***
138     set DDIR=plugin\LoggerPlugin
139     set SDIR=%SOURCE_DIR%\%DDIR%
140     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
141     copy %SDIR%\log4j.cfg %DDIR% %COPY_PARAM%
142     echo.*** Template files for LoggerPlugin ***
143     set DDIR=plugin\RasterCalculator
144     set SDIR=%SOURCE_DIR%\%DDIR%
145     if not exist %DDIR% (mkdir %DDIR%) else echo. folder '%DDIR%' already exists!
146     copy %SDIR%\default_filter.inp %DDIR% %COPY_PARAM%
147    
148    
149     goto finish
150    
151    
152     rem ************************** Finish routine **************************
153     :finish
154     echo.Finished.
155     echo.
156    
157     endlocal

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26