diff --git a/.gitignore b/.gitignore index 941c0be022..b872144c1f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ target/ !oscript.exe addin.zip +src/addins/tcp_server/OPI_TCPServer.zip diff --git a/src/addins/tcp_server/Cargo.lock b/src/addins/tcp_server/Cargo.lock index 5a8a42f299..453e1ba486 100644 --- a/src/addins/tcp_server/Cargo.lock +++ b/src/addins/tcp_server/Cargo.lock @@ -2,6 +2,14 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "OPI_TCPServer" +version = "0.1.0" +dependencies = [ + "addin1c", + "serde_json", +] + [[package]] name = "addin1c" version = "0.5.0" @@ -24,14 +32,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "opi_addin" -version = "0.1.0" -dependencies = [ - "addin1c", - "serde_json", -] - [[package]] name = "proc-macro2" version = "1.0.92" diff --git a/src/addins/tcp_server/Cargo.toml b/src/addins/tcp_server/Cargo.toml index f8e826bfd1..ce99833b7c 100644 --- a/src/addins/tcp_server/Cargo.toml +++ b/src/addins/tcp_server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "opi_addin" +name = "OPI_TCPServer" version = "0.1.0" edition = "2021" diff --git a/src/addins/tcp_server/release.bat b/src/addins/tcp_server/release.bat index 648eb36f3b..f25fea5d78 100644 --- a/src/addins/tcp_server/release.bat +++ b/src/addins/tcp_server/release.bat @@ -1,7 +1,7 @@ @echo off :: Установить переменную -set LIB_NAME=opi_addin +set LIB_NAME=OPI_TCPServer set OPENSSL_DIR=C:\msys64\mingw64 set OPENSSL_LIB_DIR=%OPENSSL_DIR%\lib set OPENSSL_INCLUDE_DIR=%OPENSSL_DIR%\include @@ -47,10 +47,15 @@ copy /y MANIFEST.XML "%OUTPUT_DIR%\MANIFEST.XML" if errorlevel 1 goto :error :: Архивация -set ZIP_NAME=addin.zip -powershell -Command "Compress-Archive -Path '%OUTPUT_DIR%\*' -Force -DestinationPath '%ZIP_NAME%'" +powershell -Command "Compress-Archive -Path '%OUTPUT_DIR%\*' -Force -DestinationPath '%LIB_NAME%.zip'" if errorlevel 1 goto :error +copy /y "%LIB_NAME%.zip" "../../ru/OInt/addins/%LIB_NAME%.zip" +copy /y "%LIB_NAME%.zip" "../../en/OInt/addins/%LIB_NAME%.zip" + +copy /y "%LIB_NAME%.zip" "../../ru/OPI/src/CommonTemplates/%LIB_NAME%/Template.addin" +copy /y "%LIB_NAME%.zip" "../../en/OPI/src/CommonTemplates/%LIB_NAME%/Template.addin" + if exist "%OUTPUT_DIR%" ( rmdir /S /Q "%OUTPUT_DIR%" ) diff --git a/src/en/OInt/addins/OPI_TCPServer.zip b/src/en/OInt/addins/OPI_TCPServer.zip new file mode 100644 index 0000000000..80a2916c5d Binary files /dev/null and b/src/en/OInt/addins/OPI_TCPServer.zip differ diff --git a/src/ru/OInt/addins/OPI_TCPServer.zip b/src/ru/OInt/addins/OPI_TCPServer.zip new file mode 100644 index 0000000000..80a2916c5d Binary files /dev/null and b/src/ru/OInt/addins/OPI_TCPServer.zip differ diff --git a/src/ru/OPI/src/CommonTemplates/OPI_TCPServer/OPI_TCPServer.mdo b/src/ru/OPI/src/CommonTemplates/OPI_TCPServer/OPI_TCPServer.mdo new file mode 100644 index 0000000000..9b33096c7b --- /dev/null +++ b/src/ru/OPI/src/CommonTemplates/OPI_TCPServer/OPI_TCPServer.mdo @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mdclass:CommonTemplate xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="db1c4d3a-787c-4744-b110-653437f7096e"> + <name>OPI_TCPServer</name> + <synonym> + <key>ru</key> + <value>TCPServer</value> + </synonym> + <templateType>AddIn</templateType> +</mdclass:CommonTemplate> diff --git a/src/ru/OPI/src/CommonTemplates/OPI_TCPServer/Template.addin b/src/ru/OPI/src/CommonTemplates/OPI_TCPServer/Template.addin new file mode 100644 index 0000000000..80a2916c5d Binary files /dev/null and b/src/ru/OPI/src/CommonTemplates/OPI_TCPServer/Template.addin differ diff --git a/src/ru/OPI/src/Configuration/Configuration.mdo b/src/ru/OPI/src/Configuration/Configuration.mdo index 35d6a540ab..32dc33e553 100644 --- a/src/ru/OPI/src/Configuration/Configuration.mdo +++ b/src/ru/OPI/src/Configuration/Configuration.mdo @@ -40,6 +40,7 @@ </configurationInformationAddress> <subsystems>Subsystem.OPI_Интеграция</subsystems> <commonTemplates>CommonTemplate.OPI_TCPClient</commonTemplates> + <commonTemplates>CommonTemplate.OPI_TCPServer</commonTemplates> <commonModules>CommonModule.OPI_Инструменты</commonModules> <commonModules>CommonModule.OPI_Криптография</commonModules> <commonModules>CommonModule.OPI_ПреобразованиеТипов</commonModules>