mirror of
https://github.com/arkuznetsov/1CFilesConverter.git
synced 2024-11-28 08:49:00 +02:00
refactor: Имена переменных для входных параметров приведены к единому виду;
feat: Реализована возможность передачи параметров скриптов через переменные среды.
This commit is contained in:
parent
5adbe94d54
commit
3ef2030fe5
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C configuration to 1C configuration file ^(*.cf^)
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -22,19 +24,18 @@ set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set CONFIG_SOURCE=%1
|
||||
IF defined CONFIG_SOURCE set CONFIG_SOURCE=%CONFIG_SOURCE:"=%
|
||||
set CONFIG_FILE=%2
|
||||
IF defined CONFIG_FILE (
|
||||
set CONFIG_FILE=%CONFIG_FILE:"=%
|
||||
set CONFIG_FILE_PATH=%~dp2
|
||||
)
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
set V8_DST_FOLDER=%~dp2
|
||||
set V8_DST_FOLDER=%V8_DST_FOLDER:~0,-1%
|
||||
|
||||
IF not defined CONFIG_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to 1C configuration source (infobase, 1C:Designer XML files or 1C:EDT project)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined CONFIG_FILE (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to 1C configuration file (*.cf)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
@ -51,26 +52,26 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF not exist "%CONFIG_FILE_PATH%" md "%CONFIG_FILE_PATH%"
|
||||
IF not exist "%V8_DST_FOLDER%" md "%V8_DST_FOLDER%"
|
||||
|
||||
echo [INFO] Checking configuration source type...
|
||||
|
||||
IF exist "%CONFIG_SOURCE%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
goto export_edt
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\Configuration.xml" (
|
||||
IF exist "%V8_SRC_PATH%\Configuration.xml" (
|
||||
echo [INFO] Source type: 1C:Designer XML files
|
||||
set XML_PATH=%CONFIG_SOURCE%
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
goto export_xml
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\1cv8.1cd" (
|
||||
IF exist "%V8_SRC_PATH%\1cv8.1cd" (
|
||||
echo [INFO] Source type: Infobase
|
||||
set IB_PATH=%CONFIG_SOURCE%
|
||||
set IB_PATH=%V8_SRC_PATH%
|
||||
goto export_ib
|
||||
)
|
||||
|
||||
echo [ERROR] Error cheking type of configuration "%CONFIG_SOURCE%"!
|
||||
echo [ERROR] Error cheking type of configuration "%V8_SRC_PATH%"!
|
||||
echo Infobase, 1C:Designer XML files or 1C:EDT project expected.
|
||||
exit /b 1
|
||||
|
||||
@ -79,8 +80,8 @@ exit /b 1
|
||||
IF not exist "%XML_PATH%" md "%XML_PATH%"
|
||||
md "%WS_PATH%"
|
||||
|
||||
echo [INFO] Export "%CONFIG_SOURCE%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace export --project "%CONFIG_SOURCE%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
echo [INFO] Export "%V8_SRC_PATH%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:export_xml
|
||||
|
||||
@ -99,11 +100,11 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
|
||||
:export_ib
|
||||
|
||||
echo [INFO] Export infobase "%IB_PATH%" configuration to "%CONFIG_FILE%"...
|
||||
echo [INFO] Export infobase "%IB_PATH%" configuration to "%V8_DST_PATH%"...
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %CONFIG_FILE%
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %V8_DST_PATH%
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" "%CONFIG_FILE%"
|
||||
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" "%V8_DST_PATH%"
|
||||
)
|
||||
|
||||
echo [INFO] Clear temporary files...
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C configuration to 1C:EDT project
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -21,16 +23,16 @@ set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set CONFIG_SOURCE=%1
|
||||
IF defined CONFIG_SOURCE set CONFIG_SOURCE=%CONFIG_SOURCE:"=%
|
||||
set CONFIG_PATH=%2
|
||||
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
|
||||
IF not defined CONFIG_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to 1C configuration source (1C configuration file (*.cf), infobase or 1C:Designer XML files)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined CONFIG_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save configuration files in 1C:EDT peoject format"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
@ -46,40 +48,40 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF exist "%CONFIG_PATH%" rd /S /Q "%CONFIG_PATH%"
|
||||
md "%CONFIG_PATH%"
|
||||
IF exist "%V8_DST_PATH%" rd /S /Q "%V8_DST_PATH%"
|
||||
md "%V8_DST_PATH%"
|
||||
|
||||
echo [INFO] Checking configuration source type...
|
||||
|
||||
IF /i "%CONFIG_SOURCE:~-3%" equ ".cf" (
|
||||
IF /i "%V8_SRC_PATH:~-3%" equ ".cf" (
|
||||
echo [INFO] Source type: Configuration file ^(CF^)
|
||||
goto export_cf
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\1cv8.1cd" (
|
||||
IF exist "%V8_SRC_PATH%\1cv8.1cd" (
|
||||
echo [INFO] Source type: Infobase
|
||||
set IB_PATH=%CONFIG_SOURCE%
|
||||
set IB_PATH=%V8_SRC_PATH%
|
||||
goto export_ib
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\Configuration.xml" (
|
||||
IF exist "%V8_SRC_PATH%\Configuration.xml" (
|
||||
echo [INFO] Source type: 1C:Designer XML files
|
||||
set XML_PATH=%CONFIG_SOURCE%
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
goto export_xml
|
||||
)
|
||||
|
||||
echo [ERROR] Error cheking type of configuration "%CONFIG_SOURCE%"!
|
||||
echo [ERROR] Error cheking type of configuration "%V8_SRC_PATH%"!
|
||||
echo Infobase, configuration file ^(*.cf^) or 1C:Designer XML files expected.
|
||||
exit /b 1
|
||||
|
||||
:export_cf
|
||||
|
||||
echo [INFO] Creating infobase "%IB_PATH%" from file "%CONFIG_FILE%"...
|
||||
echo [INFO] Creating infobase "%IB_PATH%" from file "%V8_SRC_PATH%"...
|
||||
|
||||
md "%IB_PATH%"
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%CONFIG_FILE%"
|
||||
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%V8_SRC_PATH%"
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%CONFIG_FILE%"
|
||||
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%V8_SRC_PATH%"
|
||||
)
|
||||
|
||||
:export_ib
|
||||
@ -98,8 +100,8 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
|
||||
md "%WS_PATH%"
|
||||
|
||||
echo [INFO] Export configuration from "%XML_PATH%" to 1C:EDT format "%CONFIG_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace import --project "%CONFIG_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
|
||||
echo [INFO] Export configuration from "%XML_PATH%" to 1C:EDT format "%V8_DST_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
|
||||
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Load 1C configuration to 1C infobase
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -20,16 +22,16 @@ set LOCAL_TEMP=%V8_TEMP%\%~n0
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set CONFIG_SOURCE=%1
|
||||
IF defined CONFIG_SOURCE set CONFIG_SOURCE=%CONFIG_SOURCE:"=%
|
||||
set IB_PATH=%2
|
||||
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
|
||||
IF not defined CONFIG_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to 1C configuration source (1C configuration file (*.cf), 1C:Designer XML files or 1C:EDT project)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined IB_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder contains 1C infobase"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
@ -45,60 +47,60 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
|
||||
md "%IB_PATH%"
|
||||
IF exist "%V8_DST_PATH%" rd /S /Q "%V8_DST_PATH%"
|
||||
md "%V8_DST_PATH%"
|
||||
|
||||
echo [INFO] Checking configuration source type...
|
||||
|
||||
IF /i "%CONFIG_SOURCE:~-3%" equ ".cf" (
|
||||
IF /i "%V8_SRC_PATH:~-3%" equ ".cf" (
|
||||
echo [INFO] Source type: Configuration file ^(CF^)
|
||||
goto export_cf
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
goto export_edt
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\Configuration.xml" (
|
||||
IF exist "%V8_SRC_PATH%\Configuration.xml" (
|
||||
echo [INFO] Source type: 1C:Designer XML files
|
||||
set XML_PATH=%CONFIG_SOURCE%
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
goto export_xml
|
||||
)
|
||||
|
||||
echo [ERROR] Error cheking type of configuration "%CONFIG_SOURCE%"!
|
||||
echo [ERROR] Error cheking type of configuration "%V8_SRC_PATH%"!
|
||||
echo Configuration file ^(*.cf^), 1C:Designer XML files or 1C:EDT project expected.
|
||||
exit /b 1
|
||||
|
||||
:export_edt
|
||||
|
||||
echo [INFO] Export "%CONFIG_SOURCE%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
echo [INFO] Export "%V8_SRC_PATH%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
|
||||
md "%XML_PATH%"
|
||||
md "%WS_PATH%"
|
||||
|
||||
call %V8_RING_TOOL% edt workspace export --project "%CONFIG_SOURCE%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:export_xml
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
echo [INFO] Creating infobase "%V8_DST_PATH%"...
|
||||
%V8_TOOL% CREATEINFOBASE File=%V8_DST_PATH%; /DisableStartupDialogs
|
||||
|
||||
echo [INFO] Loading infobase "%IB_PATH%" configuration from XML-files "%XML_PATH%"...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %XML_PATH%
|
||||
echo [INFO] Loading infobase "%V8_DST_PATH%" configuration from XML-files "%XML_PATH%"...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%V8_DST_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %XML_PATH%
|
||||
) ELSE (
|
||||
echo [INFO] Creating infobase "%IB_PATH%" from XML files "%XML_PATH%"...
|
||||
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --import="%XML_PATH%"
|
||||
echo [INFO] Creating infobase "%V8_DST_PATH%" from XML files "%XML_PATH%"...
|
||||
%IBCMD_TOOL% infobase create --db-path="%V8_DST_PATH%" --create-database --import="%XML_PATH%"
|
||||
)
|
||||
|
||||
goto end
|
||||
|
||||
:export_cf
|
||||
|
||||
echo [INFO] Creating infobase "%IB_PATH%" from file "%CONFIG_SOURCE%"...
|
||||
echo [INFO] Creating infobase "%V8_DST_PATH%" from file "%V8_SRC_PATH%"...
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%CONFIG_SOURCE%"
|
||||
%V8_TOOL% CREATEINFOBASE File="%V8_DST_PATH%"; /DisableStartupDialogs /UseTemplate "%V8_SRC_PATH%"
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%CONFIG_SOURCE%"
|
||||
%IBCMD_TOOL% infobase create --db-path="%V8_DST_PATH%" --create-database --load="%V8_SRC_PATH%"
|
||||
)
|
||||
|
||||
:end
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C configuration to 1C:Designer XML format
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -20,16 +22,16 @@ set LOCAL_TEMP=%V8_TEMP%\%~n0
|
||||
set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set CONFIG_SOURCE=%1
|
||||
IF defined CONFIG_SOURCE set CONFIG_SOURCE=%CONFIG_SOURCE:"=%
|
||||
set CONFIG_PATH=%2
|
||||
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
|
||||
IF not defined CONFIG_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to 1C configuration source (1C configuration file (*.cf), infobase or 1C:EDT project)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined CONFIG_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save configuration files in 1C:Designer XML format"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
@ -45,59 +47,59 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF exist "%CONFIG_PATH%" rd /S /Q "%CONFIG_PATH%"
|
||||
md "%CONFIG_PATH%"
|
||||
IF exist "%V8_DST_PATH%" rd /S /Q "%V8_DST_PATH%"
|
||||
md "%V8_DST_PATH%"
|
||||
|
||||
echo [INFO] Checking configuration source type...
|
||||
|
||||
IF /i "%CONFIG_SOURCE:~-3%" equ ".cf" (
|
||||
IF /i "%V8_SRC_PATH:~-3%" equ ".cf" (
|
||||
echo [INFO] Source type: Configuration file ^(CF^)
|
||||
goto export_cf
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\1cv8.1cd" (
|
||||
IF exist "%V8_SRC_PATH%\1cv8.1cd" (
|
||||
echo [INFO] Source type: Infobase
|
||||
set IB_PATH=%CONFIG_SOURCE%
|
||||
set IB_PATH=%V8_SRC_PATH%
|
||||
goto export_ib
|
||||
)
|
||||
IF exist "%CONFIG_SOURCE%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
goto export_edt
|
||||
)
|
||||
|
||||
echo [ERROR] Error cheking type of configuration "%CONFIG_SOURCE%"!
|
||||
echo [ERROR] Error cheking type of configuration "%V8_SRC_PATH%"!
|
||||
echo Infobase, configuration file ^(*.cf^) or 1C:EDT project expected.
|
||||
exit /b 1
|
||||
|
||||
:export_cf
|
||||
|
||||
echo [INFO] Creating infobase "%IB_PATH%" from file "%CONFIG_SOURCE%"...
|
||||
echo [INFO] Creating infobase "%IB_PATH%" from file "%V8_SRC_PATH%"...
|
||||
|
||||
md "%IB_PATH%"
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%CONFIG_SOURCE%"
|
||||
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%V8_SRC_PATH%"
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%CONFIG_SOURCE%"
|
||||
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%V8_SRC_PATH%"
|
||||
)
|
||||
|
||||
:export_ib
|
||||
|
||||
echo [INFO] Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%CONFIG_PATH%"...
|
||||
echo [INFO] Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%V8_DST_PATH%"...
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%CONFIG_PATH%" -force
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%V8_DST_PATH%" -force
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" "%CONFIG_PATH%" --force
|
||||
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" "%V8_DST_PATH%" --force
|
||||
)
|
||||
|
||||
goto end
|
||||
|
||||
:export_edt
|
||||
|
||||
echo [INFO] Export "%EDT_PATH%" to 1C:Designer XML format "%CONFIG_PATH%"...
|
||||
echo [INFO] Export "%V8_SRC_PATH%" to 1C:Designer XML format "%V8_DST_PATH%"...
|
||||
|
||||
md "%WS_PATH%"
|
||||
|
||||
call %V8_RING_TOOL% edt workspace export --project "%CONFIG_SOURCE%" --configuration-files "%CONFIG_PATH%" --workspace-location "%WS_PATH%"
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:end
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C external data processors ^& reports to 1C:EDT project
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -19,30 +21,31 @@ set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set DP_SOURCE=%1
|
||||
IF defined DP_SOURCE set DP_SOURCE=%DP_SOURCE:"=%
|
||||
set DP_SOURCE_PATH=%~dp1
|
||||
set DP_DEST_PATH=%2
|
||||
IF defined DP_DEST_PATH set DP_DEST_PATH=%DP_DEST_PATH:"=%
|
||||
set BASE_CONFIG=%3
|
||||
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
set V8_SRC_FOLDER=%~dp1
|
||||
set V8_SRC_FOLDER=%V8_SRC_FOLDER:~0,-1%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
IF "%3" neq "" set V8_BASE_CONFIG=%3
|
||||
IF defined V8_BASE_CONFIG set V8_BASE_CONFIG=%V8_BASE_CONFIG:"=%
|
||||
|
||||
IF not defined DP_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to folder containing data processors (*.epf) & reports (*.erf) in binary or XML format or path to binary data processor (*.epf) or report (*.erf)"
|
||||
set ERROR_CODE=1
|
||||
) ELSE (
|
||||
IF not exist "%DP_SOURCE%" (
|
||||
echo [ERROR] Path "%DP_SOURCE%" doesn't exist ^(parameter 1^).
|
||||
IF not exist "%V8_SRC_PATH%" (
|
||||
echo [ERROR] Path "%V8_SRC_PATH%" doesn't exist ^(parameter 1^).
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
)
|
||||
IF not defined DP_DEST_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save 1C data processors & reports in 1C:EDT format"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not exist "%BASE_CONFIG%" (
|
||||
echo [INFO] Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
|
||||
set BASE_CONFIG=
|
||||
IF not exist "%V8_BASE_CONFIG%" (
|
||||
echo [INFO] Path "%V8_BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
|
||||
set V8_BASE_CONFIG=
|
||||
)
|
||||
IF %ERROR_CODE% neq 0 (
|
||||
echo ===
|
||||
@ -59,31 +62,31 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF exist "%DP_DEST_PATH%" rd /S /Q "%DP_DEST_PATH%"
|
||||
md %DP_DEST_PATH%
|
||||
IF exist "%V8_DST_PATH%" rd /S /Q "%V8_DST_PATH%"
|
||||
md %V8_DST_PATH%
|
||||
|
||||
echo [INFO] Set infobase for export data processor/report...
|
||||
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%V8_BASE_CONFIG%"
|
||||
|
||||
IF "%BASE_CONFIG%" equ "" (
|
||||
IF "%V8_BASE_CONFIG%" equ "" (
|
||||
md "%IB_PATH%"
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
set BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
goto export
|
||||
)
|
||||
IF exist "%BASE_CONFIG%\1cv8.1cd" (
|
||||
IF exist "%V8_BASE_CONFIG%\1cv8.1cd" (
|
||||
echo [INFO] Basic config source type: Infobase
|
||||
set BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%BASE_CONFIG%
|
||||
set IB_PATH=%V8_BASE_CONFIG%
|
||||
goto export
|
||||
)
|
||||
md "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%V8_BASE_CONFIG%" "%IB_PATH%"
|
||||
IF ERRORLEVEL 0 goto export
|
||||
|
||||
echo [ERROR] Error cheking type of basic configuration "%BASE_CONFIG%"!
|
||||
echo [ERROR] Error cheking type of basic configuration "%V8_BASE_CONFIG%"!
|
||||
echo Infobase, configuration file ^(*.cf^), 1C:Designer XML, 1C:EDT project or no configuration expected.
|
||||
exit /b 1
|
||||
|
||||
@ -91,54 +94,54 @@ exit /b 1
|
||||
|
||||
echo [INFO] Checking data processord ^& reports source type...
|
||||
|
||||
FOR /f %%f IN ('dir /b /a-d "%DP_SOURCE%\*.epf" "%DP_SOURCE%\*.erf"') DO (
|
||||
FOR /f %%f IN ('dir /b /a-d "%V8_SRC_PATH%\*.epf" "%V8_SRC_PATH%\*.erf"') DO (
|
||||
echo [INFO] Source type: External data processors ^(epf^) ^& reports ^(erf^) binary files
|
||||
set DP_SOURCE_PATH=%DP_SOURCE%
|
||||
set DP_SOURCE_MASK="%DP_SOURCE%\*.epf" "%DP_SOURCE%\*.erf"
|
||||
set V8_SRC_FOLDER=%V8_SRC_PATH%
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%\*.epf" "%V8_SRC_PATH%\*.erf"
|
||||
goto export_epf
|
||||
)
|
||||
FOR /f %%f IN ('dir /b /a-d "%DP_SOURCE%\*.xml"') DO (
|
||||
FOR /f %%f IN ('dir /b /a-d "%V8_SRC_PATH%\*.xml"') DO (
|
||||
echo [INFO] Source type: 1C:Designer XML files folder ^(external data processors ^& reports^)
|
||||
set XML_PATH=%DP_SOURCE%
|
||||
set DP_SOURCE_MASK="%DP_SOURCE%\*.xml"
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%\*.xml"
|
||||
goto export_xml
|
||||
)
|
||||
set DP_SOURCE_MASK="%DP_SOURCE%"
|
||||
IF /i "%DP_SOURCE:~-4%" equ ".xml" (
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%"
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".xml" (
|
||||
echo [INFO] Source type: 1C:Designer XML files ^(external data processor or report^)
|
||||
set XML_PATH=%DP_SOURCE_PATH%
|
||||
set XML_PATH=%V8_SRC_FOLDER%
|
||||
goto export_xml
|
||||
)
|
||||
IF /i "%DP_SOURCE:~-4%" equ ".epf" (
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".epf" (
|
||||
echo [INFO] Source type: External data processor binary file ^(epf^)
|
||||
goto export_epf
|
||||
)
|
||||
IF /i "%DP_SOURCE:~-4%" equ ".erf" (
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".erf" (
|
||||
echo [INFO] Source type: External report binary file ^(erf^)
|
||||
goto export_epf
|
||||
)
|
||||
|
||||
echo [ERROR] Wrong path "%DP_SOURCE%"!
|
||||
echo [ERROR] Wrong path "%V8_SRC_PATH%"!
|
||||
echo Folder containing external data processors ^& reports in binary or XML format, data processor binary ^(*.epf^) or report binary ^(*.erf^) expected.
|
||||
exit /b 1
|
||||
|
||||
:export_epf
|
||||
|
||||
echo [INFO] Export data processors ^& reports from folder "%DP_SOURCE%" to 1C:Designer XML format "%XML_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
echo [INFO] Export data processors ^& reports from folder "%V8_SRC_PATH%" to 1C:Designer XML format "%XML_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
|
||||
md "%XML_PATH%"
|
||||
|
||||
FOR /f %%f IN ('dir /b /a-d %DP_SOURCE_MASK%') DO (
|
||||
FOR /f %%f IN ('dir /b /a-d %V8_SRC_MASK%') DO (
|
||||
echo [INFO] Building %%~nf...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%XML_PATH%" "%DP_SOURCE_PATH%\%%~nxf"
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%XML_PATH%" "%V8_SRC_FOLDER%\%%~nxf"
|
||||
)
|
||||
|
||||
:export_xml
|
||||
|
||||
md "%WS_PATH%"
|
||||
|
||||
echo [INFO] Export dataprocessors ^& reports from 1C:Designer XML format "%XML_PATH%" to 1C:EDT format "%DP_DEST_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace import --project "%DP_DEST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
|
||||
echo [INFO] Export dataprocessors ^& reports from 1C:Designer XML format "%XML_PATH%" to 1C:EDT format "%V8_DST_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
|
||||
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C external data processors ^& reports to binary format ^(*.epf, *.erf^)
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -19,30 +21,31 @@ set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set DP_SOURCE=%1
|
||||
IF defined DP_SOURCE set DP_SOURCE=%DP_SOURCE:"=%
|
||||
set DP_SOURCE_PATH=%~dp1
|
||||
set DP_DEST_PATH=%2
|
||||
IF defined DP_DEST_PATH set DP_DEST_PATH=%DP_DEST_PATH:"=%
|
||||
set BASE_CONFIG=%3
|
||||
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
set V8_SRC_FOLDER=%~dp1
|
||||
set V8_SRC_FOLDER=%V8_SRC_FOLDER:~0,-1%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
IF "%3" neq "" set V8_BASE_CONFIG=%3
|
||||
IF defined V8_BASE_CONFIG set V8_BASE_CONFIG=%V8_BASE_CONFIG:"=%
|
||||
|
||||
IF not defined DP_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to folder contains 1C data processors & reports in 1C:Designer XML or 1C:EDT project format or path to main xml-file of data processor or report"
|
||||
set ERROR_CODE=1
|
||||
) ELSE (
|
||||
IF not exist "%DP_SOURCE%" (
|
||||
echo [ERROR] Path "%DP_SOURCE%" doesn't exist ^(parameter 1^).
|
||||
IF not exist "%V8_SRC_PATH%" (
|
||||
echo [ERROR] Path "%V8_SRC_PATH%" doesn't exist ^(parameter 1^).
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
)
|
||||
IF not defined DP_DEST_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save data processors & reports in binary format (*.epf, *.erf)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not exist "%BASE_CONFIG%" (
|
||||
echo [INFO] Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
|
||||
set BASE_CONFIG=
|
||||
IF not exist "%V8_BASE_CONFIG%" (
|
||||
echo [INFO] Path "%V8_BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
|
||||
set V8_BASE_CONFIG=
|
||||
)
|
||||
IF %ERROR_CODE% neq 0 (
|
||||
echo ===
|
||||
@ -59,30 +62,30 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF not exist "%DP_DEST_PATH%" md "%DP_DEST_PATH%"
|
||||
IF not exist "%V8_DST_PATH%" md "%V8_DST_PATH%"
|
||||
|
||||
echo [INFO] Set infobase for export data processor/report...
|
||||
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%V8_BASE_CONFIG%"
|
||||
|
||||
IF "%BASE_CONFIG%" equ "" (
|
||||
IF "%V8_BASE_CONFIG%" equ "" (
|
||||
md "%IB_PATH%"
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
set BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
goto export
|
||||
)
|
||||
IF exist "%BASE_CONFIG%\1cv8.1cd" (
|
||||
IF exist "%V8_BASE_CONFIG%\1cv8.1cd" (
|
||||
echo [INFO] Basic config source type: Infobase
|
||||
set BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%BASE_CONFIG%
|
||||
set IB_PATH=%V8_BASE_CONFIG%
|
||||
goto export
|
||||
)
|
||||
md "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%V8_BASE_CONFIG%" "%IB_PATH%"
|
||||
IF ERRORLEVEL 0 goto export
|
||||
|
||||
echo [ERROR] Error cheking type of basic configuration "%BASE_CONFIG%"!
|
||||
echo [ERROR] Error cheking type of basic configuration "%V8_BASE_CONFIG%"!
|
||||
echo Infobase, configuration file ^(*.cf^), 1C:Designer XML, 1C:EDT project or no configuration expected.
|
||||
exit /b 1
|
||||
|
||||
@ -90,58 +93,60 @@ exit /b 1
|
||||
|
||||
echo [INFO] Checking data processord ^& reports source type...
|
||||
|
||||
set DP_SOURCE_IS_EDT=0
|
||||
set V8_SRC_IS_EDT=0
|
||||
|
||||
IF exist "%DP_SOURCE%\DT-INF\" (
|
||||
IF exist "%DP_SOURCE%\src\ExternalDataProcessors\" set DP_SOURCE_IS_EDT=1
|
||||
IF exist "%DP_SOURCE%\src\ExternalReports\" set DP_SOURCE_IS_EDT=1
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\src\ExternalDataProcessors\" set V8_SRC_IS_EDT=1
|
||||
IF exist "%V8_SRC_PATH%\src\ExternalReports\" set V8_SRC_IS_EDT=1
|
||||
)
|
||||
IF "%DP_SOURCE_IS_EDT%" equ "1" (
|
||||
IF "%V8_SRC_IS_EDT%" equ "1" (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
goto export_edt
|
||||
)
|
||||
FOR /f %%f IN ('dir /b /a-d "%DP_SOURCE%\*.xml"') DO (
|
||||
FOR /f %%f IN ('dir /b /a-d "%V8_SRC_PATH%\*.xml"') DO (
|
||||
echo [INFO] Source type: 1C:Designer XML files folder ^(external data processors ^& reports^)
|
||||
set XML_PATH=%DP_SOURCE%
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%\*.xml"
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
goto export_xml
|
||||
)
|
||||
IF /i "%DP_SOURCE:~-4%" equ ".xml" (
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".xml" (
|
||||
echo [INFO] Source type: 1C:Designer XML files ^(external data processor or report^)
|
||||
set XML_PATH=%DP_SOURCE_PATH%
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%"
|
||||
set XML_PATH=%V8_SRC_FOLDER%
|
||||
goto export_xml
|
||||
)
|
||||
|
||||
echo [ERROR] Wrong path "%DP_SOURCE%"!
|
||||
echo [ERROR] Wrong path "%V8_SRC_PATH%"!
|
||||
echo Folder containing external data processors ^& reports in XML format or 1C:EDT project or path to main xml-file of data processor or report expected.
|
||||
exit /b 1
|
||||
|
||||
:export_edt
|
||||
|
||||
echo [INFO] Export external data processors ^& reports from 1C:EDT format "%DP_SOURCE%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
echo [INFO] Export external data processors ^& reports from 1C:EDT format "%V8_SRC_PATH%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
|
||||
md "%XML_PATH%"
|
||||
md "%WS_PATH%"
|
||||
|
||||
call %V8_RING_TOOL% edt workspace export --project "%DP_SOURCE%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:export_xml
|
||||
|
||||
IF "%DP_SOURCE_IS_EDT%" equ "1" (
|
||||
echo [INFO] Import external data processors from "%XML_PATH%" to 1C:Designer format "%DP_DEST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
IF "%V8_SRC_IS_EDT%" equ "1" (
|
||||
echo [INFO] Import external data processors from "%XML_PATH%" to 1C:Designer format "%V8_DST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
FOR /f %%f IN ('dir /b /a-d "%XML_PATH%\ExternalDataProcessors\*.xml"') DO (
|
||||
echo [INFO] Building %%~nf...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\ExternalDataProcessors\%%~nxf" "%DP_DEST_PATH%"
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\ExternalDataProcessors\%%~nxf" "%V8_DST_PATH%"
|
||||
)
|
||||
echo [INFO] Import external reports from "%XML_PATH%" to 1C:Designer format "%DP_DEST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
echo [INFO] Import external reports from "%XML_PATH%" to 1C:Designer format "%V8_DST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
FOR /f %%f IN ('dir /b /a-d "%XML_PATH%\ExternalReports\*.xml"') DO (
|
||||
echo [INFO] Building %%~nf...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\ExternalReports\%%~nxf" "%DP_DEST_PATH%"
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\ExternalReports\%%~nxf" "%V8_DST_PATH%"
|
||||
)
|
||||
) ELSE (
|
||||
echo [INFO] Import external datap processors ^& reports from "%XML_PATH%" to 1C:Designer format "%DP_DEST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
FOR /f %%f IN ('dir /b /a-d "%XML_PATH%\*.xml"') DO (
|
||||
echo [INFO] Import external datap processors ^& reports from "%XML_PATH%" to 1C:Designer format "%V8_DST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
FOR /f %%f IN ('dir /b /a-d %V8_SRC_MASK%') DO (
|
||||
echo [INFO] Building %%~nf...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\%%~nxf" "%DP_DEST_PATH%"
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\%%~nxf" "%V8_DST_PATH%"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C external data processors ^& reports to 1C:Designer XML format
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -18,30 +20,31 @@ set LOCAL_TEMP=%V8_TEMP%\%~n0
|
||||
set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set DP_SOURCE=%1
|
||||
IF defined DP_SOURCE set DP_SOURCE=%DP_SOURCE:"=%
|
||||
set DP_SOURCE_PATH=%~dp1
|
||||
set DP_DEST_PATH=%2
|
||||
IF defined DP_DEST_PATH set DP_DEST_PATH=%DP_DEST_PATH:"=%
|
||||
set BASE_CONFIG=%3
|
||||
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
set V8_SRC_FOLDER=%~dp1
|
||||
set V8_SRC_FOLDER=%V8_SRC_FOLDER:~0,-1%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
IF "%3" neq "" set V8_BASE_CONFIG=%3
|
||||
IF defined V8_BASE_CONFIG set V8_BASE_CONFIG=%V8_BASE_CONFIG:"=%
|
||||
|
||||
IF not defined DP_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to folder containing data processors (*.epf) & reports (*.erf) in binary or EDT project or path to binary data processor (*.epf) or report (*.erf)"
|
||||
set ERROR_CODE=1
|
||||
) ELSE (
|
||||
IF not exist "%DP_SOURCE%" (
|
||||
echo [ERROR] Path "%DP_SOURCE%" doesn't exist ^(parameter 1^).
|
||||
IF not exist "%V8_SRC_PATH%" (
|
||||
echo [ERROR] Path "%V8_SRC_PATH%" doesn't exist ^(parameter 1^).
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
)
|
||||
IF not defined DP_DEST_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save 1C data processors & reports in 1C:Designer XML format"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not exist "%BASE_CONFIG%" (
|
||||
echo [INFO] Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
|
||||
set BASE_CONFIG=
|
||||
IF not exist "%V8_BASE_CONFIG%" (
|
||||
echo [INFO] Path "%V8_BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
|
||||
set V8_BASE_CONFIG=
|
||||
)
|
||||
IF %ERROR_CODE% neq 0 (
|
||||
echo ===
|
||||
@ -58,30 +61,30 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF not exist "%DP_DEST_PATH%" md "%DP_DEST_PATH%"
|
||||
IF not exist "%V8_DST_PATH%" md "%V8_DST_PATH%"
|
||||
|
||||
echo [INFO] Set infobase for export data processor/report...
|
||||
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%V8_BASE_CONFIG%"
|
||||
|
||||
IF "%BASE_CONFIG%" equ "" (
|
||||
IF "%V8_BASE_CONFIG%" equ "" (
|
||||
md "%IB_PATH%"
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
set BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
goto export
|
||||
)
|
||||
IF exist "%BASE_CONFIG%\1cv8.1cd" (
|
||||
IF exist "%V8_BASE_CONFIG%\1cv8.1cd" (
|
||||
echo [INFO] Basic config source type: Infobase
|
||||
set BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%BASE_CONFIG%
|
||||
set IB_PATH=%V8_BASE_CONFIG%
|
||||
goto export
|
||||
)
|
||||
md "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%V8_BASE_CONFIG%" "%IB_PATH%"
|
||||
IF ERRORLEVEL 0 goto export
|
||||
|
||||
echo [ERROR] Error cheking type of basic configuration "%BASE_CONFIG%"!
|
||||
echo [ERROR] Error cheking type of basic configuration "%V8_BASE_CONFIG%"!
|
||||
echo Infobase, configuration file ^(*.cf^), 1C:Designer XML, 1C:EDT project or no configuration expected.
|
||||
exit /b 1
|
||||
|
||||
@ -89,52 +92,52 @@ exit /b 1
|
||||
|
||||
echo [INFO] Checking data processord ^& reports source type...
|
||||
|
||||
set DP_SOURCE_IS_EDT=0
|
||||
IF exist "%DP_SOURCE%\DT-INF\" (
|
||||
IF exist "%DP_SOURCE%\src\ExternalDataProcessors\" set DP_SOURCE_IS_EDT=1
|
||||
IF exist "%DP_SOURCE%\src\ExternalReports\" set DP_SOURCE_IS_EDT=1
|
||||
set V8_SRC_IS_EDT=0
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\src\ExternalDataProcessors\" set V8_SRC_IS_EDT=1
|
||||
IF exist "%V8_SRC_PATH%\src\ExternalReports\" set V8_SRC_IS_EDT=1
|
||||
)
|
||||
IF "%DP_SOURCE_IS_EDT%" equ "1" (
|
||||
IF "%V8_SRC_IS_EDT%" equ "1" (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
goto end
|
||||
)
|
||||
FOR /f %%f IN ('dir /b /a-d "%DP_SOURCE%\*.epf" "%DP_SOURCE%\*.erf"') DO (
|
||||
FOR /f %%f IN ('dir /b /a-d "%V8_SRC_PATH%\*.epf" "%V8_SRC_PATH%\*.erf"') DO (
|
||||
echo [INFO] Source type: External data processors ^(epf^) ^& reports ^(erf^) binary files
|
||||
set DP_SOURCE_PATH=%DP_SOURCE%
|
||||
set DP_SOURCE_MASK="%DP_SOURCE%\*.epf" "%DP_SOURCE%\*.erf"
|
||||
set V8_SRC_FOLDER=%V8_SRC_PATH%
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%\*.epf" "%V8_SRC_PATH%\*.erf"
|
||||
goto export_epf
|
||||
)
|
||||
set DP_SOURCE_MASK="%DP_SOURCE%"
|
||||
IF /i "%DP_SOURCE:~-4%" equ ".epf" (
|
||||
set V8_SRC_MASK="%V8_SRC_PATH%"
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".epf" (
|
||||
echo [INFO] Source type: External data processor binary file ^(epf^)
|
||||
goto export_epf
|
||||
)
|
||||
IF /i "%DP_SOURCE:~-4%" equ ".erf" (
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".erf" (
|
||||
echo [INFO] Source type: External report binary file ^(erf^)
|
||||
goto export_epf
|
||||
)
|
||||
|
||||
echo [ERROR] Wrong path "%DP_SOURCE%"!
|
||||
echo [ERROR] Wrong path "%V8_SRC_PATH%"!
|
||||
echo Folder containing external data processors ^& reports in binary or EDT project, data processor binary ^(*.epf^) or report binary ^(*.erf^) expected.
|
||||
exit /b 1
|
||||
|
||||
:export_epf
|
||||
|
||||
echo [INFO] Export data processors ^& reports from folder "%DP_SOURCE%" to 1C:Designer XML format "%DP_DEST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
FOR /f %%f IN ('dir /b /a-d %DP_SOURCE_MASK%') DO (
|
||||
echo [INFO] Export data processors ^& reports from folder "%V8_SRC_PATH%" to 1C:Designer XML format "%V8_DST_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
|
||||
FOR /f %%f IN ('dir /b /a-d %V8_SRC_MASK%') DO (
|
||||
echo [INFO] Building %%~nf...
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%DP_DEST_PATH%" "%DP_SOURCE_PATH%\%%~nxf"
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%V8_DST_PATH%" "%V8_SRC_FOLDER%\%%~nxf"
|
||||
)
|
||||
|
||||
goto end
|
||||
|
||||
:export_xml
|
||||
|
||||
echo [INFO] Export dataprocessors ^& reports from 1C:EDT project "%DP_SOURCE%" to 1C:Designer XML format "%DP_DEST_PATH%"...
|
||||
echo [INFO] Export dataprocessors ^& reports from 1C:EDT project "%V8_SRC_PATH%" to 1C:Designer XML format "%V8_DST_PATH%"...
|
||||
|
||||
md "%WS_PATH%"
|
||||
|
||||
call %V8_RING_TOOL% edt workspace export --project "%DP_SOURCE%" --configuration-files "%DP_DEST_PATH%" --workspace-location "%WS_PATH%"
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:end
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Validate 1C configuration, extension, external data processors ^& reports using 1C:EDT ^(using ring tool^)
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -19,8 +21,8 @@ IF "%VALIDATE_PATH%" equ "" (
|
||||
)
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set CONFIG_PATH=%1
|
||||
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
set REPORT_FILE=%2
|
||||
IF defined REPORT_FILE (
|
||||
set REPORT_FILE=%REPORT_FILE:"=%
|
||||
@ -29,7 +31,7 @@ IF defined REPORT_FILE (
|
||||
set EXT_NAME=%3
|
||||
IF defined EXT_NAME set EXT_NAME=%EXT_NAME:"=%
|
||||
|
||||
IF not defined CONFIG_PATH (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to 1C configuration, extension, data processors or reports (binary (*.cf, *.cfe, *.epf, *.erf), 1C:Designer XML format or 1C:EDT format)"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
@ -53,33 +55,33 @@ IF not exist "%REPORT_FILE_PATH%" md "%REPORT_FILE_PATH%"
|
||||
|
||||
echo [INFO] Prepare project for validation...
|
||||
|
||||
IF exist "%CONFIG_PATH%\DT-INF\" (
|
||||
set VALIDATE_PATH=%CONFIG_PATH%
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
set VALIDATE_PATH=%V8_SRC_PATH%
|
||||
goto validate
|
||||
)
|
||||
md "%VALIDATE_PATH%"
|
||||
IF /i "%CONFIG_PATH:~-3%" equ ".cf" (
|
||||
call %~dp0conf2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
|
||||
IF /i "%V8_SRC_PATH:~-3%" equ ".cf" (
|
||||
call %~dp0conf2edt.cmd "%V8_SRC_PATH%" "%VALIDATE_PATH%"
|
||||
goto validate
|
||||
)
|
||||
IF /i "%CONFIG_PATH:~-4%" equ ".cfe" (
|
||||
call %~dp0ext2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%" "%EXT_NAME%"
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".cfe" (
|
||||
call %~dp0ext2edt.cmd "%V8_SRC_PATH%" "%VALIDATE_PATH%" "%EXT_NAME%"
|
||||
goto validate
|
||||
)
|
||||
IF exist "%CONFIG_PATH%\Configuration.xml" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%CONFIG_PATH%\Configuration.xml"') DO (
|
||||
call %~dp0ext2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
|
||||
IF exist "%V8_SRC_PATH%\Configuration.xml" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%V8_SRC_PATH%\Configuration.xml"') DO (
|
||||
call %~dp0ext2edt.cmd "%V8_SRC_PATH%" "%VALIDATE_PATH%"
|
||||
goto validate
|
||||
)
|
||||
call %~dp0conf2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
|
||||
call %~dp0conf2edt.cmd "%V8_SRC_PATH%" "%VALIDATE_PATH%"
|
||||
goto validate
|
||||
)
|
||||
IF exist "%CONFIG_PATH%\1cv8.1cd" (
|
||||
call %~dp0conf2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
|
||||
IF exist "%V8_SRC_PATH%\1cv8.1cd" (
|
||||
call %~dp0conf2edt.cmd "%V8_SRC_PATH%" "%VALIDATE_PATH%"
|
||||
goto validate
|
||||
)
|
||||
FOR /f %%f IN ('dir /b /a-d "%CONFIG_PATH%\*.epf" "%CONFIG_PATH%\*.erf" "%CONFIG_PATH%\*.xml" "%CONFIG_PATH%\ExternalDataProcessors\*.xml" "%CONFIG_PATH%\ExternalReports\*.xml"') DO (
|
||||
call %~dp0dp2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
|
||||
FOR /f %%f IN ('dir /b /a-d "%V8_SRC_PATH%\*.epf" "%V8_SRC_PATH%\*.erf" "%V8_SRC_PATH%\*.xml" "%V8_SRC_PATH%\ExternalDataProcessors\*.xml" "%V8_SRC_PATH%\ExternalReports\*.xml"') DO (
|
||||
call %~dp0dp2edt.cmd "%V8_SRC_PATH%" "%VALIDATE_PATH%"
|
||||
goto validate
|
||||
)
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C configuration extension to binary format ^(*.cfe^)
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -21,38 +23,37 @@ set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set EXT_SOURCE=%1
|
||||
IF defined EXT_SOURCE set EXT_SOURCE=%EXT_SOURCE:"=%
|
||||
set EXT_FILE=%2
|
||||
IF defined EXT_FILE (
|
||||
set EXT_FILE=%EXT_FILE:"=%
|
||||
set EXT_FILE_PATH=%~dp2
|
||||
)
|
||||
set EXT_NAME=%3
|
||||
IF defined EXT_NAME set EXT_NAME=%EXT_NAME:"=%
|
||||
set BASE_CONFIG=%4
|
||||
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
set V8_DST_FOLDER=%~dp2
|
||||
set V8_DST_FOLDER=%V8_DST_FOLDER:~0,-1%
|
||||
IF "%3" neq "" set V8_EXT_NAME=%3
|
||||
IF defined V8_EXT_NAME set V8_EXT_NAME=%V8_EXT_NAME:"=%
|
||||
IF "%4" neq "" set V8_BASE_CONFIG=%4
|
||||
IF defined V8_BASE_CONFIG set V8_BASE_CONFIG=%V8_BASE_CONFIG:"=%
|
||||
|
||||
IF not defined EXT_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to folder contains 1C extension in 1C:Designer XML format or EDT project"
|
||||
set ERROR_CODE=1
|
||||
) ELSE (
|
||||
IF not exist "%EXT_SOURCE%" (
|
||||
echo [ERROR] Path "%EXT_SOURCE%" doesn't exist ^(parameter 1^).
|
||||
IF not exist "%V8_SRC_PATH%" (
|
||||
echo [ERROR] Path "%V8_SRC_PATH%" doesn't exist ^(parameter 1^).
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
)
|
||||
IF not defined EXT_FILE (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to 1C configuration extension file (*.cfe)"
|
||||
set ERROR_CODE=1
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined EXT_NAME (
|
||||
IF not defined V8_EXT_NAME (
|
||||
echo [ERROR] Missed parameter 3 - "configuration extension name"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not exist "%BASE_CONFIG%" (
|
||||
echo [INFO] Path "%BASE_CONFIG%" doesn't exist ^(parameter 4^), empty infobase will be used.
|
||||
set BASE_CONFIG=
|
||||
IF not exist "%V8_BASE_CONFIG%" (
|
||||
echo [INFO] Path "%V8_BASE_CONFIG%" doesn't exist ^(parameter 4^), empty infobase will be used.
|
||||
set V8_BASE_CONFIG=
|
||||
)
|
||||
IF %ERROR_CODE% neq 0 (
|
||||
echo ===
|
||||
@ -69,30 +70,30 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF not exist "%EXT_FILE_PATH%" md "%EXT_FILE_PATH%"
|
||||
IF not exist "%V8_DST_FOLDER%" md "%V8_DST_FOLDER%"
|
||||
|
||||
echo [INFO] Set infobase for export data processor/report...
|
||||
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
|
||||
set V8_BASE_CONFIG_DESCRIPTION=configuration from "%V8_BASE_CONFIG%"
|
||||
|
||||
IF "%BASE_CONFIG%" equ "" (
|
||||
IF "%V8_BASE_CONFIG%" equ "" (
|
||||
md "%IB_PATH%"
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
set BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
set V8_BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
goto export
|
||||
)
|
||||
IF exist "%BASE_CONFIG%\1cv8.1cd" (
|
||||
IF exist "%V8_BASE_CONFIG%\1cv8.1cd" (
|
||||
echo [INFO] Basic config source type: Infobase
|
||||
set BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%BASE_CONFIG%
|
||||
set V8_BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%V8_BASE_CONFIG%
|
||||
goto export
|
||||
)
|
||||
md "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%V8_BASE_CONFIG%" "%IB_PATH%"
|
||||
IF ERRORLEVEL 0 goto export
|
||||
|
||||
echo [ERROR] Error cheking type of basic configuration "%BASE_CONFIG%"!
|
||||
echo [ERROR] Error cheking type of basic configuration "%V8_BASE_CONFIG%"!
|
||||
echo Infobase, configuration file ^(*.cf^), 1C:Designer XML, 1C:EDT project or no configuration expected.
|
||||
exit /b 1
|
||||
|
||||
@ -100,9 +101,9 @@ exit /b 1
|
||||
|
||||
echo [INFO] Checking 1C extension source type...
|
||||
|
||||
IF exist "%EXT_SOURCE%\DT-INF\" (
|
||||
IF exist "%EXT_SOURCE%\src\Configuration\Configuration.mdo" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%EXT_SOURCE%\src\Configuration\Configuration.mdo"') DO (
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\src\Configuration\Configuration.mdo" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%V8_SRC_PATH%\src\Configuration\Configuration.mdo"') DO (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
md "%XML_PATH%"
|
||||
md "%WS_PATH%"
|
||||
@ -110,39 +111,39 @@ IF exist "%EXT_SOURCE%\DT-INF\" (
|
||||
)
|
||||
)
|
||||
)
|
||||
IF exist "%EXT_SOURCE%\Configuration.xml" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%EXT_SOURCE%\Configuration.xml"') DO (
|
||||
IF exist "%V8_SRC_PATH%\Configuration.xml" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%V8_SRC_PATH%\Configuration.xml"') DO (
|
||||
echo [INFO] Source type: 1C:Designer XML files
|
||||
set XML_PATH=%EXT_SOURCE%
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
goto export_xml
|
||||
)
|
||||
)
|
||||
|
||||
echo [ERROR] Wrong path "%EXT_SOURCE%"!
|
||||
echo [ERROR] Wrong path "%V8_SRC_PATH%"!
|
||||
echo Folder containing configuration extension in 1C:Designer XML format or 1C:EDT project expected.
|
||||
exit /b 1
|
||||
|
||||
:export_edt
|
||||
|
||||
echo [INFO] Export configuration extension from 1C:EDT format "%EXT_SOURCE%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace export --project "%EXT_SOURCE%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
echo [INFO] Export configuration extension from 1C:EDT format "%V8_SRC_PATH%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:export_xml
|
||||
|
||||
echo [INFO] Loading configuration extension from XML-files "%XML_PATH%" to infobase "%IB_PATH%"...
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %XML_PATH% -Extension %EXT_NAME%
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %XML_PATH% -Extension %V8_EXT_NAME%
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config import --db-path="%IB_PATH%" --extension=%EXT_NAME% "%XML_PATH%"
|
||||
%IBCMD_TOOL% infobase config import --db-path="%IB_PATH%" --extension=%V8_EXT_NAME% "%XML_PATH%"
|
||||
)
|
||||
|
||||
:export_ib
|
||||
|
||||
echo [INFO] Export configuration extension from infobase "%IB_PATH%" configuration to "%EXT_FILE%"...
|
||||
echo [INFO] Export configuration extension from infobase "%IB_PATH%" configuration to "%V8_DST_PATH%"...
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %EXT_FILE% -Extension %EXT_NAME%
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %V8_DST_PATH% -Extension %V8_EXT_NAME%
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" --extension=%EXT_NAME% "%EXT_FILE%"
|
||||
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" --extension=%V8_EXT_NAME% "%V8_DST_PATH%"
|
||||
)
|
||||
|
||||
echo [INFO] Clear temporary files...
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C configuration extension to 1C:EDT project
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -21,35 +23,35 @@ set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set XML_PATH=%LOCAL_TEMP%\tmp_xml
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set EXT_SOURCE=%1
|
||||
IF defined EXT_SOURCE set EXT_SOURCE=%EXT_SOURCE:"=%
|
||||
set EXT_DEST_PATH=%2
|
||||
IF defined EXT_DEST_PATH set EXT_DEST_PATH=%EXT_DEST_PATH:"=%
|
||||
set EXT_NAME=%3
|
||||
IF defined EXT_NAME set EXT_NAME=%EXT_NAME:"=%
|
||||
set BASE_CONFIG=%4
|
||||
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
IF "%3" neq "" set V8_EXT_NAME=%3
|
||||
IF defined V8_EXT_NAME set V8_EXT_NAME=%V8_EXT_NAME:"=%
|
||||
IF "%4" neq "" set V8_BASE_CONFIG=%4
|
||||
IF defined V8_BASE_CONFIG set V8_BASE_CONFIG=%V8_BASE_CONFIG:"=%
|
||||
|
||||
IF not defined EXT_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to folder contains 1C extension binary file (*.cfe) or in 1C:Designer XML format"
|
||||
set ERROR_CODE=1
|
||||
) ELSE (
|
||||
IF not exist "%EXT_SOURCE%" (
|
||||
echo [ERROR] Path "%EXT_SOURCE%" doesn't exist ^(parameter 1^).
|
||||
IF not exist "%V8_SRC_PATH%" (
|
||||
echo [ERROR] Path "%V8_SRC_PATH%" doesn't exist ^(parameter 1^).
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
)
|
||||
IF not defined EXT_DEST_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save configuration extension in 1C:EDT project format"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined EXT_NAME (
|
||||
IF not defined V8_EXT_NAME (
|
||||
echo [ERROR] Missed parameter 3 - "configuration extension name"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not exist "%BASE_CONFIG%" (
|
||||
echo [INFO] Path "%BASE_CONFIG%" doesn't exist ^(parameter 4^), empty infobase will be used.
|
||||
set BASE_CONFIG=
|
||||
IF not exist "%V8_BASE_CONFIG%" (
|
||||
echo [INFO] Path "%V8_BASE_CONFIG%" doesn't exist ^(parameter 4^), empty infobase will be used.
|
||||
set V8_BASE_CONFIG=
|
||||
)
|
||||
IF %ERROR_CODE% neq 0 (
|
||||
echo ===
|
||||
@ -66,31 +68,31 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF exist "%EXT_DEST_PATH%" rd /S /Q "%EXT_DEST_PATH%"
|
||||
md %EXT_DEST_PATH%
|
||||
IF exist "%V8_DST_PATH%" rd /S /Q "%V8_DST_PATH%"
|
||||
md %V8_DST_PATH%
|
||||
|
||||
echo [INFO] Set infobase for export data processor/report...
|
||||
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
|
||||
set V8_BASE_CONFIG_DESCRIPTION=configuration from "%V8_BASE_CONFIG%"
|
||||
|
||||
IF "%BASE_CONFIG%" equ "" (
|
||||
IF "%V8_BASE_CONFIG%" equ "" (
|
||||
md "%IB_PATH%"
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
set BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
set V8_BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
goto export
|
||||
)
|
||||
IF exist "%BASE_CONFIG%\1cv8.1cd" (
|
||||
IF exist "%V8_BASE_CONFIG%\1cv8.1cd" (
|
||||
echo [INFO] Basic config source type: Infobase
|
||||
set BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%BASE_CONFIG%
|
||||
set V8_BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%V8_BASE_CONFIG%
|
||||
goto export
|
||||
)
|
||||
md "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%V8_BASE_CONFIG%" "%IB_PATH%"
|
||||
IF ERRORLEVEL 0 goto export
|
||||
|
||||
echo [ERROR] Error cheking type of basic configuration "%BASE_CONFIG%"!
|
||||
echo [ERROR] Error cheking type of basic configuration "%V8_BASE_CONFIG%"!
|
||||
echo Infobase, configuration file ^(*.cf^), 1C:Designer XML, 1C:EDT project or no configuration expected.
|
||||
exit /b 1
|
||||
|
||||
@ -98,30 +100,30 @@ exit /b 1
|
||||
|
||||
echo [INFO] Checking 1C extension source type...
|
||||
|
||||
IF /i "%EXT_SOURCE:~-4%" equ ".cfe" (
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".cfe" (
|
||||
echo [INFO] Source type: Configuration extension file ^(CFE^)
|
||||
goto export_cfe
|
||||
)
|
||||
IF exist "%EXT_SOURCE%\Configuration.xml" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%EXT_SOURCE%\Configuration.xml"') DO (
|
||||
IF exist "%V8_SRC_PATH%\Configuration.xml" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%V8_SRC_PATH%\Configuration.xml"') DO (
|
||||
echo [INFO] Source type: 1C:Designer XML files
|
||||
set XML_PATH=%EXT_SOURCE%
|
||||
set XML_PATH=%V8_SRC_PATH%
|
||||
goto export_xml
|
||||
)
|
||||
)
|
||||
|
||||
echo [ERROR] Wrong path "%EXT_SOURCE%"!
|
||||
echo [ERROR] Wrong path "%V8_SRC_PATH%"!
|
||||
echo Configuration extension binary ^(*.cfe^) or folder containing configuration extension in 1C:Designer XML format expected.
|
||||
exit /b 1
|
||||
|
||||
:export_cfe
|
||||
|
||||
echo [INFO] Loading configuration extension from file "%EXT_SOURCE%" to infobase "%IB_PATH%"...
|
||||
echo [INFO] Loading configuration extension from file "%V8_SRC_PATH%" to infobase "%IB_PATH%"...
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadCfg %EXT_SOURCE% -Extension %EXT_NAME%
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadCfg %V8_SRC_PATH% -Extension %V8_EXT_NAME%
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config load --db-path="%IB_PATH%" --extension=%EXT_NAME% "%EXT_SOURCE%"
|
||||
%IBCMD_TOOL% infobase config load --db-path="%IB_PATH%" --extension=%V8_EXT_NAME% "%V8_SRC_PATH%"
|
||||
)
|
||||
|
||||
echo [INFO] Export configuration extension from infobase "%IB_PATH%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
@ -129,18 +131,18 @@ echo [INFO] Export configuration extension from infobase "%IB_PATH%" to 1C:Desig
|
||||
md %XML_PATH%
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%XML_PATH%" -Extension %EXT_NAME% -force
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%XML_PATH%" -Extension %V8_EXT_NAME% -force
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --extension=%EXT_NAME% --force "%XML_PATH%"
|
||||
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --extension=%V8_EXT_NAME% --force "%XML_PATH%"
|
||||
)
|
||||
|
||||
:export_xml
|
||||
|
||||
echo [INFO] Export configuration extension from 1C:Designer XML format "%XML_PATH%" to 1C:EDT format "%EXT_DEST_PATH%"...
|
||||
echo [INFO] Export configuration extension from 1C:Designer XML format "%XML_PATH%" to 1C:EDT format "%V8_DST_PATH%"...
|
||||
|
||||
md %WS_PATH%
|
||||
|
||||
call %V8_RING_TOOL% edt workspace import --project "%EXT_DEST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
|
||||
call %V8_RING_TOOL% edt workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
|
||||
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
|
@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
echo Convert 1C configuration extension to 1C:Designer XML format
|
||||
|
||||
set ERROR_CODE=0
|
||||
@ -20,35 +22,35 @@ set LOCAL_TEMP=%V8_TEMP%\%~n0
|
||||
set IB_PATH=%LOCAL_TEMP%\tmp_db
|
||||
set WS_PATH=%LOCAL_TEMP%\edt_ws
|
||||
|
||||
set EXT_SOURCE=%1
|
||||
IF defined EXT_SOURCE set EXT_SOURCE=%EXT_SOURCE:"=%
|
||||
set EXT_DEST_PATH=%2
|
||||
IF defined EXT_DEST_PATH set EXT_DEST_PATH=%EXT_DEST_PATH:"=%
|
||||
set EXT_NAME=%3
|
||||
IF defined EXT_NAME set EXT_NAME=%EXT_NAME:"=%
|
||||
set BASE_CONFIG=%4
|
||||
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
|
||||
IF "%1" neq "" set V8_SRC_PATH=%1
|
||||
IF defined V8_SRC_PATH set V8_SRC_PATH=%V8_SRC_PATH:"=%
|
||||
IF "%2" neq "" set V8_DST_PATH=%2
|
||||
IF defined V8_DST_PATH set V8_DST_PATH=%V8_DST_PATH:"=%
|
||||
IF "%3" neq "" set V8_EXT_NAME=%3
|
||||
IF defined V8_EXT_NAME set V8_EXT_NAME=%V8_EXT_NAME:"=%
|
||||
IF "%4" neq "" set V8_BASE_CONFIG=%4
|
||||
IF defined V8_BASE_CONFIG set V8_BASE_CONFIG=%V8_BASE_CONFIG:"=%
|
||||
|
||||
IF not defined EXT_SOURCE (
|
||||
IF not defined V8_SRC_PATH (
|
||||
echo [ERROR] Missed parameter 1 - "path to folder contains 1C extension binary file (*.cfe) or EDT project"
|
||||
set ERROR_CODE=1
|
||||
) ELSE (
|
||||
IF not exist "%EXT_SOURCE%" (
|
||||
echo [ERROR] Path "%EXT_SOURCE%" doesn't exist ^(parameter 1^).
|
||||
IF not exist "%V8_SRC_PATH%" (
|
||||
echo [ERROR] Path "%V8_SRC_PATH%" doesn't exist ^(parameter 1^).
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
)
|
||||
IF not defined EXT_DEST_PATH (
|
||||
IF not defined V8_DST_PATH (
|
||||
echo [ERROR] Missed parameter 2 - "path to folder to save configuration extension files in 1C:Designer XML format"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not defined EXT_NAME (
|
||||
IF not defined V8_EXT_NAME (
|
||||
echo [ERROR] Missed parameter 3 - "configuration extension name"
|
||||
set ERROR_CODE=1
|
||||
)
|
||||
IF not exist "%BASE_CONFIG%" (
|
||||
echo [INFO] Path "%BASE_CONFIG%" doesn't exist ^(parameter 4^), empty infobase will be used.
|
||||
set BASE_CONFIG=
|
||||
IF not exist "%V8_BASE_CONFIG%" (
|
||||
echo [INFO] Path "%V8_BASE_CONFIG%" doesn't exist ^(parameter 4^), empty infobase will be used.
|
||||
set V8_BASE_CONFIG=
|
||||
)
|
||||
IF %ERROR_CODE% neq 0 (
|
||||
echo ===
|
||||
@ -65,30 +67,30 @@ IF %ERROR_CODE% neq 0 (
|
||||
echo [INFO] Clear temporary files...
|
||||
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"
|
||||
md "%LOCAL_TEMP%"
|
||||
IF not exist "%EXT_DEST_PATH%" md "%EXT_DEST_PATH%"
|
||||
IF not exist "%V8_DST_PATH%" md "%V8_DST_PATH%"
|
||||
|
||||
echo [INFO] Set infobase for export data processor/report...
|
||||
|
||||
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
|
||||
set V8_BASE_CONFIG_DESCRIPTION=configuration from "%V8_BASE_CONFIG%"
|
||||
|
||||
IF "%BASE_CONFIG%" equ "" (
|
||||
IF "%V8_BASE_CONFIG%" equ "" (
|
||||
md "%IB_PATH%"
|
||||
echo [INFO] Creating infobase "%IB_PATH%"...
|
||||
set BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
set V8_BASE_CONFIG_DESCRIPTION=empty configuration
|
||||
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
|
||||
goto export
|
||||
)
|
||||
IF exist "%BASE_CONFIG%\1cv8.1cd" (
|
||||
IF exist "%V8_BASE_CONFIG%\1cv8.1cd" (
|
||||
echo [INFO] Basic config source type: Infobase
|
||||
set BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%BASE_CONFIG%
|
||||
set V8_BASE_CONFIG_DESCRIPTION=existed configuration
|
||||
set IB_PATH=%V8_BASE_CONFIG%
|
||||
goto export
|
||||
)
|
||||
md "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
|
||||
call %~dp0conf2ib.cmd "%V8_BASE_CONFIG%" "%IB_PATH%"
|
||||
IF ERRORLEVEL 0 goto export
|
||||
|
||||
echo [ERROR] Error cheking type of basic configuration "%BASE_CONFIG%"!
|
||||
echo [ERROR] Error cheking type of basic configuration "%V8_BASE_CONFIG%"!
|
||||
echo Infobase, configuration file ^(*.cf^), 1C:Designer XML, 1C:EDT project or no configuration expected.
|
||||
exit /b 1
|
||||
|
||||
@ -96,50 +98,50 @@ exit /b 1
|
||||
|
||||
echo [INFO] Checking 1C extension source type...
|
||||
|
||||
IF /i "%EXT_SOURCE:~-4%" equ ".cfe" (
|
||||
IF /i "%V8_SRC_PATH:~-4%" equ ".cfe" (
|
||||
echo [INFO] Source type: Configuration extension file ^(CFE^)
|
||||
goto export_cfe
|
||||
)
|
||||
IF exist "%EXT_SOURCE%\DT-INF\" (
|
||||
IF exist "%EXT_SOURCE%\src\Configuration\Configuration.mdo" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%EXT_SOURCE%\src\Configuration\Configuration.mdo"') DO (
|
||||
IF exist "%V8_SRC_PATH%\DT-INF\" (
|
||||
IF exist "%V8_SRC_PATH%\src\Configuration\Configuration.mdo" (
|
||||
FOR /f %%t IN ('findstr /r /i "<objectBelonging>" "%V8_SRC_PATH%\src\Configuration\Configuration.mdo"') DO (
|
||||
echo [INFO] Source type: 1C:EDT project
|
||||
goto export_edt
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
echo [ERROR] Wrong path "%EXT_SOURCE%"!
|
||||
echo [ERROR] Wrong path "%V8_SRC_PATH%"!
|
||||
echo Configuration extension binary ^(*.cfe^) or folder containing configuration extension 1C:EDT project expected.
|
||||
exit /b 1
|
||||
|
||||
:export_cfe
|
||||
|
||||
echo [INFO] Loading configuration extension from file "%EXT_SOURCE%" to infobase "%IB_PATH%"...
|
||||
echo [INFO] Loading configuration extension from file "%V8_SRC_PATH%" to infobase "%IB_PATH%"...
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadCfg %EXT_SOURCE% -Extension %EXT_NAME%
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadCfg %V8_SRC_PATH% -Extension %V8_EXT_NAME%
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config load --db-path="%IB_PATH%" --extension=%EXT_NAME% "%EXT_SOURCE%"
|
||||
%IBCMD_TOOL% infobase config load --db-path="%IB_PATH%" --extension=%V8_EXT_NAME% "%V8_SRC_PATH%"
|
||||
)
|
||||
|
||||
echo [INFO] Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%EXT_DEST_PATH%"...
|
||||
echo [INFO] Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%V8_DST_PATH%"...
|
||||
|
||||
IF "%V8_CONVERT_TOOL%" equ "designer" (
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%EXT_DEST_PATH%" -Extension %EXT_NAME% -force
|
||||
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%V8_DST_PATH%" -Extension %V8_EXT_NAME% -force
|
||||
) ELSE (
|
||||
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --extension=%EXT_NAME% --force "%EXT_DEST_PATH%"
|
||||
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --extension=%V8_EXT_NAME% --force "%V8_DST_PATH%"
|
||||
)
|
||||
|
||||
goto end
|
||||
|
||||
:export_edt
|
||||
|
||||
echo [INFO] Export configuration extension from 1C:EDT format "%EXT_SOURCE%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
echo [INFO] Export configuration extension from 1C:EDT format "%V8_SRC_PATH%" to 1C:Designer XML format "%XML_PATH%"...
|
||||
|
||||
md "%WS_PATH%"
|
||||
|
||||
call %V8_RING_TOOL% edt workspace export --project "%EXT_SOURCE%" --configuration-files "%EXT_DEST_PATH%" --workspace-location "%WS_PATH%"
|
||||
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
|
||||
|
||||
:end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user