MFC 1.3 · Шаг 2. Получение исходников

Что будет сделано на этой странице. Вы скачаете исходный код TMC Suite 1.3 с GitHub — одним из двух способов: командой git clone (способ А) или ZIP-архивом через браузер (способ Б) — и положите его в папку C:\src\TMC_Suite. Затем сверите, что внутри есть все нужные папки и файлы.

Репозиторий: https://github.com/klimov-kn/TMC_Suite (ветка mfc, метка выпуска v1.3).

Основная ветка репозитория main — это уже новая версия 5.0 на Qt 6. Версия MFC лежит в ветке mfc, поэтому при скачивании ветку или метку нужно указывать явно.


2.0 Куда класть исходники

Во всей инструкции исходники лежат в папке

C:\src\TMC_Suite

Эту папку дальше называем корнем проекта. Можно выбрать другую папку, тогда во всех командах подставляйте свой путь. Рекомендации:

  • путь латиницей, без русских букв (сборка в папке с русскими буквами не проверялась);
  • пробелы в пути допустимы (проверено: проект собирается в папке с пробелом в имени);
  • не кладите исходники в C:\Program Files — там нужны права администратора на запись;
  • не кладите в папку, которую синхронизирует OneDrive, — синхронизация может блокировать файлы во время сборки.

Создайте папку C:\src, если её нет: откройте Проводник, выберите диск C:, щёлкните правой кнопкой по пустому месту → Создать → Папку, введите имя src, нажмите Enter.


2.1 Способ А — через git (рекомендуется)

Нужен установленный Git (см. шаг 1, пункт 1.4).

  1. Откройте меню «Пуск», наберите PowerShell, запустите Windows PowerShell.
  2. Перейдите в папку C:\src:

    cd C:\src
    
  3. Скачайте репозиторий. Выберите одну из двух команд:

    • выпуск 1.3 точно в том виде, в каком он опубликован (метка v1.3):

      git clone --branch v1.3 https://github.com/klimov-kn/TMC_Suite.git TMC_Suite
      

      Git напишет предупреждение You are in 'detached HEAD' state… — это нормально для скачивания по метке, ничего делать не нужно;

    • последнее состояние ветки mfc (выпуск 1.3 плюс последующие правки, если они есть):

      git clone --branch mfc https://github.com/klimov-kn/TMC_Suite.git TMC_Suite
      

    На момент написания инструкции ветка mfc отличается от метки v1.3 только служебными файлами (CHANGELOG.md и две страницы папки .github), исходный код одинаковый.

  4. Дождитесь окончания. Логин и пароль GitHub не нужны — репозиторий открытый. Скачивание занимает несколько секунд (замерено: 3 секунды, около 10 МБ).

  5. Перейдите в корень проекта:

    cd C:\src\TMC_Suite
    

Как обновить исходники позже (только для ветки mfc): в папке C:\src\TMC_Suite выполните git pull.

Вариант: скачать прямо из Visual Studio

Git встроен в Visual Studio, поэтому можно обойтись без отдельной установки Git:

  1. Запустите Visual Studio 2026.
  2. В стартовом окне нажмите «Клонировать репозиторий» (Clone a repository).
  3. В поле «Расположение репозитория» (Repository location) вставьте https://github.com/klimov-kn/TMC_Suite.git.
  4. В поле «Путь» (Path) укажите C:\src\TMC_Suite.
  5. Нажмите «Клонировать» (Clone).

Так скачивается основная ветка main, то есть версия 5.0, а не MFC. Перейдите на нужную ветку: меню Git → Управление ветвями, в списке remotes/origin дважды щёлкните mfc. Решение после этого откройте, как описано на шаге 3.


2.2 Способ Б — ZIP-архив через браузер (без git)

  1. Откройте в браузере https://github.com/klimov-kn/TMC_Suite.
  2. Над списком файлов откройте список веток (на нём написано main) и выберите mfc.
  3. Нажмите зелёную кнопку <> Code и в раскрывшемся окне, на вкладке Local, нажмите внизу Download ZIP.

    Браузер сохранит файл TMC_Suite-mfc.zip (около 3 МБ) в папку «Загрузки».

    Чтобы скачать именно выпуск 1.3 (метку v1.3), откройте https://github.com/klimov-kn/TMC_Suite/releases/tag/v1.3 и внизу, в разделе Assets, нажмите Source code (zip). Файл будет называться TMC_Suite-1.3.zip, а папка внутри — TMC_Suite-1.3. Прямая ссылка: https://github.com/klimov-kn/TMC_Suite/archive/refs/tags/v1.3.zip.

  4. Снимите блокировку с архива (рекомендуется: Windows помечает скачанные файлы как «пришедшие из интернета»): в Проводнике щёлкните по TMC_Suite-mfc.zip правой кнопкой → Свойства → на вкладке Общие внизу поставьте галочку «Разблокировать» → ОК. Если такой галочки нет — блокировки нет, пропустите пункт.

  5. Щёлкните по архиву правой кнопкой → Извлечь все… → в поле пути впишите C:\src → Извлечь.

  6. В C:\src появится папка TMC_Suite-mfc (или TMC_Suite-1.3). Переименуйте её в TMC_Suite: правая кнопка → Переименовать.

    Проверьте, что не получилось двойной вложенности C:\src\TMC_Suite\TMC_Suite-mfc\…. Папка src с исходниками должна лежать по пути C:\src\TMC_Suite\src.

Архив не содержит истории изменений и папки .git; для сборки это не важно.


2.3 Проверьте, что всё на месте

Откройте C:\src\TMC_Suite в Проводнике. Должно быть так (проверено по содержимому репозитория):

C:\src\TMC_Suite\
├── .github\            служебные файлы GitHub (шаблоны, политика безопасности)
├── build\              общие настройки сборки (property sheets)
│   ├── Common.props    пути к заголовкам и библиотекам, папка платформы, MBCS
│   ├── LibOutput.props куда класть .lib  → dist\<платформа>\lib
│   └── ExeOutput.props куда класть .exe  → dist\<платформа>\bin
├── dist\
│   └── README.md       сюда сборка положит готовые файлы (пока только README)
├── graphify-out\       карта связей кода (для сборки не нужна)
├── installer\          скрипт установщика TMC_Suite.iss и его картинки
├── src\
│   ├── tamic.slnx      ОБЩЕЕ РЕШЕНИЕ — все 12 проектов
│   ├── Include\        общие заголовки (.h)
│   ├── libs\           6 библиотек
│   ├── viewers\        3 вьювера
│   ├── kernels\        2 счётных ядра
│   └── fieldview\      FieldView
├── BUILD_ORDER.md      краткая карта сборки
├── CHANGELOG.md        история изменений
├── LICENSE, NOTICE     лицензия Apache 2.0
└── README.md

Файлы проектов (12 штук), которые входят в решение src\tamic.slnx:

Группа Проект (файл) Папка Что получится
Библиотека SFILE95.vcxproj src\libs\SFILE95 SFILE95.lib
Библиотека complex.vcxproj src\libs\complex complex.lib
Библиотека exprint.vcxproj src\libs\exprint exprint.lib
Библиотека TMCLibError.vcxproj src\libs\TMCLibError TMCLibError.lib
Библиотека Prepr.vcxproj src\libs\PREPR Prepr.lib
Библиотека TMCIndan.vcxproj src\libs\TMCIndan TMCIndan.lib
Вьювер TMCROS.vcxproj src\viewers\Tmcrtout TMCROS.exe — временные сигналы
Вьювер TMCGROUT.vcxproj src\viewers\Tmcgrout TMCGROUT.exe — матрицы рассеяния
Вьювер TMC_DN.vcxproj src\viewers\DiaNapGr TMC_DN.exe — диаграммы направленности
Ядро PlanRT_H.vcxproj src\kernels\PlanarRT_H tmc_rth.exe — H-поляризация
Ядро PlanRT_X.vcxproj src\kernels\PlanarRT_X tmc_rtx.exe — X-мода
Визуализация FldView.vcxproj src\fieldview FieldView.exe — поля (OpenGL)

Быстрая проверка в PowerShell (в папке C:\src\TMC_Suite):

Test-Path .\src\tamic.slnx
(Get-ChildItem .\src -Recurse -Filter *.vcxproj).Count

Первая команда должна ответить True, вторая — 12.

Чего в репозитории нет (и это нормально)

  • Готовых программ (.exe, .lib) — их создаёт сборка; готовые сборки выложены отдельно в разделе Releases.
  • Образцов заданий (samples\) и руководства пользователя в HTML (docs\) — они не публикуются в репозитории. Для проверки сборки на шаге 5 дан короткий пробный файл задания; что делать с установщиком без этих папок — на шаге 6.
  • Дополнительных библиотек (GLEW, GLFW и т. п.) — FieldView использует системные opengl32.lib и glu32.lib из Windows SDK.

Про кодировку исходников

Файлы .cpp, .h, .rc содержат русские комментарии и строки в кодировке Windows-1251. Если будете их открывать в Visual Studio — ничего не пересохраняйте в другой кодировке: это может испортить русские строки в ресурсах программ.

Дальше — Шаг 3. Сборка в Visual Studio или Шаг 4. Сборка из командной строки.

MFC 1.3 · Step 2. Getting the sources

What this page covers. You will download the TMC Suite 1.3 source code from GitHub — in one of two ways: with the git clone command (method A) or as a ZIP archive via the browser (method B) — and put it into the folder C:\src\TMC_Suite. Then you will check that it contains all the required folders and files.

Repository: https://github.com/klimov-kn/TMC_Suite (branch mfc, release tag v1.3).

The main branch of the repository, main, is now the new version 5.0 on Qt 6. The MFC version is in the mfc branch, so always name the branch or tag explicitly when downloading.


2.0 Where to put the sources

Throughout the guide, the sources are in the folder

C:\src\TMC_Suite

From here on this folder is called the project root. You can choose another folder; then substitute your own path in all commands. Recommendations:

  • a path in Latin letters, without Cyrillic letters (building in a folder with Cyrillic letters was not tested);
  • spaces in the path are allowed (tested: the project builds in a folder with a space in its name);
  • do not put the sources into C:\Program Files — writing there requires administrator rights;
  • do not put them into a folder synchronized by OneDrive — synchronization can lock files during the build.

Create the folder C:\src if it does not exist: open File Explorer, select drive C:, right-click an empty area → New → Folder, enter the name src, press Enter.


Git must be installed (see step 1, section 1.4).

  1. Open the Start menu, type PowerShell, start Windows PowerShell.
  2. Go to the folder C:\src:

    cd C:\src
    
  3. Download the repository. Choose one of the two commands:

    • release 1.3 exactly as it was published (tag v1.3):

      git clone --branch v1.3 https://github.com/klimov-kn/TMC_Suite.git TMC_Suite
      

      Git prints the warning You are in 'detached HEAD' state… — this is normal when downloading by tag, nothing needs to be done;

    • the latest state of the mfc branch (release 1.3 plus later changes, if any):

      git clone --branch mfc https://github.com/klimov-kn/TMC_Suite.git TMC_Suite
      

    At the time of writing, the mfc branch differs from the v1.3 tag only in service files (CHANGELOG.md and two pages of the .github folder); the source code is the same.

  4. Wait until it finishes. A GitHub login and password are not needed — the repository is public. The download takes a few seconds (measured: 3 seconds, about 10 MB).

  5. Go to the project root:

    cd C:\src\TMC_Suite
    

How to update the sources later (only for the mfc branch): in the folder C:\src\TMC_Suite run git pull.

Variant: download directly from Visual Studio

Git is built into Visual Studio, so you can do without a separate Git installation:

  1. Start Visual Studio 2026.
  2. In the start window, click Clone a repository.
  3. In the Repository location field, paste https://github.com/klimov-kn/TMC_Suite.git.
  4. In the Path field, enter C:\src\TMC_Suite.
  5. Click Clone.

This downloads the default main branch, which is version 5.0, not MFC. Switch to the right branch: menu Git → Manage Branches, then in the remotes/origin list double-click mfc. Then open the solution as described in step 3.


2.2 Method B — ZIP archive via the browser (without git)

  1. Open https://github.com/klimov-kn/TMC_Suite in a browser.
  2. Click the green <> Code button above the file list.
  3. In the window that opens, on the Local tab, click Download ZIP at the bottom.

    Before that, open the branch list above the files (it reads main) and choose mfc. The browser saves the file TMC_Suite-mfc.zip (about 3 MB) to the Downloads folder.

    To download exactly release 1.3 (tag v1.3), open https://github.com/klimov-kn/TMC_Suite/releases/tag/v1.3 and at the bottom, in the Assets section, click Source code (zip). The file will be called TMC_Suite-1.3.zip, and the folder inside — TMC_Suite-1.3. Direct link: https://github.com/klimov-kn/TMC_Suite/archive/refs/tags/v1.3.zip.

  4. Unblock the archive (recommended: Windows marks downloaded files as “came from the internet”): in File Explorer, right-click TMC_Suite-mfc.zip → Properties → on the General tab, check Unblock at the bottom → OK. If there is no such checkbox, there is no block; skip this item.

  5. Right-click the archive → Extract All… → enter C:\src in the path field → Extract.

  6. The folder TMC_Suite-mfc (or TMC_Suite-1.3) appears in C:\src. Rename it to TMC_Suite: right-click → Rename.

    Check that you did not get a double nesting C:\src\TMC_Suite\TMC_Suite-mfc\…. The src folder with the sources must be at the path C:\src\TMC_Suite\src.

The archive contains no change history and no .git folder; this does not matter for the build.


2.3 Check that everything is in place

Open C:\src\TMC_Suite in File Explorer. It should look like this (checked against the repository contents):

C:\src\TMC_Suite\
├── .github\            GitHub service files (templates, security policy)
├── build\              common build settings (property sheets)
│   ├── Common.props    paths to headers and libraries, platform folder, MBCS
│   ├── LibOutput.props where to put .lib  → dist\<platform>\lib
│   └── ExeOutput.props where to put .exe  → dist\<platform>\bin
├── dist\
│   └── README.md       the build puts the finished files here (only README for now)
├── graphify-out\       code relationship map (not needed for the build)
├── installer\          installer script TMC_Suite.iss and its images
├── src\
│   ├── tamic.slnx      COMMON SOLUTION — all 12 projects
│   ├── Include\        common headers (.h)
│   ├── libs\           6 libraries
│   ├── viewers\        3 viewers
│   ├── kernels\        2 compute kernels
│   └── fieldview\      FieldView
├── BUILD_ORDER.md      short build map
├── CHANGELOG.md        change history
├── LICENSE, NOTICE     Apache 2.0 license
└── README.md

Project files (12 in total) that are part of the solution src\tamic.slnx:

Group Project (file) Folder What you get
Library SFILE95.vcxproj src\libs\SFILE95 SFILE95.lib
Library complex.vcxproj src\libs\complex complex.lib
Library exprint.vcxproj src\libs\exprint exprint.lib
Library TMCLibError.vcxproj src\libs\TMCLibError TMCLibError.lib
Library Prepr.vcxproj src\libs\PREPR Prepr.lib
Library TMCIndan.vcxproj src\libs\TMCIndan TMCIndan.lib
Viewer TMCROS.vcxproj src\viewers\Tmcrtout TMCROS.exe — time signals
Viewer TMCGROUT.vcxproj src\viewers\Tmcgrout TMCGROUT.exe — scattering matrices
Viewer TMC_DN.vcxproj src\viewers\DiaNapGr TMC_DN.exe — radiation patterns
Kernel PlanRT_H.vcxproj src\kernels\PlanarRT_H tmc_rth.exe — H-polarization
Kernel PlanRT_X.vcxproj src\kernels\PlanarRT_X tmc_rtx.exe — X-mode
Visualization FldView.vcxproj src\fieldview FieldView.exe — fields (OpenGL)

Quick check in PowerShell (in the folder C:\src\TMC_Suite):

Test-Path .\src\tamic.slnx
(Get-ChildItem .\src -Recurse -Filter *.vcxproj).Count

The first command should answer True, the second — 12.

What the repository does not contain (and this is normal)

  • Finished programs (.exe, .lib) — they are created by the build; ready-made builds are published separately in the Releases section.
  • Sample task files (samples\) and the user manual in HTML (docs\) — they are not published in the repository. To check the build in step 5, a short test task file is given; what to do with the installer without these folders is described in step 6.
  • Additional libraries (GLEW, GLFW, etc.) — FieldView uses the system opengl32.lib and glu32.lib from the Windows SDK.

About the encoding of the sources

The .cpp, .h, .rc files contain Russian comments and strings in the Windows-1251 encoding. If you open them in Visual Studio, do not re-save anything in another encoding: this can corrupt the Russian strings in the program resources.

Next — Step 3. Building in Visual Studio or Step 4. Building from the command line.