### Batch Build Configuration File Example Source: https://context7.com/saby-integration/v8unpack/llms.txt An example JSON configuration file used for batch building multiple 1C:Enterprise products. It defines source and binary paths, temporary directories, index files, and build options for each product. ```json { "ERP25_extension": { "src": "src/ERP25", "bin": "bin/saby_erp25.cfe", "temp": "temp", "index": "cmd/ERP25/index.json", "disable": false, "options": { "descent": 2005006, "auto_include": true, "version": "80316" } }, "BUH3_extension": { "src": "src/BUH3", "bin": "bin/saby_buh3.cfe", "temp": "temp", "index": "cmd/BUH3/index.json", "disable": false, "options": { "descent": 3000112, "auto_include": true } } } ``` -------------------------------- ### Execute Batch Assembly Command Source: https://github.com/saby-integration/v8unpack/blob/main/docs/history.md Command-line example demonstrating how to trigger a batch assembly process for a specific product defined in a JSON configuration file. ```bash v8unpack.exe -BA cmd/products.json --index ERP25PROF2005006 ``` -------------------------------- ### Install v8unpack using pip Source: https://context7.com/saby-integration/v8unpack/llms.txt Installs the v8unpack utility using pip, the standard Python package installer. This is the primary method for obtaining the tool. ```bash pip install v8unpack ``` -------------------------------- ### Code Reusability with Include Directives (1C) Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md This directive allows splitting code into separate files. The path is relative to the unpack root, with underscores as separators. Nested includes are supported. For older versions (82, 81), directives are commented out as '//v8unpack {#directive...}'. Code cannot start with a directive; a newline before '#' is required. ```1c #Область include_[путь до файла] ПримерКода = 1; #КонецОбласти ``` ```1c //v8unpack #Область include_[путь до файла] //v8unpack #КонецОбласти ``` -------------------------------- ### Batch Build Multiple Products (Command Line) Source: https://context7.com/saby-integration/v8unpack/llms.txt Builds multiple 1C:Enterprise products from a configuration file via the command line. Supports building all products defined in the file or a specific product using its identifier. ```bash # Сборка всех продуктов v8unpack.exe -BA cmd/products.json # Сборка конкретного продукта v8unpack.exe -BA cmd/products.json --index ERP25_extension ``` -------------------------------- ### Batch Build Multiple Products (Python) Source: https://context7.com/saby-integration/v8unpack/llms.txt Builds multiple 1C:Enterprise products from a single configuration file. Allows specifying a specific product by its identifier and controlling the number of processes for parallel building. ```python import v8unpack # Сборка всех продуктов из конфигурационного файла v8unpack.build_all('d:/cmd/products.json') # Сборка конкретного продукта по его идентификатору v8unpack.build_all('d:/cmd/products.json', 'ERP25_extension', processes=4) ``` -------------------------------- ### Распаковка файла расширения 1С с v8unpack Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Команда для распаковки файла расширения (.cf) в указанный каталог. Использует v8unpack.exe с параметрами для указания входного файла, выходного каталога, файла индекса и версии конфигурации для суффиксов. ```bash v8unpack.exe -E d:/sample.cf d:/unpack --index index.json --descent 4100200 ``` -------------------------------- ### Build 1C Source Files (Command Line) Source: https://context7.com/saby-integration/v8unpack/llms.txt Builds 1C:Enterprise binary files from source files using the command-line interface. Supports basic building and advanced options for extensions, including index files, descent versions, and compatibility versions. ```bash # Базовая сборка v8unpack.exe -B d:/unpack d:/repacked.cf # Сборка расширения для конкретной версии конфигурации v8unpack.exe -B d:/src d:/bin/extension.cfe --index index.json --descent 3075100 --version 80316 ``` -------------------------------- ### Сборка расширения 1С из исходников с v8unpack Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Команда для сборки файла расширения (.cfe) из исходных файлов. Использует v8unpack.exe с параметрами для указания каталога с исходниками, выходного файла, файла индекса, версии конфигурации для суффиксов и целевой версии режима совместимости. ```bash v8unpack.exe -B d:/unpack d:/repacked.cf --index index.json --descent 4100200 --version 803012 ``` -------------------------------- ### Extracting and Building 1C External Processing with v8unpack Source: https://github.com/saby-integration/v8unpack/blob/main/docs/transition.md This snippet demonstrates how to use the v8unpack tool to extract and build 1C external processing files. It involves commands for extracting source code, building the processed file for a specific platform version, and updating an index file that defines shared components. The process is designed to manage code across different 1C platform versions. ```bash v8unpack.exe -E bin\Sbis1C_UF.epf src --index index.json ``` ```bash v8unpack.exe -B src bin\Sbis1C_UF.epf --index index.json --version=83 ``` ```bash v8unpack.exe -I src --index index.json -core core ``` -------------------------------- ### Define File Mapping and Exclusions Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Shows how to map source files to target directories, use wildcards for bulk moving, and define specific file exclusions within the index configuration. ```json { "ExternalDataProcessor.1c": "core/ExternalDataProcessor.1c", "Form": { "Форма1": { "Form.id.json": null, "Form.obj.bsl": "base/Форма2.bsl", "*": "base/Форма1" } } } ``` -------------------------------- ### Build 1C Source Files (Python) Source: https://context7.com/saby-integration/v8unpack/llms.txt Builds a 1C:Enterprise binary file from source files located in a directory. Supports basic building and advanced options for extensions, including temporary directories, index files, process management, and metadata prefixes. ```python import v8unpack # Базовая сборка обработки v8unpack.build('d:/unpack', 'd:/repacked.epf') # Сборка расширения с полным набором параметров v8unpack.build( 'd:/src', # папка с исходниками 'd:/bin/extension.cfe', # путь до собираемого файла temp_dir='d:/temp', # временная папка index='d:/cmd/index.json', # файл оглавления processes=8, # количество процессов options={ 'descent': 3075100, # версия конфигурации 'version': '80316', # версия режима совместимости (8.3.16) 'prefix': 'СБИС_', # префикс имен объектов метаданных 'auto_include': True # автоформирование оглавления } ) ``` -------------------------------- ### Configure Include Areas and Submodules Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Demonstrates how to override code areas for specific configurations and link multiple index files to support modular project structures. ```json "Области include": { "core_Область1": "core_Область2" } ``` ```json "index.json": [ "{submodule}/index.json", "cmd/index.json" ] ``` -------------------------------- ### Generate Index via CLI Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Command-line instruction to automatically generate an index file by scanning the source directory and mapping files to the core directory. ```bash v8unpack.exe -I src --index index.json --core core ``` -------------------------------- ### Reuse code via include directives in BSL Source: https://context7.com/saby-integration/v8unpack/llms.txt Demonstrates how to extract common BSL code into separate files using #Область include directives. Includes support for read-only imports (includr) and dynamic compilation directives. ```bsl // Модуль формы с областями include // Область будет вынесена в отдельный файл core/form3/common.bsl #Область include_core_form3_common // Этот код будет в отдельном файле Функция ОбщаяФункция() Экспорт Возврат "Общий результат"; КонецФункции #КонецОбласти // Использование includr - область только читается, не перезаписывается при разборке #Область includr_core_form3_common // Код берется из файла, но не обновляется при разборке #КонецОбласти // Динамические директивы - установка директивы при сборке #Область include_core_utils_client //&НаКлиенте // Код из файла будет вставлен с директивой &НаКлиенте #КонецОбласти ``` ```bsl //DynamicDirective Функция ПолучитьДанные() // При сборке перед //DynamicDirective будет добавлена директива из области Возврат Новый Структура; КонецФункции //DynamicDirective Процедура ОбработатьДанные(Данные) // Директива будет применена ко всем //DynamicDirective в области КонецПроцедуры ``` -------------------------------- ### Index File for Shared Components in 1C Processing Source: https://github.com/saby-integration/v8unpack/blob/main/docs/transition.md This JSON file serves as an index to define which components (code, forms, layouts) of the 1C external processing should be shared across different platform versions and which should remain specific. An empty object `{}` indicates an initial state, which is then populated by the `update_index.cmd` script. ```json {} ``` -------------------------------- ### Batch processing configuration Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Defines a JSON structure for batch building or extracting multiple products. Allows specifying source, binary path, and build options per product. ```json { "saby_vo3_83_uf": { "src": "src", "bin": "bin/saby_vo3_83_uf.epf", "temp": "temp", "index": "index.json", "disable": false, "options": { "descent": null, "auto_include": true } } } ``` -------------------------------- ### Configure index.json file mapping Source: https://github.com/saby-integration/v8unpack/blob/main/docs/history.md Demonstrates the use of wildcard characters in index.json to manage file movement during the build process. The '*' operator allows for bulk file operations while maintaining specific exceptions for individual files. ```json { "Form": { "Форма1": { "Form.id.json": null, "Form.obj.bsl": "base/Форма2", "*": "base/Форма1" } } } ``` -------------------------------- ### Execute batch operations Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Runs batch extraction or assembly based on a provided product configuration file. ```bash v8unpack.exe -EA product.json --index saby_vo3_83_uf v8unpack.exe -BA product.json --index saby_vo3_83_uf ``` -------------------------------- ### Batch Unpack Multiple Files (Command Line) Source: https://context7.com/saby-integration/v8unpack/llms.txt Unpacks multiple 1C:Enterprise binary files using a configuration file via the command line. Supports unpacking all files defined in the configuration or a specific file using its identifier. ```bash # Распаковка всех продуктов v8unpack.exe -EA cmd/products.json # Распаковка конкретного продукта v8unpack.exe -EA cmd/products.json --index BUH3_extension ``` -------------------------------- ### Unpack 1C Binary File (Command Line) Source: https://context7.com/saby-integration/v8unpack/llms.txt Unpacks 1C:Enterprise binary files using the command-line interface. Supports basic unpacking and advanced options for extensions, including index files, descent versions, and temporary directories. ```bash # Базовая распаковка v8unpack.exe -E d:/sample.cf d:/unpack # Распаковка расширения с параметрами v8unpack.exe -E d:/extension.cfe d:/src --index index.json --descent 3075100 --temp d:/temp ``` -------------------------------- ### Build 1C binary files Source: https://github.com/saby-integration/v8unpack/blob/main/README.md Reconstructs 1C:Enterprise binary files from a directory of unpacked source files. This allows for automated build pipelines from version-controlled source code. ```bash v8unpack.exe -B d:/unpack d:/repacked.cf ``` ```python import v8unpack if __name__ == '__main__': v8unpack.build('d:/unpack', 'd:/repacked.cf') ``` -------------------------------- ### Form Element Group Reusability with Include Prefix (1C) Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Allows splitting form elements into separate files by prefixing the root element's name with 'include'. Subordinate elements are also extracted. Naming rules and file organization follow the same principles as code includes. Nested includes for form elements are not supported. Declaring necessary properties on the target form is crucial. ```1c // Пример структуры элемента формы // <Элемент Имя="include_МояГруппа" Тип="Группа"> // <Элемент Имя="Поле1" Тип="Поле" /> // <Элемент Имя="Кнопка1" Тип="Кнопка" /> // ``` -------------------------------- ### Configure Batch Processing for v8unpack Source: https://github.com/saby-integration/v8unpack/blob/main/docs/history.md Defines the structure of a JSON configuration file used for mass assembly and disassembly of 1C:Enterprise distributions. This allows users to manage multiple products and their build parameters in a single file. ```json { "ERP25PROF2005006": { "src": "src/ERP25PROF", "bin": "bin/saby_ce_kedo_ERP25PROF_2005006.cfe", "temp": "temp", "index": "cmd/ERP25/index.json", "version": "80316", "descent": 2005006, "gui": null, "disable": true }, "БУХ3PROF3000112": { "src": "src/БУХ3PROF", "bin": "bin/saby_ce_kedo_БУХ3PROF_3000112.cfe", "temp": "temp", "index": "cmd/БУХ3/index.json", "version": "80314", "descent": 3000112 } } ``` -------------------------------- ### Batch Unpack Multiple Files (Python) Source: https://context7.com/saby-integration/v8unpack/llms.txt Unpacks multiple 1C:Enterprise binary files based on a configuration. Allows specifying a particular product to unpack by its identifier and controlling the number of processes for parallel unpacking. ```python import v8unpack # Распаковка всех продуктов v8unpack.extract_all('d:/cmd/products.json') # Распаковка конкретного продукта v8unpack.extract_all('d:/cmd/products.json', 'BUH3_extension', processes=4) ``` -------------------------------- ### Configure Include Regions in index.json Source: https://github.com/saby-integration/v8unpack/blob/main/docs/history.md Defines how to remap code regions during the build process using the index.json file. This allows for conditional implementation of logic based on the target application or configuration type. ```json { "Области include": { "core_Область1": "core_Область2" } } ``` -------------------------------- ### Unpack 1C Binary File (Python) Source: https://context7.com/saby-integration/v8unpack/llms.txt Unpacks a 1C:Enterprise binary file (cf, cfe, epf) into a directory containing JSON and BSL files. Supports basic unpacking and advanced options like temporary directories, index files, and process management. ```python import v8unpack # Базовая распаковка конфигурации v8unpack.extract('d:/sample.cf', 'd:/unpack') # Распаковка с использованием индексного файла и временной папки v8unpack.extract( 'd:/extension.cfe', # путь до бинарного файла 'd:/src', # папка для исходников temp_dir='d:/temp', # временная папка (не удаляется после работы) index='d:/cmd/index.json', # файл оглавления для переиспользования processes=4, # количество процессов options={ 'descent': 3075100, # версия конфигурации (3.75.100) 'auto_include': True, # автоматическое формирование оглавления 'version': '80316' # версия режима совместимости } ) ``` -------------------------------- ### Update index file Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Updates the index file used for mapping source files. Requires source path, index file path, and core path. ```bash v8unpack.exe -I src --index index.json --core core ``` ```python import v8unpack if __name__ == '__main__': v8unpack.update_index('d:/unpack', index) ``` -------------------------------- ### Unpack 1C binary files Source: https://github.com/saby-integration/v8unpack/blob/main/README.md Extracts 1C:Enterprise binary files into a directory of source files. Supports both command-line execution and direct Python library integration. ```bash v8unpack.exe -E d:/sample.cf d:/unpack ``` ```python import v8unpack if __name__ == '__main__': v8unpack.extract('d:/sample.cf', 'd:/unpack') ``` -------------------------------- ### Update index.json for v8unpack Source: https://context7.com/saby-integration/v8unpack/llms.txt Generates or updates the index.json file to map source files for the build process. Supports both Python API calls and command-line interface execution. ```python import v8unpack # Обновление индекса с указанием общей папки v8unpack.update_index( 'd:/src', # папка с исходниками 'd:/cmd/index.json', # путь до индексного файла 'core' # папка для общих модулей ) ``` ```bash # Формирование индекса v8unpack.exe -I src --index index.json --core core ``` -------------------------------- ### Dynamic Directives within Include Areas (1C) Source: https://github.com/saby-integration/v8unpack/blob/main/docs/usage.md Enables defining execution directives dynamically when including code. This is useful for using universal code in different contexts. Directives are added to the include area's name as a comment. '//DynamicDirective' comments within the code are replaced by the specified directive during assembly. ```1c //DynamicDirective Функция HelloWorld() КонецФункции ``` ```1c #Область include_XXX //&НаКлиенте //DynamicDirective Функция HelloWorld() КонецФункции #КонецОбласти ``` ```1c #Область include_XXX //&НаКлиенте &НаКлиенте //DynamicDirective Функция HelloWorld() КонецФункции #КонецОбласти ```