forked from arkuznetsov/1CFilesConverter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathedt2xml.cmd
47 lines (38 loc) · 1.34 KB
/
edt2xml.cmd
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
@ECHO OFF
rem Convert 1C configuration from 1C:EDT format to 1C:Designer XML format
rem %1 - path to folder contains configuration files in 1C:EDT format
rem %2 - path to folder to save configuration files in 1C:Designer XML format
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
FOR /F "usebackq tokens=1 delims=" %%i IN (`where ring`) DO (
set RING_TOOL="%%i"
)
set IB_PATH=%V8_TEMP%\tmp_db
set WS_PATH=%V8_TEMP%\edt_ws
set EDT_PATH=%1
if defined EDT_PATH set EDT_PATH=%EDT_PATH:"=%
set CONFIG_PATH=%2
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
if not defined EDT_PATH (
echo Missed parameter 1 "path to folder contains configuration files in 1C:EDT format"
exit /b 1
)
if not defined CONFIG_PATH (
echo Missed parameter 2 "path to folder to save configuration files in 1C:Designer XML format"
exit /b 1
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
if exist "%CONFIG_PATH%" (
rd /S /Q "%CONFIG_PATH%"
)
md "%CONFIG_PATH%"
echo Export "%EDT_PATH%" to 1C:Designer XML format "%CONFIG_PATH%"...
call %RING_TOOL% edt workspace export --project "%EDT_PATH%" --configuration-files "%CONFIG_PATH%" --workspace-location "%WS_PATH%"
echo Clear temporary files...
rd /S /Q "%IB_PATH%"
rd /S /Q "%WS_PATH%"