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

feat: Реализована возможность указания используемой версии EDT через переменную среды V8_EDT_VERSION.

This commit is contained in:
Artem Kuznetsov 2023-09-13 14:32:32 +03:00
parent 05bce3faee
commit 76e95687f8
12 changed files with 47 additions and 13 deletions

View File

@ -54,6 +54,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -142,7 +145,7 @@ IF not exist "%XML_PATH%" md "%XML_PATH%"
md "%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%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
:export_xml

View File

@ -53,6 +53,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -170,7 +173,7 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
md "%WS_PATH%"
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%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% 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%"

View File

@ -53,6 +53,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -168,7 +171,7 @@ 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 "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
:export_xml

View File

@ -53,6 +53,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -168,7 +171,7 @@ 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 "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
:end

View File

@ -47,6 +47,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "designer"
@ -201,7 +204,7 @@ FOR /F "delims=" %%f IN ('dir /b /a-d %V8_SRC_MASK%') DO (
md "%WS_PATH%"
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%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% 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%"

View File

@ -47,6 +47,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "designer"
@ -187,7 +190,7 @@ echo [INFO] Export external data processors ^& reports from 1C:EDT format "%V8_S
md "%XML_PATH%"
md "%WS_PATH%"
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
:export_xml

View File

@ -47,6 +47,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "designer"
@ -197,7 +200,7 @@ echo [INFO] Export dataprocessors ^& reports from 1C:EDT project "%V8_SRC_PATH%"
md "%WS_PATH%"
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
:end

View File

@ -9,7 +9,7 @@
@ECHO OFF
SETLOCAL
SETLOCAL ENABLEDELAYEDEXPANSION
set CONVERT_VERSION=UNKNOWN
IF exist "%~dp0..\VERSION" FOR /F "usebackq tokens=* delims=" %%i IN ("%~dp0..\VERSION") DO set CONVERT_VERSION=%%i
@ -42,6 +42,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
set LOCAL_TEMP=%V8_TEMP%\%~n0
IF "%VALIDATE_PATH%" equ "" (
@ -132,7 +135,7 @@ echo [INFO] Run validation in "%VALIDATE_PATH%"...
md "%WS_PATH%"
call %V8_RING_TOOL% edt workspace validate --project-list "%VALIDATE_PATH%" --workspace-location "%WS_PATH%" --file "%REPORT_FILE%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace validate --project-list "%VALIDATE_PATH%" --workspace-location "%WS_PATH%" --file "%REPORT_FILE%"
echo [INFO] Clear temporary files...
IF exist "%LOCAL_TEMP%" rd /S /Q "%LOCAL_TEMP%"

View File

@ -53,6 +53,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -192,7 +195,7 @@ exit /b 1
:export_edt
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%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
:export_xml

View File

@ -53,6 +53,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -216,7 +219,7 @@ echo [INFO] Export configuration extension from 1C:Designer XML format "%XML_PAT
md %WS_PATH%
call %V8_RING_TOOL% edt workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% 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%"

View File

@ -53,6 +53,9 @@ IF not defined V8_RING_TOOL (
echo [ERROR] Can't find "ring" tool. Add path to "ring.bat" to "PATH" environment variable, or set "V8_RING_TOOL" variable with full specified path
set ERROR_CODE=1
)
IF defined V8_EDT_VERSION (
set V8_EDT_VERSION=@%V8_EDT_VERSION:@=%
)
echo [INFO] Start conversion using "%V8_CONVERT_TOOL%"
@ -215,7 +218,7 @@ echo [INFO] Export configuration extension from 1C:EDT format "%V8_SRC_PATH%" to
md "%WS_PATH%"
call %V8_RING_TOOL% edt workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
:end

View File

@ -1,4 +1,5 @@
V8_VERSION=8.3.20.2184
V8_VERSION=8.3.20.2290
V8_EDT_VERSION=2023.1.4
V8_DB_SRV_DBMS=MSSQLServer
V8_DB_SRV_ADDR=localhost
V8_DB_SRV_USR=_1CSrvUsr1