Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Tools/Niklas-Excon-Helper/branch_helper.py
T
torsten d5c13033e2 Session 022: Migrate Lts/Tools (72 submodules) to Qt6
- Copied complete Lts/Tools directory from qt5-before to qt6-after
- Updated 32 CMakeLists.txt files (Qt5:: → Qt6::)
- Tools subdirectory already included in parent Lts/CMakeLists.txt
- All 72 tool submodules now present in qt6-migrated-legatus
- Includes: Adler, ArAssets, ConfigX, DBAdministration, DBUpdate,
  DdsView, InfrastructureManagement, and 67 more tools
- C++17 standard (RTI 7.7.0 compatibility maintained)
- Tests deferred until final validation phase

Migration progress:
✅ Lts/Application (68 files)
✅ Lts/DDS (verified Qt6-ready)
✅ Lts/Plugins (60 submodules, verified)
✅ Lts/Projects (5 submodules, verified)
✅ Lts/Proxies (13 submodules, verified)
✅ Lts/Services (47 submodules, verified)
✅ Lts/Tools (72 submodules, copied + CMake updated)
✅ Lts/Viewer (LtsFileDialog, LtsReportDisplay, SituationMap)
🟡 TetraIF (partial)
🟡 Z (partial: nglwidgets, QtSingleApplication, qsql_informix, WMS_Interface)
2026-08-25 14:07:20 +02:00

105 lines
3.6 KiB
Python
Executable File

from prompt_toolkit import prompt
import concurrent.futures
import network
import settings
import local
from rich.table import Table
from rich.console import Console
def switch_branch(verbose):
tds = settings.get_setting("tds")
tds_user = settings.get_setting("tds_user")
tds_pass = settings.get_setting("tds_pass")
branches_list = network.list_branches(tds, tds_user, tds_pass)
table = Table(title="Branches")
table.add_column("Branches")
for branch in branches_list:
table.add_row(branch)
branch_name = prompt('Branch name:')
if branch_name not in branches_list:
print("choose branch from the list!")
switch_branch(verbose)
def add_branch(verbose):
localhost = False
tds = settings.get_setting("tds")
if tds == "localhost":
localhost = True
tds_user = settings.get_setting("tds_user")
tds_pass = settings.get_setting("tds_pass")
dbs = settings.get_setting("dbs")
dbs_user = settings.get_setting("dbs_user")
dbs_pass = settings.get_setting("dbs_pass")
branch_url = prompt('SVN URL:')
project_name_p= prompt("Project Name(y/n)(Standard is guez):")
project_name = "guez"
guez_mode= True
build_ws= True
build_sv= True
build_hla= False
if prompt("GÜZ Mode(y/n)(Standard is ON):") == "n":
guez_mode = False
if prompt("Build WS(y/n)(Standard is ON):") == "n":
build_ws = False
if prompt("Build SV(y/n)(Standard is ON):") == "n":
build_sv = False
if prompt("Build HLA(y/n)(Standard is OFF):") == "y":
build_hla=True
if project_name_p != "":
project_name=project_name_p
console = Console()
with console.status("[bold green]Adding branch..."):
with concurrent.futures.ProcessPoolExecutor() as executor:
if not localhost:
branch_name = network.add_branch(tds, tds_user, tds_pass, branch_url)
console.log("Adding Folders on Server and SVN Checkout complete.")
executor.submit(build_remote(tds, tds_user, tds_pass, branch_name, project_name, guez_mode, build_ws, build_sv, build_hla))
console.log("Building on Server complete.(SRC and Test-DB)")
branch_name = local.add_branch(branch_url)
if branch_name:
console.log("Adding Folders on local machine and SVN Checkout complete.")
else:
return
if executor.submit(build_local(project_name, guez_mode, build_ws, build_sv, build_hla, branch_name)):
console.log("Building on local machine complete.")
else:
return
if not localhost:
db_name = network.checkLtsccConf(tds, tds_user, tds_pass, "DatabaseName")
network.save_db(dbs, dbs_user, dbs_pass, db_name, verbose)
console.log("Saving old db complete.")
network.editLtsccConf(tds, tds_user, tds_pass, "DatabaseName", f'{branch_name}_db')
console.log("Editing new DB to lts-cc.conf complete.")
console.log("Build Test DB complete.")
settings.set_setting("current_branch", branch_name)
def build_remote(tds, tds_user, tds_pass, branch_name, project_name, guez_mode, build_ws, build_sv, build_hla):
network.build_branch(tds, tds_user, tds_pass, branch_name, project_name, guez_mode, build_ws, build_sv, build_hla)
network.build_test_db(tds,tds_user,tds_pass, branch_name)
def build_local(project_name, guez_mode, build_ws, build_sv, build_hla, branch_name):
local.build_branch(branch_name, project_name, guez_mode, build_ws, build_sv, build_hla)