|
1 | | -LCModel Library |
2 | | -=============== |
| 1 | +# LCModel Library |
3 | 2 |
|
4 | | -Description |
5 | | ------------ |
| 3 | +## Description |
6 | 4 |
|
7 | 5 | The library for the SIL Language and Culture Model. |
8 | | -The liblcm library is the core [FieldWorks](github.com/sillsdev/FieldWorks) model for linguistic analyses of languages. Tools in this library provide the ability to store and interact with language and culture data, including anthropological, text corpus, and linguistics data. |
9 | 6 |
|
10 | | -Instructions |
11 | | ------------- |
| 7 | +The liblcm library is the core [FieldWorks](https://github.com/sillsdev/FieldWorks) model for |
| 8 | +linguistic analyses of languages. Tools in this library provide the ability to store and interact |
| 9 | +with language and culture data, including anthropological, text corpus, and linguistics data. |
| 10 | + |
| 11 | +## Instructions |
12 | 12 |
|
13 | 13 | 1. Install Required Software |
14 | | -- git |
15 | | -- Visual Studio 2017 or MonoDevelop |
| 14 | + |
| 15 | + - git |
| 16 | + - Visual Studio 2019 (with C++), MonoDevelop, or JetBrains Rider |
16 | 17 |
|
17 | 18 | 2. Clone the liblcm repository |
18 | | -- Open a terminal (or git bash on Windows) and cd into a desired directory. |
19 | | -- Run `git clone https://github.com/sillsdev/liblcm.git` |
| 19 | + |
| 20 | + - Open a terminal (or git bash on Windows) and cd into a desired directory. |
| 21 | + - Run `git clone https://github.com/sillsdev/liblcm.git` |
20 | 22 |
|
21 | 23 | 3. Build liblcm |
22 | | -- cd into the directory of the cloned liblcm repository. |
23 | 24 |
|
24 | | -**On Windows**, `LCM.sln` can be built from within Visual Studio, or |
25 | | -- Open Visual Studio Developer Command Prompt. |
26 | | -- Run `build.cmd` to build the liblcm library. |
| 25 | + - cd into the directory of the cloned liblcm repository. |
27 | 26 |
|
28 | | -**On Linux** |
29 | | -- Run `build.sh` to build the liblcm library. |
| 27 | + On Windows: |
30 | 28 |
|
31 | | -By default, this will build liblcm in the Debug configuration. |
32 | | -To build with a different configuration, use: |
| 29 | + - Run the appropriate `vsvars*.bat`. Alternatively, `LCM.sln` can be built from within Visual Studio. |
| 30 | + - Run `build.cmd` to build the liblcm library. |
| 31 | + |
| 32 | + On Linux: |
33 | 33 |
|
34 | | - build.(cmd|sh) (Debug|Release) |
| 34 | + - Run `build.sh` to build the liblcm library. |
35 | 35 |
|
36 | | -Debugging |
37 | | ---------- |
| 36 | +By default, this will build liblcm in the Debug configuration. |
| 37 | +To build with a different configuration, use: |
38 | 38 |
|
39 | | -The LCModel library depends on multiple libpalaso files that are downloaded automatically by triggering the build script. The option to build liblcm using locally built dependencies is also available to assist with debugging. Copy all of the relevent files from the libpalaso output folder into the lib/downloads folder in liblcm, then build with the command: |
| 39 | +```bash |
| 40 | +build.(cmd|sh) (Debug|Release) |
| 41 | +``` |
40 | 42 |
|
41 | | - build.(cmd|sh) Debug Build True |
| 43 | +## Debugging |
42 | 44 |
|
43 | | -Build a 64-bit build with the command: |
| 45 | +The LCModel library consumes multiple libpalaso files as NuGet packages. FieldWorks and other |
| 46 | +projects consume LCModel as a NuGet package. Several options to debug across NuGet dependencies are |
| 47 | +discussed on [this wiki](https://github.com/sillsdev/libpalaso/wiki/Developing-with-locally-modified-nuget-packages). |
| 48 | +To publish and consume LCModel through local sources: |
44 | 49 |
|
45 | | - build.(cmd|sh) Debug Build False x64 |
| 50 | +- Set an environment variable `LOCAL_NUGET_REPO` with the path to a folder on your computer (or |
| 51 | + local network) to publish locally-built packages |
| 52 | +- See [these instructions](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) |
| 53 | + to enable local package sources |
| 54 | +- `build /t:pack` will pack nuget packages and publish them to `LOCAL_NUGET_REPO` |
46 | 55 |
|
47 | | -Tests |
48 | | ------ |
| 56 | +## Tests |
49 | 57 |
|
50 | | -**On Linux** |
| 58 | +### Linux |
51 | 59 |
|
52 | | - (. environ && cd artifacts/Debug/ && ICU_DATA="IcuData/" nunit-console SIL.LCModel*Tests.dll ) |
| 60 | +```bash |
| 61 | +(. environ && cd artifacts/Debug/net461/ && ICU_DATA="IcuData/icudt54l" nunit-console SIL.LCModel*Tests.dll ) |
| 62 | +``` |
53 | 63 |
|
54 | 64 | **On Windows with ReSharper** |
55 | 65 |
|
|
66 | 76 | 4. Execute: "..\..\packages\NUnit.ConsoleRunner.3.9.0\tools\nunit3-console.exe" SIL.LCModel.Tests.dll |
67 | 77 | (Or specify one of the other SIL.LCModel*Tests.dll) |
68 | 78 | 5. To debug the tests from Visual Studio; Immediately after the tests have started |
69 | | - running "Attach to Process..." and select 'nunit-agent.exe'. |
| 79 | + running "Attach to Process..." and select 'nunit-agent.exe'. |
0 commit comments