1
0
mirror of https://github.com/arkuznetsov/1CFilesConverter.git synced 2024-11-24 08:33:30 +02:00

style: поправлено оформление кода, убраны лишние скобки.

This commit is contained in:
Artem Kuznetsov 2023-07-22 11:06:53 +03:00
parent d8cef1be9a
commit 5df627d4cf
20 changed files with 268 additions and 400 deletions

View File

@ -7,8 +7,8 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
@ -21,49 +21,41 @@ set XML_PATH=%V8_TEMP%\tmp_xml
set WS_PATH=%V8_TEMP%\edt_ws
set CONFIG_FILE=%1
if defined CONFIG_FILE set CONFIG_FILE=%CONFIG_FILE:"=%
IF defined CONFIG_FILE set CONFIG_FILE=%CONFIG_FILE:"=%
set CONFIG_PATH=%2
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_FILE (
IF not defined CONFIG_FILE (
echo Missed parameter 1 "path to 1C configuration file"
exit /b 1
)
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 2 "path to folder to save configuration files in 1C:EDT format"
exit /b 1
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
if exist "%CONFIG_PATH%" (
rd /S /Q "%CONFIG_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF exist "%CONFIG_PATH%" rd /S /Q "%CONFIG_PATH%"
md "%CONFIG_PATH%"
echo Creating infobase "%IB_PATH%" from file "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%CONFIG_FILE%"
) else (
) ELSE (
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%CONFIG_FILE%"
)
echo Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%XML_PATH%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%XML_PATH%" -force
) else (
) ELSE (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" "%XML_PATH%" --force
)
@ -71,12 +63,6 @@ echo Export configuration from "%XML_PATH%" to 1C:EDT format "%CONFIG_PATH%"...
call %RING_TOOL% edt workspace import --project "%CONFIG_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -7,37 +7,35 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set CONFIG_FILE=%1
if defined CONFIG_FILE set CONFIG_FILE=%CONFIG_FILE:"=%
IF defined CONFIG_FILE set CONFIG_FILE=%CONFIG_FILE:"=%
set IB_PATH=%2
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_FILE (
IF not defined CONFIG_FILE (
echo Missed parameter 1 "path to 1C configuration file"
exit /b 1
)
if not defined IB_PATH (
IF not defined IB_PATH (
echo Missed parameter 2 "path to folder contains 1C infobase"
exit /b 1
)
echo Clear infobase folder "%IB_PATH%"...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
echo Creating infobase "%IB_PATH%" from file "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%CONFIG_FILE%"
) else (
) ELSE (
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%CONFIG_FILE%"
)

View File

@ -7,55 +7,49 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set IB_PATH=%V8_TEMP%\tmp_db
set CONFIG_FILE=%1
if defined CONFIG_FILE set CONFIG_FILE=%CONFIG_FILE:"=%
IF defined CONFIG_FILE set CONFIG_FILE=%CONFIG_FILE:"=%
set CONFIG_PATH=%2
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_FILE (
IF not defined CONFIG_FILE (
echo Missed parameter 1 "path to 1C configuration file"
exit /b 1
)
if not defined CONFIG_PATH (
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 "%CONFIG_PATH%" (
rd /S /Q "%CONFIG_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%CONFIG_PATH%" rd /S /Q "%CONFIG_PATH%"
md "%CONFIG_PATH%"
echo Creating infobase "%IB_PATH%" from file "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% CREATEINFOBASE File="%IB_PATH%"; /DisableStartupDialogs /UseTemplate "%CONFIG_FILE%"
) else (
) ELSE (
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%CONFIG_FILE%"
)
echo Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%CONFIG_PATH%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%CONFIG_PATH%" -force
) else (
) ELSE (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" "%CONFIG_PATH%" --force
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"

View File

@ -6,8 +6,8 @@ rem %2 - path to folder to save 1C data processors & reports in 1C:EDT format
rem %3 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem or folder contains 1C infobase used for convertion
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
FOR /F "usebackq tokens=1 delims=" %%i IN (`where ring`) DO (
@ -20,21 +20,21 @@ set WS_PATH=%V8_TEMP%\edt_ws
set CLEAN_AFTER_EXPORT=0
set DP_BIN_PATH=%1
if defined DP_BIN_PATH set DP_BIN_PATH=%DP_BIN_PATH:"=%
IF defined DP_BIN_PATH set DP_BIN_PATH=%DP_BIN_PATH:"=%
set DP_SRC_PATH=%2
if defined DP_SRC_PATH set DP_SRC_PATH=%DP_SRC_PATH:"=%
IF defined DP_SRC_PATH set DP_SRC_PATH=%DP_SRC_PATH:"=%
set BASE_CONFIG=%3
if defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
if not defined DP_BIN_PATH (
IF not defined DP_BIN_PATH (
echo Missed parameter 1 "path to folder contains data processors & reports in binary format (*.epf, *.erf)"
exit /b 1
)
if not defined DP_SRC_PATH (
IF not defined DP_SRC_PATH (
echo Missed parameter 2 "path to folder to save 1C data processors & reports in 1C:EDT format"
exit /b 1
)
if not exist "%BASE_CONFIG%" (
IF not exist "%BASE_CONFIG%" (
echo Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
set BASE_CONFIG=
)
@ -45,20 +45,20 @@ IF "%BASE_CONFIG%" equ "" (
set CLEAN_AFTER_EXPORT=1
set BASE_CONFIG_DESCRIPTION=empty configuration
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
) else (
) ELSE (
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
IF exist "%BASE_CONFIG%\DT-INF\" (
set CLEAN_AFTER_EXPORT=1
call %~dp0edt2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\Configuration.xml" (
set CLEAN_AFTER_EXPORT=1
call %~dp0xml2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\1cv8.1cd" (
set BASE_CONFIG_DESCRIPTION=existed configuration
set IB_PATH=%BASE_CONFIG%
) else (
) ELSE (
set CLEAN_AFTER_EXPORT=1
call %~dp0cf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
)
@ -67,18 +67,10 @@ IF "%BASE_CONFIG%" equ "" (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
if exist "%DP_SRC_PATH%" (
rd /S /Q "%DP_SRC_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF exist "%DP_SRC_PATH%" rd /S /Q "%DP_SRC_PATH%"
md "%V8_TEMP%"
md "%XML_PATH%"
md "%WS_PATH%"
@ -103,12 +95,6 @@ echo Export dataprocessors ^& reports from 1C:Designer XML format "%XML_PATH%" t
call %RING_TOOL% edt workspace import --project "%DP_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -6,8 +6,8 @@ rem %2 - path to folder to save 1C data processors & reports in 1C:Designer XML
rem %3 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem or folder contains 1C infobase used for convertion
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
@ -15,21 +15,21 @@ set IB_PATH=%V8_TEMP%\tmp_db
set CLEAN_AFTER_EXPORT=0
set DP_BIN_PATH=%1
if defined DP_BIN_PATH set DP_BIN_PATH=%DP_BIN_PATH:"=%
IF defined DP_BIN_PATH set DP_BIN_PATH=%DP_BIN_PATH:"=%
set DP_SRC_PATH=%2
if defined DP_SRC_PATH set DP_SRC_PATH=%DP_SRC_PATH:"=%
IF defined DP_SRC_PATH set DP_SRC_PATH=%DP_SRC_PATH:"=%
set BASE_CONFIG=%3
if defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
if not defined DP_BIN_PATH (
IF not defined DP_BIN_PATH (
echo Missed parameter 1 "path to folder contains data processors & reports in binary format (*.epf, *.erf)"
exit /b 1
)
if not defined DP_SRC_PATH (
IF not defined DP_SRC_PATH (
echo Missed parameter 2 "path to folder to save 1C data processors & reports in 1C:Designer XML format"
exit /b 1
)
if not exist "%BASE_CONFIG%" (
IF not exist "%BASE_CONFIG%" (
echo Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
set BASE_CONFIG=
)
@ -40,20 +40,20 @@ IF "%BASE_CONFIG%" equ "" (
set CLEAN_AFTER_EXPORT=1
set BASE_CONFIG_DESCRIPTION=empty configuration
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
) else (
) ELSE (
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
IF exist "%BASE_CONFIG%\DT-INF\" (
set CLEAN_AFTER_EXPORT=1
call %~dp0edt2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\Configuration.xml" (
set CLEAN_AFTER_EXPORT=1
call %~dp0xml2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\1cv8.1cd" (
set BASE_CONFIG_DESCRIPTION=existed configuration
set IB_PATH=%BASE_CONFIG%
) else (
) ELSE (
set CLEAN_AFTER_EXPORT=1
call %~dp0cf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
)
@ -62,9 +62,7 @@ IF "%BASE_CONFIG%" equ "" (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
md "%DP_SRC_PATH%"
echo Export dataprocessors from folder "%DP_BIN_PATH%" to 1C:Designer XML format "%DP_SRC_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
@ -83,6 +81,4 @@ FOR /f %%f IN ('dir /b /a-d "%DP_BIN_PATH%\*.erf"') DO (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"

View File

@ -6,8 +6,8 @@ rem %2 - path to folder to save data processor & report in 1C:EDT format
rem %3 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem or folder contains 1C infobase used for convertion
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
FOR /F "usebackq tokens=1 delims=" %%i IN (`where ring`) DO (
@ -20,21 +20,21 @@ set WS_PATH=%V8_TEMP%\edt_ws
set CLEAN_AFTER_EXPORT=0
set DP_FILE=%1
if defined DP_FILE set DP_FILE=%DP_FILE:"=%
IF defined DP_FILE set DP_FILE=%DP_FILE:"=%
set DP_PATH=%2
if defined DP_PATH set DP_PATH=%DP_PATH:"=%
IF defined DP_PATH set DP_PATH=%DP_PATH:"=%
set BASE_CONFIG=%3
if defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
if not defined DP_FILE (
IF not defined DP_FILE (
echo Missed parameter 1 "path to 1C data processor or report (*.epf, *.erf)"
exit /b 1
)
if not defined DP_PATH (
IF not defined DP_PATH (
echo Missed parameter 2 "path to folder to save data processor & report in 1C:EDT format"
exit /b 1
)
if not exist "%BASE_CONFIG%" (
IF not exist "%BASE_CONFIG%" (
echo Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
set BASE_CONFIG=
)
@ -45,20 +45,20 @@ IF "%BASE_CONFIG%" equ "" (
set CLEAN_AFTER_EXPORT=1
set BASE_CONFIG_DESCRIPTION=empty configuration
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
) else (
) ELSE (
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
IF exist "%BASE_CONFIG%\DT-INF\" (
set CLEAN_AFTER_EXPORT=1
call %~dp0edt2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\Configuration.xml" (
set CLEAN_AFTER_EXPORT=1
call %~dp0xml2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\1cv8.1cd" (
set BASE_CONFIG_DESCRIPTION=existed configuration
set IB_PATH=%BASE_CONFIG%
) else (
) ELSE (
set CLEAN_AFTER_EXPORT=1
call %~dp0cf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
)
@ -67,18 +67,10 @@ IF "%BASE_CONFIG%" equ "" (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
if exist "%DP_PATH%" (
rd /S /Q "%DP_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF exist "%DP_PATH%" rd /S /Q "%DP_PATH%"
md "%XML_PATH%"
md "%WS_PATH%"
md "%DP_PATH%"
@ -90,12 +82,6 @@ echo Export dataprocessor / report from 1C:Designer XML format "%XML_PATH%" to 1
call %RING_TOOL% edt workspace import --project "%DP_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -6,8 +6,8 @@ rem %2 - path to folder to save data processor & report in 1C:Designer XML forma
rem %3 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem or folder contains 1C infobase used for convertion
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
@ -15,22 +15,22 @@ set IB_PATH=%V8_TEMP%\tmp_db
set CLEAN_AFTER_EXPORT=0
set DP_FILE=%1
if defined DP_FILE set DP_FILE=%DP_FILE:"=%
IF defined DP_FILE set DP_FILE=%DP_FILE:"=%
set DP_PATH=%2
if defined DP_PATH set DP_PATH=%DP_PATH:"=%
IF defined DP_PATH set DP_PATH=%DP_PATH:"=%
set BASE_CONFIG=%3
if defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
if not defined DP_FILE (
IF not defined DP_FILE (
echo Missed parameter 1 "path to 1C data processor or report (*.epf, *.erf)".
exit /b 1
)
if not defined DP_PATH (
IF not defined DP_PATH (
echo Missed parameter 2 "path to folder to save data processor & report in 1C:Designer XML format".
exit /b 1
)
if not exist "%BASE_CONFIG%" (
IF not exist "%BASE_CONFIG%" (
echo Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
set BASE_CONFIG=
)
@ -41,20 +41,20 @@ IF "%BASE_CONFIG%" equ "" (
set CLEAN_AFTER_EXPORT=1
set BASE_CONFIG_DESCRIPTION=empty configuration
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
) else (
) ELSE (
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
IF exist "%BASE_CONFIG%\DT-INF\" (
set CLEAN_AFTER_EXPORT=1
call %~dp0edt2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\Configuration.xml" (
set CLEAN_AFTER_EXPORT=1
call %~dp0xml2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\1cv8.1cd" (
set BASE_CONFIG_DESCRIPTION=existed configuration
set IB_PATH=%BASE_CONFIG%
) else (
) ELSE (
set CLEAN_AFTER_EXPORT=1
call %~dp0cf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
)
@ -63,15 +63,11 @@ IF "%BASE_CONFIG%" equ "" (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
md "%DP_PATH%"
echo Export dataprocessor / report "%DP_FILE%" to 1C:Designer XML format "%DP_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%DP_PATH%" "%DP_FILE%"
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"

View File

@ -6,8 +6,8 @@ rem %2 - path to folder to save data processors & reports in binary format (*.ep
rem %3 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem or folder contains 1C infobase used for convertion
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
@ -15,21 +15,21 @@ set IB_PATH=%V8_TEMP%\tmp_db
set CLEAN_AFTER_EXPORT=0
set DP_SRC_PATH=%1
if defined DP_SRC_PATH set DP_SRC_PATH=%DP_SRC_PATH:"=%
IF defined DP_SRC_PATH set DP_SRC_PATH=%DP_SRC_PATH:"=%
set DP_BIN_PATH=%2
if defined DP_BIN_PATH set DP_BIN_PATH=%DP_BIN_PATH:"=%
IF defined DP_BIN_PATH set DP_BIN_PATH=%DP_BIN_PATH:"=%
set BASE_CONFIG=%3
if defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
if not defined DP_SRC_PATH (
IF not defined DP_SRC_PATH (
echo Missed parameter 1 "path to folder contains 1C data processors & reports in 1C:Designer XML format"
exit /b 1
)
if not defined DP_BIN_PATH (
IF not defined DP_BIN_PATH (
echo Missed parameter 2 "path to folder to save data processors & reports in binary format (*.epf, *.erf)"
exit /b 1
)
if not exist "%BASE_CONFIG%" (
IF not exist "%BASE_CONFIG%" (
echo Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
set BASE_CONFIG=
)
@ -40,20 +40,20 @@ IF "%BASE_CONFIG%" equ "" (
set CLEAN_AFTER_EXPORT=1
set BASE_CONFIG_DESCRIPTION=empty configuration
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
) else (
) ELSE (
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
IF exist "%BASE_CONFIG%\DT-INF\" (
set CLEAN_AFTER_EXPORT=1
call %~dp0edt2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\Configuration.xml" (
set CLEAN_AFTER_EXPORT=1
call %~dp0xml2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\1cv8.1cd" (
set BASE_CONFIG_DESCRIPTION=existed configuration
set IB_PATH=%BASE_CONFIG%
) else (
) ELSE (
set CLEAN_AFTER_EXPORT=1
call %~dp0cf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
)
@ -62,9 +62,7 @@ IF "%BASE_CONFIG%" equ "" (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
md "%DP_BIN_PATH%"
echo Import dataprocessors ^& reports from folder "%DP_SRC_PATH%" to 1C:Designer format "%DP_BIN_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
@ -76,6 +74,4 @@ FOR /f %%f IN ('dir /b /a-d "%DP_SRC_PATH%\*.xml"') DO (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"

View File

@ -6,8 +6,8 @@ rem %2 - path to folder to save data processor & report in binary format
rem %3 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem or folder contains 1C infobase used for convertion
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
@ -15,21 +15,21 @@ set IB_PATH=%V8_TEMP%\tmp_db
set CLEAN_AFTER_EXPORT=0
set DP_FILE=%1
if defined DP_FILE set DP_FILE=%DP_FILE:"=%
IF defined DP_FILE set DP_FILE=%DP_FILE:"=%
set DP_PATH=%2
if defined DP_PATH set DP_PATH=%DP_PATH:"=%
IF defined DP_PATH set DP_PATH=%DP_PATH:"=%
set BASE_CONFIG=%3
if defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
IF defined BASE_CONFIG set BASE_CONFIG=%BASE_CONFIG:"=%
if not defined DP_FILE (
IF not defined DP_FILE (
echo Missed parameter 1 "path to main file of 1C data processor or report in 1C:Designer XML format (*.xml)"
exit /b 1
)
if not defined DP_PATH (
IF not defined DP_PATH (
echo Missed parameter 2 "path to folder to save data processor & report in binary format"
exit /b 1
)
if not exist "%BASE_CONFIG%" (
IF not exist "%BASE_CONFIG%" (
echo Path "%BASE_CONFIG%" doesn't exist ^(parameter 3^), empty infobase will be used.
set BASE_CONFIG=
)
@ -40,20 +40,20 @@ IF "%BASE_CONFIG%" equ "" (
set CLEAN_AFTER_EXPORT=1
set BASE_CONFIG_DESCRIPTION=empty configuration
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
) else (
) ELSE (
set BASE_CONFIG_DESCRIPTION=configuration from "%BASE_CONFIG%"
IF exist "%BASE_CONFIG%\DT-INF\" (
set CLEAN_AFTER_EXPORT=1
call %~dp0edt2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\Configuration.xml" (
set CLEAN_AFTER_EXPORT=1
call %~dp0xml2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
) else (
) ELSE (
IF exist "%BASE_CONFIG%\1cv8.1cd" (
set BASE_CONFIG_DESCRIPTION=existed configuration
set IB_PATH=%BASE_CONFIG%
) else (
) ELSE (
set CLEAN_AFTER_EXPORT=1
call %~dp0cf2ib.cmd "%BASE_CONFIG%" "%IB_PATH%"
)
@ -62,15 +62,11 @@ IF "%BASE_CONFIG%" equ "" (
)
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
md "%DP_PATH%"
echo Import dataprocessor / report "%DP_FILE%" to 1C:Designer format "%DP_PATH%" using infobase "%IB_PATH%" with %BASE_CONFIG_DESCRIPTION%...
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%DP_FILE%" "%DP_PATH%"
echo Clear temporary files...
IF "%CLEAN_AFTER_EXPORT%" equ "1" (
rd /S /Q "%IB_PATH%"
)
IF "%CLEAN_AFTER_EXPORT%" equ "1" IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"

View File

@ -4,8 +4,8 @@ rem Validate 1C configuration using 1C:EDT (ring tool)
rem %1 - path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)
rem %2 - path to validation report file
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
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"
@ -18,37 +18,35 @@ set WS_PATH=%V8_TEMP%\edt_ws
set CLEAN_AFTER_VALIDATION=0
set CONFIG_PATH=%1
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set REPORT_FILE=%2
if defined REPORT_FILE (
IF defined REPORT_FILE (
set REPORT_FILE=%REPORT_FILE:"=%
set REPORT_FILE_PATH=%~dp2
)
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 1 "path to 1C configuration (binary (*.cf), 1C:Designer XML format or 1C:EDT format)"
exit /b 1
)
if not defined REPORT_FILE (
IF not defined REPORT_FILE (
echo Missed parameter 2 "path to validation report file"
exit /b 1
)
echo Clear temporary files...
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
del "%REPORT_FILE%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF exist "%REPORT_FILE_PATH%" rd /S /Q "%REPORT_FILE_PATH%"
md "%REPORT_FILE_PATH%"
echo Prepare project for validation...
IF exist "%CONFIG_PATH%\DT-INF\" (
set VALIDATE_PATH=%CONFIG_PATH%
) else (
) ELSE (
set CLEAN_AFTER_VALIDATION=1
IF exist "%CONFIG_PATH%\Configuration.xml" (
call %~dp0xml2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
) else (
) ELSE (
call %~dp0cf2edt.cmd "%CONFIG_PATH%" "%VALIDATE_PATH%"
)
)
@ -57,7 +55,5 @@ echo Run validation in "%VALIDATE_PATH%"...
call %RING_TOOL% edt workspace validate --project-list "%VALIDATE_PATH%" --workspace-location "%WS_PATH%" --file "%REPORT_FILE%"
echo Clear temporary files...
rd /S /Q "%WS_PATH%"
IF "%CLEAN_AFTER_VALIDATION%" equ "1" (
rd /S /Q "%VALIDATE_PATH%"
)
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF "%CLEAN_AFTER_VALIDATION%" equ "1" IF exist "%VALIDATE_PATH%" rd /S /Q "%VALIDATE_PATH%"

View File

@ -7,8 +7,8 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
@ -21,36 +21,30 @@ set XML_PATH=%V8_TEMP%\tmp_xml
set WS_PATH=%V8_TEMP%\edt_ws
set CONFIG_PATH=%1
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set CONFIG_FILE=%2
if defined CONFIG_FILE (
IF defined CONFIG_FILE (
set CONFIG_FILE=%CONFIG_FILE:"=%
set CONFIG_FILE_PATH=%~dp2
)
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 1 "path to folder contains configuration files in 1C:EDT format"
exit /b 1
)
if not defined CONFIG_FILE (
IF not defined CONFIG_FILE (
echo Missed parameter 2 "path to 1C configuration file (*.cf)"
exit /b 1
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
md "%V8_TEMP%"
md "%XML_PATH%"
md "%WS_PATH%"
@ -59,31 +53,25 @@ md "%CONFIG_FILE_PATH%"
echo Export "%CONFIG_PATH%" to 1C:Designer XML format "%XML_PATH%"...
call %RING_TOOL% edt workspace export --project "%CONFIG_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
echo Creating infobase "%IB_PATH%"...
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
echo Loading infobase "%IB_PATH%" configuration from XML-files "%XML_PATH%"...
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %XML_PATH%
) else (
) ELSE (
echo Creating infobase "%IB_PATH%" with configuration from XML-files "%XML_PATH%"...
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --import="%XML_PATH%"
)
echo Export infobase "%IB_PATH%" configuration to "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %CONFIG_FILE%
) else (
) ELSE (
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" "%CONFIG_FILE%"
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -7,8 +7,8 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
@ -20,30 +20,26 @@ set XML_PATH=%V8_TEMP%\tmp_xml
set WS_PATH=%V8_TEMP%\edt_ws
set CONFIG_PATH=%1
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set IB_PATH=%2
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 1 "path to folder contains configuration files in 1C:EDT format"
exit /b 1
)
if not defined IB_PATH (
IF not defined IB_PATH (
echo Missed parameter 2 "path to folder contains 1C infobase"
exit /b 1
)
echo Clear temporary files...
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
md "%V8_TEMP%"
md "%XML_PATH%"
md "%WS_PATH%"
@ -52,25 +48,19 @@ echo Export "%CONFIG_PATH%" to 1C:Designer XML format "%XML_PATH%"...
call %RING_TOOL% edt workspace export --project "%CONFIG_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
echo Clear infobase folder "%IB_PATH%"...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
echo Creating infobase "%IB_PATH%"...
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
echo Loading infobase "%IB_PATH%" configuration from XML-files "%XML_PATH%"...
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %XML_PATH%
) else (
) ELSE (
echo Creating infobase "%IB_PATH%" with configuration from XML-files "%XML_PATH%"...
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --import="%XML_PATH%"
)
echo Clear temporary files...
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -4,7 +4,7 @@ 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
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"
@ -14,38 +14,28 @@ 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:"=%
IF defined EDT_PATH set EDT_PATH=%EDT_PATH:"=%
set CONFIG_PATH=%2
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
if not defined EDT_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 (
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%"
)
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...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -7,28 +7,28 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set IB_PATH=%1
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONFIG_FILE=%2
if defined CONFIG_FILE (
IF defined CONFIG_FILE (
set CONFIG_FILE=%CONFIG_FILE:"=%
set CONFIG_FILE_PATH=%~dp2
)
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined IB_PATH (
IF not defined IB_PATH (
echo Missed parameter 1 "path to folder contains 1C infobase"
exit /b 1
)
if not defined CONFIG_FILE (
IF not defined CONFIG_FILE (
echo Missed parameter 2 "path to 1C configuration file (*.cf)"
exit /b 1
)
@ -36,8 +36,8 @@ if not defined CONFIG_FILE (
md "%CONFIG_FILE_PATH%"
echo Export infobase "%IB_PATH%" configuration to "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %CONFIG_FILE%
) else (
) ELSE (
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" "%CONFIG_FILE%"
)

View File

@ -7,8 +7,8 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
@ -20,39 +20,33 @@ set XML_PATH=%V8_TEMP%\tmp_xml
set WS_PATH=%V8_TEMP%\edt_ws
set IB_PATH=%1
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONFIG_PATH=%2
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined IB_PATH (
IF not defined IB_PATH (
echo Missed parameter 1 "path to folder contains 1C infobase"
exit /b 1
)
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 2 "path to 1C configuration files in 1C:EDT format"
exit /b 1
)
echo Clear temporary files...
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
if exist "%CONFIG_PATH%" (
rd /S /Q "%CONFIG_PATH%"
)
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF exist "%CONFIG_PATH%" rd /S /Q "%CONFIG_PATH%"
md "%CONFIG_PATH%"
echo Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%XML_PATH%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%XML_PATH%" -force
) else (
) ELSE (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" "%XML_PATH%" --force
)
@ -60,9 +54,5 @@ echo Export configuration from "%XML_PATH%" to 1C:EDT format "%CONFIG_PATH%"...
call %RING_TOOL% edt workspace import --project "%CONFIG_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
echo Clear temporary files...
if exist "%XML_PATH%" (
rd /S /Q "%XML_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%XML_PATH%" rd /S /Q "%XML_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -7,38 +7,36 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set IB_PATH=%1
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONFIG_PATH=%2
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined IB_PATH (
IF not defined IB_PATH (
echo Missed parameter 1 "path to folder contains 1C infobase"
exit /b 1
)
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 2 "path to 1C configuration files in 1C:Designer XML format"
exit /b 1
)
echo Clear temporary files...
if exist "%CONFIG_PATH%" (
rd /S /Q "%CONFIG_PATH%"
)
IF exist "%CONFIG_PATH%" rd /S /Q "%CONFIG_PATH%"
md "%CONFIG_PATH%"
echo Export configuration from infobase "%IB_PATH%" to 1C:Designer XML format "%CONFIG_PATH%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File="%IB_PATH%"; /DisableStartupDialogs /DumpConfigToFiles "%CONFIG_PATH%" -force
) else (
) ELSE (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" "%CONFIG_PATH%" --force
)

View File

@ -7,59 +7,55 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set IB_PATH=%V8_TEMP%\tmp_db
set CONFIG_PATH=%1
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set CONFIG_FILE=%2
if defined CONFIG_FILE (
IF defined CONFIG_FILE (
set CONFIG_FILE=%CONFIG_FILE:"=%
set CONFIG_FILE_PATH=%~dp2
)
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 1 "path to folder contains configuration files in 1C:Designer XML format"
exit /b 1
)
if not defined CONFIG_FILE (
IF not defined CONFIG_FILE (
echo Missed parameter 2 "path to 1C configuration file (*.cf)"
exit /b 1
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
md "%CONFIG_FILE_PATH%"
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
echo Creating infobase "%IB_PATH%"...
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
echo Loading infobase "%IB_PATH%" configuration from XML-files "%CONFIG_PATH%"...
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %CONFIG_PATH%
) else (
) ELSE (
echo Creating infobase "%IB_PATH%" from XML files "%CONFIG_PATH%"...
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --import="%CONFIG_PATH%"
)
echo Export infobase "%IB_PATH%" configuration to "%CONFIG_FILE%"...
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /DumpCfg %CONFIG_FILE%
) else (
) ELSE (
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" "%CONFIG_FILE%"
)
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"

View File

@ -4,45 +4,35 @@ rem Convert 1C configuration from 1C:Designer XML format to 1C:EDT format
rem %1 - path to folder contains configuration files in 1C:Designer XML format
rem %2 - path to folder to save configuration files in 1C:EDT format
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
if not defined V8_TEMP set V8_TEMP=%TEMP%\1c
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_TEMP set V8_TEMP=%TEMP%\1c
set IB_PATH=%V8_TEMP%\tmp_db
set WS_PATH=%V8_TEMP%\edt_ws
set CONFIG_PATH=%1
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set EDT_PATH=%2
if defined EDT_PATH set EDT_PATH=%EDT_PATH:"=%
IF defined EDT_PATH set EDT_PATH=%EDT_PATH:"=%
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 1 "path to folder contains configuration files in 1C:Designer XML format"
exit /b 1
)
if not defined EDT_PATH (
IF not defined EDT_PATH (
echo Missed parameter 2 "path to folder to save configuration files in 1C:EDT 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 "%EDT_PATH%" (
rd /S /Q "%EDT_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"
IF exist "%EDT_PATH%" rd /S /Q "%EDT_PATH%"
md "%EDT_PATH%"
echo Export "%CONFIG_PATH%" to 1C:EDT format "%EDT_PATH%"...
call %RING_TOOL% edt workspace import --project "%EDT_PATH%" --configuration-files "%CONFIG_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
echo Clear temporary files...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
if exist "%WS_PATH%" (
rd /S /Q "%WS_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
IF exist "%WS_PATH%" rd /S /Q "%WS_PATH%"

View File

@ -7,41 +7,39 @@ rem %3 - convertion tool to use:
rem ibcmd - ibcmd tool (default)
rem designer - batch run of 1C:Designer
if not defined V8_VERSION set V8_VERSION=8.3.20.2290
IF not defined V8_VERSION set V8_VERSION=8.3.20.2290
set V8_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\1cv8.exe"
set IBCMD_TOOL="C:\Program Files\1cv8\%V8_VERSION%\bin\ibcmd.exe"
set CONFIG_PATH=%1
if defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
IF defined CONFIG_PATH set CONFIG_PATH=%CONFIG_PATH:"=%
set IB_PATH=%2
if defined IB_PATH set IB_PATH=%IB_PATH:"=%
IF defined IB_PATH set IB_PATH=%IB_PATH:"=%
set CONV_TOOL=%3
if defined CONV_TOOL (
IF defined CONV_TOOL (
set CONV_TOOL=%CONV_TOOL:"=%
) else set CONV_TOOL=ibcmd
) ELSE set CONV_TOOL=ibcmd
if not defined CONFIG_PATH (
IF not defined CONFIG_PATH (
echo Missed parameter 1 "path to folder contains configuration files in 1C:Designer XML format"
exit /b 1
)
if not defined IB_PATH (
IF not defined IB_PATH (
echo Missed parameter 2 "path to folder contains 1C infobase"
exit /b 1
)
echo Clear infobase folder "%IB_PATH%"...
if exist "%IB_PATH%" (
rd /S /Q "%IB_PATH%"
)
IF exist "%IB_PATH%" rd /S /Q "%IB_PATH%"
if "%CONV_TOOL%" equ "designer" (
IF "%CONV_TOOL%" equ "designer" (
echo Creating infobase "%IB_PATH%"...
%V8_TOOL% CREATEINFOBASE File=%IB_PATH%; /DisableStartupDialogs
echo Loading infobase "%IB_PATH%" configuration from XML-files "%CONFIG_PATH%"...
%V8_TOOL% DESIGNER /IBConnectionString File=%IB_PATH%; /DisableStartupDialogs /LoadConfigFromFiles %CONFIG_PATH%
) else (
) ELSE (
echo Creating infobase "%IB_PATH%" from XML files "%CONFIG_PATH%"...
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --import="%CONFIG_PATH%"
)

View File

@ -13,9 +13,7 @@ set V8_VERSION=8.3.20.2290
set V8_TEMP=%OUT_PATH%\tmp
echo Clear output files...
if exist "%OUT_PATH%" (
rd /S /Q "%OUT_PATH%"
)
IF exist "%OUT_PATH%" rd /S /Q "%OUT_PATH%"
md "%OUT_PATH%"
md "%V8_TEMP%"
@ -45,9 +43,9 @@ echo ======
FOR /f %%f IN ('dir /b /a-d "%~dp0before\*.cmd"') DO (
set /a TEST_COUNT=!TEST_COUNT!+1
call %BEFORE_TEST_PATH%\%%~f
if exist "!TEST_CHECK_PATH!" (
IF exist "!TEST_CHECK_PATH!" (
set /a TEST_SUCCESS=!TEST_SUCCESS!+1
) else (
) ELSE (
echo ===
echo Prepare step FAILED ^(%%~nf^): Path "!TEST_CHECK_PATH!" not found
echo ===
@ -64,9 +62,9 @@ echo ======
FOR /f %%f IN ('dir /b /a-d "%~dp0tests\*.cmd"') DO (
set /a TEST_COUNT=!TEST_COUNT!+1
call %TEST_PATH%\%%~f
if exist "!TEST_CHECK_PATH!" (
IF exist "!TEST_CHECK_PATH!" (
set /a TEST_SUCCESS=!TEST_SUCCESS!+1
) else (
) ELSE (
echo ===
echo Test FAILED ^(%%~nf^): Path "!TEST_CHECK_PATH!" not found
echo ===
@ -89,4 +87,4 @@ FOR %%j IN (!TEST_FAILED_LIST!) DO (
echo %%j
)
rd /S /Q "%IB_PATH%"
IF exist "%V8_TEMP%" rd /S /Q "%V8_TEMP%"