|
1 | | -# README # |
| 1 | +# OneScript # |
2 | 2 |
|
3 | | -### The project is an independent cross-platform open-source implementation of a virtual machine that executes scripts written in BSL (1C:Enterprise scripting language). |
| 3 | +[](https://t.me/oscript_library) [](https://build.oscript.io/job/1Script/job/develop/) [](https://build.oscript.io/job/1Script/job/master/) |
4 | 4 |
|
5 | | - |
| 5 | +## The project is an independent cross-platform implementation of a virtual machine that executes scripts written in the 1C:Enterprise language ## |
6 | 6 |
|
7 | | -Script execution doesn't use any 1C:Enterprise system libraries and doesn't require installation of 1C:Enterprise system on the target machine. |
| 7 | +  |
8 | 8 |
|
9 | | -In other words, this is a possibility to write programs in the 1C (BSL) language without using the 1C:Enterprise platform. |
| 9 | +The 1C:Enterprise system libraries are not used and installation of the 1C:Enterprise system on the target machine is not required. |
10 | 10 |
|
11 | | -## Name and pronunciation |
| 11 | +In other words, this is a tool for writing and executing programs in the 1C language without using the 1C:Enterprise platform. |
12 | 12 |
|
13 | | -The project is called OneScript, can be abbreviated to the title 1Script on writing. |
| 13 | +## Name and pronunciation ## |
14 | 14 |
|
15 | | -## Project site |
| 15 | +The project is called OneScript, can be abbreviated to the title 1Script when writing. Pronounced as `[uanskript]`. |
16 | 16 |
|
17 | | -Basic information about the project, releases and technical documentation are located on the official website. |
| 17 | +OneScript allows you to create and execute text scripts written in a language familiar to any specialist working with the 1C:Enterprise system. Using a familiar language for script automation significantly increases a specialist's productivity by simplifying the automation of manual operations. |
18 | 18 |
|
19 | | -http://oscript.io |
| 19 | +## Project site ## |
20 | 20 |
|
21 | | -## Library of useful scripts |
| 21 | +Main information about the project, releases and technical documentation are located on the official website |
22 | 22 |
|
23 | | -The OneScript package already includes a set of commonly used packages. |
| 23 | +[https://oscript.io](https://oscript.io) |
| 24 | + |
| 25 | +## Library of useful scripts ## |
| 26 | + |
| 27 | +The OneScript distribution already includes a set of the most commonly used packages. These, as well as other packages, are located in the [oscript-library](https://github.com/oscript-library) repository and are available to everyone. There is a package manager [opm](https://github.com/oscript-library/opm). |
| 28 | + |
| 29 | +## Installation ## |
| 30 | + |
| 31 | +### Windows ### |
| 32 | + |
| 33 | +- (interactively) download from the [official website](https://oscript.io) or installer from the [Releases](https://github.com/EvilBeaver/OneScript/releases) section and run it. Then, Next, Done. |
| 34 | + |
| 35 | +### Linux ### |
| 36 | + |
| 37 | +- (interactively) download the required package from the [official website](https://oscript.io) or installer from the [Releases](https://github.com/EvilBeaver/OneScript/releases) section and install it. |
| 38 | + |
| 39 | +### MacOS ### |
| 40 | + |
| 41 | +There is no interactive installer, but the engine can be installed from the command line: |
| 42 | + |
| 43 | +- install [homebrew](https://brew.sh/index_ru) |
| 44 | +- install mono with the command `brew install mono` |
| 45 | +- download [ovm](https://github.com/oscript-library/ovm/releases). Download the `ovm.exe` file (despite the .exe extension it will work on MacOS) |
| 46 | +- run the command `mono path/to/ovm.exe install stable` |
| 47 | + |
| 48 | + *Tip: To correctly specify the path to `ovm.exe`, drag the `ovm.exe` file into the terminal. Example of a full command: `mono Users/username/Downloads/ovm.exe install stable`* |
| 49 | +- run the command `mono path/to/ovm.exe use stable` |
| 50 | +- restart the terminal |
| 51 | + |
| 52 | +#### Additional configuration for Self-Contained distribution (does not require dotnet installation) |
| 53 | + |
| 54 | +``` |
| 55 | +chmod +x ./oscript |
| 56 | +xattr -d com.apple.quarantine *.dylib oscript |
| 57 | +codesign -s - ./oscript |
| 58 | +``` |
| 59 | + |
| 60 | + |
| 61 | +# Manual local build |
| 62 | + |
| 63 | +## Preparation |
| 64 | + |
| 65 | +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. |
| 66 | + |
| 67 | +* 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. |
| 68 | + |
| 69 | +## Build |
| 70 | + |
| 71 | +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. |
| 72 | +Build is performed using msbuild. Targets: |
| 73 | + |
| 74 | +* CleanAll - clean previous build results |
| 75 | +* BuildAll - prepare files for distribution |
| 76 | +* MakeCPP;MakeFDD;MakeSCD;BuildDebugger - separate build targets for preparing different types of distributions |
| 77 | +* PrepareDistributionFiles - build full distribution packages (including libraries) |
| 78 | +* PackDistributions - prepare ZIP archives for distribution |
| 79 | +* CreateNuget - create packages for publishing to NuGet |
| 80 | + |
| 81 | +**Build parameters** |
| 82 | + |
| 83 | +* VersionPrefix - release number prefix, its main part, for example, 2.0.0 |
| 84 | +* VersionSuffix - version suffix, which usually acts as an arbitrary versioning suffix according to semver, for example, beta-786 (optional) |
| 85 | +* NoCppCompiler - if True - C++ compiler is not installed, C++ components (NativeApi support) will not be added to the build |
| 86 | + |
| 87 | +All distribution files will be placed in the `built` directory at the root of the 1Script repository |
| 88 | + |
| 89 | +### Building distribution contents in a separate directory |
| 90 | + |
| 91 | +```bat |
| 92 | +msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles |
| 93 | +``` |
| 94 | + |
| 95 | +### Building with manual version specification |
| 96 | + |
| 97 | +```bat |
| 98 | +msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles /p:VersionPrefix=2.0.0 |
| 99 | +``` |
| 100 | + |
| 101 | +### Building ZIP distributions |
| 102 | + |
| 103 | +```bat |
| 104 | +msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles;PackDistributions /p:VersionPrefix=2.0.0 /p:VersionSuffix=preview223 |
| 105 | +``` |
| 106 | + |
| 107 | +### Documentation generation |
| 108 | + |
| 109 | +```bat |
| 110 | +msbuild Build.csproj /t:BuildDocumentation |
| 111 | +``` |
0 commit comments