You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-EN.md
+65-18Lines changed: 65 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,50 +57,97 @@ The OneScript distribution already includes a set of the most commonly used pack
57
57
58
58
## Preparation
59
59
60
-
Links to distributions are provided below, however, please note that links may change over time and their relevance is not guaranteed. You need dotnet SDK and C++ compiler, which can be downloaded from anywhere you can find.
60
+
To build the project you need:
61
61
62
-
* Install [MS BuildTools](https://visualstudio.microsoft.com/ru/thank-you-downloading-visual-studio/?sku=buildtools&rel=16), when installing enable targeting for .net6, .net4.8, install C++ compiler.
62
+
*[.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) (the project's target framework is `net8.0`).
63
+
* A C++ compiler — only required to build the native bridge `ScriptEngine.NativeApi` (support for native add-ins compatible with the 1C NativeApi). On Windows the easiest way to get one is to install [MS Build Tools](https://visualstudio.microsoft.com/visual-studio-build-tools/) or Visual Studio with the "Desktop development with C++" workload. If a C++ compiler is not available, see the `NoCppCompiler` parameter below.
64
+
65
+
> Distribution links may change over time, their relevance is not guaranteed.
63
66
64
67
## Build
65
68
66
-
Launch Developer Command Prompt (will appear in the Start menu after installing MSBuildTools or Visual Studio). Navigate to the OneScript repository directory. The following are commands in the Developer Command Prompt console.
67
-
Build is performed using msbuild. Targets:
69
+
The build is driven by MSBuild via the `Build.csproj` script in the repository root. Commands can be run with `msbuild` (Developer Command Prompt installed together with MS Build Tools/Visual Studio) or with `dotnet msbuild` (cross-platform).
70
+
71
+
Main targets:
68
72
69
-
* CleanAll - clean previous build results
70
-
* BuildAll - prepare files for distribution
71
-
* MakeCPP;MakeFDD;MakeSCD;BuildDebugger - separate build targets for preparing different types of distributions
72
-
* PrepareDistributionFiles - build full distribution packages (including libraries)
73
-
* PackDistributions - prepare ZIP archives for distribution
74
-
* CreateNuget - create packages for publishing to NuGet
73
+
*`CleanAll` — clean previous build results;
74
+
*`BuildAll` — build binary files for distribution (FDD, SCD, debugger; native components are also built when a C++ compiler is available);
75
+
*`MakeCPP`, `MakeFDD`, `MakeSCD`, `BuildDebugger` — individual targets that build specific parts of the distribution;
76
+
*`GatherLibrary` — download and stage the base set of libraries (`opm`, `asserts`, `logos`, `fs`, `tempfiles`, `cli`);
77
+
*`PrepareDistributionFiles` — build full distribution contents (including libraries and documentation);
78
+
*`PackDistributions` — pack the distribution contents into ZIP archives for all supported platforms;
79
+
*`BuildDocumentation` — generate the platform reference (markdown + json);
80
+
*`CreateNuget` / `PublishNuget` — build and publish NuGet packages;
81
+
*`Test` (`UnitTests`, `ScriptedTests`) — run unit and acceptance (BSL) tests.
75
82
76
83
**Build parameters**
77
84
78
-
* VersionPrefix - release number prefix, its main part, for example, 2.0.0
79
-
* VersionSuffix - version suffix, which usually acts as an arbitrary versioning suffix according to semver, for example, beta-786 (optional)
80
-
* NoCppCompiler - if True - C++ compiler is not installed, C++ components (NativeApi support) will not be added to the build
85
+
*`VersionPrefix` — main part of the release number, for example `2.0.0` (defaults to `2.0.0`);
86
+
*`VersionSuffix` — optional SemVer suffix, for example `beta-786`;
87
+
*`NoCppCompiler` — when set to `True`, native C++ components (NativeApi) are not built and not included in the distribution (use it when no C++ compiler is installed);
88
+
*`Configuration` — build configuration, defaults to `Release`. For a debug build on Linux use `LinuxDebug`.
81
89
82
-
All distribution files will be placed in the `built` directory at the root of the 1Script repository
90
+
All build artifacts are placed in the `built` directory at the repository root.
83
91
84
92
### Building distribution contents in a separate directory
***C# unit tests** — located in `src/Tests/*` (xUnit/NUnit). Run them via `dotnet test` in the corresponding test project directory or all at once:
127
+
```bat
128
+
dotnet msbuild Build.csproj /t:UnitTests
129
+
```
130
+
***BSL acceptance tests** — located in the `tests/` directory and executed by `testrunner.os` against a freshly built `oscript`. The repository includes wrapper scripts:
Copy file name to clipboardExpand all lines: README.md
+65-19Lines changed: 65 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,50 +57,96 @@ OneScript позволяет создавать и выполнять текст
57
57
58
58
## Подготовка
59
59
60
-
Ниже приведены ссылки на дистрибутивы, однако, учтите, что ссылки могут меняться со временем и их актуальность не гарантируется. Нужен dotnet SDK и компилятор C++, скачать можно из любого места, которое нагуглится.
60
+
Для сборки потребуется:
61
61
62
-
* Установить [MS BuildTools](https://visualstudio.microsoft.com/ru/thank-you-downloading-visual-studio/?sku=buildtools&rel=16), при установке включить таргетинг на .net6, .net4.8, установить компилятор C++.
62
+
*[.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) (целевой фреймворк проекта — `net8.0`).
63
+
* Компилятор C++ — нужен только для сборки нативного моста `ScriptEngine.NativeApi` (поддержка внешних компонент стандарта 1С NativeApi). На Windows проще всего получить его, поставив [MS Build Tools](https://visualstudio.microsoft.com/visual-studio-build-tools/) или Visual Studio с компонентом «Разработка классических приложений на C++». Если C++ компилятора нет, см. параметр `NoCppCompiler` ниже.
64
+
65
+
> Ссылки на дистрибутивы могут меняться со временем, их актуальность не гарантируется.
63
66
64
67
## Сборка
65
68
66
-
Запустить Developer Command Prompt (появится в меню Пуск после установки MSBuildTools или Visual Studio). Перейти в каталог репозитория OneScript. Далее приведены команды в консоли Developer Command Prompt
67
-
Сборка выполняется с помощью msbuild. Таргеты:
69
+
Сборка выполняется с помощью MSBuild и сценария `Build.csproj` в корне репозитория. Команды можно запускать как через `msbuild` (Developer Command Prompt после установки MS Build Tools/Visual Studio), так и через `dotnet msbuild` (кросс-платформенно).
70
+
71
+
Основные таргеты:
68
72
69
-
* CleanAll - очистка результатов предыдущих сборок
70
-
* BuildAll - подготовить файлы для поставки
71
-
* MakeCPP;MakeFDD;MakeSCD;BuildDebugger - отдельные таргеты сборки для подготовки разных типов поставки
72
-
* PrepareDistributionFiles - сборка полных пакетов поставки (включая библиотеки)
73
-
* PackDistributions - подготовка ZIP архивов поставки
74
-
* CreateNuget - создать пакеты для публикации в NuGet
73
+
*`CleanAll` — очистка результатов предыдущих сборок;
74
+
*`BuildAll` — собрать бинарные файлы для поставки (FDD, SCD, отладчик; при наличии C++ — нативные компоненты);
75
+
*`MakeCPP`, `MakeFDD`, `MakeSCD`, `BuildDebugger` — отдельные таргеты сборки разных частей поставки;
76
+
*`GatherLibrary` — скачать и сложить базовый набор библиотек (`opm`, `asserts`, `logos`, `fs`, `tempfiles`, `cli`);
77
+
*`PrepareDistributionFiles` — собрать полные содержимые дистрибутивов (вкл. библиотеки и документацию);
78
+
*`PackDistributions` — упаковать содержимое в ZIP-архивы под все поддерживаемые платформы;
79
+
*`BuildDocumentation` — сгенерировать справку по платформе (markdown + json);
80
+
*`CreateNuget` / `PublishNuget` — собрать и опубликовать NuGet-пакеты;
81
+
*`Test` (`UnitTests`, `ScriptedTests`) — прогнать модульные и приёмочные (BSL) тесты.
75
82
76
83
**Параметры сборки**
77
84
78
-
* VersionPrefix - префикс номера релиза, его основная часть, например, 2.0.0
79
-
* VersionSuffix - суффикс номера, который обычно выступает в качестве произвольного суффикса версионирования по semver, например, beta-786 (необязателен)
80
-
* NoCppCompiler - если True - не установлен компилятор C++, в сборку не будут добавлены компоненты C++ (поддержка NativeApi)
85
+
*`VersionPrefix` — основная часть номера релиза, например `2.0.0` (по умолчанию `2.0.0`);
86
+
*`VersionSuffix` — необязательный suffix по SemVer, например `beta-786`;
87
+
*`NoCppCompiler` — если `True`, нативные компоненты C++ (NativeApi) не собираются и не включаются в дистрибутив (используйте, если компилятор C++ не установлен);
88
+
*`Configuration` — конфигурация сборки, по умолчанию `Release`. Для отладочной сборки на Linux используется `LinuxDebug`.
81
89
82
-
Все поставляемые файлы будут размещены в каталоге `built` в корне репозитория 1Script
90
+
Все артефакты сборки размещаются в каталоге `built` в корне репозитория.
83
91
84
92
### Сборка содержимого дистрибутивов в отдельном каталоге
***Модульные тесты на C#** — расположены в `src/Tests/*` (xUnit/NUnit), запускаются через `dotnet test` в каталоге соответствующего тестового проекта или одной командой:
127
+
```bat
128
+
dotnet msbuild Build.csproj /t:UnitTests
129
+
```
130
+
***Приёмочные тесты на BSL** — расположены в каталоге `tests/` и запускаются через `testrunner.os` на свежесобранном `oscript`. Для удобства в репозитории есть скрипты-обёртки:
0 commit comments