Adds rpm specs to migration repo
This commit is contained in:
1 parent
acee7b8766
commit
7f035543e2
145 files changed
+13982
No files matched your search
Executable
+146
@@ -0,0 +1,146 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
#ifndef sourceDir
|
||||
#define sourceDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-rpm'
|
||||
#endif
|
||||
|
||||
#ifndef buildDir
|
||||
#define buildDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-build-rpm'
|
||||
#endif
|
||||
|
||||
#ifndef instDir
|
||||
#define instDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-inst'
|
||||
#endif
|
||||
|
||||
#ifndef licenceDir
|
||||
#define licenceDir='T:\Jenkins\workspace\TDS-OC-64-Trunk\TDS-rpm\Lts\Projects\Guez'
|
||||
#endif
|
||||
|
||||
#ifndef helpDir
|
||||
#define helpDir='T:\OnlineHelp\guez'
|
||||
#endif
|
||||
|
||||
#ifndef dbname
|
||||
#define dbName='guez_pro_db.sql'
|
||||
#endif
|
||||
|
||||
#ifndef Version
|
||||
#define Version="7.2"
|
||||
#endif
|
||||
|
||||
AppId={{3F4F4542-E83F-4414-8D3D-AF18E2F795F6}
|
||||
AppName=GÜZ Ausbilderterminal
|
||||
AppVersion={#Version}
|
||||
AppPublisher=LifeMaps GmbH
|
||||
AppPublisherURL=life-maps.com/de/lifemaps/company/divisions_and_subsidiaries/lifemaps/index.php
|
||||
AppSupportURL=life-maps.com/de/lifemaps/company/divisions_and_subsidiaries/lifemaps/index.php
|
||||
AppUpdatesURL=life-maps.com/de/lifemaps/company/divisions_and_subsidiaries/lifemaps/index.php
|
||||
Compression=lzma
|
||||
DefaultDirName=C:\LifeMaps\Lts
|
||||
DisableDirPage=yes
|
||||
DefaultGroupName=GÜZ Ausbilderterminal
|
||||
DisableProgramGroupPage=yes
|
||||
OutputBaseFilename=GÜZ_Ausbilderterminal_{#SetupSetting("AppVersion")}
|
||||
SetupIconFile={#sourceDir}\Lts\Plugins\Styles\Light\resources\icons\16x16\rde.ico
|
||||
SolidCompression=yes
|
||||
UsePreviousAppDir=no
|
||||
UsePreviousGroup=no
|
||||
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
|
||||
|
||||
[Types]
|
||||
Name: full; Description: "Full installation";
|
||||
Name: custom; Description: "Custom installation"; Flags: isCustom
|
||||
|
||||
[Components]
|
||||
Name: ABT; Description: ABT Application; Types: full
|
||||
#ifndef noHelp
|
||||
Name: HELP; Description: Online Help; Types: full
|
||||
#endif
|
||||
|
||||
#ifndef noSV
|
||||
Name: SV; Description: Server Services; Types: full
|
||||
#endif
|
||||
|
||||
#ifndef noDB
|
||||
Name: DB; Description: Database; Types: full
|
||||
#endif
|
||||
[Files]
|
||||
;Component WS
|
||||
Source: "{#instDir}\srt\*"; DestDir: "{app}\WS"; Components: ABT; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "{#buildDir}\lts-cc.conf"; DestDir: "{app}\"; Components: ABT; Flags: ignoreversion
|
||||
|
||||
#ifndef noSV
|
||||
;Component SV
|
||||
Source: "{#instDir}\srv\*"; DestDir: "{app}\SV\"; Components: SV; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
;Source: "{#buildDir}\lts-cc.conf"; DestDir: "{app}\"; Components: SV; Flags: ignoreversion ; Do not copy on SV
|
||||
Source: "{#sourceDir}\Lts\Proxies\TrainingAreaBaseOC\taboc.dat"; DestDir: "{app}\SV\"; Components: SV; Flags: ignoreversion
|
||||
Source: "{#licenceDir}\oc_licence_file.crl"; DestDir: "{app}\SV\share\Lts\Licence"; Components: SV; Flags: ignoreversion
|
||||
Source: "{#licenceDir}\licence_file.crl"; DestDir: "{app}\SV\share\Lts\Licence"; Components: SV; Flags: ignoreversion
|
||||
#endif
|
||||
|
||||
#ifndef noHelp
|
||||
;Component HELP
|
||||
Source: "{#helpDir}\share\*"; DestDir: "{app}\WS\share"; Components: HELP; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
#endif
|
||||
|
||||
;Component DB
|
||||
#ifndef noDB
|
||||
Source: "{#buildDir}\bin\test\create_excon_db.py"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
||||
Source: "{#buildDir}\bin\test\init_db_users_grants.sql"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
||||
Source: "{#buildDir}\bin\test\init_db_procedures.sql"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
||||
Source: "{#instDir}\{#dbName}"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
||||
Source: "{#buildDir}\lts-cc.conf"; DestDir: "{app}\DB"; Components: DB; Flags: ignoreversion
|
||||
#endif
|
||||
|
||||
;Source: "Redist\vc_redist.x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall
|
||||
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\Legatus EXCON"; Filename: "{app}\OperatorApplication.exe"
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\WS\vc_redist.x64.exe"; Check: VCRedistNeedsInstall
|
||||
[Run]
|
||||
#ifndef noDB
|
||||
Filename: "cmd"; Parameters: "/c{app}\DB\create_excon_db.py -d lts_ets_pro -p guez -f {#dbName}"; WorkingDir: "{app}\DB"; Components: DB; Flags: waituntilterminated
|
||||
#endif
|
||||
|
||||
[Code]
|
||||
#IFDEF UNICODE
|
||||
#DEFINE AW "W"
|
||||
#ELSE
|
||||
#DEFINE AW "A"
|
||||
#ENDIF
|
||||
type
|
||||
INSTALLSTATE = Longint;
|
||||
const
|
||||
INSTALLSTATE_INVALIDARG = -2; { An invalid parameter was passed to the function. }
|
||||
INSTALLSTATE_UNKNOWN = -1; { The product is neither advertised or installed. }
|
||||
INSTALLSTATE_ADVERTISED = 1; { The product is advertised but not installed. }
|
||||
INSTALLSTATE_ABSENT = 2; { The product is installed for a different user. }
|
||||
INSTALLSTATE_DEFAULT = 5; { The product is installed for the current user. }
|
||||
|
||||
VC_2017_REDIST_X64 = '{F106B700-BFF8-3065-B305-14D36AD40539}';
|
||||
|
||||
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
|
||||
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
|
||||
|
||||
function VCVersionInstalled(const ProductID: string): Boolean;
|
||||
begin
|
||||
Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
|
||||
end;
|
||||
|
||||
function VCRedistNeedsInstall: Boolean;
|
||||
begin
|
||||
Result := VCVersionInstalled(VC_2017_REDIST_X64);
|
||||
end;
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
#
|
||||
# spec file for package GeographicLib
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name GeographicLib
|
||||
%define ctc_name ctc_%{real_name}
|
||||
|
||||
Name: %{ctc_name}
|
||||
#BuildRequires: -
|
||||
Provides: %{ctc_name}
|
||||
Url: http://geographiclib.sourceforge.net/
|
||||
License: MIT/X11 License
|
||||
Group: System/Libraries
|
||||
Summary: Coordinate conversion library
|
||||
Version: 1.49
|
||||
Release: 1
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
%if 0%{?suse_version} < 1120
|
||||
BuildRoot: %{_tmppath}/%{real_name}-%{version}-build
|
||||
%endif
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
GeographicLib is a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for geoid height calculations, and for solving geodesic problems. It is a suitable replacement for the core functionality provided by geotrans.
|
||||
|
||||
%package devel
|
||||
#BuildRequires: -
|
||||
Requires: %{ctc_name}
|
||||
Provides: %{ctc_name}-devel
|
||||
License: LGPL v3
|
||||
Group: Development/Libraries
|
||||
Summary: Coordinate conersion library
|
||||
|
||||
%description devel
|
||||
You need this package, if you want to compile programs with GeographicLib.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{version}
|
||||
|
||||
%build
|
||||
export CURRENT_ROOT=`pwd`
|
||||
|
||||
rm -fr $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
mkdir $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cmake $CURRENT_ROOT \
|
||||
-DLIB_SUFFIX=64 \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export CURRENT_ROOT=`pwd`
|
||||
export DONT_STRIP=1
|
||||
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
make DESTDIR=%{?buildroot:%{buildroot}} install
|
||||
|
||||
%if 0%{?suse_version} < 1120
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/bin/
|
||||
%{_prefix}/sbin/geographiclib-get-geoids
|
||||
%{_prefix}/sbin/geographiclib-get-gravity
|
||||
%{_prefix}/sbin/geographiclib-get-magnetic
|
||||
%{_prefix}/lib64/
|
||||
%exclude %{_prefix}/lib64/python
|
||||
%{_prefix}/share/man/
|
||||
%{_prefix}/share/matlab/
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/include/
|
||||
%{_prefix}/lib64/cmake/
|
||||
%{_prefix}/share/doc/
|
||||
|
||||
%changelog
|
||||
* Sun Jan 23 2011 Christian Ehrlicher
|
||||
- initial version
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# spec file for package OpenSceneGraph (Version 3.1.7)
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name OpenSceneGraph
|
||||
%define ctc_name ctc_%{real_name}
|
||||
|
||||
Name: %{ctc_name}
|
||||
BuildRequires: cmake
|
||||
Provides: %{ctc_name}
|
||||
Url: http://www.openscenegraph.org/
|
||||
License: OpenSceneGraph Public License
|
||||
Group: System/Libraries
|
||||
Summary: The OpenSceneGraph is an open source high performance 3D graphics toolkit
|
||||
Version: 3.2.3
|
||||
Release: 2
|
||||
Source: %{real_name}-%{version}.zip
|
||||
%if 0%{?suse_version} < 1120
|
||||
BuildRoot: %{_tmppath}/%{real_name}-%{version}-build
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
The OpenSceneGraph is an open source high performance 3D graphics toolkit, used by application developers in fields such as visual simulation, games, virtual reality, scientific visualization and modelling. Written entirely in Standard C++ and OpenGL it runs on all Windows platforms, OSX, GNU/Linux, IRIX, Solaris, HP-Ux, AIX and FreeBSD operating systems. The OpenSceneGraph is now well established as the world leading scene graph technology, used widely in the vis-sim, space, scientific, oil-gas, games and virtual reality industries.
|
||||
|
||||
%package devel
|
||||
#BuildRequires: -
|
||||
Requires: %{name}
|
||||
Provides: ctc_%{name}-devel
|
||||
License: OpenSceneGraph Public License
|
||||
Group: Development/Libraries
|
||||
Summary: The OpenSceneGraph is an open source high performance 3D graphics toolkit
|
||||
|
||||
%description devel
|
||||
You need this package, if you want to compile programs with OSG.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{version}
|
||||
|
||||
%build
|
||||
export CURRENT_ROOT=`pwd`
|
||||
|
||||
rm -fr $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
mkdir $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cmake $CURRENT_ROOT -DDESIRED_QT_VERSION=5 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_RELWITHDEBINFO_POSTFIX="" -DCMAKE_INSTALL_PREFIX=%{_prefix}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export CURRENT_ROOT=`pwd`
|
||||
export DONT_STRIP=1
|
||||
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
make DESTDIR=%{?buildroot:%{buildroot}} install
|
||||
|
||||
%if 0%{?suse_version} < 1120
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/bin/
|
||||
%{_prefix}/lib64/
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/include/
|
||||
|
||||
%changelog
|
||||
* Sun Jan 23 2011 Christian Ehrlicher
|
||||
- initial version
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
|
||||
%define conf_dir /opt/AVS/etc
|
||||
%define project @PROJECT@
|
||||
|
||||
Name: %{project}_avs_conf-if
|
||||
Summary: AVS configuration for AVS-CNR-Interface for CNR (RadioStations)
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.de
|
||||
Packager: ctc
|
||||
Group: Applications/Configuration
|
||||
License: proprietary
|
||||
Source0: avs_conf.tgz
|
||||
Requires: %{project}_AVS_Interface
|
||||
Requires: %{project}_AVS_Root
|
||||
BuildArch: noarch
|
||||
#BuildRequires:
|
||||
|
||||
%description
|
||||
AVS configuration for AVS-CNR-Interface for CNR (RadioStations)
|
||||
|
||||
%changelog
|
||||
#* LANG=en_US.UTF-8 date +"%a %b %d %Y" text
|
||||
* Wed May 22 2019 cf
|
||||
added Vendor, changed URL.
|
||||
postinstall script differentiates between projects.
|
||||
* Thu Sep 27 2018 cf
|
||||
initial version
|
||||
|
||||
|
||||
|
||||
# -c: create toplevel directory and extract contents there
|
||||
%prep
|
||||
%setup -q -c
|
||||
|
||||
|
||||
# nothing to build
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{conf_dir}
|
||||
cp %{project}/if/*.conf %{buildroot}%{conf_dir}/
|
||||
cp %{project}/if/*.conf.in %{buildroot}%{conf_dir}/
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc)
|
||||
%{conf_dir}/AVS_Config.conf
|
||||
%{conf_dir}/AVS_Interface.conf.in
|
||||
%{conf_dir}/AVS_Root.conf
|
||||
|
||||
%post
|
||||
# For GÜZ we need to adjust the AVS_Interface.conf for each IF separately.
|
||||
%if "%{project}" == "guez"
|
||||
let stationId=$(hostname | tr a-z A-Z | sed 's/^CEF0\([0-9]\)IFR[0-9]\{2\}$/\1/')
|
||||
let fuadNet="171 + $stationId"
|
||||
fuadInterface="10.7.${fuadNet}.100"
|
||||
exconInterface="10.7.150.19${stationId}"
|
||||
sed -e s,@FUAD_INTERFACE@,${fuadInterface},g \
|
||||
-e s,@EXCON_INTERFACE@,${exconInterface},g \
|
||||
%{conf_dir}/AVS_Interface.conf.in > %{conf_dir}/AVS_Interface.conf
|
||||
%else
|
||||
cp %{conf_dir}/AVS_Interface.conf.in | %{conf_dir}/AVS_Interface.conf
|
||||
%endif
|
||||
chown ctc:ctc %{conf_dir}/AVS_Interface.conf
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm -f %{conf_dir}/AVS_Interface.conf
|
||||
fi
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# $Id: avs_conf.spec.in 49636 2020-01-28 11:13:06Z wille_m $
|
||||
# $HeadURL: svn://slssvn/TDS/branches/product/devel/trunk/specs/external/avs_conf/avs_conf.spec.in $
|
||||
#
|
||||
|
||||
%define conf_dir /opt/AVS/etc
|
||||
%define project @PROJECT@
|
||||
|
||||
Name: %{project}_avs_conf-legacy-ws
|
||||
Summary: AVS configuration for legacy workstations
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.de
|
||||
Packager: ctc
|
||||
Group: Applications/Configuration
|
||||
License: proprietary
|
||||
Source0: avs_conf.tgz
|
||||
BuildArch: noarch
|
||||
Requires: %{project}_AVS_Workstation
|
||||
Conflicts: %{project}_avs_conf-ws
|
||||
#BuildRequires:
|
||||
|
||||
|
||||
%description
|
||||
AVS configuration for legacy workstations
|
||||
|
||||
|
||||
%changelog
|
||||
#* LANG=en_US.UTF-8 date +"%a %b %d %Y" text
|
||||
* Tue Jan 28 2020 mw
|
||||
added package for legacy machines for project ahtc
|
||||
|
||||
|
||||
# -c: create toplevel directory and extract contents there
|
||||
%prep
|
||||
%setup -q -c
|
||||
|
||||
|
||||
# nothing to build
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{conf_dir}
|
||||
cp %{project}/AVS_Config.conf %{project}/AVS_DB.conf %{project}/AVS_Export.conf %{project}/AVS_Mixer.conf %{buildroot}%{conf_dir}/
|
||||
cp %{project}/AVS_Workstation_legacy.conf %{buildroot}%{conf_dir}/AVS_Workstation.conf
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc)
|
||||
%{conf_dir}/AVS_Config.conf
|
||||
%{conf_dir}/AVS_DB.conf
|
||||
%{conf_dir}/AVS_Export.conf
|
||||
%{conf_dir}/AVS_Mixer.conf
|
||||
%{conf_dir}/AVS_Workstation.conf
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
|
||||
%define conf_dir /opt/AVS/etc
|
||||
%define project @PROJECT@
|
||||
|
||||
Name: %{project}_avs_conf
|
||||
Summary: AVS configuration
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.de
|
||||
Packager: ctc
|
||||
Group: Applications/Configuration
|
||||
License: proprietary
|
||||
Source0: avs_conf.tgz
|
||||
BuildArch: noarch
|
||||
#Requires:
|
||||
#BuildRequires:
|
||||
|
||||
|
||||
%description
|
||||
dummy -- we build sub-packages only
|
||||
|
||||
|
||||
%changelog
|
||||
#* LANG=en_US.UTF-8 date +"%a %b %d %Y" text
|
||||
* Wed May 22 2019 cf
|
||||
added Vendor, changed URL
|
||||
* Fri Apr 27 2018 cf
|
||||
initial version
|
||||
|
||||
|
||||
|
||||
# -c: create toplevel directory and extract contents there
|
||||
%prep
|
||||
%setup -q -c
|
||||
|
||||
|
||||
# nothing to build
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{conf_dir}
|
||||
# copy all config files but legacy conf
|
||||
find %{project}/ ! -name AVS_Workstation_legacy.conf -name *.conf -maxdepth 1 -exec cp -t %{buildroot}%{conf_dir}/ {} +
|
||||
|
||||
|
||||
# no %files section -- we build sub-packages only
|
||||
#%files
|
||||
|
||||
|
||||
%package ws
|
||||
Summary: AVS configuration for workstations
|
||||
Requires: %{project}_AVS_Workstation
|
||||
Conflicts: %{project}_avs_conf-aar
|
||||
Conflicts: %{project}_avs_conf-legacy-ws
|
||||
%description ws
|
||||
AVS configuration for workstations
|
||||
%files ws
|
||||
%defattr(-,ctc,ctc)
|
||||
%{conf_dir}/AVS_Config.conf
|
||||
%{conf_dir}/AVS_DB.conf
|
||||
%{conf_dir}/AVS_Export.conf
|
||||
%{conf_dir}/AVS_Mixer.conf
|
||||
%{conf_dir}/AVS_Workstation.conf
|
||||
|
||||
%package aar
|
||||
Summary: AVS configuration for AAR workstations
|
||||
Requires: %{project}_AVS_Workstation
|
||||
Requires: %{project}_AVS_Root
|
||||
Requires: %{project}_AVS_Server
|
||||
Conflicts: %{project}_avs_conf-ws
|
||||
Conflicts: %{project}_avs_conf-sv
|
||||
Conflicts: %{project}_avs_conf-legacy-ws
|
||||
%description aar
|
||||
AVS configuration for AAR workstations
|
||||
%files aar
|
||||
%defattr(-,ctc,ctc)
|
||||
%{conf_dir}/AVS_Config.conf
|
||||
%{conf_dir}/AVS_DB.conf
|
||||
%{conf_dir}/AVS_Export.conf
|
||||
%{conf_dir}/AVS_Mixer.conf
|
||||
%{conf_dir}/AVS_Root.conf
|
||||
%{conf_dir}/AVS_Server.aar.conf
|
||||
%{conf_dir}/AVS_Workstation.conf
|
||||
|
||||
%post aar
|
||||
/sbin/ldconfig
|
||||
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
|
||||
ln -sf %{conf_dir}/AVS_Server.aar.conf %{conf_dir}/AVS_Server.conf
|
||||
if [ ! -e /data ]; then
|
||||
mkdir /data;
|
||||
fi
|
||||
chown ctc_ws:ctc /data
|
||||
fi
|
||||
|
||||
%preun aar
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm -f %{conf_dir}/AVS_Server.conf
|
||||
rm -rf /data
|
||||
fi
|
||||
|
||||
|
||||
%package sv
|
||||
Summary: AVS configuration for AVS-server
|
||||
Requires: %{project}_AVS_Config
|
||||
Requires: %{project}_AVS_Interface
|
||||
Requires: %{project}_AVS_MotionRecorder
|
||||
Requires: %{project}_AVS_Root
|
||||
Requires: %{project}_AVS_Server
|
||||
Requires: %{project}_AVS_TimelineConverter
|
||||
# A conditional require depending on a specific project can be done like this:
|
||||
%if "%{project}" == "some_future_project"
|
||||
Requires: %{project}_AVS_Mobilegate
|
||||
%endif
|
||||
%description sv
|
||||
AVS configuration for AVS-server
|
||||
%files sv
|
||||
%defattr(-,ctc,ctc)
|
||||
%{conf_dir}/AVS_Config.conf
|
||||
%{conf_dir}/AVS_DB.conf
|
||||
%{conf_dir}/AVS_Interface.conf
|
||||
%{conf_dir}/AVS_Mobilegate.conf
|
||||
%{conf_dir}/AVS_MotionRecorder.conf
|
||||
%{conf_dir}/AVS_Root.conf
|
||||
%{conf_dir}/AVS_Server.conf
|
||||
%{conf_dir}/AVS_TimelineConverter.conf
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
#! /bin/bash
|
||||
|
||||
#
|
||||
# Dieses Skript soll sowohl lokal in einer Working Copy als auch über Jenkins ausführbar sein.
|
||||
# Unter Jenkins soll nur dieser Ordner ausgecheckt werden.
|
||||
# Die gebauten RPMs werden von rpmbuild unter ~/rpmbuild/RPMS abgelegt.
|
||||
# Wenn sie für Jenkins zugreifbar sein sollen (für die Artefacts), müssen sie jedoch
|
||||
# irgendwo im Workspace liegen. Daher ist für die Verwendung über Jenkins ein optionaler
|
||||
# Kopier- bzw. Move-Schritt am Ende notwendig.
|
||||
#
|
||||
|
||||
determine_info_cmd()
|
||||
{
|
||||
# check whether svn or git (svn-bridge) is used:
|
||||
local is_svn=1
|
||||
local info_cmd='svn info'
|
||||
svn info >> /dev/null 2>&1 || is_svn=0
|
||||
|
||||
if [ $is_svn -eq 0 ]; then
|
||||
info_cmd='git svn info'
|
||||
fi
|
||||
|
||||
echo $info_cmd
|
||||
}
|
||||
|
||||
determine_revision()
|
||||
{
|
||||
info_cmd=$(determine_info_cmd)
|
||||
|
||||
local revision=$($info_cmd | grep "Last Changed Rev:" | cut -d ' ' -f 4)
|
||||
if [[ ! $revision -gt 0 ]]; then
|
||||
echo "Failed_to_determine_revision"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $revision
|
||||
}
|
||||
|
||||
copy_rpms()
|
||||
{
|
||||
if [[ ! -d $outdir ]]; then
|
||||
mkdir -p "$outdir"
|
||||
fi
|
||||
|
||||
rpms=($(find $rpm_builddir/RPMS -name "${project}_avs_conf-*-${version}-${revision}.*.rpm"))
|
||||
mv "${rpms[@]}" "$outdir"
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $0 [-p <project>] [-v <version>] [-o <outdir>]"
|
||||
}
|
||||
|
||||
LANG=en_US
|
||||
|
||||
project=guez
|
||||
version=1.0
|
||||
outdir=
|
||||
while getopts p:v:o:h opt_name
|
||||
do
|
||||
case $opt_name in
|
||||
p) project="$OPTARG";;
|
||||
v) version="$OPTARG";;
|
||||
o) outdir="$OPTARG";;
|
||||
h) usage; exit 0;;
|
||||
?) usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ ! -d "$project" ]]; then
|
||||
echo "Missing folder for project $project!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
revision=$(determine_revision)
|
||||
spec_file=avs_conf.spec
|
||||
spec_file_legacy=avs_conf-legacy-ws.spec
|
||||
spec_file_if=avs_conf-if.spec
|
||||
|
||||
echo "Project: ${project}, Version: ${version}.${revision}"
|
||||
|
||||
rpm_builddir=$HOME/rpmbuild
|
||||
src_dir=$rpm_builddir/SOURCES
|
||||
|
||||
[ ! -d "$src_dir" ] && mkdir -p "$src_dir"
|
||||
|
||||
# We use the same project tarball for both packages
|
||||
tar czf "$src_dir/avs_conf.tgz" $project
|
||||
cp "$src_dir/avs_conf.tgz" "$src_dir/avs_conf-if.tgz"
|
||||
|
||||
# Some projects don't need/have an AVS interface workstation and thus don't need avs_conf-if.
|
||||
spec_files_to_build=("$spec_file")
|
||||
if [[ $project != qatar ]]; then
|
||||
spec_files_to_build+=("$spec_file_if")
|
||||
fi
|
||||
if [[ $project == ahtc ]]; then
|
||||
spec_files_to_build+=("$spec_file_legacy")
|
||||
fi
|
||||
|
||||
for f in "${spec_files_to_build[@]}"; do
|
||||
sed -e s,@PROJECT@,${project},g \
|
||||
-e s,@VERSION@,${version},g \
|
||||
-e s,@RELEASE@,${revision},g \
|
||||
${f}.in > $f
|
||||
|
||||
rpmbuild -bb $f
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $?;
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n $outdir ]]; then
|
||||
copy_rpms
|
||||
fi
|
||||
|
||||
for f in "${spec_files_to_build[@]}"; do
|
||||
rm $f;
|
||||
done
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#! /bin/bash
|
||||
|
||||
#
|
||||
# Dieses Skript soll sowohl lokal in einer Working Copy als auch über Jenkins ausführbar sein.
|
||||
# Unter Jenkins soll nur dieser Ordner ausgecheckt werden.
|
||||
# Die gebauten RPMs werden von rpmbuild unter ~/rpmbuild/RPMS abgelegt.
|
||||
# Wenn sie für Jenkins zugreifbar sein sollen (für die Artefacts), müssen sie jedoch
|
||||
# irgendwo im Workspace liegen. Daher ist für die Verwendung über Jenkins ein optionaler
|
||||
# Kopier- bzw. Move-Schritt am Ende notwendig.
|
||||
#
|
||||
|
||||
|
||||
copy_rpms()
|
||||
{
|
||||
if [[ ! -d $outdir ]]; then
|
||||
mkdir -p "$outdir"
|
||||
fi
|
||||
|
||||
rpms=($(find $rpm_builddir/RPMS -name "${project}_avs_conf-*-${version}-${revision}.*.rpm"))
|
||||
mv "${rpms[@]}" "$outdir"
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $0 [-p <project>] [-v <version>] [-o <outdir>]"
|
||||
}
|
||||
|
||||
LANG=en_US
|
||||
|
||||
project=guez
|
||||
version=1.0
|
||||
outdir=
|
||||
while getopts p:v:o:h opt_name
|
||||
do
|
||||
case $opt_name in
|
||||
p) project="$OPTARG";;
|
||||
v) version="$OPTARG";;
|
||||
o) outdir="$OPTARG";;
|
||||
h) usage; exit 0;;
|
||||
?) usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ ! -d "$project" ]]; then
|
||||
echo "Missing folder for project $project!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
revision="$BUILD_NUMBER"
|
||||
spec_file=avs_conf.spec
|
||||
spec_file_legacy=avs_conf-legacy-ws.spec
|
||||
spec_file_if=avs_conf-if.spec
|
||||
|
||||
echo "Project: ${project}, Version: ${version}.${revision}"
|
||||
|
||||
rpm_builddir=$HOME/rpmbuild
|
||||
src_dir=$rpm_builddir/SOURCES
|
||||
|
||||
[ ! -d "$src_dir" ] && mkdir -p "$src_dir"
|
||||
|
||||
# We use the same project tarball for both packages
|
||||
tar czf "$src_dir/avs_conf.tgz" $project
|
||||
cp "$src_dir/avs_conf.tgz" "$src_dir/avs_conf-if.tgz"
|
||||
|
||||
# Some projects don't need/have an AVS interface workstation and thus don't need avs_conf-if.
|
||||
spec_files_to_build=("$spec_file")
|
||||
if [[ $project != qatar ]]; then
|
||||
spec_files_to_build+=("$spec_file_if")
|
||||
fi
|
||||
if [[ $project == ahtc ]]; then
|
||||
spec_files_to_build+=("$spec_file_legacy")
|
||||
fi
|
||||
|
||||
for f in "${spec_files_to_build[@]}"; do
|
||||
sed -e s,@PROJECT@,${project},g \
|
||||
-e s,@VERSION@,${version},g \
|
||||
-e s,@RELEASE@,${revision},g \
|
||||
${f}.in > $f
|
||||
|
||||
rpmbuild -bb $f
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $?;
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n $outdir ]]; then
|
||||
copy_rpms
|
||||
fi
|
||||
|
||||
for f in "${spec_files_to_build[@]}"; do
|
||||
rm $f;
|
||||
done
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[Bridge]
|
||||
ServerPort=7000
|
||||
ServerHost=localhost
|
||||
IAmServer=false
|
||||
|
||||
[ConfigServer]
|
||||
Port=8888
|
||||
|
||||
[Announcements]
|
||||
DontAnnounce=true
|
||||
|
||||
[ConfigClient]
|
||||
Server1=EXCAVS01 8888
|
||||
ListenToAnnouncements=false
|
||||
; 0.0.0.0 = any interface
|
||||
; MulticastInterface=0.0.0.0
|
||||
; AliveEnabled=true ; default false
|
||||
; AliveInterval=10 ; in s
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
[Database]
|
||||
user=ets_avm
|
||||
passwd=ctc11de
|
||||
;dbType=QSQLITE
|
||||
dbType=QPSQL
|
||||
host=EXCDBS01
|
||||
dbName=lts_ets_pro
|
||||
scheme=avm
|
||||
prePartContext=ex_
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[%General]
|
||||
;FilePath=/tmp/export
|
||||
|
||||
[RcpExport]
|
||||
Autostart=1
|
||||
OperatorTCPPort=6380
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
[TETRA]
|
||||
Enable=1
|
||||
GatewayTCPAddress=CCSTSW01
|
||||
GatewayTCPPort=52044
|
||||
GatewayRTPInterface=0.0.0.0
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
DownstreamRTPMulticastInterface=EXCAVS01
|
||||
RtpOutputPacketSize=240
|
||||
;SilenceDetectionThreshold=0x14 used in TetraSession.cpp
|
||||
;MulticastAddressRangeBegin=224.0.1.2 used in TetraSession.cpp
|
||||
;MulticastAddressRangeEnd=239.255.255.255 used in TetraSession.cpp
|
||||
;RecordingDataAccuSeconds=1 used in TetraSession.cpp *1000
|
||||
;GatewayRTPOutAddress=0.0.0.0 used in TetraSession.cpp
|
||||
;
|
||||
;General/DownstreamRTPMulticastInterface ??? used in TetraSession.cpp
|
||||
;
|
||||
; ACHTUNG: Werte fuer CNR_G711 sind nur fuer Tests und muessen angepasst werden !!!
|
||||
[CNR_G711]
|
||||
Enable=0
|
||||
GatewayTCPAddress=172.25.140.10
|
||||
GatewayTCPPort=52044
|
||||
GatewayRTPInterface=0.0.0.0
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
DownstreamRTPMulticastInterface=EXCAVS01
|
||||
RtpOutputPortOffset=100
|
||||
|
||||
[CNR_GUEZ]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=0
|
||||
OperatorTCPPort=3281
|
||||
StReFu1TCPAddress=CEVMSRF01
|
||||
StReFu1TCPPort=8300
|
||||
StReFu2TCPAddress=CEVMSRF02
|
||||
StReFu2TCPPort=8300
|
||||
FUALinkRTPOutPort=8000
|
||||
FUALinkRTPInPort=8001
|
||||
FUALinkKeepAlivePort=9001
|
||||
FUALinkRTPInterface=10.7.150.33
|
||||
FUALinkRTPOutPacketSize=320
|
||||
DownstreamRTPMulticastInterface=EXCAVS01
|
||||
SilenceDetectionThreshold=0x14
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
|
||||
[ADDAC]
|
||||
Enable=0
|
||||
RtChannelDigitalIOMapping=9: PTT[1A-0] SND[1B-0] SQU[2B-0], 10: PTT[1A-1] SND[1B-1] SQU[2B-1], 11: PTT[1A-2] SND[1B-2] SQU[2B-2], 12: PTT[1A-3] SND[1B-3] SQU[2B-3], 13: PTT[1A-4] SND[1B-4] SQU[2B-4], 14: PTT[1A-5] SND[1B-5] SQU[2B-5], 15: PTT[1A-6] SND[1B-6] SQU[2B-6], 16: PTT[1A-7] SND[1B-7] SQU[2B-7]
|
||||
|
||||
[AXISV]
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
|
||||
[AXISA]
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
SilenceDetectionThreshold=-1
|
||||
|
||||
[ONVIFV]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
EventTimeout=5
|
||||
|
||||
[ONVIFA]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
EventTimeout=5
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
SilenceDetectionThreshold=-1
|
||||
|
||||
[DEKTEC]
|
||||
Enable=1
|
||||
MaxRecordBufferSeconds=-1
|
||||
DektecDeviceRTPInterface=10.7.152.133
|
||||
DektecDeviceMulticastAddress=239.16.33.254
|
||||
|
||||
[TEST]
|
||||
Enable=0
|
||||
|
||||
[%General]
|
||||
FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[Mixer]
|
||||
input="hw:0,0"
|
||||
output="hw:0,0"
|
||||
Resample=0
|
||||
LocalFeedback="Rear Mic"
|
||||
; LocalFeedbackVolume is no longer used, we trust asound.state instead
|
||||
LocalFeedbackVolume=40
|
||||
CaptureDevice="Capture"
|
||||
InputSource="Input Source"
|
||||
MulticastInteface=0.0.0.0
|
||||
|
||||
; sounds are relative to datadir
|
||||
[Sounds]
|
||||
Busy=sounds/Busy.wav
|
||||
Incoming=sounds/IncomingCall.wav
|
||||
Outgoing=sounds/OutgoingCall.wav
|
||||
INTOutgoing=sounds/INTOutgoingCall.wav
|
||||
RTOutgoing=sounds/RTOutgoingCall.wav
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
[General]
|
||||
; if not set, the default AVS_MG-<hostname> will be used
|
||||
;name=MG1
|
||||
|
||||
[Transcoding]
|
||||
; e.g.: 25fps à 5 fps
|
||||
LowBandwidth/framerateDivisor=5
|
||||
; best encoding quality = 0, worst encoding quality = 32
|
||||
LowBandwidth/quality=20
|
||||
; will not affect DAR (display aspect ratio), dimensions must be multiple of 16
|
||||
LowBandwidth/resolution=176x144
|
||||
; default gop size is 25, only used for live streaming
|
||||
LowBandwidth/gopSize=25
|
||||
LowBandwidth/multithreaded=false
|
||||
; The sending of udp packets is spread over the duration time for each frame.
|
||||
; This will lead to a delay of 1/fps. You can limit this delay here.
|
||||
; Works only if liveBitRateLimit is not set. Only used for live streaming.
|
||||
LowBandwidth/maxSendDelayMs=1000
|
||||
; 0 = no limit, limit is achieved by delaying sends and dropping frames.
|
||||
; bitRateLimit is of higher priority than maxSendDelayMs.
|
||||
; This option helps to fight udp packets bursts when sending I-frames.
|
||||
; Only used for live streaming.
|
||||
LowBandwidth/liveBitRateLimit=0
|
||||
; Must be >= 2, greater values might lead to greater delay/jitter but may reduce frame drops
|
||||
; recommended 3
|
||||
; Only used for live streaming.
|
||||
LowBandwidth/liveFrameQueueSize=3
|
||||
|
||||
LowFramerateHighQuality/framerateDivisor=20
|
||||
LowFramerateHighQuality/quality=1
|
||||
LowFramerateHighQuality/resolution=720x576
|
||||
LowFramerateHighQuality/gopSize=30
|
||||
LowFramerateHighQuality/multithreaded=false
|
||||
LowFramerateHighQuality/maxSendDelayMs=1000
|
||||
LowFramerateHighQuality/liveBitRateLimit=0
|
||||
LowFramerateHighQuality/liveFrameQueueSize=3
|
||||
|
||||
WhatEverName/framerateDivisor=2
|
||||
WhatEverName/quality=4
|
||||
WhatEverName/resolution=704x288
|
||||
WhatEverName/gopSize=20
|
||||
WhatEverName/multithreaded=false
|
||||
WhatEverName/maxSendDelayMs=1000
|
||||
WhatEverName/liveBitRateLimit=0
|
||||
WhatEverName/liveFrameQueueSize=3
|
||||
|
||||
WhatEverName2/framerateDivisor=1
|
||||
WhatEverName2/quality=4
|
||||
WhatEverName2/resolution=704x288
|
||||
WhatEverName2/gopSize=100
|
||||
WhatEverName2/multithreaded=false
|
||||
WhatEverName2/maxSendDelayMs=1000
|
||||
WhatEverName2/liveBitRateLimit=100000
|
||||
WhatEverName2/liveFrameQueueSize=3
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
[Recorder]
|
||||
OperatorTCPPort=6390
|
||||
LeadRecordingTime=30
|
||||
FollowUpRecordingTime=10
|
||||
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
|
||||
DebugTraceEnableMotionRecorder=false
|
||||
; LogCode MREC: MotionRecorder
|
||||
DebugTraceEnableDataBaseHandling=false
|
||||
; LogCode MREC:DBH: DataBaseHandling
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
[%General]
|
||||
start_config = true
|
||||
HaveInterface = true
|
||||
HaveServer = true
|
||||
HaveWorkstation = false
|
||||
HaveExport = false
|
||||
;WorkstationUsers = <username>,<userid>,..
|
||||
EnableFMServer = true
|
||||
HaveMotionRecorder = true
|
||||
HaveTimelineConverter = true
|
||||
HaveMobilegateLive = false
|
||||
HaveMobilegatePlayback = false
|
||||
|
||||
[Management]
|
||||
halt = /sbin/shutdown -h now
|
||||
reboot = /sbin/shutdown -r now
|
||||
|
||||
[RcpFM]
|
||||
OperatorTCPPort=6360
|
||||
|
||||
[RcpAVE]
|
||||
OperatorTCPPort=6350
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
[RECORD]
|
||||
Enable=1
|
||||
|
||||
[PLAYBACK]
|
||||
Enable=1
|
||||
|
||||
[%General]
|
||||
PrivateServer=1
|
||||
PrivateRootFilePath=/data
|
||||
;FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
[RECORD]
|
||||
Enable=1
|
||||
|
||||
[PLAYBACK]
|
||||
Enable=1
|
||||
|
||||
[%General]
|
||||
;FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[WebSocket]
|
||||
Port=7020
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+325
@@ -0,0 +1,325 @@
|
||||
MaximumVideoDialogs=12
|
||||
[%General]
|
||||
windowMode=decorated
|
||||
; decorated - with decoration and resizable
|
||||
; normal - without decoration and fixed size
|
||||
interlacingMode = verticalsmoothing
|
||||
language=de_DE
|
||||
;FdLimit=65000
|
||||
|
||||
importPath=/opt/RDE_AVS_NGL/import
|
||||
|
||||
|
||||
[AudioWindow]
|
||||
screen=0
|
||||
size=@Size(1060 755)
|
||||
corner=@Point(0 325)
|
||||
title=Audio
|
||||
windowMode=normal
|
||||
visible=true
|
||||
statusLine=false
|
||||
; shows radio traffic in a circuit
|
||||
trafficColor=#FFFF00
|
||||
; show electronic warfare traffic in a circuit
|
||||
ewColor=#FF0000
|
||||
; blinking color for radio buttons
|
||||
radioBlinkColor=#FFFF00
|
||||
; blinking color for incoming intercom calls
|
||||
intercomBlinkColor=#FFFF00
|
||||
; color of a voice channel button while sending
|
||||
airtimeColor=#00FF00
|
||||
; color of a voice channel button when sending is denied
|
||||
deniedColor=#FF0000
|
||||
; color of an overridden button
|
||||
overrideColor=#0000FF
|
||||
|
||||
[VideoWindows]
|
||||
; After switching from overview to a single video the overview will be removed after x seconds
|
||||
overviewTimeout=10
|
||||
|
||||
; Video Live
|
||||
CTCVideo-1\screen=1
|
||||
CTCVideo-1\size=@Size(1920 1080)
|
||||
CTCVideo-1\corner=@Point(0 0)
|
||||
CTCVideo-1\vectorColor=#FFFFFF
|
||||
CTCVideo-1\backgroundColor=#202000
|
||||
CTCVideo-1\videoBackgroundColor=#000080
|
||||
CTCVideo-1\videoStandByColor=#000040
|
||||
CTCVideo-1\liveFrameColor=#404040
|
||||
CTCVideo-1\liveTextColor=#FFFFFF
|
||||
CTCVideo-1\playbackFrameColor=#800080
|
||||
CTCVideo-1\playbackTextColor=#FFFFFF
|
||||
CTCVideo-1\importFrameColor=#808000
|
||||
CTCVideo-1\importTextColor=#000000
|
||||
CTCVideo-1\visible=false
|
||||
CTCVideo-1\title=Video 1
|
||||
CTCVideo-1\windowMode=normal
|
||||
CTCVideo-1\statusLine=true
|
||||
CTCVideo-1\timeFormat=dtg
|
||||
|
||||
; Video Playback
|
||||
CTCPlayback-1\screen=2
|
||||
CTCPlayback-1\size=@Size(1920 1080)
|
||||
CTCPlayback-1\corner=@Point(0 0)
|
||||
CTCPlayback-1\vectorColor=#FFFFFF
|
||||
CTCPlayback-1\backgroundColor=#202000
|
||||
CTCPlayback-1\videoBackgroundColor=#000080
|
||||
CTCPlayback-1\videoStandByColor=#000040
|
||||
CTCPlayback-1\liveFrameColor=#404040
|
||||
CTCPlayback-1\liveTextColor=#FFFFFF
|
||||
CTCPlayback-1\playbackFrameColor=#800080
|
||||
CTCPlayback-1\playbackTextColor=#FFFFFF
|
||||
CTCPlayback-1\importFrameColor=#808000
|
||||
CTCPlayback-1\importTextColor=#000000
|
||||
CTCPlayback-1\visible=false
|
||||
CTCPlayback-1\title=Playback 1
|
||||
CTCPlayback-1\windowMode=normal
|
||||
CTCPlayback-1\statusLine=true
|
||||
CTCPlayback-1\timeFormat=dtg
|
||||
|
||||
; CTCPlayback-2 is used for Audio Playback.
|
||||
; Not configured here as it will never be visible.
|
||||
|
||||
; Video Playback for Presentation
|
||||
CTCPresentation-1\screen=0
|
||||
CTCPresentation-1\size=@Size(1920 1080)
|
||||
CTCPresentation-1\corner=@Point(0 0)
|
||||
CTCPresentation-1\vectorColor=#FFFFFF
|
||||
CTCPresentation-1\backgroundColor=#202000
|
||||
CTCPresentation-1\videoBackgroundColor=#000080
|
||||
CTCPresentation-1\videoStandByColor=#000040
|
||||
CTCPresentation-1\liveFrameColor=#404040
|
||||
CTCPresentation-1\liveTextColor=#FFFFFF
|
||||
CTCPresentation-1\playbackFrameColor=#800080
|
||||
CTCPresentation-1\playbackTextColor=#FFFFFF
|
||||
CTCPresentation-1\importFrameColor=#808000
|
||||
CTCPresentation-1\importTextColor=#000000
|
||||
CTCPresentation-1\visible=false
|
||||
CTCPresentation-1\title=Playback 1
|
||||
CTCPresentation-1\windowMode=normal
|
||||
CTCPresentation-1\statusLine=true
|
||||
CTCPresentation-1\timeFormat=dtg
|
||||
|
||||
; CTCPresentation-2 is used for Audio Presentation.
|
||||
; Not configured here as it will never be visible.
|
||||
|
||||
; Video Live
|
||||
CTCVideo-2\screen=0
|
||||
CTCVideo-2\size=@Size(1920 325)
|
||||
CTCVideo-2\corner=@Point(0 0)
|
||||
CTCVideo-2\vectorColor=#FFFFFF
|
||||
CTCVideo-2\backgroundColor=#202000
|
||||
CTCVideo-2\videoBackgroundColor=#000080
|
||||
CTCVideo-2\videoStandByColor=#000040
|
||||
CTCVideo-2\liveFrameColor=#404040
|
||||
CTCVideo-2\liveTextColor=#FFFFFF
|
||||
CTCVideo-2\playbackFrameColor=#800080
|
||||
CTCVideo-2\playbackTextColor=#FFFFFF
|
||||
CTCVideo-2\importFrameColor=#808000
|
||||
CTCVideo-2\importTextColor=#000000
|
||||
CTCVideo-2\visible=true
|
||||
CTCVideo-2\title=Video 2
|
||||
CTCVideo-2\windowMode=normal
|
||||
CTCVideo-2\statusLine=true
|
||||
CTCVideo-2\timeFormat=dtg
|
||||
|
||||
; Video Live
|
||||
CTCVideo-3\screen=0
|
||||
CTCVideo-3\size=@Size(860 755)
|
||||
CTCVideo-3\corner=@Point(1060 325)
|
||||
CTCVideo-3\vectorColor=#FFFFFF
|
||||
CTCVideo-3\backgroundColor=#202000
|
||||
CTCVideo-3\videoBackgroundColor=#000080
|
||||
CTCVideo-3\videoStandByColor=#000040
|
||||
CTCVideo-3\liveFrameColor=#404040
|
||||
CTCVideo-3\liveTextColor=#FFFFFF
|
||||
CTCVideo-3\playbackFrameColor=#800080
|
||||
CTCVideo-3\playbackTextColor=#FFFFFF
|
||||
CTCVideo-3\importFrameColor=#808000
|
||||
CTCVideo-3\importTextColor=#000000
|
||||
CTCVideo-3\visible=true
|
||||
CTCVideo-3\title=Video 3
|
||||
CTCVideo-3\windowMode=normal
|
||||
CTCVideo-3\statusLine=true
|
||||
CTCVideo-3\timeFormat=dtg
|
||||
|
||||
; Video Live
|
||||
CTCVideo-4\screen=0
|
||||
CTCVideo-4\size=@Size(1060 755)
|
||||
CTCVideo-4\corner=@Point(0 325)
|
||||
CTCVideo-4\vectorColor=#FFFFFF
|
||||
CTCVideo-4\backgroundColor=#202000
|
||||
CTCVideo-4\videoBackgroundColor=#000080
|
||||
CTCVideo-4\videoStandByColor=#000040
|
||||
CTCVideo-4\liveFrameColor=#404040
|
||||
CTCVideo-4\liveTextColor=#FFFFFF
|
||||
CTCVideo-4\playbackFrameColor=#800080
|
||||
CTCVideo-4\playbackTextColor=#FFFFFF
|
||||
CTCVideo-4\importFrameColor=#808000
|
||||
CTCVideo-4\importTextColor=#000000
|
||||
CTCVideo-4\visible=false
|
||||
CTCVideo-4\title=Video 4
|
||||
CTCVideo-4\windowMode=normal
|
||||
CTCVideo-4\statusLine=true
|
||||
CTCVideo-4\timeFormat=dtg
|
||||
|
||||
; Import
|
||||
CTCImport\screen=0
|
||||
CTCImport\size=@Size(860 755)
|
||||
CTCImport\corner=@Point(1060 325)
|
||||
CTCImport\vectorColor=#FFFFFF
|
||||
CTCImport\backgroundColor=#202000
|
||||
CTCImport\videoBackgroundColor=#000080
|
||||
CTCImport\videoStandByColor=#000040
|
||||
CTCImport\liveFrameColor=#404040
|
||||
CTCImport\liveTextColor=#FFFFFF
|
||||
CTCImport\playbackFrameColor=#800080
|
||||
CTCImport\playbackTextColor=#FFFFFF
|
||||
CTCImport\importFrameColor=#808000
|
||||
CTCImport\importTextColor=#000000
|
||||
CTCImport\visible=false
|
||||
CTCImport\title=Video Import
|
||||
CTCImport\windowMode=normal
|
||||
CTCImport\statusLine=true
|
||||
CTCImport\timeFormat=dtg
|
||||
|
||||
[PedalSwitch]
|
||||
interface=/dev/ttyS0
|
||||
|
||||
[Intercom]
|
||||
port=8000
|
||||
|
||||
[AVS_Interface]
|
||||
radioAddressType=unicast
|
||||
videoAddressType=unicast
|
||||
|
||||
[AVS_MotionRecorder]
|
||||
;MotionRecorder Settings
|
||||
Host="EXCAVS01"
|
||||
Port=6390
|
||||
|
||||
[AVS_Mixer]
|
||||
;Factors for weighting the volume of these channels; range => 0.0 .. 1.0
|
||||
avChannelFactor=1.0
|
||||
signalToneFactor=0.5
|
||||
rtChannelFactor=1.0
|
||||
announcementChannelFactor=1.0
|
||||
intercomFactor=1.0
|
||||
|
||||
[TextOverlayTemplates]
|
||||
;
|
||||
; topleft
|
||||
;
|
||||
;
|
||||
; this template is called "topleft". Template names
|
||||
; must not contain special characters like '";, \n\t' and so on.
|
||||
|
||||
topleft/initiallyVisible=true
|
||||
|
||||
; text will be drawn inside margin,
|
||||
; margin is given in pixels
|
||||
topleft/margin/top=20
|
||||
topleft/margin/left=20
|
||||
topleft/margin/right=20
|
||||
topleft/margin/bottom=20
|
||||
|
||||
; normalized position coordinates are in the range [0.0-1.0]
|
||||
topleft/posX=0.0
|
||||
topleft/posY=0.0
|
||||
topleft/width=1.0 ; entire margin
|
||||
|
||||
; colors are given in #aarrggbb with each of a, r, g and b are
|
||||
; given as a hexadecimal digit
|
||||
topleft/clrText=#ffffffff ;opaque white
|
||||
topleft/clrBack=#a00a0a0a ;transparent dark grey
|
||||
|
||||
; break lines on word boundaries
|
||||
topleft/wordbreak=true
|
||||
|
||||
; following alignFlags can be x-ored
|
||||
; alignLeft=0x1
|
||||
; alignRight=0x2
|
||||
; alignHCenter=0x4
|
||||
; alignTop=0x8
|
||||
; alignBottom=0x10
|
||||
; alignVCenter=0x20
|
||||
topleft/alignFlags=0x9
|
||||
|
||||
; Default, Helvetica, Times, ...
|
||||
topleft/font/family=Default
|
||||
; possible values for weight: light, normal, demibold, bold, black
|
||||
topleft/font/weight=normal
|
||||
|
||||
; normalized (1.0 = margin height), will be superseded
|
||||
; by <template name>/font/ptSize if present
|
||||
topleft/font/relHeight=0.1
|
||||
|
||||
; this supersedes above <template name>/font/relHeight
|
||||
topleft/font/ptSize=14.0
|
||||
|
||||
; in pixels, for some kind of poor man's 3d-effect
|
||||
topleft/font/shadowWidth=0
|
||||
|
||||
topleft/font/italic=false
|
||||
topleft/font/underline=false
|
||||
|
||||
|
||||
;
|
||||
; bottomcenter
|
||||
;
|
||||
;
|
||||
; this template is called "bottomcenter". Template names
|
||||
; must not contain special characters like '";, \n\t' and so on.
|
||||
|
||||
bottomcenter/initiallyVisible=true
|
||||
|
||||
; text will be drawn inside margin,
|
||||
; margin is given in pixels
|
||||
bottomcenter/margin/top=20;
|
||||
bottomcenter/margin/left=20;
|
||||
bottomcenter/margin/right=20;
|
||||
bottomcenter/margin/bottom=20;
|
||||
|
||||
; normalized position coordinates are in the range [0.0-1.0]
|
||||
bottomcenter/posX=0.5
|
||||
bottomcenter/posY=1.0
|
||||
bottomcenter/width=1.0 ; entire margin
|
||||
|
||||
; colors are given in #aarrggbb with each of a, r, g and b are
|
||||
; given as a hexadecimal digit
|
||||
bottomcenter/clrText=#ff000000 ;opaque black
|
||||
bottomcenter/clrBack=#a0ffffff ;transparent white
|
||||
|
||||
; break lines on word boundaries
|
||||
bottomcenter/wordbreak=true
|
||||
|
||||
; following alignFlags can be x-ored
|
||||
; alignLeft=0x1
|
||||
; alignRight=0x2
|
||||
; alignHCenter=0x4
|
||||
; alignTop=0x8
|
||||
; alignBottom=0x10
|
||||
; alignVCenter=0x20
|
||||
bottomcenter/alignFlags=0x14
|
||||
|
||||
; Default, Helvetica, Times, ...
|
||||
bottomcenter/font/family=Default
|
||||
; possible values for weight: light, normal, demibold, bold, black
|
||||
bottomcenter/font/weight=normal
|
||||
|
||||
; normalized (1.0 = margin height), will be superseded
|
||||
; by <template name>/font/ptSize if present
|
||||
bottomcenter/font/relHeight=0.05
|
||||
|
||||
; this supersedes above <template name>/font/relHeight
|
||||
bottomcenter/font/ptSize=14.0
|
||||
|
||||
; in pixels, for some kind of poor man's 3d-effect
|
||||
bottomcenter/font/shadowWidth=0
|
||||
|
||||
bottomcenter/font/italic=false
|
||||
bottomcenter/font/underline=false
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
[Bridge]
|
||||
ServerPort=7000
|
||||
ServerHost=localhost
|
||||
IAmServer=false
|
||||
|
||||
[ConfigServer]
|
||||
Port=8888
|
||||
|
||||
[Announcements]
|
||||
DontAnnounce=true
|
||||
|
||||
[ConfigClient]
|
||||
Server1=10.7.150.33 8888
|
||||
ListenToAnnouncements=false
|
||||
; 0.0.0.0 = any interface
|
||||
; MulticastInterface=0.0.0.0
|
||||
AliveEnabled=true ; default false
|
||||
AliveInterval=10 ; in s
|
||||
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
[Network]
|
||||
AvsInterfaceShouldBindThisInstance=0
|
||||
|
||||
[CNR_GUEZ]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=1
|
||||
OperatorTCPPort=3281
|
||||
StReFu1TCPAddress=CEVMSRF01
|
||||
StReFu1TCPPort=8300
|
||||
StReFu2TCPAddress=CEVMSRF02
|
||||
StReFu2TCPPort=8300
|
||||
FUALinkRTPOutPort=8000
|
||||
FUALinkRTPInPort=8001
|
||||
FUALinkKeepAlivePort=9001
|
||||
FUALinkRTPInterface=@FUAD_INTERFACE@
|
||||
FUALinkRTPOutPacketSize=320
|
||||
DownstreamRTPMulticastInterface=@EXCON_INTERFACE@
|
||||
SilenceDetectionThreshold=0x14
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
|
||||
[%General]
|
||||
;FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[%General]
|
||||
start_config = false
|
||||
HaveInterface = true
|
||||
HaveServer = false
|
||||
HaveWorkstation = false
|
||||
HaveExport = false
|
||||
;WorkstationUsers = <username>,<userid>,..
|
||||
EnableFMServer = false
|
||||
HaveMotionRecorder = false
|
||||
HaveTimelineConverter = false
|
||||
HaveMobilegateLive = false
|
||||
HaveMobilegatePlayback = false
|
||||
|
||||
[Management]
|
||||
halt = /sbin/shutdown -h now
|
||||
reboot = /sbin/shutdown -r now
|
||||
|
||||
[RcpFM]
|
||||
OperatorTCPPort=6360
|
||||
|
||||
[RcpAVE]
|
||||
OperatorTCPPort=6350
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[Bridge]
|
||||
ServerPort=7000
|
||||
ServerHost=localhost
|
||||
IAmServer=false
|
||||
|
||||
[ConfigServer]
|
||||
Port=8888
|
||||
|
||||
[Announcements]
|
||||
DontAnnounce=true
|
||||
|
||||
[ConfigClient]
|
||||
Server1=EXCAVS01 8888
|
||||
ListenToAnnouncements=false
|
||||
; 0.0.0.0 = any interface
|
||||
; MulticastInterface=0.0.0.0
|
||||
; AliveEnabled=true ; default false
|
||||
; AliveInterval=10 ; in s
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
[Database]
|
||||
user=ets_avm
|
||||
passwd=ctc11de
|
||||
;dbType=QSQLITE
|
||||
dbType=QPSQL
|
||||
host=EXCDBS01
|
||||
dbName=lts_ets_pro
|
||||
scheme=avm
|
||||
prePartContext=ex_
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[%General]
|
||||
;FilePath=/tmp/export
|
||||
|
||||
[RcpExport]
|
||||
Autostart=1
|
||||
OperatorTCPPort=6380
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
[TETRA]
|
||||
Enable=1
|
||||
GatewayTCPAddress=CCSTSW01
|
||||
GatewayTCPPort=52044
|
||||
GatewayRTPInterface=0.0.0.0
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
DownstreamRTPMulticastInterface=EXCAVS01
|
||||
RtpOutputPacketSize=240
|
||||
;SilenceDetectionThreshold=0x14 used in TetraSession.cpp
|
||||
;MulticastAddressRangeBegin=224.0.1.2 used in TetraSession.cpp
|
||||
;MulticastAddressRangeEnd=239.255.255.255 used in TetraSession.cpp
|
||||
;RecordingDataAccuSeconds=1 used in TetraSession.cpp *1000
|
||||
;GatewayRTPOutAddress=0.0.0.0 used in TetraSession.cpp
|
||||
;
|
||||
;General/DownstreamRTPMulticastInterface ??? used in TetraSession.cpp
|
||||
;
|
||||
; ACHTUNG: Werte fuer CNR_G711 sind nur fuer Tests und muessen angepasst werden !!!
|
||||
[CNR_G711]
|
||||
Enable=0
|
||||
GatewayTCPAddress=172.25.140.10
|
||||
GatewayTCPPort=52044
|
||||
GatewayRTPInterface=0.0.0.0
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
DownstreamRTPMulticastInterface=EXCAVS01
|
||||
RtpOutputPortOffset=100
|
||||
|
||||
[CNR_GUEZ]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=0
|
||||
OperatorTCPPort=3281
|
||||
StReFu1TCPAddress=CEVMSRF01
|
||||
StReFu1TCPPort=8300
|
||||
StReFu2TCPAddress=CEVMSRF02
|
||||
StReFu2TCPPort=8300
|
||||
FUALinkRTPOutPort=8000
|
||||
FUALinkRTPInPort=8001
|
||||
FUALinkKeepAlivePort=9001
|
||||
FUALinkRTPInterface=10.7.150.33
|
||||
FUALinkRTPOutPacketSize=320
|
||||
DownstreamRTPMulticastInterface=EXCAVS01
|
||||
SilenceDetectionThreshold=0x14
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
|
||||
[ADDAC]
|
||||
Enable=0
|
||||
RtChannelDigitalIOMapping=9: PTT[1A-0] SND[1B-0] SQU[2B-0], 10: PTT[1A-1] SND[1B-1] SQU[2B-1], 11: PTT[1A-2] SND[1B-2] SQU[2B-2], 12: PTT[1A-3] SND[1B-3] SQU[2B-3], 13: PTT[1A-4] SND[1B-4] SQU[2B-4], 14: PTT[1A-5] SND[1B-5] SQU[2B-5], 15: PTT[1A-6] SND[1B-6] SQU[2B-6], 16: PTT[1A-7] SND[1B-7] SQU[2B-7]
|
||||
|
||||
[AXISV]
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
|
||||
[AXISA]
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
SilenceDetectionThreshold=-1
|
||||
|
||||
[ONVIFV]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
EventTimeout=5
|
||||
|
||||
[ONVIFA]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=1
|
||||
Monitoring=1
|
||||
EventTimeout=5
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
SilenceDetectionThreshold=-1
|
||||
|
||||
[DEKTEC]
|
||||
Enable=1
|
||||
MaxRecordBufferSeconds=-1
|
||||
DektecDeviceRTPInterface=10.7.152.133
|
||||
DektecDeviceMulticastAddress=239.16.33.254
|
||||
|
||||
[TEST]
|
||||
Enable=0
|
||||
|
||||
[%General]
|
||||
FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[Mixer]
|
||||
input="hw:0,0"
|
||||
output="hw:0,0"
|
||||
Resample=0
|
||||
LocalFeedback="Rear Mic"
|
||||
; LocalFeedbackVolume is no longer used, we trust asound.state instead
|
||||
LocalFeedbackVolume=40
|
||||
CaptureDevice="Capture"
|
||||
InputSource="Input Source"
|
||||
MulticastInteface=0.0.0.0
|
||||
|
||||
; sounds are relative to datadir
|
||||
[Sounds]
|
||||
Busy=sounds/Busy.wav
|
||||
Incoming=sounds/IncomingCall.wav
|
||||
Outgoing=sounds/OutgoingCall.wav
|
||||
INTOutgoing=sounds/INTOutgoingCall.wav
|
||||
RTOutgoing=sounds/RTOutgoingCall.wav
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
[General]
|
||||
; if not set, the default AVS_MG-<hostname> will be used
|
||||
;name=MG1
|
||||
|
||||
[Transcoding]
|
||||
; e.g.: 25fps à 5 fps
|
||||
LowBandwidth/framerateDivisor=5
|
||||
; best encoding quality = 0, worst encoding quality = 32
|
||||
LowBandwidth/quality=20
|
||||
; will not affect DAR (display aspect ratio), dimensions must be multiple of 16
|
||||
LowBandwidth/resolution=176x144
|
||||
; default gop size is 25, only used for live streaming
|
||||
LowBandwidth/gopSize=25
|
||||
LowBandwidth/multithreaded=false
|
||||
; The sending of udp packets is spread over the duration time for each frame.
|
||||
; This will lead to a delay of 1/fps. You can limit this delay here.
|
||||
; Works only if liveBitRateLimit is not set. Only used for live streaming.
|
||||
LowBandwidth/maxSendDelayMs=1000
|
||||
; 0 = no limit, limit is achieved by delaying sends and dropping frames.
|
||||
; bitRateLimit is of higher priority than maxSendDelayMs.
|
||||
; This option helps to fight udp packets bursts when sending I-frames.
|
||||
; Only used for live streaming.
|
||||
LowBandwidth/liveBitRateLimit=0
|
||||
; Must be >= 2, greater values might lead to greater delay/jitter but may reduce frame drops
|
||||
; recommended 3
|
||||
; Only used for live streaming.
|
||||
LowBandwidth/liveFrameQueueSize=3
|
||||
|
||||
LowFramerateHighQuality/framerateDivisor=20
|
||||
LowFramerateHighQuality/quality=1
|
||||
LowFramerateHighQuality/resolution=720x576
|
||||
LowFramerateHighQuality/gopSize=30
|
||||
LowFramerateHighQuality/multithreaded=false
|
||||
LowFramerateHighQuality/maxSendDelayMs=1000
|
||||
LowFramerateHighQuality/liveBitRateLimit=0
|
||||
LowFramerateHighQuality/liveFrameQueueSize=3
|
||||
|
||||
WhatEverName/framerateDivisor=2
|
||||
WhatEverName/quality=4
|
||||
WhatEverName/resolution=704x288
|
||||
WhatEverName/gopSize=20
|
||||
WhatEverName/multithreaded=false
|
||||
WhatEverName/maxSendDelayMs=1000
|
||||
WhatEverName/liveBitRateLimit=0
|
||||
WhatEverName/liveFrameQueueSize=3
|
||||
|
||||
WhatEverName2/framerateDivisor=1
|
||||
WhatEverName2/quality=4
|
||||
WhatEverName2/resolution=704x288
|
||||
WhatEverName2/gopSize=100
|
||||
WhatEverName2/multithreaded=false
|
||||
WhatEverName2/maxSendDelayMs=1000
|
||||
WhatEverName2/liveBitRateLimit=100000
|
||||
WhatEverName2/liveFrameQueueSize=3
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
[Recorder]
|
||||
OperatorTCPPort=6390
|
||||
LeadRecordingTime=30
|
||||
FollowUpRecordingTime=10
|
||||
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
|
||||
DebugTraceEnableMotionRecorder=false
|
||||
; LogCode MREC: MotionRecorder
|
||||
DebugTraceEnableDataBaseHandling=false
|
||||
; LogCode MREC:DBH: DataBaseHandling
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
[%General]
|
||||
start_config = true
|
||||
HaveInterface = true
|
||||
HaveServer = true
|
||||
HaveWorkstation = false
|
||||
HaveExport = false
|
||||
;WorkstationUsers = <username>,<userid>,..
|
||||
EnableFMServer = true
|
||||
HaveMotionRecorder = true
|
||||
HaveTimelineConverter = true
|
||||
HaveMobilegateLive = false
|
||||
HaveMobilegatePlayback = false
|
||||
|
||||
[Management]
|
||||
halt = /sbin/shutdown -h now
|
||||
reboot = /sbin/shutdown -r now
|
||||
|
||||
[RcpFM]
|
||||
OperatorTCPPort=6360
|
||||
|
||||
[RcpAVE]
|
||||
OperatorTCPPort=6350
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
[RECORD]
|
||||
Enable=1
|
||||
|
||||
[PLAYBACK]
|
||||
Enable=1
|
||||
|
||||
[%General]
|
||||
PrivateServer=1
|
||||
PrivateRootFilePath=/data
|
||||
;FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
[RECORD]
|
||||
Enable=1
|
||||
|
||||
[PLAYBACK]
|
||||
Enable=1
|
||||
|
||||
[%General]
|
||||
;FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[WebSocket]
|
||||
Port=7020
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
MaximumVideoDialogs=12
|
||||
[%General]
|
||||
windowMode=decorated
|
||||
; decorated - with decoration and resizable
|
||||
; normal - without decoration and fixed size
|
||||
interlacingMode = verticalsmoothing
|
||||
language=de_DE
|
||||
;FdLimit=65000
|
||||
|
||||
importPath=/opt/RDE_AVS_NGL/import
|
||||
|
||||
|
||||
[AudioWindow]
|
||||
screen=0
|
||||
size=@Size(1300 1270)
|
||||
corner=@Point(0 650)
|
||||
title=Audio
|
||||
windowMode=normal
|
||||
visible=true
|
||||
statusLine=false
|
||||
; shows radio traffic in a circuit
|
||||
trafficColor=#FFFF00
|
||||
; show electronic warfare traffic in a circuit
|
||||
ewColor=#FF0000
|
||||
; blinking color for radio buttons
|
||||
radioBlinkColor=#FFFF00
|
||||
; blinking color for incoming intercom calls
|
||||
intercomBlinkColor=#FFFF00
|
||||
; color of a voice channel button while sending
|
||||
airtimeColor=#00FF00
|
||||
; color of a voice channel button when sending is denied
|
||||
deniedColor=#FF0000
|
||||
; color of an overridden button
|
||||
overrideColor=#0000FF
|
||||
|
||||
[VideoWindows]
|
||||
; After switching from overview to a single video the overview will be removed after x seconds
|
||||
overviewTimeout=10
|
||||
|
||||
; Video Live
|
||||
CTCVideo-1\screen=1
|
||||
CTCVideo-1\size=@Size(1920 1080)
|
||||
CTCVideo-1\corner=@Point(0 0)
|
||||
CTCVideo-1\vectorColor=#FFFFFF
|
||||
CTCVideo-1\backgroundColor=#202000
|
||||
CTCVideo-1\videoBackgroundColor=#000080
|
||||
CTCVideo-1\videoStandByColor=#000040
|
||||
CTCVideo-1\liveFrameColor=#404040
|
||||
CTCVideo-1\liveTextColor=#FFFFFF
|
||||
CTCVideo-1\playbackFrameColor=#800080
|
||||
CTCVideo-1\playbackTextColor=#FFFFFF
|
||||
CTCVideo-1\importFrameColor=#808000
|
||||
CTCVideo-1\importTextColor=#000000
|
||||
CTCVideo-1\visible=false
|
||||
CTCVideo-1\title=Video 1
|
||||
CTCVideo-1\windowMode=normal
|
||||
CTCVideo-1\statusLine=true
|
||||
CTCVideo-1\timeFormat=dtg
|
||||
|
||||
; Video Playback
|
||||
CTCPlayback-1\screen=2
|
||||
CTCPlayback-1\size=@Size(1920 1080)
|
||||
CTCPlayback-1\corner=@Point(0 0)
|
||||
CTCPlayback-1\vectorColor=#FFFFFF
|
||||
CTCPlayback-1\backgroundColor=#202000
|
||||
CTCPlayback-1\videoBackgroundColor=#000080
|
||||
CTCPlayback-1\videoStandByColor=#000040
|
||||
CTCPlayback-1\liveFrameColor=#404040
|
||||
CTCPlayback-1\liveTextColor=#FFFFFF
|
||||
CTCPlayback-1\playbackFrameColor=#800080
|
||||
CTCPlayback-1\playbackTextColor=#FFFFFF
|
||||
CTCPlayback-1\importFrameColor=#808000
|
||||
CTCPlayback-1\importTextColor=#000000
|
||||
CTCPlayback-1\visible=false
|
||||
CTCPlayback-1\title=Playback 1
|
||||
CTCPlayback-1\windowMode=normal
|
||||
CTCPlayback-1\statusLine=true
|
||||
CTCPlayback-1\timeFormat=dtg
|
||||
|
||||
; CTCPlayback-2 is used for Audio Playback.
|
||||
; Not configured here as it will never be visible.
|
||||
|
||||
; Video Playback for Presentation
|
||||
CTCPresentation-1\screen=0
|
||||
CTCPresentation-1\size=@Size(1920 1080)
|
||||
CTCPresentation-1\corner=@Point(0 0)
|
||||
CTCPresentation-1\vectorColor=#FFFFFF
|
||||
CTCPresentation-1\backgroundColor=#202000
|
||||
CTCPresentation-1\videoBackgroundColor=#000080
|
||||
CTCPresentation-1\videoStandByColor=#000040
|
||||
CTCPresentation-1\liveFrameColor=#404040
|
||||
CTCPresentation-1\liveTextColor=#FFFFFF
|
||||
CTCPresentation-1\playbackFrameColor=#800080
|
||||
CTCPresentation-1\playbackTextColor=#FFFFFF
|
||||
CTCPresentation-1\importFrameColor=#808000
|
||||
CTCPresentation-1\importTextColor=#000000
|
||||
CTCPresentation-1\visible=false
|
||||
CTCPresentation-1\title=Playback 1
|
||||
CTCPresentation-1\windowMode=normal
|
||||
CTCPresentation-1\statusLine=true
|
||||
CTCPresentation-1\timeFormat=dtg
|
||||
|
||||
; CTCPresentation-2 is used for Audio Presentation.
|
||||
; Not configured here as it will never be visible.
|
||||
|
||||
; Video Live
|
||||
CTCVideo-2\screen=0
|
||||
CTCVideo-2\size=@Size(2880 650)
|
||||
CTCVideo-2\corner=@Point(0 0)
|
||||
CTCVideo-2\vectorColor=#FFFFFF
|
||||
CTCVideo-2\backgroundColor=#202000
|
||||
CTCVideo-2\videoBackgroundColor=#000080
|
||||
CTCVideo-2\videoStandByColor=#000040
|
||||
CTCVideo-2\liveFrameColor=#404040
|
||||
CTCVideo-2\liveTextColor=#FFFFFF
|
||||
CTCVideo-2\playbackFrameColor=#800080
|
||||
CTCVideo-2\playbackTextColor=#FFFFFF
|
||||
CTCVideo-2\importFrameColor=#808000
|
||||
CTCVideo-2\importTextColor=#000000
|
||||
CTCVideo-2\visible=true
|
||||
CTCVideo-2\title=Video 2
|
||||
CTCVideo-2\windowMode=normal
|
||||
CTCVideo-2\statusLine=true
|
||||
CTCVideo-2\timeFormat=dtg
|
||||
;(1300 1270)
|
||||
; Video Live
|
||||
CTCVideo-3\screen=0
|
||||
CTCVideo-3\size=@Size(1580 1207)
|
||||
CTCVideo-3\corner=@Point(1300 650)
|
||||
CTCVideo-3\vectorColor=#FFFFFF
|
||||
CTCVideo-3\backgroundColor=#202000
|
||||
CTCVideo-3\videoBackgroundColor=#000080
|
||||
CTCVideo-3\videoStandByColor=#000040
|
||||
CTCVideo-3\liveFrameColor=#404040
|
||||
CTCVideo-3\liveTextColor=#FFFFFF
|
||||
CTCVideo-3\playbackFrameColor=#800080
|
||||
CTCVideo-3\playbackTextColor=#FFFFFF
|
||||
CTCVideo-3\importFrameColor=#808000
|
||||
CTCVideo-3\importTextColor=#000000
|
||||
CTCVideo-3\visible=true
|
||||
CTCVideo-3\title=Video 3
|
||||
CTCVideo-3\windowMode=normal
|
||||
CTCVideo-3\statusLine=true
|
||||
CTCVideo-3\timeFormat=dtg
|
||||
|
||||
; Video Live
|
||||
CTCVideo-4\screen=0
|
||||
CTCVideo-4\size=@Size(1060 755)
|
||||
CTCVideo-4\corner=@Point(0 325)
|
||||
CTCVideo-4\vectorColor=#FFFFFF
|
||||
CTCVideo-4\backgroundColor=#202000
|
||||
CTCVideo-4\videoBackgroundColor=#000080
|
||||
CTCVideo-4\videoStandByColor=#000040
|
||||
CTCVideo-4\liveFrameColor=#404040
|
||||
CTCVideo-4\liveTextColor=#FFFFFF
|
||||
CTCVideo-4\playbackFrameColor=#800080
|
||||
CTCVideo-4\playbackTextColor=#FFFFFF
|
||||
CTCVideo-4\importFrameColor=#808000
|
||||
CTCVideo-4\importTextColor=#000000
|
||||
CTCVideo-4\visible=false
|
||||
CTCVideo-4\title=Video 4
|
||||
CTCVideo-4\windowMode=normal
|
||||
CTCVideo-4\statusLine=true
|
||||
CTCVideo-4\timeFormat=dtg
|
||||
|
||||
; Import
|
||||
CTCImport\screen=0
|
||||
CTCImport\size=@Size(1580 1207)
|
||||
CTCImport\corner=@Point(1300 650)
|
||||
CTCImport\vectorColor=#FFFFFF
|
||||
CTCImport\backgroundColor=#202000
|
||||
CTCImport\videoBackgroundColor=#000080
|
||||
CTCImport\videoStandByColor=#000040
|
||||
CTCImport\liveFrameColor=#404040
|
||||
CTCImport\liveTextColor=#FFFFFF
|
||||
CTCImport\playbackFrameColor=#800080
|
||||
CTCImport\playbackTextColor=#FFFFFF
|
||||
CTCImport\importFrameColor=#808000
|
||||
CTCImport\importTextColor=#000000
|
||||
CTCImport\visible=false
|
||||
CTCImport\title=Video Import
|
||||
CTCImport\windowMode=normal
|
||||
CTCImport\statusLine=true
|
||||
CTCImport\timeFormat=dtg
|
||||
|
||||
[PedalSwitch]
|
||||
interface=/dev/ttyS0
|
||||
|
||||
[Intercom]
|
||||
port=8000
|
||||
|
||||
[AVS_Interface]
|
||||
radioAddressType=unicast
|
||||
videoAddressType=unicast
|
||||
|
||||
[AVS_Mixer]
|
||||
;Factors for weighting the volume of these channels; range => 0.0 .. 1.0
|
||||
avChannelFactor=1.0
|
||||
signalToneFactor=0.5
|
||||
rtChannelFactor=1.0
|
||||
announcementChannelFactor=1.0
|
||||
intercomFactor=1.0
|
||||
|
||||
[TextOverlayTemplates]
|
||||
;
|
||||
; topleft
|
||||
;
|
||||
;
|
||||
; this template is called "topleft". Template names
|
||||
; must not contain special characters like '";, \n\t' and so on.
|
||||
|
||||
topleft/initiallyVisible=true
|
||||
|
||||
; text will be drawn inside margin,
|
||||
; margin is given in pixels
|
||||
topleft/margin/top=20
|
||||
topleft/margin/left=20
|
||||
topleft/margin/right=20
|
||||
topleft/margin/bottom=20
|
||||
|
||||
; normalized position coordinates are in the range [0.0-1.0]
|
||||
topleft/posX=0.0
|
||||
topleft/posY=0.0
|
||||
topleft/width=1.0 ; entire margin
|
||||
|
||||
; colors are given in #aarrggbb with each of a, r, g and b are
|
||||
; given as a hexadecimal digit
|
||||
topleft/clrText=#ffffffff ;opaque white
|
||||
topleft/clrBack=#a00a0a0a ;transparent dark grey
|
||||
|
||||
; break lines on word boundaries
|
||||
topleft/wordbreak=true
|
||||
|
||||
; following alignFlags can be x-ored
|
||||
; alignLeft=0x1
|
||||
; alignRight=0x2
|
||||
; alignHCenter=0x4
|
||||
; alignTop=0x8
|
||||
; alignBottom=0x10
|
||||
; alignVCenter=0x20
|
||||
topleft/alignFlags=0x9
|
||||
|
||||
; Default, Helvetica, Times, ...
|
||||
topleft/font/family=Default
|
||||
; possible values for weight: light, normal, demibold, bold, black
|
||||
topleft/font/weight=normal
|
||||
|
||||
; normalized (1.0 = margin height), will be superseded
|
||||
; by <template name>/font/ptSize if present
|
||||
topleft/font/relHeight=0.1
|
||||
|
||||
; this supersedes above <template name>/font/relHeight
|
||||
topleft/font/ptSize=14.0
|
||||
|
||||
; in pixels, for some kind of poor man's 3d-effect
|
||||
topleft/font/shadowWidth=0
|
||||
|
||||
topleft/font/italic=false
|
||||
topleft/font/underline=false
|
||||
|
||||
|
||||
;
|
||||
; bottomcenter
|
||||
;
|
||||
;
|
||||
; this template is called "bottomcenter". Template names
|
||||
; must not contain special characters like '";, \n\t' and so on.
|
||||
|
||||
bottomcenter/initiallyVisible=true
|
||||
|
||||
; text will be drawn inside margin,
|
||||
; margin is given in pixels
|
||||
bottomcenter/margin/top=20;
|
||||
bottomcenter/margin/left=20;
|
||||
bottomcenter/margin/right=20;
|
||||
bottomcenter/margin/bottom=20;
|
||||
|
||||
; normalized position coordinates are in the range [0.0-1.0]
|
||||
bottomcenter/posX=0.5
|
||||
bottomcenter/posY=1.0
|
||||
bottomcenter/width=1.0 ; entire margin
|
||||
|
||||
; colors are given in #aarrggbb with each of a, r, g and b are
|
||||
; given as a hexadecimal digit
|
||||
bottomcenter/clrText=#ff000000 ;opaque black
|
||||
bottomcenter/clrBack=#a0ffffff ;transparent white
|
||||
|
||||
; break lines on word boundaries
|
||||
bottomcenter/wordbreak=true
|
||||
|
||||
; following alignFlags can be x-ored
|
||||
; alignLeft=0x1
|
||||
; alignRight=0x2
|
||||
; alignHCenter=0x4
|
||||
; alignTop=0x8
|
||||
; alignBottom=0x10
|
||||
; alignVCenter=0x20
|
||||
bottomcenter/alignFlags=0x14
|
||||
|
||||
; Default, Helvetica, Times, ...
|
||||
bottomcenter/font/family=Default
|
||||
; possible values for weight: light, normal, demibold, bold, black
|
||||
bottomcenter/font/weight=normal
|
||||
|
||||
; normalized (1.0 = margin height), will be superseded
|
||||
; by <template name>/font/ptSize if present
|
||||
bottomcenter/font/relHeight=0.05
|
||||
|
||||
; this supersedes above <template name>/font/relHeight
|
||||
bottomcenter/font/ptSize=14.0
|
||||
|
||||
; in pixels, for some kind of poor man's 3d-effect
|
||||
bottomcenter/font/shadowWidth=0
|
||||
|
||||
bottomcenter/font/italic=false
|
||||
bottomcenter/font/underline=false
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
[Bridge]
|
||||
ServerPort=7000
|
||||
ServerHost=localhost
|
||||
IAmServer=false
|
||||
|
||||
[ConfigServer]
|
||||
Port=8888
|
||||
|
||||
[Announcements]
|
||||
DontAnnounce=true
|
||||
|
||||
[ConfigClient]
|
||||
Server1=10.7.150.33 8888
|
||||
ListenToAnnouncements=false
|
||||
; 0.0.0.0 = any interface
|
||||
; MulticastInterface=0.0.0.0
|
||||
AliveEnabled=true ; default false
|
||||
AliveInterval=10 ; in s
|
||||
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
[Network]
|
||||
AvsInterfaceShouldBindThisInstance=0
|
||||
|
||||
[CNR_GUEZ]
|
||||
MaxRecordBufferSeconds=-1
|
||||
Enable=1
|
||||
OperatorTCPPort=3281
|
||||
StReFu1TCPAddress=CEVMSRF01
|
||||
StReFu1TCPPort=8300
|
||||
StReFu2TCPAddress=CEVMSRF02
|
||||
StReFu2TCPPort=8300
|
||||
FUALinkRTPOutPort=8000
|
||||
FUALinkRTPInPort=8001
|
||||
FUALinkKeepAlivePort=9001
|
||||
FUALinkRTPInterface=@FUAD_INTERFACE@
|
||||
FUALinkRTPOutPacketSize=320
|
||||
DownstreamRTPMulticastInterface=@EXCON_INTERFACE@
|
||||
SilenceDetectionThreshold=0x14
|
||||
ElokaSignalPath=/opt/AVS/data/eloka
|
||||
|
||||
[%General]
|
||||
;FdLimit=65000
|
||||
|
||||
[Logging]
|
||||
;Level=Fatal, Critical, Warning, Debug
|
||||
Level=Fatal, Critical, Warning
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
[%General]
|
||||
start_config = false
|
||||
HaveInterface = true
|
||||
HaveServer = false
|
||||
HaveWorkstation = false
|
||||
HaveExport = false
|
||||
;WorkstationUsers = <username>,<userid>,..
|
||||
EnableFMServer = false
|
||||
HaveMotionRecorder = false
|
||||
HaveTimelineConverter = false
|
||||
HaveMobilegateLive = false
|
||||
HaveMobilegatePlayback = false
|
||||
|
||||
[Management]
|
||||
halt = /sbin/shutdown -h now
|
||||
reboot = /sbin/shutdown -r now
|
||||
|
||||
[RcpFM]
|
||||
OperatorTCPPort=6360
|
||||
|
||||
[RcpAVE]
|
||||
OperatorTCPPort=6350
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# rpmbuild -bb --target=noarch bremen_buildings_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name bremen_buildings_buildingviewer
|
||||
|
||||
Summary: Bremen Buildings (BT56) for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: 1.0.0
|
||||
Release: 1
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
Obsoletes: lts_Maps_BuildingViewer_Bremen
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Bremen Buildings / BuildingViewer
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Thu Jun 27 2019 Christian Ehrlicher
|
||||
- initial, svn rev 1812
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
mv %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
Name: clazy
|
||||
Version: 1.3
|
||||
Release: 1%{?dist}
|
||||
Vendor: The KDE project
|
||||
Summary: Qt oriented code checker based on clang framework. Krazy's little brother.
|
||||
|
||||
Group: Development/Languages/C and C++
|
||||
License: LGPLv2
|
||||
URL: https://github.com/KDE/clazy
|
||||
|
||||
Source: clazy-1.3.zip
|
||||
|
||||
Requires: clang
|
||||
BuildRequires: cmake, llvm-clang, llvm-clang-devel, gcc8-c++
|
||||
|
||||
%description
|
||||
clazy is a compiler plugin which allows clang to understand Qt semantics.
|
||||
You get more than 50 Qt related compiler warnings, ranging from unneeded memory allocations to misusage of API, including fix-its for automatic refactoring.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
cd build
|
||||
CC=gcc-8 CXX=g++-8 cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
cd build
|
||||
%ninja_install
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
mv %{buildroot}/usr/man/man1/clazy.1 %{buildroot}%{_mandir}/man1/
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*
|
||||
%doc %{_datadir}/doc/clazy/*
|
||||
%doc %{_mandir}/man1/*
|
||||
|
||||
%clean
|
||||
rm -rf ${buildroot}
|
||||
|
||||
%changelog
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
Name: clazy
|
||||
Version: 1.5
|
||||
Release: 1%{?dist}
|
||||
Vendor: The KDE project
|
||||
Summary: Qt oriented code checker based on clang framework. Krazy's little brother.
|
||||
|
||||
Group: Development/Languages/C and C++
|
||||
License: LGPLv2
|
||||
URL: https://github.com/KDE/clazy
|
||||
|
||||
Source: clazy-1.5.zip
|
||||
|
||||
Requires: clang4
|
||||
BuildRequires: cmake, clang4, clang4-devel, gcc8-c++
|
||||
|
||||
%description
|
||||
clazy is a compiler plugin which allows clang to understand Qt semantics.
|
||||
You get more than 50 Qt related compiler warnings, ranging from unneeded memory allocations to misusage of API, including fix-its for automatic refactoring.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
cd build
|
||||
CC=gcc-8 CXX=g++-8 cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
cd build
|
||||
%ninja_install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*
|
||||
%doc %{_datadir}/doc/clazy/*
|
||||
%doc %{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Baut ein clazy-RPM für die mit -r angegebene Version. Aktuell werden die Version 1.3 und 1.5 unterstützt.
|
||||
# Für 1.5 braucht man zwingend clang >= 4.0.
|
||||
# Version 1.3 kann man auch noch für clang 3.8 bauen.
|
||||
#
|
||||
# Die Sourcen für die entsprechende Version werden direkt vom entsprechenden Branch auf GitHub gezogen.
|
||||
# Der Download wird mit curl durchgeführt. Damit der Download hinter dem Proxy funktioniert,
|
||||
# muss man die Umgebungsvariable https_proxy mit Username und Passwort gesetzt haben.
|
||||
#
|
||||
# @author: Christian Fröbel
|
||||
#
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "$0 -r 1.3|1.5"
|
||||
}
|
||||
|
||||
while getopts "hr:" opt; do
|
||||
case "$opt" in
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
r)
|
||||
version=${OPTARG}
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ $version != "1.3" && $version != "1.5" ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "version: $version"
|
||||
specfile=clazy-${version}.spec
|
||||
sourcedir=$(rpm --eval %{_sourcedir})
|
||||
|
||||
curl -L -o $sourcedir/clazy-${version}.zip https://github.com/KDE/clazy/archive/${version}.zip
|
||||
|
||||
# Löscht das buildroot-Verzeichnis nach erfolgreichem Build, nicht jedoch das ausgepackte Archiv.
|
||||
rpmbuild -bb $specfile || exit 1
|
||||
|
||||
# Löscht das ausgepackte Archiv.
|
||||
rpmbuild --clean $specfile
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
--- src/log4qt/logmanager.cpp.orig 2018-01-08 08:23:00.303262244 +0100
|
||||
+++ src/log4qt/logmanager.cpp 2018-01-08 08:23:19.259410697 +0100
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
// Configuration using setting Configuration
|
||||
value = InitialisationHelper::setting(QLatin1String("Configuration"));
|
||||
- if (QFile::exists(value))
|
||||
+ if (!value.isEmpty() && QFile::exists(value))
|
||||
{
|
||||
static_logger()->debug("Default initialisation configures from file '%1' specified by Configure", value);
|
||||
PropertyConfigurator::configure(value);
|
||||
--- src/log4qt/helpers/configuratorhelper.cpp.orig 2018-01-15 12:44:43.783689106 +0100
|
||||
+++ src/log4qt/helpers/configuratorhelper.cpp 2018-01-15 12:45:20.787982755 +0100
|
||||
@@ -83,7 +83,8 @@
|
||||
mConfigurationFile.setFile(rFileName);
|
||||
mpConfigureFunc = nullptr;
|
||||
delete mpConfigurationFileWatch;
|
||||
- if (!QFileInfo::exists(rFileName))
|
||||
+ mpConfigurationFileWatch = nullptr;
|
||||
+ if (rFileName.isEmpty() || !QFileInfo::exists(rFileName))
|
||||
return;
|
||||
|
||||
mpConfigureFunc = pConfigureFunc;
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
#
|
||||
# mkdir -p ctc_devel_tds_qt5/
|
||||
# cp subversion_config ctc_devel_tds_qt5/
|
||||
# cp valgrind_supressions.txt ctc_devel_tds_qt5/
|
||||
# cp git_with_committer ctc_devel_tds_qt5/
|
||||
# cp -r gdb ctc_devel_tds_qt5/
|
||||
# tar cvzf ctc_devel_tds_qt5.tgz ctc_devel_tds_qt5/
|
||||
# mkdir -p ~/rpmbuild/SOURCES/
|
||||
# cp ctc_devel_tds_qt5.tgz ~/rpmbuild/SOURCES/
|
||||
# rpmbuild -bb ctc_devel_tds_qt5-1.0.spec
|
||||
# rm -r ctc_devel_tds_qt5.tgz ctc_devel_tds_qt5/
|
||||
|
||||
Summary: CTC Development Meta-Package (Qt5 development)
|
||||
Name: ctc_devel_tds_qt5
|
||||
Version: 1.0
|
||||
Release: 25
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: ctc_devel_tds_qt5.tgz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: ctc_devel
|
||||
Requires: boost-devel
|
||||
Requires: cmake
|
||||
Requires: cmake-gui
|
||||
Requires: ctc_arcgis
|
||||
Requires: ctc_arcgis-devel
|
||||
Requires: ctc_BuildingViewer-devel
|
||||
Requires: ctc_Log4Qt-devel
|
||||
Requires: gdal-devel
|
||||
Requires: ctc_GeographicLib-devel
|
||||
Requires: libproj-devel
|
||||
Requires: ctc_rti
|
||||
Requires: ctc_rti-devel
|
||||
Requires: ctc_tmsif
|
||||
Requires: ctc_tmsif-devel
|
||||
Requires: ctc_schusstafel
|
||||
Requires: gdb
|
||||
Requires: git
|
||||
Requires: grantlee5-devel
|
||||
Requires: pkgconfig(gstreamer-1.0)
|
||||
Requires: pkgconfig(gstreamer-app-1.0)
|
||||
Requires: pkgconfig(gstreamer-video-1.0)
|
||||
Requires: python
|
||||
Requires: python-xml
|
||||
Requires: kdchart-devel
|
||||
Requires: qt5-kdreports-devel
|
||||
Requires: libGLU1
|
||||
Requires: libOpenSceneGraph-devel
|
||||
Requires: libopenssl-devel
|
||||
Requires: libpoppler-qt5-devel
|
||||
Requires: libqt5-creator
|
||||
Requires: libqt5-linguist-devel
|
||||
Requires: libqt5-qtbase-devel
|
||||
Requires: libqt5-qtdoc
|
||||
Requires: libqt5-qtlocation-devel
|
||||
Requires: libqt5-qtmultimedia-devel
|
||||
Requires: libqt5-qtquickcontrols
|
||||
Requires: libqt5-qtsensors-devel
|
||||
Requires: libqt5-qtserialport-devel
|
||||
Requires: libqt5-qtsvg-devel
|
||||
Requires: libqt5-qttools-devel
|
||||
Requires: libqt5-qtwebengine-devel
|
||||
Requires: libqt5-qtwebsockets-devel
|
||||
Requires: libqt5-qtx11extras-devel
|
||||
Requires: libqt5-qtxmlpatterns-devel
|
||||
Requires: libQt5Core-devel
|
||||
Requires: libQt5Gui-devel
|
||||
Requires: libQt5Network-devel
|
||||
Requires: libQt5OpenGL-devel
|
||||
Requires: libQt5PrintSupport-devel
|
||||
Requires: libQt5Sql-devel
|
||||
Requires: libQt5Sql5-postgresql
|
||||
Requires: libreoffice-sdk
|
||||
Requires: libuuid-devel
|
||||
Requires: mc
|
||||
Requires: ninja
|
||||
Requires: postgresql-devel
|
||||
Requires: rpm-build
|
||||
Requires: subversion
|
||||
Requires: subversion-tools
|
||||
Requires: subversion-bash-completion
|
||||
Requires: valgrind
|
||||
Requires: vlc-devel
|
||||
Requires: xsd
|
||||
|
||||
Obsoletes: ctc_OpenSceneGraph
|
||||
Obsoletes: ctc_OpenSceneGraph-devel
|
||||
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
META-RPM to install all relevant files needed to develop for TDS
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Fri Jun 14 2024 Norbert Thoden
|
||||
- add dependencie to python
|
||||
* Thu Mar 12 2020 CE
|
||||
- use gstreamer 1.x everywhere, use OSG from distribution
|
||||
* Thu Apr 02 2019 CE
|
||||
- qt5 pretty printers - python3 compatibility
|
||||
- remove some unused dependencies
|
||||
* Thu Dec 14 2017 CE
|
||||
- add pretty printers for dds types
|
||||
* Fri Mar 03 2017 CE
|
||||
- add ninja
|
||||
* Wed Nov 11 2015 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n ctc_devel_tds_qt5
|
||||
|
||||
%build
|
||||
# nothing to do here
|
||||
|
||||
%install
|
||||
mkdir -p "$RPM_BUILD_ROOT/%{prefix}shd/CTC/TOOLS/.subversion/"
|
||||
cp -r "%{_builddir}/%{buildsubdir}/subversion_config" "$RPM_BUILD_ROOT/%{prefix}shd/CTC/TOOLS/.subversion/config"
|
||||
|
||||
cp "%{_builddir}/%{buildsubdir}/valgrind_supressions.txt" "$RPM_BUILD_ROOT/%{prefix}shd/CTC/TOOLS/valgrind_supressions.txt"
|
||||
|
||||
mkdir -p "$RPM_BUILD_ROOT/%{prefix}usr/bin/"
|
||||
cp -r "%{_builddir}/%{buildsubdir}/git_with_committer" "$RPM_BUILD_ROOT/%{prefix}/usr/bin/"
|
||||
|
||||
mkdir -p "$RPM_BUILD_ROOT/%{prefix}etc/gdbinit.d/qt5"
|
||||
cp -r %{_builddir}/%{buildsubdir}/gdb/* "$RPM_BUILD_ROOT/%{prefix}etc/gdbinit.d/qt5/"
|
||||
|
||||
%clean
|
||||
# nothing to do here
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc)
|
||||
%{prefix}/shd/CTC/TOOLS/.subversion/config
|
||||
%{prefix}/shd/CTC/TOOLS/valgrind_supressions.txt
|
||||
%{prefix}/usr/bin/git_with_committer
|
||||
%{prefix}/etc/gdbinit.d/qt5
|
||||
|
||||
%pre
|
||||
%post
|
||||
if [ ! -e /shd/CTC/LOG ]; then
|
||||
mkdir -p /shd/CTC/LOG
|
||||
chown ctc:ctc /shd/CTC/LOG
|
||||
chmod 1777 /shd/CTC/LOG
|
||||
fi
|
||||
|
||||
# update ${alias_file}
|
||||
alias_file="/etc/profile.d/alias.bash"
|
||||
sed -i '/# BEGIN LTS/,/# END LTS/d' ${alias_file}
|
||||
echo "# BEGIN LTS" >> ${alias_file}
|
||||
echo "alias git=git_with_committer" >> ${alias_file}
|
||||
echo "# END LTS" >> ${alias_file}
|
||||
|
||||
# update gdbinit_file=
|
||||
gdbinit_file="/etc/gdbinit"
|
||||
sed -i '/# BEGIN LTS/,/# END LTS/d' ${gdbinit_file}
|
||||
echo "# BEGIN LTS" >> ${gdbinit_file}
|
||||
echo "source /etc/gdbinit.d/qt5/load-qt5printers.py" >> ${gdbinit_file}
|
||||
echo "source /etc/gdbinit.d/qt5/load_lts_printers.py" >> ${gdbinit_file}
|
||||
echo "# END LTS" >> ${gdbinit_file}
|
||||
|
||||
# update valgrindrc
|
||||
valgrindrc_file="%{prefix}/shd/CTC/TOOLS/.valgrindrc"
|
||||
if [ -e ${valgrindrc_file} ]; then
|
||||
sed -i '/# BEGIN LTS/,/# END LTS/d' ${valgrindrc_file}
|
||||
fi
|
||||
echo "# BEGIN LTS" >> ${valgrindrc_file}
|
||||
echo "--suppressions=%{prefix}/shd/CTC/TOOLS/valgrind_supressions.txt" >> ${valgrindrc_file}
|
||||
echo "# END LTS" >> ${valgrindrc_file}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then # execute only during uninstall, not when upgrading
|
||||
alias_file="/etc/profile.d/alias.bash"
|
||||
sed -i '/# BEGIN LTS/,/# END LTS/d' ${alias_file}
|
||||
|
||||
gdbinit_file="/etc/gdbinit"
|
||||
sed -i '/# BEGIN LTS/,/# END LTS/d' ${gdbinit_file}
|
||||
|
||||
valgrindrc_file="%{prefix}/shd/CTC/TOOLS/.valgrindrc"
|
||||
sed -i '/# BEGIN LTS/,/# END LTS/d' ${valgrindrc_file}
|
||||
fi
|
||||
%postun
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# thp_viewer.tar.bz2 muss nach /usr/src/packages/SOURCES
|
||||
# rpmbuild -bb ctc_drc-1.0.spec
|
||||
#
|
||||
Summary: CTC Apache AH64-D Data raw to xml converter
|
||||
Name: ctc_drc
|
||||
Version: 1.1
|
||||
Release: 7056
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: ctc_drc.tar.bz2
|
||||
Prefix: /
|
||||
BuildRoot: /tmp/drc
|
||||
Vendor: LifeMaps GmbH GmbH / InterCoastalElectronics Inc
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: drc
|
||||
Provides: ctc_drc
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
Executable to convert raw flight data from Apache AH64-D to xml
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Thu Apr 15 2015 CE
|
||||
- Make drc executable
|
||||
|
||||
* Fri Aug 15 2014 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n drc
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
# nothing to do here
|
||||
|
||||
%install
|
||||
mkdir -p "$RPM_BUILD_ROOT/%{prefix}/usr/bin/"
|
||||
cp -r "%{_builddir}/%{buildsubdir}/drc" "$RPM_BUILD_ROOT/%{prefix}/usr/bin/drc"
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%attr(755,-,-) "%{prefix}/usr/bin/drc"
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# spec file for package gdal (without poppler)
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
# rpmbuild -bb ctc_gdal_2.4.3.spec
|
||||
|
||||
|
||||
%define real_name gdal
|
||||
%define ctc_name ctc_%{real_name}
|
||||
|
||||
Name: %{ctc_name}
|
||||
BuildRequires: cmake
|
||||
Provides: %{real_name} , libgdal20, libgdal.so.20()(64bit), libgdal20(ppc-64)
|
||||
License: MIT AND BSD-3-Clause AND SUSE-Public-Domain
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats
|
||||
Version: 2.4.3
|
||||
Release: 1
|
||||
Source: %{real_name}-%{version}.tar.xz
|
||||
|
||||
# BuildRoot required??
|
||||
BuildRoot: %{_tmppath}/%{real_name}-%{version}-build
|
||||
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
GDAL is a translator library for raster geospatial data formats that
|
||||
is released under an Open Source license. As a library, it presents a
|
||||
single abstract data model to the calling application for all
|
||||
supported formats. The related OGR library (which lives within the
|
||||
GDAL source tree) provides a similar capability for simple features
|
||||
vector data.
|
||||
Distribution: openSUSE Leap 15.1
|
||||
|
||||
|
||||
%package devel
|
||||
#BuildRequires: -
|
||||
Requires: %{ctc_name}
|
||||
Provides: %{ctc_name}-devel
|
||||
License: MIT AND BSD-3-Clause AND SUSE-Public-Domain
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats
|
||||
|
||||
%description devel
|
||||
You need this package, if you want to compile programs with gdal
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{version}
|
||||
|
||||
%build
|
||||
export CURRENT_ROOT=`pwd`
|
||||
|
||||
# %{_prefix} -> '/usr'
|
||||
|
||||
mkdir -p %{buildroot}%{_prefix}
|
||||
|
||||
# 2022-02 : >>>Poppler support: no<<< seems to be default, but that´s the reason we are creating ctc_gdal...
|
||||
./configure --with-poppler=no --prefix=%{buildroot}%{_prefix}
|
||||
|
||||
echo "... buildroot/usr = %{buildroot}%{_prefix}"
|
||||
ls -lisa %{buildroot}%{_prefix}
|
||||
|
||||
%__make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DONT_STRIP=1
|
||||
|
||||
make install
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/bin
|
||||
%{_prefix}/etc
|
||||
%{_prefix}/lib64
|
||||
%{_prefix}/share
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/include/
|
||||
|
||||
%changelog
|
||||
* Sun Feb 20 2022 Patric Karwat
|
||||
- change Provides to: '{ real_name } , libgdal20, libgdal.so.20()(64bit), libgdal20(ppc-64)'
|
||||
* Fri Feb 19 2022 Norbert Thoden
|
||||
- initial version
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
# $Id: ctc_thp.spec 20691 2014-08-07 13:35:12Z ehrlicher $
|
||||
# $HeadURL: svn://slssvn/TDS/branches/tes_uae/devel/trunk/specs/ctc_thp.spec $
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# cd ../../Lts/Proxies/HighLevelArchitecture/
|
||||
# tar cvzf ~/rpmbuild/SOURCES/ctc_mak_rti_srv.tgz makConfig
|
||||
# cd -
|
||||
# rpmbuild --target=noarch -ba ctc_mak_rti_srv.spec
|
||||
#
|
||||
Summary: License Manager for MAK RTI
|
||||
Name: ctc_mak_rti_lm
|
||||
Version: 1.0
|
||||
Release: 1
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: ctc_mak_rti_lm.tgz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.de
|
||||
Packager: ctc
|
||||
AutoReqProv: yes
|
||||
|
||||
Requires: aksusbd
|
||||
# needed for aksusbd
|
||||
Requires: glibc-32bit
|
||||
|
||||
%description
|
||||
License Manager for MAK RTI
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Thu Sep 05 2019 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n mak-LicenseManager
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
instdir="$RPM_BUILD_ROOT/opt/NGS/mak-LicenseManager/"
|
||||
mkdir -p ${instdir}
|
||||
cp -d %{_builddir}/%{buildsubdir}/* "$instdir"
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/mak-LicenseManager/
|
||||
%attr(755,-,-) /opt/NGS/mak-LicenseManager/ctc_mak_rti_lm_systemd
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then # execute only during uninstall, not when upgrading
|
||||
systemctl stop ctc_mak_rti_lm.service
|
||||
systemctl disable ctc_mak_rti_lm.service
|
||||
fi
|
||||
|
||||
%post
|
||||
systemctl link /opt/NGS/mak-LicenseManager/ctc_mak_rti_lm.service
|
||||
systemctl restart ctc_mak_rti_lm.service
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
# $Id: ctc_thp.spec 20691 2014-08-07 13:35:12Z ehrlicher $
|
||||
# $HeadURL: svn://slssvn/TDS/branches/tes_uae/devel/trunk/specs/ctc_thp.spec $
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# cd ../../Lts/Proxies/HighLevelArchitecture/
|
||||
# tar cvzf ~/rpmbuild/SOURCES/ctc_mak_rti_srv.tgz makConfig
|
||||
# cd -
|
||||
# rpmbuild --target=noarch -ba ctc_mak_rti_srv.spec
|
||||
#
|
||||
Summary: Config settings to start/stop MAK RTI services
|
||||
Name: ctc_mak_rti_srv
|
||||
Version: 1.0
|
||||
Release: 2
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: ctc_mak_rti_srv.tgz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.de
|
||||
Packager: ctc
|
||||
AutoReqProv: yes
|
||||
|
||||
Requires: mak_rti_450
|
||||
Requires: ctc_mak_rti_lm
|
||||
|
||||
%description
|
||||
Config settings to start/stop MAK RTI services
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Thu Sep 05 2019 CE
|
||||
- fix service file
|
||||
* Fri Aug 16 2019 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n makConfig
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
instdir="$RPM_BUILD_ROOT/opt/NGS/makRti4.5-conf/"
|
||||
mkdir -p ${instdir}
|
||||
cp %{_builddir}/%{buildsubdir}/* "$instdir"
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/makRti4.5-conf/
|
||||
%attr(755,-,-) /opt/NGS/makRti4.5-conf/ctc_mak_rti_systemd
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then # execute only during uninstall, not when upgrading
|
||||
systemctl stop ctc_mak_rti.service
|
||||
systemctl disable ctc_mak_rti.service
|
||||
fi
|
||||
|
||||
%post
|
||||
systemctl link /opt/NGS/makRti4.5-conf/ctc_mak_rti.service
|
||||
systemctl restart ctc_mak_rti.service
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# rpmbuild -ba --target=noarch ctc_online_help_de.spec
|
||||
#
|
||||
|
||||
Summary: Live Simulation Training System - Online Help DE
|
||||
Name: guez_online_help_de
|
||||
Version: 1.1
|
||||
Release: 15
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: guez_online_help_de_DE.tgz
|
||||
Prefix: /shd/CTC/WS/share/Lts/help
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.lifemaps.com
|
||||
Packager: ctc
|
||||
Provides: guez_online_help_de
|
||||
Obsoletes: ctc_online_help_de
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
Live Simulation Training System - Online Help DE
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Aug 01 2022 Iuliana Ojog
|
||||
- new release Online Help new format
|
||||
* Tue Feb 01 2022 Norbert Thoden
|
||||
- new release (HTML_2022)
|
||||
* Wed Oct 13 2021 Norbert Thoden
|
||||
- new release (HTML_2021-10-12_V_2)
|
||||
* Wed Oct 12 2021 nt
|
||||
- new release with new GueZ Files (Nico)
|
||||
* Fri Oct 08 2021 pk
|
||||
- new release with new GueZ Files (MN->NT)
|
||||
* Fri Oct 08 2021 pk
|
||||
- new release with added GueZ Files
|
||||
* Wed Feb 05 2020 hjl
|
||||
- update package for ctc online help de
|
||||
* Wed Oct 10 2018 hjl
|
||||
- update package for ctc online help de
|
||||
* Wed Aug 22 2018 hjl
|
||||
- update package for ctc online help de
|
||||
* Thu Jul 26 2018 hjl
|
||||
- create package for ctc online help de
|
||||
|
||||
%prep
|
||||
%setup -q -n de_DE
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/%{prefix}"
|
||||
cp -r %{_builddir}/%{buildsubdir} %{buildroot}/%{prefix}
|
||||
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc)
|
||||
%{prefix}/de_DE
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# rpmbuild -ba --target=noarch ctc_online_help_en.spec
|
||||
#
|
||||
|
||||
Summary: Live Simulation Training System - Online Help EN
|
||||
Name: guez_online_help_en
|
||||
Version: 1.1
|
||||
Release: 15
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: guez_online_help_en_GB.tgz
|
||||
Prefix: /shd/CTC/WS/share/Lts/help
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.lifemaps.com
|
||||
Packager: ctc
|
||||
Provides: guez_online_help_en
|
||||
Obsoletes: ctc_online_help_en
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
Live Simulation Training System - Online Help EN
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y"
|
||||
* Mon Aug 01 2022 Iuliana Ojog
|
||||
- new release Online Help new format
|
||||
* Tue Feb 01 2022 pk
|
||||
- update package for ctc online help en
|
||||
* Wed Feb 05 2020 hjl
|
||||
- update package for ctc online help en
|
||||
* Wed Oct 10 2018 hjl
|
||||
- update package for ctc online help en
|
||||
* Wed Sep 12 2018 hjl
|
||||
- update package for ctc online help en
|
||||
* Thu Jul 26 2018 hjl
|
||||
- create package for ctc online help en
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n en_GB
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/%{prefix}"
|
||||
cp -r %{_builddir}/%{buildsubdir} %{buildroot}/%{prefix}
|
||||
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc)
|
||||
%{prefix}/en_GB
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# tar cvzf /home/chehrlic/rpmbuild/SOURCES/ctc_rti-6.0.1.tar.gz rti_connext_dds-6.0.1/
|
||||
# rpmbuild -bb ctc_rti-6.0.1-1.spec
|
||||
#
|
||||
%define real_name rti_connext_dds-6.0.1
|
||||
%define ndds_name rti_connext_dds-6.0.1
|
||||
|
||||
Summary: RTI 6.0.1 (DDS) runtime libraries
|
||||
Name: ctc_rti
|
||||
Version: 6.0.1
|
||||
Release: 1
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: ctc_rti-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: Real-Time Innovations
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: ctc_rti
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
Runtime libraries for DDS infrastructure
|
||||
|
||||
%package devel
|
||||
Summary: RTI 6.0.1 (DDS) runtime libraries (development files)
|
||||
Provides: ctc_rti-devel
|
||||
License: -
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
Development headers for DDS
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Dec 16 2019 CE
|
||||
- update to 6.0.1
|
||||
* Fri Apr 06 2018 CE
|
||||
- update to 5.3.1
|
||||
* Thu Aug 10 2017 CE
|
||||
- update to 5.3.0
|
||||
* Mon Oct 31 2016 CE
|
||||
- update to 5.2.3 Patch 6
|
||||
* Tue May 10 2016 CE
|
||||
- update to 5.2.3
|
||||
* Tue Jul 21 2015 CE
|
||||
- update to 5.2.0
|
||||
* Wed May 6 2015 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
%install
|
||||
mkdir -p "$RPM_BUILD_ROOT/opt/"
|
||||
cp -r "%{_builddir}/%{buildsubdir}/" "$RPM_BUILD_ROOT/opt/"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/opt/%{real_name}/rtilauncher.desktop
|
||||
/opt/%{real_name}/RTI_License_Agreement.pdf
|
||||
/opt/%{real_name}/rti_versions.xml
|
||||
/opt/%{ndds_name}/bin/
|
||||
/opt/%{ndds_name}/lib/
|
||||
/opt/%{ndds_name}/README.html
|
||||
/opt/%{ndds_name}/resource/
|
||||
/opt/%{ndds_name}/uninstall/
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%exclude /opt/%{ndds_name}/lib/x64Linux4gcc7.3.0/*.a
|
||||
%exclude /opt/%{ndds_name}/lib/x64Linux3gcc4.8.2
|
||||
%else
|
||||
%exclude /opt/%{ndds_name}/lib/x64Linux4gcc7.3.0
|
||||
%exclude /opt/%{ndds_name}/lib/x64Linux3gcc4.8.2/*.a
|
||||
%endif
|
||||
%exclude /opt/%{ndds_name}/rti_license.dat
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
/opt/%{ndds_name}/doc/
|
||||
/opt/%{ndds_name}/include/
|
||||
%if 0%{?suse_version} >= 1500
|
||||
/opt/%{ndds_name}/lib/x64Linux4gcc7.3.0/*.a
|
||||
%else
|
||||
/opt/%{ndds_name}/lib/x64Linux3gcc4.8.2/*.a
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%post
|
||||
if [ -e /opt/RTI ]; then
|
||||
rm /opt/RTI
|
||||
fi
|
||||
ln -sf /opt/%{real_name} /opt/RTI
|
||||
%if 0%{?suse_version} >= 1500
|
||||
echo "/opt/RTI/lib/x64Linux4gcc7.3.0/" > /etc/ld.so.conf.d/rti.conf
|
||||
%else
|
||||
echo "/opt/RTI/lib/x64Linux3gcc4.8.2/" > /etc/ld.so.conf.d/rti.conf
|
||||
%endif
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
if [ -e /opt/RTI ]; then
|
||||
rm /opt/RTI
|
||||
fi
|
||||
rm /etc/ld.so.conf.d/rti.conf
|
||||
fi
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# schusstafel.tar.bz2 muss nach /usr/src/packages/SOURCES
|
||||
# rpmbuild --target=noarch -ba ctc_schusstafel.spec
|
||||
#
|
||||
Summary: CTC Schusstafel library
|
||||
Name: ctc_schusstafel
|
||||
Version: 1.0
|
||||
Release: 1
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: schusstafel.tar.bz2
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
Library for Geopairing
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Thu Aug 28 2014 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n schusstafel
|
||||
echo "prep done"
|
||||
|
||||
%build
|
||||
# nothing to do here
|
||||
|
||||
%install
|
||||
mkdir -p "$RPM_BUILD_ROOT/usr/lib64/"
|
||||
mkdir -p "$RPM_BUILD_ROOT/usr/include/"
|
||||
cp %{_builddir}/%{buildsubdir}/lib64/* "$RPM_BUILD_ROOT/usr/lib64/"
|
||||
cp %{_builddir}/%{buildsubdir}/include/* "$RPM_BUILD_ROOT/usr/include/"
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
|
||||
%files
|
||||
/usr/lib64/libSchusstafel.so
|
||||
/usr/lib64/libSchusstafel.a
|
||||
/usr/include/Schusstafel.h
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
# Loads pretty printers for Qt5.
|
||||
#
|
||||
# Source this from gdb, like:
|
||||
# source /path/to/kde-dev-scripts/gdb/load-qt5printers.py
|
||||
#
|
||||
# Note that, unless you work exclusively with Qt5-based software, you
|
||||
# probably do not want to load this in your .gdbinit, as if you debug
|
||||
# a Qt4-based piece of software, the pretty printers will just break.
|
||||
#
|
||||
# See the create-qt5-autoloaders.py script for an alternative loading
|
||||
# mechanism.
|
||||
#
|
||||
|
||||
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software
|
||||
# and its documentation for any purpose and without fee is hereby
|
||||
# granted, provided that the above copyright notice appear in all
|
||||
# copies and that both that the copyright notice and this
|
||||
# permission notice and warranty disclaimer appear in supporting
|
||||
# documentation, and that the name of the author not be used in
|
||||
# advertising or publicity pertaining to distribution of the
|
||||
# software without specific, written prior permission.
|
||||
#
|
||||
# The author disclaims all warranties with regard to this
|
||||
# software, including all implied warranties of merchantability
|
||||
# and fitness. In no event shall the author be liable for any
|
||||
# special, indirect or consequential damages or any damages
|
||||
# whatsoever resulting from loss of use, data or profits, whether
|
||||
# in an action of contract, negligence or other tortious action,
|
||||
# arising out of or in connection with the use or performance of
|
||||
# this software.
|
||||
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
moddir = os.path.dirname(__file__)
|
||||
if not moddir in sys.path:
|
||||
sys.path.insert(0, moddir)
|
||||
|
||||
import qt5printers
|
||||
qt5printers.register_printers(gdb.current_objfile())
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
moddir = os.path.dirname(__file__)
|
||||
if not moddir in sys.path:
|
||||
sys.path.insert(0, moddir)
|
||||
|
||||
import lts_printers
|
||||
lts_printers.registerPrettyPrinters()
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .gdb_helper import registerPrettyPrinters
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Pretty Printer for use with pain gdb.
|
||||
To activate, put this section into your ~/.gdbinit:
|
||||
@code
|
||||
set python print-stack full
|
||||
|
||||
python
|
||||
import sys
|
||||
sys.path.insert(0, '/shd/CTC/TOOLS/TDS/TDS-source/Lts/Tools/DebuggingHelpers/')
|
||||
import gdb_helper
|
||||
gdb_helper.registerPrettyPrinters()
|
||||
end
|
||||
@endcode
|
||||
|
||||
@author Christian Fröbel
|
||||
"""
|
||||
|
||||
import gdb
|
||||
import gdb.printing
|
||||
import gdb.types
|
||||
from datetime import datetime
|
||||
import sys
|
||||
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
long = int
|
||||
|
||||
|
||||
class DdsStringPrinter(object):
|
||||
def __init__(self, val):
|
||||
self._val = val
|
||||
|
||||
def to_string(self):
|
||||
return '"{}"'.format(self._val['str_'].string())
|
||||
|
||||
|
||||
class DdsVectorPrinter(object):
|
||||
def __init__(self, val):
|
||||
self._val = val
|
||||
|
||||
def to_string(self):
|
||||
capacity = self._val['seq_']['_maximum']
|
||||
size = self._val['seq_']['_length']
|
||||
formatted = 'dds::core::vector of length {}, capacity {} = {{'.format(capacity, size)
|
||||
|
||||
containedType = self._val.type.template_argument(0)
|
||||
|
||||
rawBuffer = self._val['seq_']['_contiguous_buffer'] # unsigned char*
|
||||
typedBuffer = rawBuffer.cast(containedType.pointer())
|
||||
|
||||
for i in range(size):
|
||||
if i > 0:
|
||||
formatted += ', '
|
||||
formatted += str(typedBuffer.dereference())
|
||||
typedBuffer = typedBuffer+1
|
||||
formatted += '}'
|
||||
return formatted
|
||||
|
||||
|
||||
class DdsOptionalPrinter(object):
|
||||
"""Default implementation for dds::core::optional<T>"""
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
ptrToValue = self._val['value_']
|
||||
isInitialized = _targetAddress(ptrToValue) != 0
|
||||
if isInitialized:
|
||||
return str(ptrToValue.dereference())
|
||||
else:
|
||||
return '{uninitialized}'
|
||||
|
||||
|
||||
class DdsOptionalStringPrinter(object):
|
||||
"""Specialization for dds::core::optional<dds::core::string>"""
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
strValue = self._val['value_']
|
||||
isInitialized = _targetAddress(strValue['str_']) != 0
|
||||
if isInitialized:
|
||||
return str(strValue)
|
||||
else:
|
||||
return '{uninitialized}'
|
||||
|
||||
|
||||
class StdChronoDurationPrinter(object):
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
seconds = _createSecondsFromDuration(self._val)
|
||||
ms = long(seconds*1000)
|
||||
formatted = 'std::chrono::duration, {}ms'.format(ms)
|
||||
return formatted
|
||||
|
||||
def children(self):
|
||||
return _namedChildren(self._val)
|
||||
|
||||
|
||||
class StdChronoTimePointPrinter(object):
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
#
|
||||
# Somehow registering a printer directly for AudioVideoManagement::AvaTimePoint does not work.
|
||||
# As a workaround we simply query the type here.
|
||||
#
|
||||
if self._val.type.name == 'AudioVideoManagement::AvaTimePoint':
|
||||
return AvaTimePointPrinter(self._val).to_string()
|
||||
|
||||
dt = _createDateTimeFromTimePoint(self._val)
|
||||
formatted = 'std::chrono::time_point, {}'.format(_isoFormat(dt, nachkommaStellen=6))
|
||||
return formatted
|
||||
|
||||
def children(self):
|
||||
return _namedChildren(self._val)
|
||||
|
||||
|
||||
class AvaTimePointPrinter(object):
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
dt = _createDateTimeFromTimePoint(self._val)
|
||||
formatted = 'AudioVideoManagement::AvaTimePoint, {}'.format(_isoFormat(dt, nachkommaStellen=2))
|
||||
return formatted
|
||||
|
||||
|
||||
class AvsNtpTimestampPrinter(object):
|
||||
"""Printer for AVS NTPTimestamp"""
|
||||
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
dt = _createDateTimeFromNtpTimestamp(self._val)
|
||||
formatted = _isoFormat(dt, nachkommaStellen=3)
|
||||
return formatted
|
||||
|
||||
def children(self):
|
||||
return _namedChildren(self._val)
|
||||
|
||||
|
||||
class AvsNtpRangePrinter(object):
|
||||
"""Printer for AVS NTPRange"""
|
||||
|
||||
def __init__(self, value):
|
||||
self._val = value
|
||||
|
||||
def to_string(self):
|
||||
dtBegin = _createDateTimeFromNtpTimestamp(self._val['m_begin'])
|
||||
dtEnd = _createDateTimeFromNtpTimestamp(self._val['m_end'])
|
||||
|
||||
delta = dtEnd - dtBegin
|
||||
seconds = delta.total_seconds() # float
|
||||
fractionInMilli = long(seconds * 1000 + 0.5) % 1000
|
||||
|
||||
formatted = '{} - {}, {:d}.{:03d}s'.format(_isoFormat(dtBegin, nachkommaStellen=3), _isoFormat(dtEnd, nachkommaStellen=3), long(seconds), fractionInMilli)
|
||||
return formatted
|
||||
|
||||
def children(self):
|
||||
return _namedChildren(self._val)
|
||||
|
||||
|
||||
def _createDateTimeFromTimePoint(value):
|
||||
"""Create a datatime from a std::chrono::timepoint value"""
|
||||
sSinceEpoch = _createSecondsFromDuration(value['__d'])
|
||||
return datetime.utcfromtimestamp(sSinceEpoch)
|
||||
|
||||
def _createSecondsFromDuration(value):
|
||||
"""Create seconds as float from a std::chrono::duration value"""
|
||||
durationType = value.type
|
||||
ratioType = durationType.template_argument(1)
|
||||
dividend = long(ratioType.template_argument(0))
|
||||
divisor = long(ratioType.template_argument(1))
|
||||
duration = long(value['__r'])
|
||||
seconds = duration * dividend / float(divisor)
|
||||
return seconds
|
||||
|
||||
|
||||
NTP_OFFSET = 2208988800 # in s; NTP starts at 1900-01-01 where unix epoch is 1970-01-01; difference is 70 years plus 17 leap years
|
||||
|
||||
def _createSecondsFromNtpTimestamp(value):
|
||||
"""Create seconds as float from AVS NTPTimestamp. The format is a fixed 64 bit floating point number
|
||||
where the upper 32 bit denote the seconds and the lower 32 bit denote the fraction of a second."""
|
||||
fixedFloatValue = long(value['m_data'])
|
||||
seconds = fixedFloatValue >> 32
|
||||
fract = fixedFloatValue & 0xffffffff
|
||||
return seconds + float(fract) / (1 << 32) - NTP_OFFSET
|
||||
|
||||
def _createDateTimeFromNtpTimestamp(value):
|
||||
"""Create a datetime from AVS NTPTimestamp"""
|
||||
sSinceEpoch = _createSecondsFromNtpTimestamp(value)
|
||||
return datetime.utcfromtimestamp(sSinceEpoch)
|
||||
|
||||
|
||||
def _isoFormat(dt, nachkommaStellen):
|
||||
"""Return the ISO-representation for a given datetime instance with the requested number of Nachkommastellen"""
|
||||
assert nachkommaStellen >= 0 and nachkommaStellen <= 6
|
||||
|
||||
s = dt.isoformat(' ')
|
||||
if dt.microsecond > 0:
|
||||
if nachkommaStellen == 6:
|
||||
return s
|
||||
return s[:-(6-nachkommaStellen)]
|
||||
|
||||
return s + '.' + nachkommaStellen * '0'
|
||||
|
||||
|
||||
def _namedChildren(value):
|
||||
"""Helper function; the result can directly be used in a Printer.children()."""
|
||||
return ((f.name, value[f]) for f in value.type.fields())
|
||||
|
||||
|
||||
#
|
||||
# ptr must be a gdb.Value of pointer type.
|
||||
# @return The address the pointer is pointing to as int.
|
||||
#
|
||||
def _targetAddress(ptr):
|
||||
assert ptr.type.code == gdb.TYPE_CODE_PTR
|
||||
return long(ptr)
|
||||
|
||||
def _buildPrettyPrinters():
|
||||
pp = gdb.printing.RegexpCollectionPrettyPrinter("Excon")
|
||||
pp.add_printer('dds::core::string', '^dds::core::basic_string<char,.*>$', DdsStringPrinter)
|
||||
pp.add_printer('dds::core::vector', '^rti::core::vector<.*>$', DdsVectorPrinter)
|
||||
pp.add_printer('dds::core::optional<dds::core::string>', '^rti::core::optional<dds::core::basic_string<.*>$', DdsOptionalStringPrinter)
|
||||
pp.add_printer('dds::core::optional', '^rti::core::optional<.*>$', DdsOptionalPrinter)
|
||||
# pp.add_printer('AudioVideoManagement::AvaTimePoint', '^AudioVideoManagement::AvaTimePoint$', AvaTimePointPrinter) # somehow doesn't work
|
||||
pp.add_printer('std::chrono::duration', '^std::chrono::duration<.*>$', StdChronoDurationPrinter)
|
||||
pp.add_printer('std::chrono::time_point', '^std::chrono::time_point<.*>$', StdChronoTimePointPrinter)
|
||||
pp.add_printer('NTPTimestamp', '^NTPTimestamp$', AvsNtpTimestampPrinter)
|
||||
pp.add_printer('NTPRange', '^NTPRange$', AvsNtpRangePrinter)
|
||||
return pp
|
||||
|
||||
def registerPrettyPrinters():
|
||||
gdb.printing.register_pretty_printer(gdb.current_objfile(), _buildPrettyPrinters())
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Debugging Helpers for use with QtCreator.
|
||||
To activate, in QtCreator open Tools -> Options... -> Debugger -> Locals & Expressions
|
||||
and put the absolut path to this file into the "Extra Debugging Helpers" field.
|
||||
|
||||
@author Christian Fröbel
|
||||
"""
|
||||
|
||||
from dumper import *
|
||||
from datetime import datetime
|
||||
|
||||
def qdump__dds__core__basic_string(d, value):
|
||||
d.putItem(value['str_'])
|
||||
d.putBetterType('dds::core::string')
|
||||
|
||||
def qdump__rti__core__vector(d, value):
|
||||
innerType = value.type[0]
|
||||
capacity = value['seq_']['_maximum'].integer()
|
||||
size = value['seq_']['_length'].integer()
|
||||
|
||||
d.putItemCount(size)
|
||||
d.putNumChild(size)
|
||||
if d.isExpanded():
|
||||
with Children(d):
|
||||
with SubItem(d, 'capacity'):
|
||||
d.putValue(capacity)
|
||||
with SubItem(d, 'values'):
|
||||
d.putItemCount(size)
|
||||
if d.isExpanded():
|
||||
rawBuffer = value['seq_']['_contiguous_buffer']
|
||||
d.putArrayData(rawBuffer.integer(), size, innerType)
|
||||
|
||||
def qdump__rti__core__optional(d, value):
|
||||
innerType = value.type[0]
|
||||
stringType = d.createType('dds::core::string')
|
||||
# Kann man Types direkt vergleichen, auch wenn innerType ein Alias ist?
|
||||
if innerType.name == 'dds::core::basic_string<char, rti::core::memory::OsapiAllocator<char> >':
|
||||
_dumpOptionalString(d, value)
|
||||
else:
|
||||
_dumpOptionalCommon(d, value)
|
||||
|
||||
def _dumpOptionalCommon(d, value):
|
||||
"""Default implementation for dds::core::optional<T>"""
|
||||
ptrToValue = value['value_']
|
||||
isInitialized = ptrToValue.integer() != 0
|
||||
if isInitialized:
|
||||
innerType = value.type[0]
|
||||
d.putItem(ptrToValue.dereference())
|
||||
d.putBetterType(innerType)
|
||||
else:
|
||||
d.putValue("uninitialized")
|
||||
d.putNumChild(0)
|
||||
|
||||
def _dumpOptionalString(d, value):
|
||||
"""Specialization for dds::core::optional<dds::core::string>"""
|
||||
strValue = value['value_']
|
||||
isInitialized = strValue['str_'].integer() != 0
|
||||
if isInitialized:
|
||||
d.putItem(strValue)
|
||||
d.putBetterType('dds::core::string')
|
||||
else:
|
||||
d.putValue("uninitialized")
|
||||
d.putBetterType('dds::core::optional<dds::core::string>')
|
||||
d.putNumChild(0)
|
||||
|
||||
def qdump__Core__BaseEntity(d, value):
|
||||
name = d.extractCString(value['m_name_']['str_'].integer())
|
||||
d.putValue('{}: \\"{}\\"'.format(value['m_id_'].integer(), name))
|
||||
d.putNumChild(5)
|
||||
if d.isExpanded():
|
||||
with Children(d):
|
||||
for member in 'm_id_ m_name_ m_isDeleted_ m_isUsed_ m_isBlockedForEdit_'.split():
|
||||
with SubItem(d, member):
|
||||
d.putItem(value[member])
|
||||
|
||||
def qdump__dds__core__safe_enum(d, value):
|
||||
d.putItem(value['val'])
|
||||
|
||||
|
||||
def qdump__std__chrono__duration(d, value):
|
||||
seconds = _createSecondsFromDuration(value)
|
||||
ms = int(seconds*1000)
|
||||
d.putValue('{}ms'.format(ms))
|
||||
d.putPlainChildren(value)
|
||||
|
||||
|
||||
def qdump__AudioVideoManagement__AvaTimePoint(d, value):
|
||||
dt = _createDateTimeFromTimePoint(value)
|
||||
d.putValue(_isoFormat(dt, nachkommaStellen=2))
|
||||
d.putPlainChildren(value)
|
||||
|
||||
|
||||
def qdump__std__chrono__time_point(d, value):
|
||||
dt = _createDateTimeFromTimePoint(value)
|
||||
d.putValue(_isoFormat(dt, nachkommaStellen=6))
|
||||
d.putPlainChildren(value)
|
||||
|
||||
|
||||
def qdump__NTPTimestamp(d, value):
|
||||
dt = _createDateTimeFromNtpTimestamp(value)
|
||||
d.putValue(_isoFormat(dt, nachkommaStellen=3))
|
||||
d.putPlainChildren(value)
|
||||
|
||||
|
||||
def qdump__NTPRange(d, value):
|
||||
dtBegin = _createDateTimeFromNtpTimestamp(value['m_begin'])
|
||||
dtEnd = _createDateTimeFromNtpTimestamp(value['m_end'])
|
||||
|
||||
delta = dtEnd - dtBegin
|
||||
seconds = delta.total_seconds() # float
|
||||
fractionInMilli = int(seconds * 1000 + 0.5) % 1000
|
||||
|
||||
d.putValue('{} - {}, {:d}.{:03d}s'.format(_isoFormat(dtBegin, nachkommaStellen=3), _isoFormat(dtEnd, nachkommaStellen=3), int(seconds), fractionInMilli))
|
||||
d.putPlainChildren(value)
|
||||
|
||||
|
||||
def _createSecondsFromDuration(value):
|
||||
"""Create seconds as float from a std::chrono::duration value"""
|
||||
|
||||
durationType = value.type
|
||||
if durationType.code == TypeCodeTypedef:
|
||||
durationType = durationType.stripTypedefs()
|
||||
|
||||
ratioType = durationType[1]
|
||||
dividend = ratioType[0]
|
||||
divisor = ratioType[1]
|
||||
duration = int(value['__r'])
|
||||
seconds = duration * dividend / float(divisor)
|
||||
return seconds
|
||||
|
||||
|
||||
def _createDateTimeFromTimePoint(value):
|
||||
"""Create a datatime from a std::chrono::timepoint value"""
|
||||
sSinceEpoch = _createSecondsFromDuration(value['__d'])
|
||||
return datetime.utcfromtimestamp(sSinceEpoch)
|
||||
|
||||
|
||||
NTP_OFFSET = 2208988800 # in s; NTP starts at 1900-01-01 where unix epoch is 1970-01-01; difference is 70 years plus 17 leap years
|
||||
|
||||
def _createSecondsFromNtpTimestamp(value):
|
||||
"""Create seconds as float from AVS NTPTimestamp. The format is a fixed 64 bit floating point number
|
||||
where the upper 32 bit denote the seconds and the lower 32 bit denote the fraction of a second."""
|
||||
fixedFloatValue = int(value['m_data'])
|
||||
seconds = fixedFloatValue >> 32
|
||||
fract = fixedFloatValue & 0xffffffff
|
||||
return seconds + float(fract) / (1 << 32) - NTP_OFFSET
|
||||
|
||||
|
||||
def _createDateTimeFromNtpTimestamp(value):
|
||||
"""Create a datetime from AVS NTPTimestamp"""
|
||||
sSinceEpoch = _createSecondsFromNtpTimestamp(value)
|
||||
return datetime.utcfromtimestamp(sSinceEpoch)
|
||||
|
||||
|
||||
def _isoFormat(dt, nachkommaStellen):
|
||||
"""Return the ISO-representation for a given datetime instance with the requested number of Nachkommastellen"""
|
||||
assert nachkommaStellen >= 0 and nachkommaStellen <= 6
|
||||
|
||||
s = dt.isoformat(' ')
|
||||
if dt.microsecond > 0:
|
||||
if nachkommaStellen == 6:
|
||||
return s
|
||||
return s[:-(6-nachkommaStellen)]
|
||||
|
||||
return s + '.' + nachkommaStellen * '0'
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software
|
||||
# and its documentation for any purpose and without fee is hereby
|
||||
# granted, provided that the above copyright notice appear in all
|
||||
# copies and that both that the copyright notice and this
|
||||
# permission notice and warranty disclaimer appear in supporting
|
||||
# documentation, and that the name of the author not be used in
|
||||
# advertising or publicity pertaining to distribution of the
|
||||
# software without specific, written prior permission.
|
||||
#
|
||||
# The author disclaims all warranties with regard to this
|
||||
# software, including all implied warranties of merchantability
|
||||
# and fitness. In no event shall the author be liable for any
|
||||
# special, indirect or consequential damages or any damages
|
||||
# whatsoever resulting from loss of use, data or profits, whether
|
||||
# in an action of contract, negligence or other tortious action,
|
||||
# arising out of or in connection with the use or performance of
|
||||
# this software.
|
||||
|
||||
import gdb.printing
|
||||
from . import core
|
||||
|
||||
"""Qt5 Pretty Printers for GDB.
|
||||
|
||||
The printers are split into submodules, one for each Qt library. Each
|
||||
submodule has a "printer" attribute that contains a pretty-printer for
|
||||
that library.
|
||||
"""
|
||||
|
||||
def register_printers(obj):
|
||||
"""Registers all known Qt5 pretty-printers."""
|
||||
gdb.printing.register_pretty_printer(obj, core.printer)
|
||||
|
||||
+901
@@ -0,0 +1,901 @@
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software
|
||||
# and its documentation for any purpose and without fee is hereby
|
||||
# granted, provided that the above copyright notice appear in all
|
||||
# copies and that both that the copyright notice and this
|
||||
# permission notice and warranty disclaimer appear in supporting
|
||||
# documentation, and that the name of the author not be used in
|
||||
# advertising or publicity pertaining to distribution of the
|
||||
# software without specific, written prior permission.
|
||||
#
|
||||
# The author disclaims all warranties with regard to this
|
||||
# software, including all implied warranties of merchantability
|
||||
# and fitness. In no event shall the author be liable for any
|
||||
# special, indirect or consequential damages or any damages
|
||||
# whatsoever resulting from loss of use, data or profits, whether
|
||||
# in an action of contract, negligence or other tortious action,
|
||||
# arising out of or in connection with the use or performance of
|
||||
# this software.
|
||||
|
||||
import gdb.printing
|
||||
import itertools
|
||||
from . import typeinfo
|
||||
try:
|
||||
import urlparse
|
||||
except ImportError:
|
||||
# Python 3
|
||||
import urllib.parse as urlparse
|
||||
|
||||
"""Qt5Core pretty printer for GDB."""
|
||||
|
||||
# NB: no QPair printer: the default should be fine
|
||||
|
||||
def _format_jd(jd):
|
||||
"""Format a Julian Day in YYYY-MM-DD format."""
|
||||
# maths from http://www.tondering.dk/claus/cal/julperiod.php
|
||||
a = jd + 32044
|
||||
b = (4 * a + 3) // 146097
|
||||
c = a - ( (146097 * b) // 4 )
|
||||
d = (4 * c + 3) // 1461
|
||||
e = c - ( (1461 * d) // 4 )
|
||||
m = (5 * e + 2) // 153
|
||||
day = e - ( (153 * m + 2) // 5 ) + 1
|
||||
month = m + 3 - 12 * ( m // 10 )
|
||||
year = 100 * b + d - 4800 + ( m // 10 )
|
||||
return '{:0=4}-{:0=2}-{:0=2}'.format(year, month, day)
|
||||
|
||||
def _jd_is_valid(jd):
|
||||
"""Return whether QDate would consider a given Julian Day valid."""
|
||||
return jd >= -784350574879 and jd <= 784354017364
|
||||
|
||||
def _format_time_ms(msecs):
|
||||
"""Format a number of milliseconds since midnight in HH:MM:SS.ssss format."""
|
||||
secs = msecs // 1000
|
||||
mins = secs // 60
|
||||
hours = mins // 60
|
||||
return '{:0=2}:{:0=2}:{:0=2}.{:0=3}'.format(
|
||||
hours % 24, mins % 60, secs % 60, msecs % 1000)
|
||||
|
||||
def _ms_is_valid(msecs):
|
||||
"""Return whether QTime would consider a ms since midnight valid."""
|
||||
return msecs >= 0 and msecs <= 86400000
|
||||
|
||||
class ArrayIter:
|
||||
"""Iterates over a fixed-size array."""
|
||||
def __init__(self, array, size):
|
||||
self.array = array
|
||||
self.i = -1
|
||||
self.size = size
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
if self.i + 1 >= self.size:
|
||||
raise StopIteration
|
||||
self.i += 1
|
||||
return ('[%d]' % self.i, self.array[self.i])
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
class StructReader:
|
||||
"""Reads entries from a struct."""
|
||||
def __init__(self, data):
|
||||
self.data = data.reinterpret_cast(gdb.lookup_type('char').pointer())
|
||||
self.ptr_t = gdb.lookup_type('void').pointer()
|
||||
|
||||
def next_aligned_val(self, typ):
|
||||
ptr_val = int(str(self.data.reinterpret_cast(self.ptr_t)), 16)
|
||||
misalignment = ptr_val % self.ptr_t.sizeof
|
||||
if misalignment > 0:
|
||||
self.data += self.ptr_t.sizeof - misalignment
|
||||
val = self.data.reinterpret_cast(typ.pointer())
|
||||
self.data += typ.sizeof
|
||||
return val.referenced_value()
|
||||
|
||||
def next_val(self, typ):
|
||||
val = self.data.reinterpret_cast(typ.pointer())
|
||||
self.data += typ.sizeof
|
||||
return val.referenced_value()
|
||||
|
||||
class QBitArrayPrinter:
|
||||
"""Print a Qt5 QBitArray"""
|
||||
|
||||
class Iter:
|
||||
def __init__(self, data, size):
|
||||
self.data = data
|
||||
self.i = -1
|
||||
self.size = size
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
if self.i + 1 >= self.size:
|
||||
raise StopIteration
|
||||
self.i += 1
|
||||
if self.data[1 + (self.i >> 3)] & (1 << (self.i&7)):
|
||||
return (str(self.i), 1)
|
||||
else:
|
||||
return (str(self.i), 0)
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']['d']
|
||||
data = d.reinterpret_cast(gdb.lookup_type('char').pointer()) + d['offset']
|
||||
size = (int(d['size']) << 3) - int(data[0])
|
||||
|
||||
return self.Iter(data, size)
|
||||
|
||||
def to_string(self):
|
||||
d = self.val['d']['d']
|
||||
data = d.reinterpret_cast(gdb.lookup_type('char').pointer()) + d['offset']
|
||||
size = (int(d['size']) << 3) - int(data[0])
|
||||
if size == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'array'
|
||||
|
||||
class QByteArrayPrinter:
|
||||
"""Print a Qt5 QByteArray"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']
|
||||
data = d.reinterpret_cast(gdb.lookup_type('char').pointer()) + d['offset']
|
||||
return ArrayIter(data, d['size'])
|
||||
|
||||
def to_string(self):
|
||||
d = self.val['d']
|
||||
data = d.reinterpret_cast(gdb.lookup_type('char').pointer()) + d['offset']
|
||||
return data.string('', 'replace', d['size'])
|
||||
|
||||
def display_hint(self):
|
||||
return 'string'
|
||||
|
||||
class QCharPrinter:
|
||||
"""Print a Qt5 QChar"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
ucs = self.val['ucs']
|
||||
data = ucs.address.reinterpret_cast(gdb.lookup_type('char').pointer())
|
||||
unicode_str = data.string('utf-16', 'replace', 2)
|
||||
uch = unicode_str[0]
|
||||
if uch == unichr(0x27):
|
||||
return "'\\''"
|
||||
# this actually gives us Python escapes, but they should all be
|
||||
# valid C escapes as well
|
||||
return "'" + uch.encode('unicode_escape') + "'"
|
||||
|
||||
def display_hint(self):
|
||||
# this is not recognized by gdb, hence the manual escaping and quoting
|
||||
# we do above
|
||||
return 'char'
|
||||
|
||||
class QDatePrinter:
|
||||
"""Print a Qt5 QDate"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
jd = int(self.val['jd'])
|
||||
if not _jd_is_valid(jd):
|
||||
return '<invalid>'
|
||||
return _format_jd(jd)
|
||||
|
||||
def display_hint(self):
|
||||
return 'date'
|
||||
|
||||
class QDateTimePrinter:
|
||||
"""Print a Qt5 QDateTime"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
_unix_epoch_jd = 2440588
|
||||
_ms_per_day = 86400000
|
||||
|
||||
# status field
|
||||
_validDate = 0x04
|
||||
_validTime = 0x08
|
||||
_validDateTime = 0x10
|
||||
_timeZoneCached = 0x20
|
||||
|
||||
# time spec
|
||||
_localTime = 0
|
||||
_UTC = 1
|
||||
_offsetFromUTC = 2
|
||||
_timeZone = 3
|
||||
|
||||
def to_string(self):
|
||||
d = self.val['d']['d']
|
||||
if not d:
|
||||
return '<invalid>'
|
||||
|
||||
try:
|
||||
qshareddata_t = gdb.lookup_type('QSharedData')
|
||||
except gdb.error:
|
||||
try:
|
||||
# well, it only has a QAtomicInt in it
|
||||
qshareddata_t = gdb.lookup_type('QAtomicInt')
|
||||
except gdb.error:
|
||||
# let's hope it's the same size as an int
|
||||
qshareddata_t = gdb.lookup_type('int')
|
||||
try:
|
||||
timespec_t = gdb.lookup_type('Qt::TimeSpec')
|
||||
except gdb.error:
|
||||
# probably an int
|
||||
timespec_t = gdb.lookup_type('int')
|
||||
|
||||
reader = StructReader(d)
|
||||
reader.next_val(qshareddata_t)
|
||||
m_msecs = reader.next_aligned_val(gdb.lookup_type('qint64'))
|
||||
spec = int(reader.next_val(timespec_t))
|
||||
m_offsetFromUtc = reader.next_val(gdb.lookup_type('int'))
|
||||
m_timeZone = reader.next_val(gdb.lookup_type('QTimeZone'))
|
||||
status = int(reader.next_val(gdb.lookup_type('int')))
|
||||
|
||||
if spec == self._timeZone:
|
||||
timeZoneStr = QTimeZonePrinter(m_timeZone).to_string()
|
||||
if timeZoneStr == '':
|
||||
return '<invalid>'
|
||||
|
||||
if spec == self._localTime or (spec == self._timeZone and
|
||||
not status & self._timeZoneCached):
|
||||
# Because QDateTime delays timezone calculations as far as
|
||||
# possible, the ValidDateTime flag may not be set even if
|
||||
# it is a valid DateTime.
|
||||
if not status & self._validDate or not status & self._validTime:
|
||||
return '<invalid>'
|
||||
elif not (status & self._validDateTime):
|
||||
return '<invalid>'
|
||||
|
||||
# actually fetch:
|
||||
m_msecs = int(m_msecs)
|
||||
|
||||
jd = self._unix_epoch_jd # UNIX epoch
|
||||
jd += m_msecs // self._ms_per_day
|
||||
msecs = m_msecs % self._ms_per_day
|
||||
if msecs < 0:
|
||||
# need to adjust back to the previous day
|
||||
jd -= 1
|
||||
msecs += self._ms_per_day
|
||||
|
||||
result = _format_jd(jd) + ' ' + _format_time_ms(msecs)
|
||||
|
||||
if spec == self._localTime:
|
||||
result += ' (Local)'
|
||||
elif spec == self._UTC:
|
||||
result += ' (UTC)'
|
||||
elif spec == self._offsetFromUTC:
|
||||
offset = int(m_offsetFromUtc)
|
||||
if offset == 0:
|
||||
diffstr = ''
|
||||
else:
|
||||
hours = abs(offset // 3600)
|
||||
mins = abs((offset % 3600) // 60)
|
||||
secs = abs(offset % 60)
|
||||
sign = '+' if offset > 0 else '-'
|
||||
diffstr = '{:}{:0=2d}:{:0=2d}'.format(sign, hours, mins)
|
||||
if secs > 0:
|
||||
diffstr += ':{:0=2d}'.format(secs)
|
||||
result += ' (UTC{:})'.format(diffstr)
|
||||
elif spec == self._timeZone:
|
||||
result += ' ({:})'.format(timeZoneStr)
|
||||
|
||||
return result
|
||||
|
||||
def display_hint(self):
|
||||
return 'datetime'
|
||||
|
||||
class QHashPrinter:
|
||||
"""Print a Qt5 QHash"""
|
||||
|
||||
class Iter:
|
||||
def __init__(self, d, e):
|
||||
self.buckets_left = d['numBuckets']
|
||||
self.node_type = e.type
|
||||
# set us up at the end of a "dummy bucket"
|
||||
self.current_bucket = d['buckets'] - 1
|
||||
self.current_node = None
|
||||
self.i = -1
|
||||
self.waiting_for_value = False
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
if self.waiting_for_value:
|
||||
self.waiting_for_value = False
|
||||
node = self.current_node.reinterpret_cast(self.node_type)
|
||||
return ('value' + str(self.i), node['value'])
|
||||
|
||||
if self.current_node:
|
||||
self.current_node = self.current_node['next']
|
||||
|
||||
# the dummy node that terminates a bucket is distinguishable
|
||||
# by not having its 'next' value set
|
||||
if not self.current_node or not self.current_node['next']:
|
||||
while self.buckets_left:
|
||||
self.current_bucket += 1
|
||||
self.buckets_left -= 1
|
||||
self.current_node = self.current_bucket.referenced_value()
|
||||
if self.current_node['next']:
|
||||
break
|
||||
else:
|
||||
raise StopIteration
|
||||
|
||||
self.i += 1
|
||||
self.waiting_for_value = True
|
||||
node = self.current_node.reinterpret_cast(self.node_type)
|
||||
return ('key' + str(self.i), node['key'])
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']
|
||||
|
||||
if d['size'] == 0:
|
||||
return []
|
||||
|
||||
return self.Iter(d, self.val['e'])
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['d']['size'] == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'map'
|
||||
|
||||
class QLatin1StringPrinter:
|
||||
"""Print a Qt5 QLatin1String"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
return self.val['m_data'].string('', 'replace', self.val['m_size'])
|
||||
|
||||
def display_hint(self):
|
||||
return 'string'
|
||||
|
||||
class QLinkedListPrinter:
|
||||
"""Print a Qt5 QLinkedList"""
|
||||
|
||||
class Iter:
|
||||
def __init__(self, tail, size):
|
||||
self.current = tail
|
||||
self.i = -1
|
||||
self.size = size
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
if self.i + 1 >= self.size:
|
||||
raise StopIteration
|
||||
self.i += 1
|
||||
self.current = self.current['n']
|
||||
return (str(self.i), self.current['t'])
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
size = int(self.val['d']['size'])
|
||||
|
||||
if size == 0:
|
||||
return []
|
||||
|
||||
return self.Iter(self.val['e'], size)
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['d']['size'] == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'array'
|
||||
|
||||
class QListPrinter:
|
||||
"""Print a Qt5 QList"""
|
||||
|
||||
class Iter:
|
||||
def __init__(self, array, begin, end, typ):
|
||||
self.array = array
|
||||
self.end = end
|
||||
self.begin = begin
|
||||
self.offset = 0
|
||||
if typ.name == 'QStringList':
|
||||
self.el_type = gdb.lookup_type('QString')
|
||||
else:
|
||||
self.el_type = typ.template_argument(0)
|
||||
|
||||
if ((self.el_type.sizeof > gdb.lookup_type('void').pointer().sizeof)
|
||||
or typeinfo.type_is_known_static(self.el_type)):
|
||||
self.is_pointer = True
|
||||
elif (typeinfo.type_is_known_movable(self.el_type) or
|
||||
typeinfo.type_is_known_primitive(self.el_type)):
|
||||
self.is_pointer = False
|
||||
else:
|
||||
raise ValueError("Could not determine whether QList stores " +
|
||||
self.el_type.name + " directly or as a pointer: to fix " +
|
||||
"this, add it to one of the variables in the "+
|
||||
"qt5printers.typeinfo module")
|
||||
self.node_type = gdb.lookup_type(typ.name + '::Node').pointer()
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
if self.begin + self.offset >= self.end:
|
||||
raise StopIteration
|
||||
node = self.array[self.begin + self.offset].reinterpret_cast(self.node_type)
|
||||
if self.is_pointer:
|
||||
p = node['v']
|
||||
else:
|
||||
p = node
|
||||
self.offset += 1
|
||||
return ((str(self.offset), p.cast(self.el_type)))
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']
|
||||
begin = int(d['begin'])
|
||||
end = int(d['end'])
|
||||
|
||||
if begin == end:
|
||||
return []
|
||||
|
||||
return self.Iter(d['array'], begin, end, self.val.type.strip_typedefs())
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['d']['begin'] == self.val['d']['end']:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'array'
|
||||
|
||||
class QMapPrinter:
|
||||
"""Print a Qt5 QMap"""
|
||||
|
||||
class Iter:
|
||||
def __init__(self, root, node_p_type):
|
||||
self.root = root
|
||||
self.current = None
|
||||
self.node_p_type = node_p_type
|
||||
self.next_is_key = True
|
||||
self.i = -1
|
||||
# we store the path here to avoid keeping re-fetching
|
||||
# values from the inferior (also, skips the pointer
|
||||
# arithmetic involved in using the parent pointer)
|
||||
self.path = []
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def moveToNextNode(self):
|
||||
if self.current is None:
|
||||
# find the leftmost node
|
||||
if not self.root['left']:
|
||||
return False
|
||||
self.current = self.root
|
||||
while self.current['left']:
|
||||
self.path.append(self.current)
|
||||
self.current = self.current['left']
|
||||
elif self.current['right']:
|
||||
self.path.append(self.current)
|
||||
self.current = self.current['right']
|
||||
while self.current['left']:
|
||||
self.path.append(self.current)
|
||||
self.current = self.current['left']
|
||||
else:
|
||||
last = self.current
|
||||
self.current = self.path.pop()
|
||||
while self.current['right'] == last:
|
||||
last = self.current
|
||||
self.current = self.path.pop()
|
||||
# if there are no more parents, we are at the root
|
||||
if len(self.path) == 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
def __next__(self):
|
||||
if self.next_is_key:
|
||||
if not self.moveToNextNode():
|
||||
raise StopIteration
|
||||
self.current_typed = self.current.reinterpret_cast(self.node_p_type)
|
||||
self.next_is_key = False
|
||||
self.i += 1
|
||||
return ('key' + str(self.i), self.current_typed['key'])
|
||||
else:
|
||||
self.next_is_key = True
|
||||
return ('value' + str(self.i), self.current_typed['value'])
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']
|
||||
size = int(d['size'])
|
||||
|
||||
if size == 0:
|
||||
return []
|
||||
|
||||
realtype = self.val.type.strip_typedefs()
|
||||
keytype = realtype.template_argument(0)
|
||||
valtype = realtype.template_argument(1)
|
||||
node_type = gdb.lookup_type('QMapData<' + keytype.name + ',' + valtype.name + '>::Node')
|
||||
|
||||
return self.Iter(d['header'], node_type.pointer())
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['d']['size'] == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'map'
|
||||
|
||||
class QSetPrinter:
|
||||
"""Print a Qt5 QSet"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
hashPrinter = QHashPrinter(self.val['q_hash'])
|
||||
# the keys of the hash are the elements of the set, so select
|
||||
# every other item (starting with the first)
|
||||
return itertools.islice(hashPrinter.children(), 0, None, 2)
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['q_hash']['d']['size'] == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'array'
|
||||
|
||||
class QStringPrinter:
|
||||
"""Print a Qt5 QString"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
d = self.val['d']
|
||||
data = d.reinterpret_cast(gdb.lookup_type('char').pointer()) + d['offset']
|
||||
data_len = d['size'] * gdb.lookup_type('unsigned short').sizeof
|
||||
return data.string('utf-16', 'replace', data_len)
|
||||
|
||||
def display_hint(self):
|
||||
return 'string'
|
||||
|
||||
class QTimePrinter:
|
||||
"""Print a Qt5 QTime"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
msecs = int(self.val['mds'])
|
||||
if not _ms_is_valid(msecs):
|
||||
return '<invalid>'
|
||||
return _format_time_ms(msecs)
|
||||
|
||||
def display_hint(self):
|
||||
return 'time'
|
||||
|
||||
class QTimeZonePrinter:
|
||||
"""Print a Qt5 QTimeZone"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
d = self.val['d']['d']
|
||||
if not d:
|
||||
return ''
|
||||
|
||||
try:
|
||||
# Accessing the private data is error-prone,
|
||||
# so try just calling the id() method.
|
||||
# This should be reasonably safe, as all it will
|
||||
# do is create a QByteArray that references the
|
||||
# same internal data as the stored one. However,
|
||||
# it will only work with an attached process.
|
||||
m_id = gdb.parse_and_eval('((QTimeZone*){:})->id()'.format(self.val.address))
|
||||
except:
|
||||
ptr_size = gdb.lookup_type('void').pointer().sizeof
|
||||
try:
|
||||
qshareddata_t = gdb.lookup_type('QSharedData')
|
||||
except gdb.error:
|
||||
try:
|
||||
# well, it only has a QAtomicInt in it
|
||||
qshareddata_t = gdb.lookup_type('QAtomicInt')
|
||||
except gdb.error:
|
||||
# let's hope it's the same size as an int
|
||||
qshareddata_t = gdb.lookup_type('int')
|
||||
|
||||
reader = StructReader(d)
|
||||
reader.next_val(gdb.lookup_type('void').pointer()) # vtable
|
||||
reader.next_val(qshareddata_t)
|
||||
m_id = reader.next_aligned_val(gdb.lookup_type('QByteArray'))
|
||||
|
||||
return QByteArrayPrinter(m_id).to_string()
|
||||
|
||||
def display_hint(self):
|
||||
return 'string'
|
||||
|
||||
class QVariantPrinter:
|
||||
"""Print a Qt5 QVariant"""
|
||||
|
||||
_varmap = {
|
||||
'char': 'c',
|
||||
'uchar': 'uc',
|
||||
'short': 's',
|
||||
'signed char': 'sc',
|
||||
'ushort': 'us',
|
||||
'int': 'i',
|
||||
'uint': 'u',
|
||||
'long': 'l',
|
||||
'ulong': 'ul',
|
||||
'bool': 'b',
|
||||
'double': 'd',
|
||||
'float': 'f',
|
||||
'qreal': 'real',
|
||||
'qlonglong': 'll',
|
||||
'qulonglong': 'ull',
|
||||
'QObject*': 'o',
|
||||
'void*': 'ptr'
|
||||
}
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']
|
||||
typ = int(d['type'])
|
||||
if typ == typeinfo.meta_type_unknown:
|
||||
return [('type', 'invalid')]
|
||||
|
||||
data = d['data']
|
||||
|
||||
if typ in typeinfo.meta_type_names:
|
||||
typename = typeinfo.meta_type_names[typ]
|
||||
if typename in self._varmap:
|
||||
field = self._varmap[typename]
|
||||
return [('type', typename), ('data', data[field])]
|
||||
|
||||
try:
|
||||
if typename.endswith('*'):
|
||||
gdb_type = gdb.lookup_type(typename[0:-1]).pointer()
|
||||
else:
|
||||
gdb_type = gdb.lookup_type(typename)
|
||||
except gdb.error:
|
||||
# couldn't find any type information
|
||||
return [('type', typename), ('data', data)]
|
||||
|
||||
if gdb_type.sizeof > data.type.sizeof:
|
||||
is_pointer = True
|
||||
elif (typeinfo.type_is_known_movable(gdb_type) or
|
||||
typeinfo.type_is_known_primitive(gdb_type)):
|
||||
is_pointer = False
|
||||
elif gdb_type.tag == 'enum':
|
||||
is_pointer = False
|
||||
else:
|
||||
# couldn't figure out how the type is stored
|
||||
return [('type', typename), ('data', data)]
|
||||
|
||||
if is_pointer:
|
||||
value = data['shared']['ptr'].reinterpret_cast(gdb_type.pointer())
|
||||
else:
|
||||
void_star = gdb.lookup_type('void').pointer()
|
||||
data_void = data['c'].address.reinterpret_cast(void_star)
|
||||
value = data_void.reinterpret_cast(gdb_type.pointer())
|
||||
|
||||
return [('type', typename), ('data', value.referenced_value())]
|
||||
else:
|
||||
# custom type?
|
||||
return [('type', typ), ('data', data)]
|
||||
|
||||
def to_string(self):
|
||||
return None
|
||||
|
||||
class QVarLengthArrayPrinter:
|
||||
"""Print a Qt5 QVarLengthArray"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
size = int(self.val['s'])
|
||||
|
||||
if size == 0:
|
||||
return []
|
||||
|
||||
return ArrayIter(self.val['ptr'], size)
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['s'] == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'array'
|
||||
|
||||
class QVectorPrinter:
|
||||
"""Print a Qt5 QVector"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def children(self):
|
||||
d = self.val['d']
|
||||
el_type = self.val.type.template_argument(0)
|
||||
data_len = int(d['size'])
|
||||
|
||||
if data_len == 0:
|
||||
return []
|
||||
|
||||
data_char = d.reinterpret_cast(gdb.lookup_type('char').pointer()) + d['offset']
|
||||
data = data_char.reinterpret_cast(el_type.pointer())
|
||||
|
||||
return ArrayIter(data, data_len)
|
||||
|
||||
def to_string(self):
|
||||
# if we return an empty list from children, gdb doesn't print anything
|
||||
if self.val['d']['size'] == 0:
|
||||
return '<empty>'
|
||||
return None
|
||||
|
||||
def display_hint(self):
|
||||
return 'array'
|
||||
|
||||
class QUrlPrinter:
|
||||
"""Print a Qt5 QUrl"""
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
d = self.val['d']
|
||||
if not d:
|
||||
return '<empty>'
|
||||
|
||||
int_t = gdb.lookup_type('int')
|
||||
try:
|
||||
atomicint_t = gdb.lookup_type('QAtomicInt')
|
||||
except gdb.error:
|
||||
# let's hope it's the same size as an int
|
||||
atomicint_t = int_t
|
||||
qstring_t = gdb.lookup_type('QString')
|
||||
uchar_t = gdb.lookup_type('uchar')
|
||||
|
||||
reader = StructReader(d)
|
||||
|
||||
# These fields (including order) are unstable, and
|
||||
# may change between even patch-level Qt releases
|
||||
reader.next_val(atomicint_t)
|
||||
port = int(reader.next_val(int_t))
|
||||
scheme = reader.next_val(qstring_t)
|
||||
userName = reader.next_val(qstring_t)
|
||||
password = reader.next_val(qstring_t)
|
||||
host = reader.next_val(qstring_t)
|
||||
path = reader.next_val(qstring_t)
|
||||
query = reader.next_val(qstring_t)
|
||||
fragment = reader.next_val(qstring_t)
|
||||
reader.next_val(gdb.lookup_type('void').pointer())
|
||||
sections = int(reader.next_val(uchar_t))
|
||||
flags = int(reader.next_val(uchar_t))
|
||||
|
||||
# isLocalFile and no query and no fragment
|
||||
if flags & 0x01 and not (sections & 0x40) and not (sections & 0x80):
|
||||
# local file
|
||||
return path
|
||||
|
||||
def qs_to_s(qstring):
|
||||
return QStringPrinter(qstring).to_string()
|
||||
|
||||
# QUrl::toString() is way more complicated than what we do here,
|
||||
# but this is good enough for debugging
|
||||
result = ''
|
||||
if sections & 0x01:
|
||||
result += qs_to_s(scheme) + ':'
|
||||
if sections & (0x02 | 0x04 | 0x08 | 0x10) or flags & 0x01:
|
||||
result += '//'
|
||||
if sections & 0x02 or sections & 0x04:
|
||||
result += qs_to_s(userName)
|
||||
if sections & 0x04:
|
||||
# this may appear in backtraces that will be sent to other
|
||||
# people
|
||||
result += ':<omitted>'
|
||||
result += '@'
|
||||
if sections & 0x08:
|
||||
result += qs_to_s(host)
|
||||
if port != -1:
|
||||
result += ':' + str(port)
|
||||
result += qs_to_s(path)
|
||||
if sections & 0x40:
|
||||
result += '?' + qs_to_s(query)
|
||||
if sections & 0x80:
|
||||
result += '#' + qs_to_s(fragment)
|
||||
return result
|
||||
|
||||
def display_hint(self):
|
||||
return 'string'
|
||||
|
||||
|
||||
def build_pretty_printer():
|
||||
"""Builds the pretty printer for Qt5Core."""
|
||||
pp = gdb.printing.RegexpCollectionPrettyPrinter("Qt5Core")
|
||||
pp.add_printer('QBitArray', '^QBitArray$', QBitArrayPrinter)
|
||||
pp.add_printer('QByteArray', '^QByteArray$', QByteArrayPrinter)
|
||||
pp.add_printer('QChar', '^QChar$', QCharPrinter)
|
||||
pp.add_printer('QDate', '^QDate$', QDatePrinter)
|
||||
pp.add_printer('QDateTime', '^QDateTime$', QDateTimePrinter)
|
||||
pp.add_printer('QLatin1String', '^QLatin1String$', QLatin1StringPrinter)
|
||||
pp.add_printer('QLinkedList', '^QLinkedList<.*>$', QLinkedListPrinter)
|
||||
pp.add_printer('QList', '^QList<.*>$', QListPrinter)
|
||||
pp.add_printer('QMap', '^QMap<.*>$', QMapPrinter)
|
||||
pp.add_printer('QHash', '^QHash<.*>$', QHashPrinter)
|
||||
pp.add_printer('QQueue', '^QQueue<.*>$', QListPrinter)
|
||||
pp.add_printer('QSet', '^QSet<.*>$', QSetPrinter)
|
||||
pp.add_printer('QStack', '^QStack<.*>$', QVectorPrinter)
|
||||
pp.add_printer('QString', '^QString$', QStringPrinter)
|
||||
pp.add_printer('QStringList', '^QStringList$', QListPrinter)
|
||||
pp.add_printer('QTime', '^QTime$', QTimePrinter)
|
||||
pp.add_printer('QTimeZone', '^QTimeZone$', QTimeZonePrinter)
|
||||
pp.add_printer('QVariant', '^QVariant$', QVariantPrinter)
|
||||
pp.add_printer('QVariantList', '^QVariantList$', QListPrinter)
|
||||
pp.add_printer('QVariantMap', '^QVariantMap$', QMapPrinter)
|
||||
pp.add_printer('QVector', '^QVector<.*>$', QVectorPrinter)
|
||||
pp.add_printer('QVarLengthArray', '^QVarLengthArray<.*>$', QVarLengthArrayPrinter)
|
||||
pp.add_printer('QUrl', '^QUrl$', QUrlPrinter)
|
||||
return pp
|
||||
|
||||
printer = build_pretty_printer()
|
||||
"""The pretty printer for Qt5Core.
|
||||
|
||||
This can be registered using gdb.printing.register_pretty_printer().
|
||||
"""
|
||||
|
||||
+355
@@ -0,0 +1,355 @@
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software
|
||||
# and its documentation for any purpose and without fee is hereby
|
||||
# granted, provided that the above copyright notice appear in all
|
||||
# copies and that both that the copyright notice and this
|
||||
# permission notice and warranty disclaimer appear in supporting
|
||||
# documentation, and that the name of the author not be used in
|
||||
# advertising or publicity pertaining to distribution of the
|
||||
# software without specific, written prior permission.
|
||||
#
|
||||
# The author disclaims all warranties with regard to this
|
||||
# software, including all implied warranties of merchantability
|
||||
# and fitness. In no event shall the author be liable for any
|
||||
# special, indirect or consequential damages or any damages
|
||||
# whatsoever resulting from loss of use, data or profits, whether
|
||||
# in an action of contract, negligence or other tortious action,
|
||||
# arising out of or in connection with the use or performance of
|
||||
# this software.
|
||||
|
||||
import gdb.printing
|
||||
|
||||
"""Qt5 Type Information
|
||||
|
||||
Since the QTypeInfo information is not necessarily available at debug time, this
|
||||
module contains useful type information about standard and Qt types (such as
|
||||
whether a type is movable) that is necessary for the operation of the printers.
|
||||
This information allows the QList printer, for example, to determine how the
|
||||
elements are stored in the list.
|
||||
"""
|
||||
|
||||
primitive_types = set([
|
||||
'HB_FixedPoint',
|
||||
'HB_GlyphAttributes',
|
||||
'QCharAttributes',
|
||||
'QFlag',
|
||||
'QIncompatibleFlag',
|
||||
'QRegExpAnchorAlternation',
|
||||
'QRegExpAtom',
|
||||
'QRegExpCharClassRange',
|
||||
'QStaticPlugin',
|
||||
'QStringRef',
|
||||
'QTzType',
|
||||
'QUuid'
|
||||
])
|
||||
"""Primitive (non-template) types.
|
||||
|
||||
This does not need to include compiler-primitive types (like int).
|
||||
|
||||
If you use the Q_DECLARE_TYPEINFO macro with Q_PRIMITIVE_TYPE flag, you
|
||||
should add the type to this set. This is particularly important for
|
||||
types that are the same size as a pointer or smaller.
|
||||
"""
|
||||
|
||||
primitive_tpl_types = set(['QFlags'])
|
||||
"""Primitive template types.
|
||||
|
||||
If you use the Q_DECLARE_TYPEINFO_BODY macro with Q_PRIMITIVE_TYPE flag
|
||||
on a type with template parameters, you should add the type to this
|
||||
set. This is particularly important for types that are the same size as
|
||||
a pointer or smaller.
|
||||
|
||||
Entries should just be the base typename, without any template
|
||||
parameters (eg: "QFlags", rather than "QFlags<T>").
|
||||
"""
|
||||
|
||||
movable_types = set([
|
||||
'QBasicTimer',
|
||||
'QBitArray',
|
||||
'QByteArray',
|
||||
'QChar',
|
||||
'QCharRef',
|
||||
'QCustomTypeInfo',
|
||||
'QDate',
|
||||
'QDateTime',
|
||||
'QFileInfo',
|
||||
'QEasingCurve',
|
||||
'QFileSystemWatcherPathKey',
|
||||
'QHashDummyValue',
|
||||
'QItemSelectionRange',
|
||||
'QLatin1String',
|
||||
'QLine',
|
||||
'QLineF',
|
||||
'QLocale',
|
||||
'QLoggingRule',
|
||||
'QMargins',
|
||||
'QMarginsF',
|
||||
'QMetaClassInfo',
|
||||
'QMetaEnum',
|
||||
'QMetaMethod',
|
||||
'QMimeMagicRule',
|
||||
'QModelIndex',
|
||||
'QPersistentModelIndex',
|
||||
'QObjectPrivate::Connection',
|
||||
'QObjectPrivate::Sender',
|
||||
'QPoint',
|
||||
'QPointF',
|
||||
'QPostEvent',
|
||||
'QProcEnvKey',
|
||||
'QProcEnvValue',
|
||||
'QRect',
|
||||
'QRectF',
|
||||
'QRegExp',
|
||||
'QRegExpAutomatonState',
|
||||
'QRegExpCharClass',
|
||||
'QResourceRoot',
|
||||
'QSize',
|
||||
'QSizeF',
|
||||
'QString',
|
||||
'QStringList',
|
||||
'QTime',
|
||||
'QTimeZone::OffsetData',
|
||||
'QUrl',
|
||||
'QVariant',
|
||||
'QXmlStreamAttribute',
|
||||
'QXmlStreamEntityDeclaration',
|
||||
'QXmlStreamNamespaceDeclaration',
|
||||
'QXmlStreamNotationDeclaration'
|
||||
])
|
||||
"""Movable (non-template) types.
|
||||
|
||||
If you use the Q_DECLARE_TYPEINFO macro with Q_MOVABLE_TYPE flag, you
|
||||
should add the type to this set. This is particularly important for
|
||||
types that are the same size as a pointer or smaller.
|
||||
"""
|
||||
|
||||
movable_tpl_types = set([
|
||||
'QExplicitlySharedDataPointer',
|
||||
'QLinkedList',
|
||||
'QList',
|
||||
'QPointer',
|
||||
'QQueue',
|
||||
'QSet',
|
||||
'QSharedDataPointer',
|
||||
'QSharedPointer',
|
||||
'QStack',
|
||||
'QVector',
|
||||
'QWeakPointer'
|
||||
])
|
||||
"""Movable template types.
|
||||
|
||||
If you use the Q_DECLARE_TYPEINFO_BODY macro with Q_MOVABLE_TYPE flag
|
||||
on a type with template parameters, you should add the type to this
|
||||
set. This is particularly important for types that are the same size as
|
||||
a pointer or smaller.
|
||||
|
||||
Entries should just be the base typename, without any template
|
||||
parameters (eg: "QFlags", rather than "QFlags<T>").
|
||||
"""
|
||||
|
||||
static_types = set()
|
||||
"""Static (non-template) types.
|
||||
|
||||
If you define a custom type that is neither primitive nor movable, you
|
||||
can add the type to this set to indicate this. This is particularly
|
||||
important for types that are the same size as a pointer or smaller.
|
||||
"""
|
||||
|
||||
static_tpl_types = set()
|
||||
"""Static template types.
|
||||
|
||||
If you define a custom type with template parameters that is neither
|
||||
primitive nor movable, you can add the type to this set to indicate
|
||||
this. This is particularly important for types that are the same size as
|
||||
a pointer or smaller.
|
||||
|
||||
Entries should just be the base typename, without any template
|
||||
parameters (eg: "QFlags", rather than "QFlags<T>").
|
||||
"""
|
||||
|
||||
def type_is_known_primitive(typ):
|
||||
"""Returns True if the given gdb type is known to be primitive."""
|
||||
if typ.code == gdb.TYPE_CODE_PTR or typ.code == gdb.TYPE_CODE_INT or typ.code == gdb.TYPE_CODE_FLT or typ.code == gdb.TYPE_CODE_CHAR or typ.code == gdb.TYPE_CODE_BOOL:
|
||||
return True
|
||||
pos = typ.name.find('<')
|
||||
if pos > 0:
|
||||
return typ.name[0:pos] in primitive_tpl_types
|
||||
else:
|
||||
return typ.name in primitive_types
|
||||
|
||||
def type_is_known_movable(typ):
|
||||
"""Returns True if the given gdb type is known to be movable."""
|
||||
if not typ.name:
|
||||
return False
|
||||
pos = typ.name.find('<')
|
||||
if pos > 0:
|
||||
return typ.name[0:pos] in movable_tpl_types
|
||||
else:
|
||||
return typ.name in movable_types
|
||||
|
||||
def type_is_known_static(typ):
|
||||
"""Returns True if the given gdb type is known to be neither primitive nor movable."""
|
||||
if not typ.name:
|
||||
return False
|
||||
pos = typ.name.find('<')
|
||||
if pos > 0:
|
||||
return typ.name[0:pos] in static_tpl_types
|
||||
else:
|
||||
return typ.name in static_types
|
||||
|
||||
meta_type_unknown = 0
|
||||
"""The unknown/invalid meta type ID."""
|
||||
meta_type_user = 1024
|
||||
"""The starting value for custom type IDs."""
|
||||
meta_type_ids = {
|
||||
'bool': 1,
|
||||
'int': 2,
|
||||
'uint': 3,
|
||||
'qlonglong': 4,
|
||||
'qulonglong': 5,
|
||||
'double': 6,
|
||||
'QChar': 7,
|
||||
'QVariantMap': 8,
|
||||
'QVariantList': 9,
|
||||
'QString': 10,
|
||||
'QStringList': 11,
|
||||
'QByteArray': 12,
|
||||
'QBitArray': 13,
|
||||
'QDate': 14,
|
||||
'QTime': 15,
|
||||
'QDateTime': 16,
|
||||
'QUrl': 17,
|
||||
'QLocale': 18,
|
||||
'QRect': 19,
|
||||
'QRectF': 20,
|
||||
'QSize': 21,
|
||||
'QSizeF': 22,
|
||||
'QLine': 23,
|
||||
'QLineF': 24,
|
||||
'QPoint': 25,
|
||||
'QPointF': 26,
|
||||
'QRegExp': 27,
|
||||
'QVariantHash': 28,
|
||||
'QEasingCurve': 29,
|
||||
'QUuid': 30,
|
||||
'void*': 31,
|
||||
'long': 32,
|
||||
'short': 33,
|
||||
'char': 34,
|
||||
'ulong': 35,
|
||||
'ushort': 36,
|
||||
'uchar': 37,
|
||||
'float': 38,
|
||||
'QObject*': 39,
|
||||
'signed char': 40,
|
||||
'QVariant': 41,
|
||||
'QModelIndex': 42,
|
||||
'void': 43,
|
||||
'QRegularExpression': 44,
|
||||
'QJsonValue': 45,
|
||||
'QJsonObject': 46,
|
||||
'QJsonArray': 47,
|
||||
'QJsonDocument': 48,
|
||||
'QFont': 64,
|
||||
'QPixmap': 65,
|
||||
'QBrush': 66,
|
||||
'QColor': 67,
|
||||
'QPalette': 68,
|
||||
'QIcon': 69,
|
||||
'QImage': 70,
|
||||
'QPolygon': 71,
|
||||
'QRegion': 72,
|
||||
'QBitmap': 73,
|
||||
'QCursor': 74,
|
||||
'QKeySequence': 75,
|
||||
'QPen': 76,
|
||||
'QTextLength': 77,
|
||||
'QTextFormat': 78,
|
||||
'QMatrix': 79,
|
||||
'QTransform': 80,
|
||||
'QMatrix4x4': 81,
|
||||
'QVector2D': 82,
|
||||
'QVector3D': 83,
|
||||
'QVector4D': 84,
|
||||
'QQuaternion': 85,
|
||||
'QPolygonF': 86,
|
||||
'QSizePolicy': 121
|
||||
}
|
||||
"""Map from type names to meta type IDs."""
|
||||
meta_type_names = {
|
||||
1: 'bool',
|
||||
2: 'int',
|
||||
3: 'uint',
|
||||
4: 'qlonglong',
|
||||
5: 'qulonglong',
|
||||
6: 'double',
|
||||
7: 'QChar',
|
||||
8: 'QVariantMap',
|
||||
9: 'QVariantList',
|
||||
10: 'QString',
|
||||
11: 'QStringList',
|
||||
12: 'QByteArray',
|
||||
13: 'QBitArray',
|
||||
14: 'QDate',
|
||||
15: 'QTime',
|
||||
16: 'QDateTime',
|
||||
17: 'QUrl',
|
||||
18: 'QLocale',
|
||||
19: 'QRect',
|
||||
20: 'QRectF',
|
||||
21: 'QSize',
|
||||
22: 'QSizeF',
|
||||
23: 'QLine',
|
||||
24: 'QLineF',
|
||||
25: 'QPoint',
|
||||
26: 'QPointF',
|
||||
27: 'QRegExp',
|
||||
28: 'QVariantHash',
|
||||
29: 'QEasingCurve',
|
||||
30: 'QUuid',
|
||||
31: 'void*',
|
||||
32: 'long',
|
||||
33: 'short',
|
||||
34: 'char',
|
||||
35: 'ulong',
|
||||
36: 'ushort',
|
||||
37: 'uchar',
|
||||
38: 'float',
|
||||
39: 'QObject*',
|
||||
40: 'signed char',
|
||||
41: 'QVariant',
|
||||
42: 'QModelIndex',
|
||||
43: 'void',
|
||||
44: 'QRegularExpression',
|
||||
45: 'QJsonValue',
|
||||
46: 'QJsonObject',
|
||||
47: 'QJsonArray',
|
||||
48: 'QJsonDocument',
|
||||
64: 'QFont',
|
||||
65: 'QPixmap',
|
||||
66: 'QBrush',
|
||||
67: 'QColor',
|
||||
68: 'QPalette',
|
||||
69: 'QIcon',
|
||||
70: 'QImage',
|
||||
71: 'QPolygon',
|
||||
72: 'QRegion',
|
||||
73: 'QBitmap',
|
||||
74: 'QCursor',
|
||||
75: 'QKeySequence',
|
||||
76: 'QPen',
|
||||
77: 'QTextLength',
|
||||
78: 'QTextFormat',
|
||||
79: 'QMatrix',
|
||||
80: 'QTransform',
|
||||
81: 'QMatrix4x4',
|
||||
82: 'QVector2D',
|
||||
83: 'QVector3D',
|
||||
84: 'QVector4D',
|
||||
85: 'QQuaternion',
|
||||
86: 'QPolygonF',
|
||||
121: 'QSizePolicy'
|
||||
}
|
||||
"""Map from meta type IDs to type names."""
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# alias git git_with_commiter
|
||||
#
|
||||
|
||||
function setupAuthorCommiter() {
|
||||
# predefined users
|
||||
declare -a users=( \
|
||||
'Christian Ehrlicher' \
|
||||
'Hanna Rathje' \
|
||||
'Hannes Bäuerle' \
|
||||
'Hans-Jürgen Lampe' \
|
||||
'Iuliana Ojog' \
|
||||
'Malte Diers' \
|
||||
'Mike Wille' \
|
||||
'Norbert Thoden' \
|
||||
'Patrick Galler' \
|
||||
'Patric Karwat' \
|
||||
)
|
||||
|
||||
# the users in the last 1000 commits
|
||||
committers=`git log --pretty=format:%aN -n 1000 | sort -u `
|
||||
|
||||
# join arrays committers and users
|
||||
while read -r line; do
|
||||
users=("${users[@]}" "$line")
|
||||
done <<< "$committers"
|
||||
|
||||
# make users unique
|
||||
IFS=$'\n' committers=($(sort -u <<<"${users[*]}"))
|
||||
|
||||
# the last committer
|
||||
last_committer=`git log --pretty=format:%aN -n 1`
|
||||
|
||||
# show possible users
|
||||
echo -e "\e[31mAvailable committers:\e[0m"
|
||||
defaultId=0
|
||||
for ((i=0; i < ${#committers[@]};i++)) {
|
||||
idx=$((i + 1))
|
||||
if [ "${committers[$i]}" = "$last_committer" ] ; then
|
||||
defaultId=$idx
|
||||
echo -e "\e[32m $idx - ${committers[$i]}\e[0m (default)"
|
||||
else
|
||||
echo " $idx - ${committers[$i]}"
|
||||
fi
|
||||
}
|
||||
echo " 0 - new committer"
|
||||
echo "enter a number for the committer to use or nothing for the last committer"
|
||||
|
||||
# now ask for the committer to use
|
||||
while [ true ]; do
|
||||
echo -n "Please enter number [default=${defaultId}]: "
|
||||
read line < /dev/stdin
|
||||
# empty -> default
|
||||
if [ -z $line ] ; then
|
||||
line=$defaultId
|
||||
fi
|
||||
# its a digit and between the valid range
|
||||
if [ -z "${line##[0-9]*}" ] && [ "$line" -ge 0 ] && [ "$line" -le "${#committers[@]}" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $line -eq 0 ] ; then
|
||||
echo -n "Please enter full committer name:"
|
||||
read git_name < /dev/stdin
|
||||
else
|
||||
git_name=${committers[$((line - 1))]}
|
||||
fi
|
||||
|
||||
git_email="${git_name// /.}@lifemaps.com"
|
||||
echo "Using '$git_name ($git_email)' as author and committer"
|
||||
|
||||
export GIT_AUTHOR_NAME="$git_name"
|
||||
export GIT_AUTHOR_EMAIL="$git_email"
|
||||
export GIT_COMMITTER_NAME="$git_name"
|
||||
export GIT_COMMITTER_EMAIL="$git_email"
|
||||
}
|
||||
|
||||
if [ $# -ge 1 ] ; then
|
||||
gitopt="$1"
|
||||
case $gitopt in
|
||||
commit) setupAuthorCommiter ;;
|
||||
*);;
|
||||
esac
|
||||
fi
|
||||
|
||||
exec git "$@"
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
# Created by Norbert Thoden, SLSE, 2021-03-16
|
||||
|
||||
Um die postProcessingExcon Scripte laufen zu lassen sind erforderlich
|
||||
- xls2csv zypper in xls2csv
|
||||
- cs2cs zypper install proj
|
||||
|
||||
In dem Unterverzeichnis vwm_adjustment befinden sich die Scripte von Manfred Gronak.
|
||||
Sie dienen dazu, die Positionen der Anbringungspunkte der BSM (aussen) so zu verschieben,
|
||||
dass bei Beschuss der korrekte Raum beschädigt wird.
|
||||
|
||||
Um die js-Files auszuführen sind ein paar Vorbereitungsschritte notwendig:
|
||||
|
||||
- Repository für NodeJS hinzufügen (Es sollte aktuell sein, damit die Nachinstalltionen per npm funktionieren)
|
||||
(192.168.133.111 -> Repo-Server bei Mike Wille)
|
||||
|
||||
--------------------
|
||||
ctc@CTCAP15:/etc/zypp/repos.d> cat nodejs.repo
|
||||
[nodejs]
|
||||
name=nodejs
|
||||
enabled=1
|
||||
autorefresh=1
|
||||
baseurl=http://192.168.133.111/pub/repositories/devel:/languages:/nodejs/openSUSE_Leap_15.1/
|
||||
path=/
|
||||
type=rpm-md
|
||||
keeppackages=0
|
||||
--------------------
|
||||
|
||||
|
||||
Unklar ist, welche Version nun tatsächlich notwendig ist...
|
||||
sudo zypper install nodejs
|
||||
sudo zypper install nodejs12
|
||||
|
||||
|
||||
|
||||
|
||||
- ein paar js-Pakete nachinstallieren:
|
||||
|
||||
- Proxy-Settings:
|
||||
(Aucvh wenn im Netz oft die Notation die Notation mit "@" zu lesen ist,
|
||||
|
||||
USER@PWD|PROXY:PORT --> bei OpenSuse 15.1 hat funktioniert: NEIN
|
||||
USER:PWD|PROXY:PORT --> bei OpenSuse 15.1 hat funktioniert: JA
|
||||
|
||||
npm config set proxy http://<MAIL_ADR>:<PWD>@213.61.254.67:8080
|
||||
npm config set https-proxy http://<MAIL_ADR>:<PWD>@213.61.254.67:8080
|
||||
|
||||
->
|
||||
cat ~/.npmrc
|
||||
proxy=http://norbert.thoden%40lifemaps.com:<PWD>@213.61.254.67:8080/
|
||||
https-proxy=http://norbert.thoden@lifemaps.com:<PWD>@213.61.254.67:8080
|
||||
|
||||
- npm install
|
||||
npm install xml2json
|
||||
npm install fs
|
||||
npm install xml-formatter
|
||||
npm install js2xmlparser
|
||||
|
||||
Thore:
|
||||
>>>Hallo,
|
||||
auf dem guez-15-1-qt-5-15-rpmbuild - 10.198.80.103 ist das bereits entsprechend umgesetzt:
|
||||
Zur nachlese:
|
||||
|
||||
zypper ar http://10.198.80.75/opensuse/15.1/repositories/devel:/languages:/nodejs/openSUSE_Leap_15.1/ nodejs;
|
||||
zypper rm nodejs10 nodejs10-devel –y && zypper in nodejs12 nodejs12-devel –ly;
|
||||
npm config set proxy http://10.198.80.60:3128;
|
||||
npm config set https-proxy http://10.198.80.60:3128;
|
||||
npm install npm@latest;
|
||||
npm install xml2json fs xml-formatter js2xmlparser;
|
||||
npm config delete proxy;
|
||||
npm config delete https-proxy; <<<
|
||||
|
||||
Mit su (ohen -) habe ich dann noch machen müssen:
|
||||
npm install -g xml2json fs xml-formatter js2xmlparser
|
||||
|
||||
mit npm -list -g sieht man dann, WO diese sind -> NODE_PATH
|
||||
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
me=`basename "$0"`
|
||||
searchPath="."
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
searchPath=$1
|
||||
fi;
|
||||
|
||||
echo "START '$me' at path= '${searchPath}' ..."
|
||||
|
||||
#REF_MOD_AP_0001
|
||||
|
||||
#BDI_P_1
|
||||
#CAMERA_IN_AP_1 CAMERA_OUT_AP_1
|
||||
#IPS_OUT_AP_1 IPS_IN_AP_1
|
||||
#ZEG_MOD_AP_1
|
||||
|
||||
#undest_room_201
|
||||
#SW_room_201
|
||||
#floor_1
|
||||
#xargs grep -wo 'IPS_IN_AP_[[:digit:]]\{1\}' | sort
|
||||
|
||||
|
||||
REGEXS="${REGEXS} REF_MOD_AP_[0-9]\{4\}"
|
||||
|
||||
REGEXS="${REGEXS} BDI_P_[0-9]\{1\} BDI_P_[0-9]\{2\}"
|
||||
|
||||
REGEXS="${REGEXS} CAMERA_IN_AP_[0-9]\{1\} CAMERA_IN_AP_[0-9]\{2\}"
|
||||
REGEXS="${REGEXS} CAMERA_OUT_AP_[0-9]\{1\} CAMERA_OUT_AP_[0-9]\{2\}"
|
||||
|
||||
REGEXS="${REGEXS} IPS_IN_AP_[0-9]\{1\} IPS_IN_AP_[0-9]\{2\}"
|
||||
REGEXS="${REGEXS} IPS_OUT_AP_[0-9]\{1\} IPS_OUT_AP_[0-9]\{2\}"
|
||||
|
||||
REGEXS="${REGEXS} ZEG_AP_[0-9]\{1\} ZEG_[0-9]\{2\}"
|
||||
|
||||
REGEXS="${REGEXS} floor_[0-9]\{1\} floor_[0-9]\{2\}"
|
||||
REGEXS="${REGEXS} undest_room_[0-9]\{3\}"
|
||||
REGEXS="${REGEXS} SW_room_[0-9]\{3\}"
|
||||
|
||||
|
||||
|
||||
|
||||
cnt=0;
|
||||
|
||||
for REGEX in ${REGEXS}
|
||||
do
|
||||
echo "---------------------------------------"
|
||||
((cnt=cnt+1))
|
||||
echo " check using regex_${cnt}: '${REGEX}' --->"
|
||||
find ${searchPath} -iname "*.flt.xml" | xargs grep -wo ${REGEX} | sort | uniq -cd
|
||||
echo
|
||||
done
|
||||
|
||||
echo "END '$me' ..."
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find ../GuezBuildings/buildings/ -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
import csv
|
||||
import math
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage %s <data_file_in> <script_file_out>" % sys.argv[0])
|
||||
sys.exit()
|
||||
|
||||
def convert(src, dst, x, y):
|
||||
cmd = "cs2cs -f %%.13f %s +to %s << EOF\n%s %s\nEOF" % (src, dst, x, y)
|
||||
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
|
||||
ret = p.wait()
|
||||
pos = p.stdout.read().replace('\t', ' ').split()
|
||||
#print pos
|
||||
return pos
|
||||
|
||||
def main():
|
||||
|
||||
subdir = ''
|
||||
|
||||
# Z&M 3D-Welt liefert 'RDE_Transformationspunkte...'
|
||||
# SPD / J.Treffer ueberfuehrt diese dann in 'GUEZ_BWDLZ_Transformationspunkte_Ba*.xlsx'
|
||||
|
||||
|
||||
# script_file = open('import_salchau.csv', 'w')
|
||||
# script_file = open('import_ba1.csv', 'w')
|
||||
# script_file = open('import_baXX.csv', 'w')
|
||||
# csv_file='Transformationspunkte_180704_salchau.csv'
|
||||
# csv_file='Transformationspunkte_180829_korrigiert_BWDLZ_ba1.csv'
|
||||
# csv_file='Transformationspunkte_180829_korrigiert_BWDLZ_ba2.csv'
|
||||
|
||||
# csv_file='GUEZ_BWDLZ_Salchau.csv'
|
||||
# script_filename = 'import_salchau.csv'
|
||||
|
||||
csv_file=os.path.abspath(sys.argv[1])
|
||||
script_filename=os.path.abspath(sys.argv[2])
|
||||
|
||||
print "csv_file %s" % csv_file
|
||||
print "script_filename %s" % script_filename
|
||||
|
||||
# sys.exit()
|
||||
|
||||
|
||||
|
||||
|
||||
# script_filename = 'import_ba1.csv'
|
||||
# csv_file='GUEZ_BWDLZ_Transformationspunkte_Ba_1_2_3_4_Norbert_ba1.csv'
|
||||
|
||||
# script_filename = 'import_ba2.csv'
|
||||
# csv_file='GUEZ_BWDLZ_Transformationspunkte_Ba_1_2_3_4_Norbert_ba2.csv'
|
||||
|
||||
# script_filename = 'import_ba3.csv'
|
||||
# csv_file='GUEZ_BWDLZ_Transformationspunkte_Ba_1_2_3_4_Norbert_ba3.csv'
|
||||
|
||||
# script_filename = 'import_ba4.csv'
|
||||
# csv_file='GUEZ_BWDLZ_Transformationspunkte_Ba_1_2_3_4_Norbert_ba4.csv'
|
||||
|
||||
|
||||
script_file = open(script_filename, 'w')
|
||||
|
||||
# dir_prefix = 'bldg_'
|
||||
dir_prefix = 'bldg_'
|
||||
file_prefix = dir_prefix
|
||||
|
||||
proj_from = "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs"
|
||||
proj_utm = "+init=epsg:32632"
|
||||
proj_to = "+init=epsg:4326"
|
||||
print 'parsing %s' % csv_file
|
||||
skipped_buildings_xml = []
|
||||
skipped_buildings_vwm = []
|
||||
skipped_buildings_name = []
|
||||
skipped_buildings_no_files = []
|
||||
names = []
|
||||
|
||||
|
||||
|
||||
script_file_header = "#xmlFile;vulnerabilityFile;egcuToRoomFile;position"
|
||||
script_file.write('%s\n' % (script_file_header));
|
||||
|
||||
for line in list(csv.reader(open(csv_file, 'rt'), delimiter = ',')):
|
||||
if len(line) < 7:
|
||||
print " skip line (wrong number of columns): %s" % line
|
||||
continue
|
||||
|
||||
ofs = 2;
|
||||
if line[ofs] != 'EG':
|
||||
print " skip line (no EG): %s" % line
|
||||
continue
|
||||
ofs += 1
|
||||
|
||||
name = line[0]
|
||||
if name in names:
|
||||
print "found duplicate building %s - skipping" % name
|
||||
skipped_buildings_name.append(name)
|
||||
continue
|
||||
# adjsut the names
|
||||
name = name.strip()
|
||||
if '(' in name:
|
||||
name = name[:name.index('(') - 1]
|
||||
if len(name) == 0:
|
||||
continue
|
||||
print 'Converting coordinates for building "%s"' % name
|
||||
names.append(name)
|
||||
|
||||
try:
|
||||
x = float(line[ofs].replace(',', '.'))
|
||||
ofs += 1
|
||||
y = float(line[ofs].replace(',', '.'))
|
||||
ofs += 1
|
||||
z = float(line[ofs].replace(',', '.'))
|
||||
ofs += 1
|
||||
r = float(line[ofs].replace(',', '.'))
|
||||
except:
|
||||
continue
|
||||
path = os.path.join('../GuezBuildings', 'buildings', '%s%s' % (file_prefix, name))
|
||||
if not os.path.exists(path):
|
||||
print "Can not find path " + path
|
||||
skipped_buildings_no_files.append(name)
|
||||
continue
|
||||
xml = os.path.join(path, '%s%s.flt.xml' % (file_prefix, name))
|
||||
vwm = os.path.join(path, '%s%s.flt.VWM_Building.xml' % (file_prefix, name))
|
||||
if not os.path.exists(xml):
|
||||
skipped_buildings_xml.append(name)
|
||||
continue
|
||||
if not os.path.exists(vwm):
|
||||
skipped_buildings_vwm.append(name)
|
||||
continue
|
||||
|
||||
pos_utm1 = convert(proj_from, proj_utm, x, y)
|
||||
pos_utm2 = convert(proj_from, proj_utm, x + 1, y)
|
||||
dX = float(pos_utm1[0]) - float(pos_utm2[0])
|
||||
dY = float(pos_utm1[1]) - float(pos_utm2[1])
|
||||
angle = math.atan(dY / dX)
|
||||
angle = angle * 180 / math.pi
|
||||
r += angle
|
||||
|
||||
pos = convert(proj_from, proj_to, x, y)
|
||||
lat = float(pos[0]) / 180. * math.pi
|
||||
lon = float(pos[1]) / 180. * math.pi
|
||||
#print lon, lat, pos[0], pos[1]
|
||||
|
||||
pos = '%.13f,%.13f,%.4f,%.4f' % (lat, lon, z, r);
|
||||
flt = '%s%s.flt.xml' % (file_prefix, name)
|
||||
vwm = '%s%s.flt.VWM_Building.xml' % (file_prefix, name)
|
||||
egcu = '%s%s.egcu2room.xml' % (file_prefix, name)
|
||||
script_file.write('%s;%s;%s;%s\n' % (flt, vwm, egcu, pos));
|
||||
|
||||
print 'Summary for: %s - %s' % (csv_file, script_filename)
|
||||
|
||||
if len(skipped_buildings_no_files):
|
||||
print "Skipped due to missing files: " + ', '.join(skipped_buildings_no_files)
|
||||
if len(skipped_buildings_xml):
|
||||
print "Skipped due to missing xml: " + ', '.join(skipped_buildings_xml)
|
||||
if len(skipped_buildings_vwm):
|
||||
print "Skipped due to missing vwm: " + ', '.join(skipped_buildings_vwm)
|
||||
if len(skipped_buildings_name):
|
||||
print "Skipped due to duplicate names: " + ', '.join(skipped_buildings_name)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Vendored
Executable
+74
@@ -0,0 +1,74 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# import_ba1.csv erzeugen (mittels convert_coordinates.py)
|
||||
# "osgconv.sh ba1"
|
||||
# es wird ~/rpmbuild/SOURCES/guez_buildings_ba1_buildingviewer-1.0.0.tar.gz erzeugt, inklusive import_ba1.csv
|
||||
# rpmbuild -bb --target=noarch guez_buildings_ba0_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name guez_buildings_ba0_buildingviewer
|
||||
|
||||
Summary: Guez Buildings BA0 for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Guez Buildings / BuildingViewer for BA0 (Kanaele, U_Bahn, 0910_Wasserwerk)
|
||||
Build information: @JENKINS_BUILD_TAG@
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Mar 15 2021 Norbert Thoden
|
||||
- add vwm_adjustment (MG)
|
||||
* Tue Mar 09 2021 Norbert Thoden
|
||||
- update to rev 4571 @ renoir/SPD (new structure xlsx, footprint BN_Kan)
|
||||
* Thu Dec 10 2020 Norbert Thoden
|
||||
- update (ba1,2,3,4 ; add bldg_0910)
|
||||
* Mon Jul 01 2019 Christian Ehrlicher
|
||||
- used compressed ive files / textures
|
||||
* Thu Mar 21 2019 Christian Ehrlicher
|
||||
- renamed buildings to BWDLZ naming
|
||||
* Mon Nov 26 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Nov 09 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Oct 12 2018 Christian Ehrlicher
|
||||
- updates from SPD (models, positions)
|
||||
* Mon Aug 13 2018 Christian Ehrlicher
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
cp -r %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc,755)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
Vendored
Executable
+74
@@ -0,0 +1,74 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# import_ba1.csv erzeugen (mittels convert_coordinates.py)
|
||||
# "osgconv.sh ba1"
|
||||
# es wird ~/rpmbuild/SOURCES/guez_buildings_ba1_buildingviewer-1.0.0.tar.gz erzeugt, inklusive import_ba1.csv
|
||||
# rpmbuild -bb --target=noarch guez_buildings_ba1_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name guez_buildings_ba1_buildingviewer
|
||||
|
||||
Summary: Guez Buildings BA1 for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Guez Buildings / BuildingViewer for BA1
|
||||
Build information: @JENKINS_BUILD_TAG@
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Mar 15 2021 Norbert Thoden
|
||||
- add vwm_adjustment (MG)
|
||||
* Tue Mar 09 2021 Norbert Thoden
|
||||
- update to rev 4571 @ renoir/SPD (new structure xlsx, footprint BN_Kan)
|
||||
* Thu Dec 10 2020 Norbert Thoden
|
||||
- update (ba1,2,3,4 ; add bldg_0910)
|
||||
* Mon Jul 01 2019 Christian Ehrlicher
|
||||
- used compressed ive files / textures
|
||||
* Thu Mar 21 2019 Christian Ehrlicher
|
||||
- renamed buildings to BWDLZ naming
|
||||
* Mon Nov 26 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Nov 09 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Oct 12 2018 Christian Ehrlicher
|
||||
- updates from SPD (models, positions)
|
||||
* Mon Aug 13 2018 Christian Ehrlicher
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
cp -r %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc,755)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
Vendored
Executable
+74
@@ -0,0 +1,74 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# import_ba2.csv erzeugen (mittels convert_coordinates.py)
|
||||
# "osgconv.sh ba2"
|
||||
# es wird ~/rpmbuild/SOURCES/guez_buildings_ba2_buildingviewer-1.0.0.tar.gz erzeugt, inklusive import_ba2.csv
|
||||
# rpmbuild -bb --target=noarch guez_buildings_ba2_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name guez_buildings_ba2_buildingviewer
|
||||
|
||||
Summary: Guez Buildings BA2 for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Guez Buildings / BuildingViewer for BA2
|
||||
Build information: @JENKINS_BUILD_TAG@
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Mar 15 2021 Norbert Thoden
|
||||
- add vwm_adjustment (MG)
|
||||
* Tue Mar 09 2021 Norbert Thoden
|
||||
- update to rev 4571 @ renoir/SPD (new structure xlsx, footprint BN_Kan)
|
||||
* Thu Dec 10 2020 Norbert Thoden
|
||||
- update (ba1,2,3,4 ; add bldg_2105)
|
||||
* Mon Jul 01 2019 Christian Ehrlicher
|
||||
- used compressed ive files / textures
|
||||
* Thu Mar 21 2019 Christian Ehrlicher
|
||||
- renamed buildings to BWDLZ naming
|
||||
* Mon Nov 26 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Nov 09 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Oct 12 2018 Christian Ehrlicher
|
||||
- updates from SPD (models, positions)
|
||||
* Fri Sep 28 2018 Christian Ehrlicher
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
cp -r %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc,755)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
Vendored
Executable
+62
@@ -0,0 +1,62 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# import_ba3.csv erzeugen (mittels convert_coordinates.py)
|
||||
# "osgconv.sh ba3"
|
||||
# es wird ~/rpmbuild/SOURCES/guez_buildings_ba3_buildingviewer-1.0.0.tar.gz erzeugt, inklusive import_ba3.csv
|
||||
# rpmbuild -bb --target=noarch guez_buildings_ba3_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name guez_buildings_ba3_buildingviewer
|
||||
|
||||
Summary: Guez Buildings BA3 for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Guez Buildings / BuildingViewer for BA3
|
||||
Build information: @JENKINS_BUILD_TAG@
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Mar 15 2021 Norbert Thoden
|
||||
- add vwm_adjustment (MG)
|
||||
* Tue Mar 09 2021 Norbert Thoden
|
||||
- update to rev 4571 @ renoir/SPD (new structure xlsx, footprint BN_Kan)
|
||||
* Thu Dec 10 2020 Norbert Thoden
|
||||
- initial / update (ba1,2,3,4) (copy from ba, with used compressed ive files / texture)
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
cp -r %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc,755)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
Vendored
Executable
+62
@@ -0,0 +1,62 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# import_ba3.csv erzeugen (mittels convert_coordinates.py)
|
||||
# "osgconv.sh ba4"
|
||||
# es wird ~/rpmbuild/SOURCES/guez_buildings_ba4_buildingviewer-1.0.0.tar.gz erzeugt, inklusive import_ba3.csv
|
||||
# rpmbuild -bb --target=noarch guez_buildings_ba4_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name guez_buildings_ba4_buildingviewer
|
||||
|
||||
Summary: Guez Buildings BA4 for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Guez Buildings / BuildingViewer for BA4
|
||||
Build information: @JENKINS_BUILD_TAG@
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Mar 15 2021 Norbert Thoden
|
||||
- add vwm_adjustment (MG)
|
||||
* Tue Mar 09 2021 Norbert Thoden
|
||||
- update to rev 4571 @ renoir/SPD (new structure xlsx, footprint BN_Kan)
|
||||
* Thu Dec 10 2020 Norbert Thoden
|
||||
- initial / update (ba1,2,3,4) (copy from ba, with used compressed ive files / texture)
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
cp -r %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc,755)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
Vendored
Executable
+75
@@ -0,0 +1,75 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# import_salchau.csv erzeugen (mittels convert_coordinates.py)
|
||||
# "osgconv.sh salchau"
|
||||
# es wird ~/rpmbuild/SOURCES/guez_buildings_salchau_buildingviewer-1.0.0.tar.gz erzeugt, inklusive import_salchau.csv
|
||||
# rpmbuild -bb --target=noarch guez_buildings_salchau_buildingviewer.spec
|
||||
#
|
||||
|
||||
%define real_name guez_buildings_salchau_buildingviewer
|
||||
|
||||
Summary: Guez Buildings Salchau for BuildingViewer
|
||||
Name: %{real_name}
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: proprietary
|
||||
Group: Applications/Resources
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
Provides: %{real_name}
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
3D Models for Guez Buildings / BuildingViewer for BA1-Salchau
|
||||
Build information: @JENKINS_BUILD_TAG@
|
||||
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Mar 15 2021 Norbert Thoden
|
||||
- add vwm_adjustment (MG)
|
||||
* Tue Mar 09 2021 Norbert Thoden
|
||||
- update to rev 4571 @ renoir/SPD (new structure xlsx, footprint BN_Kan)
|
||||
* Tue Jan 05 2021 Norbert Thoden
|
||||
- update to rev 4568 @ renoir/SPD
|
||||
* Mon Jul 01 2019 Christian Ehrlicher
|
||||
- used compressed ive files / textures
|
||||
* Wed Mar 20 2019 Christian Ehrlicher
|
||||
- renamed buildings to BWDLZ naming
|
||||
* Mon Nov 26 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Nov 09 2018 Christian Ehrlicher
|
||||
- updates from SPD (models)
|
||||
* Fri Oct 12 2018 Christian Ehrlicher
|
||||
- updates from SPD (models, positions)
|
||||
* Mon Aug 13 2018 Christian Ehrlicher
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/opt/BuildingModels/"
|
||||
cp -r %{_builddir}/%{buildsubdir}/* %{buildroot}/opt/BuildingModels/
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,ctc,ctc,755)
|
||||
/opt/BuildingModels/
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Please pass: <VERSION>, <location>, <absPathTo_import_<location>.csv> like '1234.54123 <ba0|ba1|ba2|ba3|ba4|salchau> /shd/...../import_ba0.csv'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=$1
|
||||
location=$2
|
||||
import_csv=$3
|
||||
outdir_rel=guez_buildings_${location}_buildingviewer-${version}
|
||||
tmpdir=/tmp
|
||||
outdir=${tmpdir}/${outdir_rel}
|
||||
outdir_ive=${outdir}/StaticMeshes
|
||||
outdir_txt=${outdir}/texture
|
||||
|
||||
rm -rf ${outdir}
|
||||
|
||||
echo "Attn: must be called in directory with building subdirs!"
|
||||
|
||||
if [ ! -e ${outdir_ive} ]; then
|
||||
mkdir -p ${outdir_ive}
|
||||
fi
|
||||
if [ ! -e ${outdir_txt} ]; then
|
||||
mkdir -p ${outdir_txt}
|
||||
fi
|
||||
|
||||
# remove old directory
|
||||
rm -r $outdir_txt
|
||||
# copy texture directory for conversion
|
||||
cp -r texture ${outdir_txt}
|
||||
# copy all files in texture to upper case (windows...)
|
||||
for f in `ls -1 ${outdir_txt}`; do
|
||||
f_upper="${f^^}"
|
||||
f_lower="${f,,}"
|
||||
if [ "${f}x" != "${f_upper}x" ]; then
|
||||
cp ${outdir_txt}/$f ${outdir_txt}/$f_upper
|
||||
fi
|
||||
if [ "${f}x" != "${f_lower}x" ]; then
|
||||
cp ${outdir_txt}/$f ${outdir_txt}/$f_lower
|
||||
fi
|
||||
done
|
||||
|
||||
dirs=`find . -maxdepth 1 -type d | sort -n`
|
||||
pwd=`pwd`
|
||||
cd $outdir_ive
|
||||
infile=${import_csv}
|
||||
if [ ! -e ${infile} ]; then
|
||||
echo "Can not find import file ${infile}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for d in `cat ${infile} | cut -d ';' -f 1 | cut -d '.' -f 1`; do
|
||||
d=`basename $d`
|
||||
srcdir=${pwd}/${d}
|
||||
# nur fertig, wenn .flt und .flt.xml vorhanden sind
|
||||
if [ -e ${srcdir}/${d}.flt ] && [ -e ${srcdir}/${d}.flt.xml ]; then
|
||||
echo "converting $srcdir ..."
|
||||
osgconv --compressed ${srcdir}/${d}.flt ${outdir_ive}/${d}.flt.ive -O "compressed"
|
||||
cp ${srcdir}/$d.*.xml ${outdir_ive}/
|
||||
cp ${srcdir}/$d.*.xml.wrl ${outdir_ive}/
|
||||
echo "... finished"
|
||||
else
|
||||
echo " does not exist: " ${d}
|
||||
fi
|
||||
done
|
||||
rm -r $outdir_txt
|
||||
|
||||
cp ${infile} ${outdir_ive}
|
||||
cd ${tmpdir}
|
||||
tar cvzf ~/rpmbuild/SOURCES/guez_buildings_${location}_buildingviewer-${version}.tar.gz ${outdir_rel}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 2
|
||||
fi
|
||||
rm -rf ${outdir_rel}
|
||||
cd ${pwd}
|
||||
|
||||
echo "tar.tgz created: guez_buildings_${location}_buildingviewer-${version}.tar.gz"
|
||||
echo "Now you can run rpmbuild -bb --target=noarch guez_buildings_${location}_buildingviewer.spec"
|
||||
|
||||
Vendored
Executable
+57
@@ -0,0 +1,57 @@
|
||||
--- ./bldg_1251/bldg_1251.flt.xml 2021-12-14 11:19:13.992559100 +0100
|
||||
+++ ./bldg_1251/bldg_1251.flt_OKAY.xml 2021-12-14 11:24:43.046227800 +0100
|
||||
@@ -38,20 +38,7 @@
|
||||
<Coord Z="2.260" Y="-0.100" X="0.100" />
|
||||
<Dir Z="0.000" Y="1.000" X="0.000" />
|
||||
</External_Reference>
|
||||
- <External_Reference>
|
||||
- <Name>REF_MOD_AP_0008</Name>
|
||||
- <SubId ID="11008" />
|
||||
- <Model NAME="REFMOD_01.flt" />
|
||||
- <Coord Z="4.720" Y="7.773" X="-0.125" />
|
||||
- <Dir Z="0.000" Y="0.000" X="-1.000" />
|
||||
- </External_Reference>
|
||||
- <External_Reference>
|
||||
- <Name>REF_MOD_AP_0007</Name>
|
||||
- <SubId ID="11007" />
|
||||
- <Model NAME="REFMOD_01.flt" />
|
||||
- <Coord Z="2.326" Y="7.774" X="-0.126" />
|
||||
- <Dir Z="0.000" Y="0.000" X="-1.000" />
|
||||
- </External_Reference>
|
||||
+
|
||||
<External_Reference>
|
||||
<Name>IPS_OUT_AP_1</Name>
|
||||
<SubId ID="15001" />
|
||||
@@ -307,6 +294,16 @@
|
||||
<Coord Z="0.300" Y="7.034" X="1.510" />
|
||||
<Dir Z="0.000" Y="1.000" X="0.000" />
|
||||
</External_Reference>
|
||||
+
|
||||
+ <External_Reference>
|
||||
+ <Name>REF_MOD_AP_0007</Name>
|
||||
+ <SubId ID="11007" />
|
||||
+ <Model NAME="REFMOD_01.flt" />
|
||||
+ <Coord Z="2.326" Y="7.774" X="-0.126" />
|
||||
+ <Dir Z="0.000" Y="0.000" X="-1.000" />
|
||||
+ </External_Reference>
|
||||
+
|
||||
+
|
||||
</Group>
|
||||
</Switch>
|
||||
</Group>
|
||||
@@ -498,6 +495,15 @@
|
||||
<Coord Z="4.844" Y="6.126" X="0.090" />
|
||||
<Dir Z="0.000" Y="0.000" X="1.000" />
|
||||
</External_Reference>
|
||||
+
|
||||
+ <External_Reference>
|
||||
+ <Name>REF_MOD_AP_0008</Name>
|
||||
+ <SubId ID="11008" />
|
||||
+ <Model NAME="REFMOD_01.flt" />
|
||||
+ <Coord Z="4.720" Y="7.773" X="-0.125" />
|
||||
+ <Dir Z="0.000" Y="0.000" X="-1.000" />
|
||||
+ </External_Reference>
|
||||
+
|
||||
</Group>
|
||||
</Switch>
|
||||
</Group>
|
||||
specs/external/guez_buildings/postProcessingExcon/patches/patch_bldg_2101.flt.VWM_Building.xml.patch
Vendored
Executable
+46
@@ -0,0 +1,46 @@
|
||||
--- ./bldg_2101/bldg_2101.flt.VWM_Building.xml 2021-11-30 15:16:54.645671400 +0100
|
||||
+++ ./bldg_2101/bldg_2101.flt.VWM_Building_OKAY.xml 2021-11-30 15:18:13.861363200 +0100
|
||||
@@ -2827,7 +2827,42 @@
|
||||
</Room>
|
||||
<Room>
|
||||
<RoomId>2202</RoomId>
|
||||
- <NeighborRooms />
|
||||
+
|
||||
+ <NeighborRooms>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2108</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2107</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2101</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2102</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2103</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2104</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2105</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ <NeighborRoom>
|
||||
+ <RoomId>2106</RoomId>
|
||||
+ <TransitionFactor>0.9998</TransitionFactor>
|
||||
+ </NeighborRoom>
|
||||
+ </NeighborRooms>
|
||||
+
|
||||
<RoomOuterWalls>
|
||||
<OuterWall>
|
||||
<OuterWallAreaElement>
|
||||
specs/external/guez_buildings/postProcessingExcon/patches/patch_bldg_3100.flt.VWM_Building.xml.patch
Vendored
Executable
+19
@@ -0,0 +1,19 @@
|
||||
--- ./bldg_3100/bldg_3100.flt.VWM_Building.xml 2021-10-25 13:28:07.654517700 +0200
|
||||
+++ ./bldg_3100/bldg_3100.flt.VWM_Building.xmlOKAY 2021-10-25 13:29:34.533732400 +0200
|
||||
@@ -48,7 +48,8 @@
|
||||
</PolygonPoint>
|
||||
</OuterWallAreaElement>
|
||||
<ExclusionZones/>
|
||||
- </OuterWall>
|
||||
+ <OuterWallProtectiveFactor>200</OuterWallProtectiveFactor>
|
||||
+ </OuterWall>
|
||||
<OuterWall>
|
||||
<OuterWallAreaElement>
|
||||
<PolygonPoint>
|
||||
@@ -14204,4 +14205,4 @@
|
||||
</RoomOuterWalls>
|
||||
</Room>
|
||||
</Rooms>
|
||||
-</BuildingVulnerability>
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
+</BuildingVulnerability>
|
||||
Vendored
Executable
+38
@@ -0,0 +1,38 @@
|
||||
--- ./bldg_3101/bldg_3101.flt.xml 2021-12-01 11:10:17.696553000 +0100
|
||||
+++ ./bldg_3101/bldg_3101.flt.OKAY.xml 2021-12-01 11:12:16.394860200 +0100
|
||||
@@ -297,7 +297,7 @@
|
||||
<Group>
|
||||
<Name>undest_room_102</Name>
|
||||
<BBox_Min Z="-0.300" Y="4.205" X="-0.070" />
|
||||
- <BBox_Max Z="2.740" Y="13.720" X="16.719" />
|
||||
+ <BBox_Max Z="2.740" Y="13.720" X="7.29101234567" />
|
||||
<Group>
|
||||
<Name>FOOTPRINT</Name>
|
||||
<BBox_Min Z="0.000" Y="4.462" X="0.180" />
|
||||
@@ -655,7 +655,7 @@
|
||||
<SubId ID="2108" />
|
||||
<Group>
|
||||
<Name>undest_room_108</Name>
|
||||
- <BBox_Min Z="-0.300" Y="4.221" X="4.985" />
|
||||
+ <BBox_Min Z="-0.300" Y="4.221" X="10.72601234567" />
|
||||
<BBox_Max Z="2.740" Y="13.720" X="18.089" />
|
||||
<Group>
|
||||
<Name>FOOTPRINT</Name>
|
||||
@@ -737,7 +737,7 @@
|
||||
<SubId ID="2109" />
|
||||
<Group>
|
||||
<Name>undest_room_109</Name>
|
||||
- <BBox_Min Z="-0.300" Y="-0.164" X="4.985" />
|
||||
+ <BBox_Min Z="-0.300" Y="-0.164" X="14.26201234567" />
|
||||
<BBox_Max Z="2.740" Y="4.462" X="18.089" />
|
||||
<Group>
|
||||
<Name>FOOTPRINT</Name>
|
||||
@@ -899,7 +899,7 @@
|
||||
<SubId ID="2112" />
|
||||
<Group>
|
||||
<Name>undest_room_112</Name>
|
||||
- <BBox_Min Z="-0.300" Y="-0.070" X="3.567" />
|
||||
+ <BBox_Min Z="-0.300" Y="-0.070" X="7.29101234567" />
|
||||
<BBox_Max Z="2.740" Y="4.462" X="16.719" />
|
||||
<Group>
|
||||
<Name>FOOTPRINT</Name>
|
||||
+408
@@ -0,0 +1,408 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
env
|
||||
|
||||
file_location=`pwd`
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
|
||||
###
|
||||
### Presets
|
||||
###
|
||||
PROJECT="GUEZ"
|
||||
xlsxfile=GUEZ_BWDLZ_BA-0_BA-IV_Transformationspunkte_201210_Korrektur_2021-12-16
|
||||
xlsxfile=GUEZ_BWDLZ_BA-0_BA-IV_Transformationspunkte_201210_Korrektur_2021-12-16_Umbenn2022-02-24
|
||||
|
||||
SPD_BLDGS=../GuezBuildings/buildings
|
||||
LOCATIONS_LIST="ba0 ba1 ba2 ba3 ba4 salchau"
|
||||
|
||||
|
||||
|
||||
echo "Comment: remove some temporary files... revert some other..."
|
||||
rm -v GUEZ_BWDLZ*.csv
|
||||
rm -v ./import*.csv
|
||||
rm -v ./${xlsxfile}*
|
||||
rm -v vwm_adjustment*.log
|
||||
rm -v checkProtective*.log
|
||||
rm -v checkDuplicateNames*.log
|
||||
|
||||
###
|
||||
### revert *.spec
|
||||
###
|
||||
svn revert *.spec
|
||||
|
||||
###
|
||||
### check-out / revert bldgs
|
||||
###
|
||||
echo "Comment: revert bldgs: $SPD_BLDGS ..."
|
||||
rm -rfv $SPD_BLDGS/bldg_3145_47
|
||||
svn revert -R $SPD_BLDGS
|
||||
|
||||
###
|
||||
# remove uneeded: bldg_hierarchie.flt, directory bldg_EGCU_test
|
||||
###
|
||||
rm -v $SPD_BLDGS/bldg_hierarchie.flt
|
||||
rm -rfv $SPD_BLDGS/bldg_EGCU_test
|
||||
mv -v $SPD_BLDGS/bldg_3145-47 $SPD_BLDGS/bldg_3145_47
|
||||
find $SPD_BLDGS -iname "*egcu2room*" -delete
|
||||
find $SPD_BLDGS -iname "*.wrl" -delete
|
||||
find $SPD_BLDGS -iname "*.patch" -delete
|
||||
|
||||
###
|
||||
# fix syntax: bldg_3141_26.flt.VWM_Building.xml
|
||||
###
|
||||
BEFORE="<ExclusionZoneProtectiveFactor>20<\/OuterWallProtectiveFactor>"
|
||||
AFTER="<OuterWallProtectiveFactor>20<\/OuterWallProtectiveFactor>"
|
||||
sed -i "s/${BEFORE}/${AFTER}/g" $SPD_BLDGS/bldg_3141_26/bldg_3141_26.flt.VWM_Building.xml
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
|
||||
|
||||
# Fix bldg_3101 (16.787/16.786 ; remove linear dependencies (GUEZE-605, GUEZE-717 ; CheckAwesOnBldg_3101_verteilt.sh)
|
||||
sed -i 's/16.787/16.786/g' $SPD_BLDGS/bldg_3101/bldg_3101.flt.xml
|
||||
sed -i 's/16.787/16.786/g' $SPD_BLDGS/bldg_3101/bldg_3101.flt.VWM_Building.xml
|
||||
|
||||
# remove 1141n
|
||||
rm -rv $SPD_BLDGS/bldg_1141n
|
||||
|
||||
|
||||
###
|
||||
### Apply some patches: early to be idenpendent from modifications by replace_transistion_factors etc.
|
||||
###
|
||||
# Do it here, because the final xml structure is avaible now (node.js converts to json and back to xml....)
|
||||
#
|
||||
# fix Bbox / placement of 4 roomnames at 3101: 102, 108, 109, 112
|
||||
#
|
||||
# diff -Naur ./bldg_3100/bldg_3100.flt.VWM_Building.xml ./bldg_3100/bldg_3100.flt.VWM_Building.xmlOKAY
|
||||
#
|
||||
|
||||
cp -v ./patches/* $SPD_BLDGS
|
||||
if [ $? -ne 0 ]; then echo "copy command (patches) failed" ; fi
|
||||
|
||||
pushd $SPD_BLDGS
|
||||
if [ $? -ne 0 ]; then echo "cd command failed" ; fi
|
||||
|
||||
echo "Comment: cd building ; patching.."
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
dos2unix ./bldg_3101/bldg_3101.flt.xml
|
||||
cp ./bldg_3101/bldg_3101.flt.xml ./bldg_3101/bldg_3101.flt.xml_bak
|
||||
patch -p1 < patch_bldg_3101.flt.xml.patch
|
||||
if [ $? -ne 0 ]; then echo "patch (patch_bldg_3101.flt.xml.patch) failed" ; exit ; fi
|
||||
|
||||
# add missing OuterWallProtectiveFactor
|
||||
# 2021-11-19: patch ist scheinbar obsolet:
|
||||
#dos2unix bldg_3100/bldg_3100.flt.VWM_Building.xml
|
||||
#patch -p1 < patch_bldg_3100.flt.VWM_Building.xml.patch
|
||||
# if [ $? -ne 0 ]; then echo "patch (patch_bldg_3100.flt.VWM_Building.xml.patch) failed" ; fi
|
||||
|
||||
# add missing neigbors (bldg_2101: quick and dirty: just from top to bottom...)
|
||||
dos2unix bldg_2101/bldg_2101.flt.VWM_Building.xml
|
||||
cp bldg_2101/bldg_2101.flt.VWM_Building.xml bldg_2101/bldg_2101.flt.VWM_Building.xml_bak
|
||||
patch -p1 < patch_bldg_2101.flt.VWM_Building.xml.patch
|
||||
if [ $? -ne 0 ]; then echo "patch (patch_bldg_2101.flt.VWM_Building.xml.patch) failed" ; exit ; fi
|
||||
|
||||
# move 2 REF_MOD / BSM from outdoor to correct room: bldg_1251.flt.xml (GUEZE-973)
|
||||
# patch_bldg_1251.flt.xml.patch not required anymore
|
||||
#dos2unix bldg_1251/bldg_1251.flt.xml
|
||||
#cp bldg_1251/bldg_1251.flt.xml bldg_1251/bldg_1251.flt.xml_bak
|
||||
#patch -p1 < patch_bldg_1251.flt.xml.patch
|
||||
# if [ $? -ne 0 ]; then echo "patch (patch_bldg_1251.flt.xml.patch) failed" ; exit ; fi
|
||||
|
||||
|
||||
popd
|
||||
|
||||
|
||||
|
||||
###
|
||||
### check ProtectiveFactor according VEMAG
|
||||
###
|
||||
# Wall -> 200
|
||||
# Ceiling -> 200
|
||||
# ExclusiveDoor -> 20
|
||||
# ExclusiveWindow -> 0
|
||||
#
|
||||
echo "Comment: checkProtectiveFactors ..."
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
./checkProtective.sh > checkProtective.log
|
||||
protectiveErrorCnt=`cat checkProtective.log | grep "failure" | wc -l`
|
||||
echo -e "Comment: Problems regarding wrong protectiveFactors at some files: cnt: $protectiveErrorCnt"
|
||||
|
||||
|
||||
###
|
||||
### xmllint
|
||||
###
|
||||
echo "Comment: verify xml using xmllint on $SPD_BLDGS ..."
|
||||
rm /tmp/xmllintDummyout.xml
|
||||
find $SPD_BLDGS -iname "*.xml" | xargs xmllint > /tmp/xmllintDummyout.xml
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "xmllint failed" ; exit
|
||||
else
|
||||
echo "xmllint successfull"
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
### check duplicate names
|
||||
###
|
||||
echo "Comment: check duplicate names on $SPD_BLDGS ..."
|
||||
./checkDuplicateNames.sh $SPD_BLDGS > checkDuplicateNames.log
|
||||
checkDuplicateNamesCnt=`cat checkDuplicateNames.log | grep "flt" | wc -l`
|
||||
echo -e "Comment: Problems regarding duplicate Names at some files: cnt: $checkDuplicateNamesCnt"
|
||||
|
||||
|
||||
###
|
||||
### update _Transformationspunkte
|
||||
###
|
||||
####
|
||||
echo "Comment: update _Transformationspunkte......"
|
||||
cd $SPD_BLDGS/../_Transformationspunkte
|
||||
svn up --username thoden --password SPDsvnTH
|
||||
cd -
|
||||
####
|
||||
|
||||
###
|
||||
### Create VERSION_STR (containing a) rev of SPD and b) of this scripts)
|
||||
###
|
||||
# result will look like '4573.53084'
|
||||
#
|
||||
echo "Comment: create VERSION_STR..."
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
# get last mod rev and remove whitespace
|
||||
VERSION_POST_PROC=`svn info . | grep -E 'Letzte ge|Last Changed Rev' | awk -F ':' '{print $2 }'`
|
||||
VERSION_POST_PROC=`echo $VERSION_POST_PROC | sed -e 's/[[:space:]]*$//'`
|
||||
echo "VERSION_POST_PROC = '$VERSION_POST_PROC'"
|
||||
if [ -z "$VERSION_POST_PROC" ] ; then echo "VERSION_POST_PROC could not be determined" ; exit; fi
|
||||
|
||||
# get lst mod rev and remove whitespace
|
||||
VERSION1=`svn info $SPD_BLDGS | grep -E 'Letzte ge|Last Changed Rev' | awk -F ':' '{print $2 }'`
|
||||
VERSION1=`echo $VERSION1 | sed -e 's/[[:space:]]*$//'`
|
||||
echo "VERSION1 = '$VERSION1'"
|
||||
if [ -z "$VERSION1" ] ; then echo "VERSION1 could not be determined" ; exit; fi
|
||||
|
||||
VERSION2=`svn info $SPD_BLDGS/../_Transformationspunkte | grep -E 'Letzte ge|Last Changed Rev' | awk -F ':' '{print $2 }'`
|
||||
VERSION2=`echo $VERSION2 | sed -e 's/[[:space:]]*$//'`
|
||||
echo "VERSION2 = '$VERSION2'"
|
||||
if [ -z "$VERSION2" ] ; then echo "VERSION2 could not be determined" ; exit; fi
|
||||
|
||||
if (( $VERSION1 > $VERSION2 )); then
|
||||
VERSION_SPD_BLDGS=$VERSION1;
|
||||
else
|
||||
VERSION_SPD_BLDGS=$VERSION2;
|
||||
fi
|
||||
if [ -z "$VERSION_POST_PROC" ] ; then echo "VERSION_SPD_BLDGS could not be determined" ; exit; fi
|
||||
|
||||
# Please do not add strings to VERSION_STR. rpm -Uhv will have problem with it....
|
||||
echo "VERSION_SPD_BLDGS = '$VERSION_SPD_BLDGS'"
|
||||
echo "VERSION_POST_PROC = '$VERSION_POST_PROC'"
|
||||
VERSION_STR="${VERSION_SPD_BLDGS}.${VERSION_POST_PROC}"
|
||||
echo "VERSION_STR = '$VERSION_STR'"
|
||||
|
||||
|
||||
###
|
||||
### vwm_adjustment
|
||||
###
|
||||
# NodeJS:
|
||||
# multiple dirs: 1st for jenkins, 2nd for CTCAP15/Norbert
|
||||
export NODE_PATH='/usr/lib/node_modules:../node_modules'
|
||||
echo "Comment: NODE_PATH=" $NODE_PATH
|
||||
echo "Comment: vwm_adjustment at dir $SPD_BLDGS"
|
||||
node ./vwm_adjustment/RECURSIV/pos_dir_guez.js $SPD_BLDGS &> vwm_adjustment.log
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then echo " node vwm_adjustment failed" ; tail -n200 vwm_adjustment.log;
|
||||
exit
|
||||
else
|
||||
echo " node vwm_adjustment finished";
|
||||
fi
|
||||
|
||||
|
||||
# Renoir-repos has xml files without svn:eol-style.
|
||||
# So 'svn co' on unix will create files with CR+LF (Windows EOL)
|
||||
# To ensure usefull 'svn diff' showing only the real differences, convert to CR+LF:
|
||||
# execute unix2dos on all files adjusted (vwm_adjustment)
|
||||
echo "Comment: unix2dos (quiet)"
|
||||
find $FILE -name "*flt.xml" | xargs unix2dos -q
|
||||
find $FILE -name "*VWM_Building.xml" | xargs unix2dos -q
|
||||
|
||||
|
||||
|
||||
# for debug:
|
||||
# svn st ../GuezBuildings/buildings/bldg_0910/
|
||||
# svn diff ../GuezBuildings/buildings/bldg_0910/
|
||||
# svn diff ../GuezBuildings/buildings/bldg_0910/bldg_0910.flt.xml
|
||||
|
||||
|
||||
### seperate sheets:
|
||||
# xlsx to xls
|
||||
FILE=$SPD_BLDGS/../_Transformationspunkte/${xlsxfile}.xlsx
|
||||
if [ ! -f "$FILE" ]; then echo "$FILE does not exist." ; exit; fi
|
||||
cp -v $FILE .
|
||||
if [ $? -ne 0 ]; then echo "copy command failed" ; fi
|
||||
|
||||
FILE=./${xlsxfile}.xlsx
|
||||
if [ ! -f "$FILE" ]; then echo "$FILE does not exist." ; exit; fi
|
||||
soffice --headless --convert-to SOFFICE_CONVERTED.xls $FILE
|
||||
#-> GUEZ_BWDLZ_BA-0_BA-IV_Transformationspunkte_201210.SOFFICE_CONVERTED.xls
|
||||
if [ $? -ne 0 ]; then echo "soffice command failed" ; fi
|
||||
|
||||
|
||||
# xls to csv
|
||||
echo "Comment: xlsx to xls..."
|
||||
xlsfile=${xlsxfile}.SOFFICE_CONVERTED.xls
|
||||
|
||||
|
||||
echo "Comment: xls to single csv files..."
|
||||
xls2csv -x ${xlsfile} -n1 -c GUEZ_BWDLZ_salchau.csv
|
||||
xls2csv -x ${xlsfile} -n2 -c GUEZ_BWDLZ_ba0.csv
|
||||
xls2csv -x ${xlsfile} -n3 -c GUEZ_BWDLZ_ba1.csv
|
||||
xls2csv -x ${xlsfile} -n4 -c GUEZ_BWDLZ_ba2.csv
|
||||
xls2csv -x ${xlsfile} -n5 -c GUEZ_BWDLZ_ba3.csv
|
||||
xls2csv -x ${xlsfile} -n6 -c GUEZ_BWDLZ_ba4.csv
|
||||
|
||||
# sort
|
||||
for loc in ${LOCATIONS_LIST}
|
||||
do
|
||||
cat GUEZ_BWDLZ_${loc}.csv | sort > temp.txt
|
||||
mv temp.txt GUEZ_BWDLZ_${loc}.csv
|
||||
done
|
||||
rm temp.txt
|
||||
|
||||
# replace some strings
|
||||
# like BN_Kan -> BN_Kanaele and so on
|
||||
sed -i 's/BN_Kan/BN_Kanaele/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/U-Bahn/U_Bahn/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^571/salchau_571/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^574/salchau_574/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^575/salchau_575/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^576/salchau_576/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^577/salchau_577/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^tunnel/salchau_tunnel/g' GUEZ_BWDLZ_salchau.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
|
||||
# ^314126 -> ^3141_26 ; # ^314127 -> ^3141_27
|
||||
sed -i 's/^314126/3141_26/' GUEZ_BWDLZ_ba3.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
sed -i 's/^314127/3141_27/' GUEZ_BWDLZ_ba3.csv
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
|
||||
|
||||
# bldg 3145-47 -> bldg 3145_47
|
||||
cat GUEZ_BWDLZ_ba3.csv | grep -v BN_3146 > copy_GUEZ_BWDLZ_ba3.csv
|
||||
cp copy_GUEZ_BWDLZ_ba3.csv GUEZ_BWDLZ_ba3.csv
|
||||
rm copy_GUEZ_BWDLZ_ba3.csv
|
||||
sed -i 's/^3145/3145_47/g' GUEZ_BWDLZ_ba3.csv
|
||||
|
||||
|
||||
###
|
||||
### convert_coordinate.py
|
||||
###
|
||||
echo "Comment: convert_coordinates.py angles"
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
FILE=./convert_coordinates.py
|
||||
if [ ! -f "$FILE" ]; then echo "$FILE does not exist." ; exit; fi
|
||||
|
||||
for loc in ${LOCATIONS_LIST}
|
||||
do
|
||||
csv_cnt=`cat import_${loc}.csv | grep -v "^#" | wc -l`
|
||||
python ./convert_coordinates.py GUEZ_BWDLZ_${loc}.csv ./import_${loc}.csv
|
||||
cat GUEZ_BWDLZ_${loc}.csv | sort > temp.txt
|
||||
mv temp.txt GUEZ_BWDLZ_{loc}.csv
|
||||
done
|
||||
|
||||
###
|
||||
### Copy some files to $SPD_BLDGS
|
||||
###
|
||||
echo "Comment: cd building ; osgconv.sh"
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
cp -v ./osgconv.sh $SPD_BLDGS
|
||||
if [ $? -ne 0 ]; then echo "copy command (osgconv.sh) failed" ; fi
|
||||
|
||||
pushd $SPD_BLDGS
|
||||
if [ $? -ne 0 ]; then echo "cd command failed" ; fi
|
||||
|
||||
|
||||
for loc in ${LOCATIONS_LIST}
|
||||
do
|
||||
./osgconv.sh $VERSION_STR ${loc} ${file_location}/import_${loc}.csv
|
||||
done
|
||||
|
||||
### back to location of this file
|
||||
popd
|
||||
|
||||
echo "Comment: rpmbuild..."
|
||||
echo "Comment: current wd is: " `pwd`
|
||||
|
||||
|
||||
###
|
||||
### Prepare spec files:
|
||||
###
|
||||
echo "Comment: replace some vars at *.spec"
|
||||
|
||||
echo "VERSION_STR = '$VERSION_STR'"
|
||||
sed -i "s/@VERSION@/$VERSION_STR/g" guez_buildings*buildingviewer.spec
|
||||
if [ $? -ne 0 ]; then echo "sed command failed" ; fi
|
||||
|
||||
###
|
||||
### JENKINS:
|
||||
###
|
||||
if [ -z "$BUILD_TAG" ] ; then echo "JENKINS BUILD_TAG not defined, set to '-'" ; BUILD_TAG="NoTag" ; fi
|
||||
if [ -z "$BUILD_NUMBER" ] ; then echo "JENKINS BUILD_NUMBER not defined, set to '0'" ; BUILD_NUMBER=0 ; fi
|
||||
JENKINS_BUILD_TAG="${BUILD_TAG}"
|
||||
echo "JENKINS_BUILD_TAG: ${JENKINS_BUILD_TAG}"
|
||||
sed -i "s/@JENKINS_BUILD_TAG@/${JENKINS_BUILD_TAG}/g" guez_buildings*buildingviewer.spec
|
||||
if [ $? -ne 0 ]; then echo "sed command JENKINS_BUILD_TAG failed" ; fi
|
||||
sed -i "s/@RELEASE@/${BUILD_NUMBER}/g" guez_buildings*buildingviewer.spec
|
||||
if [ $? -ne 0 ]; then echo "sed command RELEASE failed" ; fi
|
||||
|
||||
|
||||
for loc in ${LOCATIONS_LIST}
|
||||
do
|
||||
rpmbuild -bb --target=noarch guez_buildings_${loc}_buildingviewer.spec
|
||||
if [ $? -ne 0 ]; then echo "rpmbuild command failed for spec 'guez_buildings_${loc}_buildingviewer.spec'" ; fi
|
||||
done
|
||||
|
||||
echo "rpmbuild... finished"
|
||||
|
||||
|
||||
csv_cnt_sum=0
|
||||
rpm_cnt_sum=0
|
||||
for loc in ${LOCATIONS_LIST}
|
||||
do
|
||||
csv_cnt=`cat import_${loc}.csv | grep -v "^#" | wc -l`
|
||||
rpm_cnt=`rpm -ql ~/rpmbuild/RPMS/noarch/guez_buildings_${loc}_buildingviewer-${VERSION_STR}-0.noarch.rpm | grep flt.xml | wc -l`
|
||||
echo -e "Comment: #bldgs: csv: $csv_cnt \t - rpm: $rpm_cnt \t at import_${loc}.csv"
|
||||
csv_cnt_sum=$(($csv_cnt_sum + $csv_cnt))
|
||||
rpm_cnt_sum=$(($rpm_cnt_sum + $rpm_cnt))
|
||||
done
|
||||
echo -e "Comment: #bldgs: csv: $csv_cnt_sum \t - rpm: $rpm_cnt_sum - Over all"
|
||||
|
||||
echo "Comment: Problems of EGCU_CONF..."
|
||||
grep "EGCU pro Etage" vwm_adjustment.log | sort -u
|
||||
grep "EGCU pro Etage" vwm_adjustment.log | sort -u | wc -l
|
||||
|
||||
echo -e "Comment: Problems regarding wrong protectiveFactors at some files: cnt: $protectiveErrorCnt"
|
||||
echo -e "Comment: Problems regarding duplicate Names at some files: cnt: $checkDuplicateNamesCnt"
|
||||
|
||||
|
||||
## JENKINS?
|
||||
if [ -z ${WORKSPACE} ]
|
||||
then
|
||||
echo "rpmbuild... move to - skipped"
|
||||
else
|
||||
echo "rpmbuild... move to "
|
||||
echo "VERSION_STR = '$VERSION_STR'"
|
||||
DST_DIR=${WORKSPACE}/rpms/
|
||||
mkdir ${DST_DIR}
|
||||
mv -v ~/rpmbuild/RPMS/noarch/guez_buildings*$VERSION_STR*.rpm ${DST_DIR}
|
||||
fi
|
||||
Vendored
Executable
+233
@@ -0,0 +1,233 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, 2021-03
|
||||
var fs = require("fs");
|
||||
var parser = require('xml2json');
|
||||
var format = require('xml-formatter');
|
||||
|
||||
var util = require('util');
|
||||
var path = require('path');
|
||||
|
||||
/****************** Hier editieren **********************/
|
||||
// Verschiebung der BSM weiter weg von der Wand
|
||||
var delta = 0.11;
|
||||
|
||||
/********************************************************/
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
this.BSM_pos = function BSM_pos(OriginalxmlFile) {
|
||||
|
||||
var xmlFileNeu = OriginalxmlFile + "_neu";
|
||||
|
||||
var content = fs.readFileSync(OriginalxmlFile);
|
||||
|
||||
var lines = content + '';
|
||||
lines = lines.split("\n");
|
||||
|
||||
// try to save the comment generated by Structure Explorer to be re-inserted later
|
||||
var comment;
|
||||
if (lines[2].includes('HdrLastDate')) {
|
||||
comment = lines[2];
|
||||
|
||||
var idx = comment.lastIndexOf("-->");
|
||||
if (idx > 10)
|
||||
comment = [comment.slice(0, idx), "- PostProcessed by SLTE $Rev$", comment.slice(idx)].join('');
|
||||
}
|
||||
|
||||
console.log("OriginalxmlFile=" + OriginalxmlFile);
|
||||
console.log("Filename=" + path.basename(OriginalxmlFile) );
|
||||
|
||||
var FileNamesArray = path.basename(OriginalxmlFile).split('.');
|
||||
var bldg_name = FileNamesArray[0];
|
||||
console.log("bldg_name = '" + bldg_name + "'" );
|
||||
const specialMovementArray = {
|
||||
"bldg_3106_11005": "0.150012345678",
|
||||
"bldg_3138_11003": "0.150012345678",
|
||||
"bldg_3139_11010": "0.150012345678",
|
||||
"bldg_3139_11011": "0.150012345678",
|
||||
"bldg_3140_11004": "0.160012345678",
|
||||
"bldg_3144_11008": "0.150012345678",
|
||||
"bldg_3144_11010": "0.150012345678",
|
||||
"bldg_3148_11006": "0.150012345678",
|
||||
"bldg_3152_11006": "0.150012345678",
|
||||
"bldg_3152_11007": "0.150012345678",
|
||||
"bldg_3156_11022": "0.150012345678",
|
||||
"bldg_3159_11012": "0.150012345678",
|
||||
|
||||
"bldg_2100_11002": "0.250012345678",
|
||||
"bldg_4115_11003": "0.150012345678",
|
||||
"bldg_4115_11005": "0.150012345678",
|
||||
"bldg_4115_11006": "0.150012345678",
|
||||
"bldg_4115_11007": "0.150012345678",
|
||||
"bldg_4115_11017": "0.150012345678",
|
||||
"bldg_4147_11012": "0.150012345678",
|
||||
"bldg_4155_11003": "0.150012345678",
|
||||
"bldg_4194_11002": "0.250012345678",
|
||||
|
||||
"bldg_4119_11007": "0.250012345678",
|
||||
"bldg_4120_11008": "0.250012345678",
|
||||
"bldg_4121_11010": "0.150012345678",
|
||||
"bldg_4121_11014": "0.150012345678",
|
||||
"bldg_4122_11009": "0.150012345678",
|
||||
"bldg_4122_11012": "0.150012345678",
|
||||
"bldg_4123_11001": "0.150012345678",
|
||||
"bldg_4123_11003": "0.150012345678",
|
||||
"bldg_4123_11013": "0.150012345678",
|
||||
|
||||
"bldg_4130_11006": "0.250012345678",
|
||||
"bldg_4130_11008": "0.250012345678",
|
||||
"bldg_4130_11009": "0.250012345678",
|
||||
}
|
||||
console.log("specialMovementArray " + util.inspect(specialMovementArray, {showHidden: false, depth: 2}));
|
||||
|
||||
|
||||
var jsonFileInhalt = parser.toJson(content, {
|
||||
reversible: true
|
||||
});
|
||||
var jsonContent = JSON.parse(jsonFileInhalt);
|
||||
|
||||
|
||||
// start with "1" to skip bldg FOOTPRINT
|
||||
var j;
|
||||
for (j = 1; j < Object.keys(jsonContent.STREIF.Header.Group.Group).length; j++) {
|
||||
// test, ob Element jsonContent.STREIF.Header.Group.Group[j] vorhanden ist
|
||||
//console.log("0 SHGGS " + j + "-" + util.inspect(jsonContent.STREIF.Header.Group.Group[j], { showHidden: false, depth: 3}));
|
||||
|
||||
if (jsonContent.STREIF.Header.Group.Group[j].Switch) {
|
||||
// console.log("1 SHGGS " + j + "-" + util.inspect(jsonContent.STREIF.Header.Group.Group[j].Switch, {showHidden: false, depth: 2}));
|
||||
|
||||
// in case of just a single room per floor,
|
||||
// -> jsonContent.STREIF.Header.Group.Group[j].Switch is NOT an array
|
||||
// -> jsonContent.STREIF.Header.Group.Group[j].Switch).length is undefined!
|
||||
// ==> wrap into an array:
|
||||
if (!Array.isArray(jsonContent.STREIF.Header.Group.Group[j].Switch)) {
|
||||
// wrap obj into an array
|
||||
var dummy = new Array;
|
||||
dummy[0] = jsonContent.STREIF.Header.Group.Group[j].Switch;
|
||||
jsonContent.STREIF.Header.Group.Group[j].Switch = dummy;
|
||||
}
|
||||
if (!Array.isArray(jsonContent.STREIF.Header.Group.Group[j].Switch))
|
||||
console.log("Switch noArray at " + OriginalxmlFile);
|
||||
|
||||
|
||||
var k;
|
||||
for (k = 0; k < Object.keys(jsonContent.STREIF.Header.Group.Group[j].Switch).length; k++) {
|
||||
// test, ob Elelemant jsonContent.STREIF.Header.Group.Group[j].Switch[k]] vorhanden ist
|
||||
if (jsonContent.STREIF.Header.Group.Group[j].Switch[k]) {
|
||||
|
||||
//console.log("2 SHGGS " + util.inspect(jsonContent.STREIF.Header.Group.Group[j].Switch[k], {showHidden: false, depth: 1}));
|
||||
console.log("2 SHGGS " + jsonContent.STREIF.Header.Group.Group[j].Switch[k].Name.$t);
|
||||
|
||||
|
||||
if (jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group == null) {
|
||||
console.log("Missing GroupNode1 at " + OriginalxmlFile + ", Data:" + util.inspect(jsonContent.STREIF.Header.Group.Group[j].Switch[k], {showHidden: false, depth: 2}));
|
||||
continue;
|
||||
}
|
||||
if (jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group.External_Reference == null) {
|
||||
console.log("Missing GroupNode2 at " + OriginalxmlFile + ", Data:" + util.inspect(jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group, {showHidden: false, depth: 2}));
|
||||
continue;
|
||||
}
|
||||
|
||||
// convert object to array to enable forEach:
|
||||
if (!Array.isArray(jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group.External_Reference)){
|
||||
jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group.External_Reference = [jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group.External_Reference]
|
||||
}
|
||||
|
||||
|
||||
if (!Array.isArray(jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group.External_Reference))
|
||||
console.log("External_Reference: noArray at " + OriginalxmlFile);
|
||||
|
||||
jsonContent.STREIF.Header.Group.Group[j].Switch[k].Group.External_Reference.forEach(extRef => {
|
||||
|
||||
console.log("XXXX current extRe " + util.inspect(extRef, { showHidden: false, depth: 3}));
|
||||
|
||||
var ID = ~~(extRef.SubId.ID / 1000);
|
||||
if (ID == 11) {
|
||||
var finalDelta = delta;
|
||||
var idx = bldg_name + "_" +extRef.SubId.ID;
|
||||
if (specialMovementArray[idx])
|
||||
{
|
||||
finalDelta = specialMovementArray[idx];
|
||||
console.log("specialMovementArray: found, finalDelta= " + finalDelta);
|
||||
}
|
||||
|
||||
console.log("adjust on item ..." + util.inspect(extRef, { showHidden: false, depth: 2 }));
|
||||
extRef.Coord.X = parseFloat(extRef.Coord.X) + (finalDelta * parseFloat(extRef.Dir.X));
|
||||
extRef.Coord.Y = parseFloat(extRef.Coord.Y) + (finalDelta * parseFloat(extRef.Dir.Y));
|
||||
extRef.Coord.Z = parseFloat(extRef.Coord.Z) + (finalDelta * parseFloat(extRef.Dir.Z));
|
||||
console.log("adjust on item " + util.inspect(extRef, { showHidden: false, depth: 2 }) + " done");
|
||||
}
|
||||
|
||||
}); // forEach
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handle outdoor elements:
|
||||
// console.log("outdoor SHGGS " + j + "-" + util.inspect(jsonContent.STREIF.Header.Group.External_Reference, { showHidden: false, depth: 3}));
|
||||
|
||||
|
||||
if (!Array.isArray(jsonContent.STREIF.Header.Group.External_Reference)) {
|
||||
jsonContent.STREIF.Header.Group.External_Reference = [jsonContent.STREIF.Header.Group.External_Reference]
|
||||
}
|
||||
|
||||
jsonContent.STREIF.Header.Group.External_Reference.forEach(extRef => {
|
||||
|
||||
// console.log("outdoor current extRe " + util.inspect(extRef, { showHidden: false, depth: 3}));
|
||||
|
||||
var ID = ~~(extRef.SubId.ID / 1000);
|
||||
if (ID == 11) {
|
||||
var finalDelta = delta;
|
||||
var idx = bldg_name + "_" +extRef.SubId.ID;
|
||||
if (specialMovementArray[idx])
|
||||
{
|
||||
finalDelta = specialMovementArray[idx];
|
||||
console.log("specialMovementArray: found, finalDelta= " + finalDelta);
|
||||
}
|
||||
|
||||
console.log("outdoor: adjust on item ..." + util.inspect(extRef, { showHidden: false, depth: 2 }));
|
||||
extRef.Coord.X = parseFloat(extRef.Coord.X) + (finalDelta * parseFloat(extRef.Dir.X));
|
||||
extRef.Coord.Y = parseFloat(extRef.Coord.Y) + (finalDelta * parseFloat(extRef.Dir.Y));
|
||||
extRef.Coord.Z = parseFloat(extRef.Coord.Z) + (finalDelta * parseFloat(extRef.Dir.Z));
|
||||
console.log("outdoor: adjust on item " + util.inspect(extRef, { showHidden: false, depth: 2 }) + " done");
|
||||
}
|
||||
}); // forEach
|
||||
|
||||
|
||||
|
||||
var Rooms = jsonContent;
|
||||
|
||||
var stringified = JSON.stringify(Rooms);
|
||||
var ausgabe = parser.toXml(stringified);
|
||||
|
||||
|
||||
if (comment)
|
||||
var formattedXml = '<?xml version="1.0" ?>' + '\n' + comment + '\n' + format(ausgabe, {
|
||||
collapseContent: true,
|
||||
lineSeparator: '\n'
|
||||
});
|
||||
else
|
||||
var formattedXml = '<?xml version="1.0" ?>' + '\n' + format(ausgabe, {
|
||||
collapseContent: true,
|
||||
lineSeparator: '\n'
|
||||
});
|
||||
|
||||
// Renoir-repos has xml files without svn:eol-style.
|
||||
// So 'svn co' will create files with CR+LF (Windows EOL)
|
||||
// To enable an svn diff showingf only the real differences, write with CR+LF:
|
||||
|
||||
// write to < OriginalxmlFile | xmlFileNeu >
|
||||
fs.writeFileSync(OriginalxmlFile, formattedXml, function(err) {
|
||||
// If an error occurred, show it
|
||||
if (err) {
|
||||
console.log("Error on writing file: " + OriginalxmlFile);
|
||||
console.err(err);
|
||||
}
|
||||
});
|
||||
|
||||
} // end of function
|
||||
} // export
|
||||
Vendored
Executable
+160
@@ -0,0 +1,160 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, , 2021-04
|
||||
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var parser = require('xml2json');
|
||||
var util = require("util");
|
||||
|
||||
|
||||
var stableSort = (arr, compare) => arr
|
||||
.map((item, index) => ({
|
||||
item,
|
||||
index
|
||||
}))
|
||||
.sort((a, b) => compare(a.item, b.item) || a.index - b.index)
|
||||
.map(({
|
||||
item
|
||||
}) => item)
|
||||
|
||||
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
this.EGCU_conf = function EGCU_conf(OriginalxmlFile) {
|
||||
|
||||
// console.log("EGCU_CONF: orgFile", OriginalxmlFile);
|
||||
|
||||
//OriginalxmlFile = ../GuezBuildings/buildings/bldg_1235/bldg_1235.flt.xml
|
||||
// dirname = ../GuezBuildings/buildings/bldg_1235
|
||||
// basename = bldg_1235
|
||||
// newname ../GuezBuildings/buildings/bldg_1235/bldg_1235.egcu.xml
|
||||
var dirname = path.dirname(OriginalxmlFile);
|
||||
var basename = path.basename(OriginalxmlFile, '.flt.xml');
|
||||
var newFileName = dirname + '/' + basename + '.egcu2room.xml';
|
||||
|
||||
|
||||
var content = fs.readFileSync(OriginalxmlFile);
|
||||
|
||||
var jsonFileInhalt = parser.toJson(content);
|
||||
var jsonContent = JSON.parse(jsonFileInhalt);
|
||||
|
||||
var numberOfBDI = 0;
|
||||
var BDI_Elements_Raw = [];
|
||||
|
||||
// convert object to array to enable forEach:
|
||||
if (!Array.isArray(jsonContent.STREIF.Header.Group.External_Reference)){
|
||||
jsonContent.STREIF.Header.Group.External_Reference = [jsonContent.STREIF.Header.Group.External_Reference]
|
||||
}
|
||||
|
||||
jsonContent.STREIF.Header.Group.External_Reference.forEach(Element => {
|
||||
|
||||
if (Element.Name.substring(0, 6) == 'BDI_P_') {
|
||||
BDI_Elements_Raw.push(Element);
|
||||
numberOfBDI = numberOfBDI + 1;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var BDI_Elements = stableSort(BDI_Elements_Raw, (a, b) => a.Coord.Z - b.Coord.Z);
|
||||
|
||||
|
||||
var Switch_Elements = [];
|
||||
|
||||
jsonContent.STREIF.Header.Group.Group.forEach(Group => {
|
||||
Switch_Elements.push(Group.Switch);
|
||||
});
|
||||
|
||||
var i;
|
||||
|
||||
var Rooms = [];
|
||||
|
||||
|
||||
for (i = 1; i < Object.keys(Switch_Elements).length; i++) {
|
||||
var j;
|
||||
if (util.isArray(Switch_Elements[i])) {
|
||||
// console.log(Object.keys(Switch_Elements[i]).length);
|
||||
for (j = 0; j < Object.keys(Switch_Elements[i]).length; j++) {
|
||||
Rooms.push(Switch_Elements[i][j]);
|
||||
}
|
||||
} else {
|
||||
Rooms.push(Switch_Elements[i]);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Test auf mindestens EGCU in einer Etage... ");
|
||||
|
||||
// Test auf mindestens EGCU in einer Etage
|
||||
BDI_Elements.forEach(BDI => {
|
||||
var k = 0;
|
||||
BDI_Elements.forEach(BDI2 => {
|
||||
if (parseInt(BDI.Coord.Z) == parseInt(BDI2.Coord.Z))
|
||||
k = k + 1;
|
||||
});
|
||||
if (k > 1) {
|
||||
console.log("EGCU_CONF: mehr als eine EGCU pro Etage " + OriginalxmlFile + " -> " + k);
|
||||
// process.exit();
|
||||
}
|
||||
});
|
||||
|
||||
var EgcuToRooms = "<EgcusToRooms>\n";
|
||||
var z = 0;
|
||||
|
||||
BDI_Elements.forEach(BDI => {
|
||||
z = z + 1;
|
||||
EgcuToRooms = EgcuToRooms + " <Egcu>\n <Mountpoint>\n";
|
||||
EgcuToRooms = EgcuToRooms + " <Name>" + BDI.Name + "</Name>\n";
|
||||
EgcuToRooms = EgcuToRooms + " <SubId>" + BDI.SubId.ID + "</SubId>\n";
|
||||
EgcuToRooms = EgcuToRooms + " </Mountpoint>\n <Rooms>\n";
|
||||
|
||||
|
||||
Rooms.forEach(Room => {
|
||||
|
||||
console.log("Room === " + util.inspect(Room, { showHidden: false, depth: 3}));
|
||||
|
||||
if (Object.keys(BDI_Elements).length == 1) {
|
||||
if (typeof(Room) !== 'undefined') {
|
||||
EgcuToRooms = EgcuToRooms + " <Name>" + Room.Name + "</Name>\n";
|
||||
EgcuToRooms = EgcuToRooms + " <SubId>" + Room.SubId.ID + "</SubId>\n";
|
||||
}
|
||||
} else {
|
||||
|
||||
if (typeof(Room) !== 'undefined') {
|
||||
console.log("XXXX Room === " + util.inspect(Room, { showHidden: false, depth: 3}));
|
||||
console.log("XXXX BDI === " + util.inspect(BDI, { showHidden: false, depth: 3}));
|
||||
var difference = BDI.Coord.Z - Room.Group.BBox_Min.Z;
|
||||
if (parseInt(difference) == 0) {
|
||||
EgcuToRooms = EgcuToRooms + " <Name>" + Room.Name + "</Name>\n";
|
||||
EgcuToRooms = EgcuToRooms + " <SubId>" + Room.SubId.ID + "</SubId>\n";
|
||||
}
|
||||
if (numberOfBDI == z) {
|
||||
if (parseInt(difference) < 0) {
|
||||
EgcuToRooms = EgcuToRooms + " <Name>" + Room.Name + "</Name>\n";
|
||||
EgcuToRooms = EgcuToRooms + " <SubId>" + Room.SubId.ID + "</SubId>\n";
|
||||
}
|
||||
}
|
||||
} // if
|
||||
} // if
|
||||
});
|
||||
EgcuToRooms = EgcuToRooms + " </Rooms>\n </Egcu>\n"
|
||||
});
|
||||
|
||||
EgcuToRooms = EgcuToRooms + '</EgcusToRooms>\n';
|
||||
|
||||
|
||||
console.log(newFileName);
|
||||
// console.log(EgcuToRooms);
|
||||
|
||||
|
||||
fs.writeFileSync(newFileName, EgcuToRooms, function(err) {
|
||||
// If an error occurred, show it and return
|
||||
console.log("EgcuToRooms.xml geschrieben")
|
||||
if (err) return console.error(err);
|
||||
// Successfully wrote binary contents to the file!
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
Executable
+101
@@ -0,0 +1,101 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, , 2021-03
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
// require ('./analyse_vmw_file.js')();
|
||||
require ('./replace_transistion_factors.js')();
|
||||
require('./BSM_pos.js')();
|
||||
require('./egcu_conf.js')();
|
||||
require('./vwmXmlToVrmlWrl.js')();
|
||||
|
||||
require('./simplify_polygons.js')();
|
||||
|
||||
var myArgs = process.argv.slice(2);
|
||||
|
||||
console.log('myArgs: ', myArgs);
|
||||
|
||||
|
||||
// const GUEZ_DIR = '/media/tbox/423F-1127/DATENGEBAEUDE_GUEZ';
|
||||
// const GUEZ_DIR = '/shd/CTC/TOOLS/GuezBuildings/buildingsXXXXX';
|
||||
|
||||
const GUEZ_DIR = myArgs[0];
|
||||
console.log('adjust file at directory: ', GUEZ_DIR);
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
|
||||
|
||||
fs.readdir(GUEZ_DIR, (err, files) => {
|
||||
|
||||
if (err) return console.error(err);
|
||||
|
||||
|
||||
|
||||
var DirNames = files.toString();
|
||||
|
||||
var DirNamesArray = DirNames.split(',');
|
||||
|
||||
DirNamesArray.forEach(DirName => {
|
||||
if (DirName.substring(0, 5) == 'bldg_') {
|
||||
console.log("Working at directory: " + DirName);
|
||||
|
||||
if ( (DirName == 'bldg_1141n') ||
|
||||
(DirName == 'bldg_1102_Treppen') )
|
||||
{
|
||||
console.log("Skip subdir '", DirName + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
fs.readdir(GUEZ_DIR + '/' + DirName, (err, subdir_files) => {
|
||||
if (err) return console.error(err);
|
||||
var SubDirNames = subdir_files.toString();
|
||||
var FileNamesArray = SubDirNames.split(',');
|
||||
|
||||
FileNamesArray.forEach(FileName => {
|
||||
|
||||
var FileNamePartArray = FileName.split('.');
|
||||
// console.log("process file: ", FileNamePartArray);
|
||||
// if (FileNamePartArray[0] == 'bldg_1199' && FileNamePartArray[2] == 'VWM_Building' && FileNamePartArray[3] == 'xml' && FileNamePartArray.length == 4) {
|
||||
if (FileNamePartArray[2] == 'VWM_Building' && FileNamePartArray[3] == 'xml' && FileNamePartArray.length == 4) {
|
||||
|
||||
var File_Path = GUEZ_DIR + '/' + DirName + '/' + FileName;
|
||||
console.log("XXXXX1 File_Path: " + File_Path );
|
||||
simplify_polygons(File_Path); // Aktiviert wg. blgd_0910_Raum2201_Wall0 (8 vertex -> 4) - GUEZE-1004
|
||||
console.log("XXXXX2 File_Path: " + File_Path );
|
||||
replace_transistion_factors(File_Path);
|
||||
|
||||
// create wrl files (VRML). Usefull to find missing outerwalls:
|
||||
console.log("XXXXX3 File_Path: " + File_Path );
|
||||
VwmXmlToWrl(File_Path)
|
||||
} // end if
|
||||
|
||||
|
||||
if (FileNamePartArray[1] == 'flt' && FileNamePartArray[2] == 'xml' && FileNamePartArray.length == 3) {
|
||||
var File_Path = GUEZ_DIR + '/' + DirName + '/' + FileName;
|
||||
console.log("XXXXX4 File_Path: " + File_Path );
|
||||
BSM_pos(File_Path);
|
||||
}
|
||||
|
||||
if (FileNamePartArray[1] == 'flt' && FileNamePartArray[2] == 'xml' && FileNamePartArray.length == 3) {
|
||||
var File_Path = GUEZ_DIR + '/' + DirName + '/' + FileName;
|
||||
console.log("XXXXX5 File_Path: " + File_Path );
|
||||
EGCU_conf(File_Path);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}); // readdir
|
||||
|
||||
|
||||
|
||||
} // end if
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Vendored
Executable
+288
@@ -0,0 +1,288 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, 2021-03
|
||||
const fs = require('fs');
|
||||
|
||||
var parser = require('xml2json');
|
||||
|
||||
var js2xmlparser = require('js2xmlparser');
|
||||
var format = require('xml-formatter');
|
||||
|
||||
var util = require('util');
|
||||
|
||||
/****************** Hier editieren **********************/
|
||||
// Das ist der Transistion Factor, der für alle vertikalen Transitionen eingetragen werden soll
|
||||
// Muss ausgetestet werden.
|
||||
var TransitionFactor_vertical = 0.15;
|
||||
var TransitionFactor_horizontal_min = 0.03; // former MG=0.1
|
||||
|
||||
var TransitionFactor_horizontal_min_limit = 0.03;
|
||||
|
||||
var BelowGroundBldgs = ['U_Bahn', 'xxx'];
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
this.replace_transistion_factors = function replace_transistion_factors(xmlFile) {
|
||||
|
||||
const OriginalVWMFile = xmlFile;
|
||||
|
||||
var content = fs.readFileSync(OriginalVWMFile);
|
||||
|
||||
var jsonFileInhalt;
|
||||
var jsonContent;
|
||||
try {
|
||||
jsonFileInhalt = parser.toJson(content);
|
||||
jsonContent = JSON.parse(jsonFileInhalt);
|
||||
} catch (e) {
|
||||
console.log("Parsing error bei Datei " + OriginalVWMFile + " -> " + e.message); // Datei geschrieben
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var BuildingName = jsonContent.BuildingVulnerability.BuildingName;
|
||||
BuildingName = BuildingName.substring(5); // bldg_U_Bahn -> U_Bahn
|
||||
|
||||
if (BelowGroundBldgs.includes(BuildingName))
|
||||
{
|
||||
console.log("BuildingName '" + BuildingName + "' -> use special values (like TransistionFactors)");
|
||||
TransitionFactor_vertical = 0.129988;
|
||||
TransitionFactor_horizontal_min = 0.129999; // U-Bahn
|
||||
}
|
||||
|
||||
|
||||
|
||||
// try to save the comment generated by Structure Explorer to be re-inserted later
|
||||
var lines = content + '';
|
||||
lines = lines.split("\n");
|
||||
|
||||
var comment;
|
||||
if (lines[2].includes('HdrLastDate')) {
|
||||
comment = lines[2];
|
||||
|
||||
var idx = comment.lastIndexOf("-->");
|
||||
if (idx > 10)
|
||||
comment = [comment.slice(0, idx), "- PostProcessed by SLTE $Rev$", comment.slice(idx)].join('');
|
||||
}
|
||||
|
||||
|
||||
var i;
|
||||
var RoomId;
|
||||
var NeighborRoomRoomId;
|
||||
var index;
|
||||
|
||||
var RoomArray = jsonContent.BuildingVulnerability.Rooms.Room;
|
||||
if (RoomArray == null) {
|
||||
console.log("Datei " + OriginalVWMFile + ": " + " WARNING, no RoomArray detected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
console.log("Datei " + OriginalVWMFile + ": " + Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length + " Rooms detected");
|
||||
|
||||
if (Array.isArray(jsonContent.BuildingVulnerability.Rooms.Room)) {
|
||||
// console.log("1Array: ");
|
||||
} else {
|
||||
// No Array..
|
||||
// wrap obj into an array to ensure 'RoomArray.forEach(...'
|
||||
var dummy = new Array;
|
||||
dummy[0] = jsonContent.BuildingVulnerability.Rooms.Room;
|
||||
jsonContent.BuildingVulnerability.Rooms.Room = dummy;
|
||||
}
|
||||
|
||||
|
||||
// check number of floors:
|
||||
var maxfloor = -1;
|
||||
var roomsPerFloor = new Map;
|
||||
for (i = 0; i < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length; i++) {
|
||||
console.log("RaumID " + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId);
|
||||
|
||||
var floor = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId - 2000);
|
||||
floor = ~~(floor / 100);
|
||||
console.log(" floor=" + floor);
|
||||
if (floor > maxfloor)
|
||||
maxfloor = floor;
|
||||
|
||||
var maxRoomNumber = jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId - 2000;
|
||||
maxRoomNumber = maxRoomNumber - (floor*100.0);
|
||||
console.log(" maxRoomNumber " + maxRoomNumber + " (" + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId + ")");
|
||||
|
||||
|
||||
console.log(" roomsPerFloor " + ", Data:" + util.inspect(roomsPerFloor, {showHidden: false, depth: 2}));
|
||||
|
||||
console.log(" roomsPerFloor " + roomsPerFloor);
|
||||
if (!roomsPerFloor.has(floor))
|
||||
roomsPerFloor.set(floor, 0);
|
||||
|
||||
if (maxRoomNumber > roomsPerFloor.get(floor))
|
||||
{
|
||||
console.log(" update: maxRoomNumber=" + maxRoomNumber + " at floor " + floor);
|
||||
roomsPerFloor.set(floor, maxRoomNumber);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("maxfloor " + maxfloor);
|
||||
|
||||
|
||||
var removeCandidates = new Array;
|
||||
|
||||
for (i = 0; i < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length; i++) {
|
||||
// Reduzierung auf die Etage
|
||||
// console.log("RaumID" + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId);
|
||||
|
||||
if (jsonContent.BuildingVulnerability.Rooms.Room[i] == null) {
|
||||
console.log("Missing RoomId at " + OriginalVWMFile);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
RoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId / 100);
|
||||
// console.log(RoomId);
|
||||
var j;
|
||||
// console.log(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms);
|
||||
// Test, ob ein Raum keine Nachbarraeume hat. Wenn dann entfernen
|
||||
if (!jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom) {
|
||||
|
||||
var roomToBeRemove = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId - 2000);
|
||||
var roomFloor = ~~(roomToBeRemove / 100);
|
||||
|
||||
// Nur oberste Etage, nur wenn mehr als eine Etage:
|
||||
if (roomFloor == maxfloor && roomsPerFloor.size > 1) {
|
||||
console.log("Element RoomId " + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId + " muesste entfernt werden at: " + OriginalVWMFile + " (maxfloor=" + maxfloor + ", rooms at previous floor:" + roomsPerFloor.get(maxfloor-1) + "m i=" + i +")");
|
||||
removeCandidates.push({'roomToBeRemovedCandidateIdx' : i, 'roomToBeRemovedCandidateRoomNumber' : jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId});
|
||||
// // delete jsonContent.BuildingVulnerability.Rooms.Room[i];
|
||||
} else
|
||||
console.log("Skip Element RoomId " + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId + " wird entfernt at: " + OriginalVWMFile + " (maxfloor=" + maxfloor + ")");
|
||||
|
||||
|
||||
} else {
|
||||
//console.log(Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[0].NeighborRooms.NeighborRoom).length);
|
||||
|
||||
for (j = 0; j < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length; j++) {
|
||||
|
||||
// console.log(jsonContent.BuildingVulnerability.Rooms.Room[0].NeighborRooms.NeighborRoom.NeighborRoom.RoomId);
|
||||
// Test, ob Raeume in der gleiche Etage liegen. Wenn nicht dann Transistion Faktoren einschreiben
|
||||
// console.log(Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length);
|
||||
if (Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length == 1) {
|
||||
NeighborRoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.RoomId / 100);
|
||||
if (RoomId != NeighborRoomId)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.TransitionFactor = TransitionFactor_vertical;
|
||||
else {
|
||||
if (jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.TransitionFactor <= TransitionFactor_horizontal_min)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.TransitionFactor = TransitionFactor_horizontal_min;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (typeof jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j] !== 'undefined') {
|
||||
// console.log(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].RoomId);
|
||||
NeighborRoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].RoomId / 100);
|
||||
if (RoomId != NeighborRoomId)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].TransitionFactor = TransitionFactor_vertical;
|
||||
else {
|
||||
if (jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].TransitionFactor <= TransitionFactor_horizontal_min)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].TransitionFactor = TransitionFactor_horizontal_min;
|
||||
}
|
||||
} else { // if undefined
|
||||
// console.log("NeighborRooms.NeighborRoom is undefined at: " + OriginalVWMFile);
|
||||
// relevant for bldg_salchau_tunnel.flt.VWM_Building.xml, bldg_BN_Kanaele and many more (78 files at this moment)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.TransitionFactor = TransitionFactor_vertical;
|
||||
}
|
||||
} // if
|
||||
} // for
|
||||
}
|
||||
}
|
||||
|
||||
// check
|
||||
|
||||
if (Object.keys(removeCandidates).length > 0) {
|
||||
// how can we process 2 rooms at the roof ??? (like Guez bldg_2101)
|
||||
if (Object.keys(removeCandidates).length > 1) {
|
||||
console.log("ERROR at " + OriginalVWMFile + " : adding neighbor failed, more then one removeCandidates: size=" + Object.keys(removeCandidates).length);
|
||||
} else {
|
||||
|
||||
removeCandidates.forEach(item => {
|
||||
var roomToBeRemovedCandidateIdx = item.roomToBeRemovedCandidateIdx;
|
||||
var roomToBeRemovedCandidateRoomNumber = item.roomToBeRemovedCandidateRoomNumber;
|
||||
|
||||
if (roomToBeRemovedCandidateIdx > 0)
|
||||
{
|
||||
console.log("roomToBeRemovedCandidateIdx=" + roomToBeRemovedCandidateIdx + ", roomToBeRemovedCandidateRoomNumber=" + roomToBeRemovedCandidateRoomNumber);
|
||||
|
||||
// console.log("NeighborRooms " + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1], {showHidden: false, depth: 3}));
|
||||
// console.log("NeighborRooms " + Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].NeighborRooms.NeighborRoom).length );
|
||||
|
||||
var lowerRoomId = jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].RoomId;
|
||||
|
||||
// add lower to topmost room:
|
||||
{
|
||||
// console.log("jsonContent11 " + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx], {showHidden: false, depth: 5}));
|
||||
|
||||
if (typeof jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx].NeighborRooms.NeighborRoom == 'undefined') {
|
||||
// expected:
|
||||
console.log(OriginalVWMFile + ", adding neighbor, part 1: lowerRoomId=" + lowerRoomId + " to topmost room=" + roomToBeRemovedCandidateRoomNumber );
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx].NeighborRooms['NeighborRoom'] = [ {"RoomId": lowerRoomId, "TransitionFactor": 0.99999} ];
|
||||
} else {
|
||||
console.log("ERROR at " + OriginalVWMFile + " : adding neighbor part 1");
|
||||
}
|
||||
// console.log("jsonContent22 " + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx], {showHidden: false, depth: 5}));
|
||||
}
|
||||
|
||||
// add topmost to lower:
|
||||
{
|
||||
// console.log("jsonContent33 " + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1], {showHidden: false, depth: 3}));
|
||||
|
||||
if (Array.isArray(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].NeighborRooms.NeighborRoom))
|
||||
{
|
||||
// expected:
|
||||
console.log(OriginalVWMFile + ", adding neighbor, part 2a: to lower room : " + jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].RoomId);
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].NeighborRooms.NeighborRoom.push({"RoomId": roomToBeRemovedCandidateRoomNumber, "TransitionFactor": 0.99999});
|
||||
} else {
|
||||
console.log(OriginalVWMFile + ", adding neighbor, part 2b: to lower room : " + jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].RoomId);
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1].NeighborRooms.NeighborRoom = [{"RoomId": roomToBeRemovedCandidateRoomNumber, "TransitionFactor": 0.99999}];
|
||||
}
|
||||
// console.log("jsonContent44 " + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room[roomToBeRemovedCandidateIdx-1], {showHidden: false, depth: 3}));
|
||||
}
|
||||
|
||||
} // if
|
||||
}) // forEach
|
||||
} // if
|
||||
}// if
|
||||
|
||||
|
||||
|
||||
// delete jsonContent.BuildingVulnerability.Rooms.Room[index].NeighborRooms.NeighborRoom.NeighborRoom;
|
||||
// jsonContent.BuildingVulnerability.Rooms.Room[index].NeighborRooms.NeighborRoom["TransitionFactor"] = TransitionFactor_vertical;
|
||||
// jsonContent.BuildingVulnerability.Rooms.Room[index].NeighborRooms.NeighborRoom["RoomId"] = NeighborRoomRoomId;
|
||||
|
||||
|
||||
var Rooms = jsonContent.BuildingVulnerability;
|
||||
var ausgabe = js2xmlparser.parse("BuildingVulnerability", Rooms);
|
||||
|
||||
if (comment) {
|
||||
var idxOfLine = ausgabe.indexOf("<BuildingName>")
|
||||
// console.log("idxOfLine: " + idxOfLine);
|
||||
var ausgabe2 = [ausgabe.slice(0, idxOfLine), comment, ausgabe.slice(idxOfLine)].join('');
|
||||
ausgabe = ausgabe2;
|
||||
}
|
||||
|
||||
var formattedXml = format(ausgabe, {
|
||||
collapseContent: true,
|
||||
lineSeparator: '\n'
|
||||
});
|
||||
|
||||
|
||||
|
||||
fs.writeFileSync(OriginalVWMFile, formattedXml, function(err) {
|
||||
// If an error occurred, show it
|
||||
if (err) {
|
||||
console.log("Error on writing file: " + OriginalVWMFile);
|
||||
console.err(err);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************************************************/
|
||||
} // end exports
|
||||
Vendored
Executable
+355
@@ -0,0 +1,355 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Norbert Thoden, 2021-12-22
|
||||
const fs = require('fs');
|
||||
|
||||
var parser = require('xml2json');
|
||||
|
||||
var js2xmlparser = require('js2xmlparser');
|
||||
var format = require('xml-formatter');
|
||||
|
||||
var util = require('util');
|
||||
|
||||
/****************** Hier editieren **********************/
|
||||
var BelowGroundBldgs = ['U_Bahn', 'xxx'];
|
||||
|
||||
var tolerance = 0.1;
|
||||
var highQuality = true;
|
||||
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
/*****************************************************************************************/
|
||||
/*****************************************************************************************/
|
||||
/*****************************************************************************************/
|
||||
/*
|
||||
* (c) 2013, Vladimir Agafonkin
|
||||
* Simplify.js, a high-performance JS polyline simplification library
|
||||
* mourner.github.io/simplify-js
|
||||
*/
|
||||
|
||||
// to suit your point format, run search/replace for '.x', '.y' and '.z';
|
||||
// (configurability would draw significant performance overhead)
|
||||
|
||||
// square distance between 2 points
|
||||
function getSquareDistance(p1, p2) {
|
||||
|
||||
var dx = p1.X - p2.X,
|
||||
dy = p1.Y - p2.Y,
|
||||
dz = p1.Z - p2.Z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
|
||||
// square distance from a point to a segment
|
||||
function getSquareSegmentDistance(p, p1, p2) {
|
||||
|
||||
var x = p1.X,
|
||||
y = p1.Y,
|
||||
z = p1.Z,
|
||||
|
||||
dx = p2.X - x,
|
||||
dy = p2.Y - y,
|
||||
dz = p2.Z - z;
|
||||
|
||||
if (dx !== 0 || dy !== 0 || dz !== 0) {
|
||||
|
||||
var t = ((p.X - x) * dx + (p.Y - y) * dy + (p.Z - z) * dz) /
|
||||
(dx * dx + dy * dy + dz * dz);
|
||||
|
||||
if (t > 1) {
|
||||
x = p2.X;
|
||||
y = p2.Y;
|
||||
z = p2.Z;
|
||||
|
||||
} else if (t > 0) {
|
||||
x += dx * t;
|
||||
y += dy * t;
|
||||
z += dz * t;
|
||||
}
|
||||
}
|
||||
|
||||
dx = p.X - x;
|
||||
dy = p.Y - y;
|
||||
dz = p.Z - z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
// the rest of the code doesn't care for the point format
|
||||
|
||||
// basic distance-based simplification
|
||||
function simplifyRadialDistance(points, sqTolerance) {
|
||||
|
||||
var prevPoint = points[0],
|
||||
newPoints = [prevPoint],
|
||||
point;
|
||||
|
||||
for (var i = 1, len = points.length; i < len; i++) {
|
||||
point = points[i];
|
||||
|
||||
if (getSquareDistance(point, prevPoint) > sqTolerance) {
|
||||
newPoints.push(point);
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
|
||||
if (prevPoint !== point) {
|
||||
newPoints.push(point);
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// simplification using optimized Douglas-Peucker algorithm with recursion elimination
|
||||
function simplifyDouglasPeucker(points, sqTolerance) {
|
||||
|
||||
var len = points.length,
|
||||
MarkerArray = typeof Uint8Array !== 'undefined' ? Uint8Array : Array,
|
||||
markers = new MarkerArray(len),
|
||||
|
||||
first = 0,
|
||||
last = len - 1,
|
||||
|
||||
stack = [],
|
||||
newPoints = [],
|
||||
|
||||
i, maxSqDist, sqDist, index;
|
||||
|
||||
markers[first] = markers[last] = 1;
|
||||
|
||||
while (last) {
|
||||
|
||||
maxSqDist = 0;
|
||||
|
||||
for (i = first + 1; i < last; i++) {
|
||||
sqDist = getSquareSegmentDistance(points[i], points[first], points[last]);
|
||||
|
||||
if (sqDist > maxSqDist) {
|
||||
index = i;
|
||||
maxSqDist = sqDist;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxSqDist > sqTolerance) {
|
||||
markers[index] = 1;
|
||||
stack.push(first, index, index, last);
|
||||
}
|
||||
|
||||
last = stack.pop();
|
||||
first = stack.pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (markers[i]) {
|
||||
newPoints.push(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
|
||||
function simplify(points, tolerance, highestQuality) {
|
||||
|
||||
var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;
|
||||
|
||||
points = highestQuality ? points : simplifyRadialDistance(points, sqTolerance);
|
||||
points = simplifyDouglasPeucker(points, sqTolerance);
|
||||
|
||||
return points;
|
||||
}
|
||||
/*****************************************************************************************/
|
||||
/*****************************************************************************************/
|
||||
/*****************************************************************************************/
|
||||
|
||||
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
this.simplify_polygons = function simplify_polygons(xmlFile) {
|
||||
|
||||
const OriginalVWMFile = xmlFile;
|
||||
|
||||
var content = fs.readFileSync(OriginalVWMFile);
|
||||
|
||||
var jsonFileInhalt;
|
||||
var jsonContent;
|
||||
try {
|
||||
jsonFileInhalt = parser.toJson(content);
|
||||
jsonContent = JSON.parse(jsonFileInhalt);
|
||||
} catch (e) {
|
||||
console.log("Parsing error bei Datei " + OriginalVWMFile + " -> " + e.message); // Datei geschrieben
|
||||
return;
|
||||
}
|
||||
|
||||
var BuildingName = jsonContent.BuildingVulnerability.BuildingName;
|
||||
BuildingName = BuildingName.substring(5); // bldg_U_Bahn -> U_Bahn
|
||||
|
||||
var RoomArray = jsonContent.BuildingVulnerability.Rooms.Room;
|
||||
if (RoomArray == null) {
|
||||
console.log("Datei " + OriginalVWMFile + ": " + " WARNING, no RoomArray detected");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Array.isArray(RoomArray)){
|
||||
RoomArray = [RoomArray]
|
||||
}
|
||||
console.log("Datei " + OriginalVWMFile + ": " + Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length + " Rooms detected");
|
||||
console.log("Datei " + OriginalVWMFile + ": " + RoomArray.length + " Rooms detected");
|
||||
|
||||
RoomArray.forEach(Room => {
|
||||
|
||||
// console.log("Bldg " + BuildingName + " - RoomId: " + Room.RoomId);
|
||||
|
||||
var OuterWallArray = Room.RoomOuterWalls.OuterWall;
|
||||
|
||||
//sometimes there are no walls: OuterWallArray is undefined
|
||||
if (!OuterWallArray)
|
||||
{
|
||||
console.log("Bldg " + BuildingName + " / room " + Room.RoomId + " has no walls") ;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Array.isArray(OuterWallArray)){
|
||||
OuterWallArray = [OuterWallArray]
|
||||
}
|
||||
|
||||
|
||||
if (!OuterWallArray)
|
||||
{
|
||||
console.log("Bldg " + BuildingName + " / room " + Room.RoomId + " has no walls") ;
|
||||
return;
|
||||
}
|
||||
|
||||
var wallIdx =-1;
|
||||
OuterWallArray.forEach(Outerwall => {
|
||||
wallIdx++;
|
||||
// console.log(" Outerwall " + "idx=" + wallIdx + " : " + util.inspect(Outerwall, {showHidden: false, depth: 3}));
|
||||
|
||||
//
|
||||
// Wall itself
|
||||
//
|
||||
|
||||
// console.log(" Outerwall: " + Outerwall.OuterWallAreaElement);
|
||||
var PolygonPoints = Outerwall.OuterWallAreaElement.PolygonPoint;
|
||||
|
||||
var polyLengthOrg = PolygonPoints.length;
|
||||
// console.log(" WALL PolygonPoints-Org= " + polyLengthOrg) ;
|
||||
// console.log(" WALL data=" + util.inspect(PolygonPoints, {showHidden: false, depth: 2}));
|
||||
PolygonPoints.forEach(PolygonPoint => {
|
||||
PolygonPoint.X = parseFloat(PolygonPoint.X);
|
||||
PolygonPoint.Y = parseFloat(PolygonPoint.Y);
|
||||
PolygonPoint.Z = parseFloat(PolygonPoint.Z);
|
||||
//console.log(" WALL Point= " + PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z) ;
|
||||
});
|
||||
|
||||
// There are some walls/rectangles with a very short side (~10cm). Most of them are correct.
|
||||
// Avoid them being modified to a triangle/line:
|
||||
if (PolygonPoints.length > 4)
|
||||
{
|
||||
PolygonPoints = simplify(PolygonPoints, tolerance, highQuality);
|
||||
var polyLengthNew = PolygonPoints.length;
|
||||
// console.log(" PolygonPoints-New= " + polyLengthNew) ;
|
||||
|
||||
if (polyLengthOrg != polyLengthNew)
|
||||
console.log(" WALL Bldg " + BuildingName + " / room " + Room.RoomId + " / wallIdx " + wallIdx + ": " + " Outerwall: length changes from " + polyLengthOrg + " to " + polyLengthNew);
|
||||
|
||||
// console.log(" data=" + util.inspect(PolygonPoints, {showHidden: false, depth: 2}));
|
||||
|
||||
// PolygonPoints.forEach(PolygonPoint => {
|
||||
// console.log(" Point= " + PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z) ;
|
||||
// });
|
||||
|
||||
// write simplified data back:
|
||||
Outerwall.OuterWallAreaElement.PolygonPoint = PolygonPoints;
|
||||
} else {
|
||||
console.log(" WALL Bldg " + BuildingName + " / room " + Room.RoomId + " / wallIdx " + wallIdx + ": Skip due to short length: " + polyLengthOrg);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ExclusionZones bldg_1199 is complex and therefore good for verification
|
||||
//
|
||||
{
|
||||
// node: Outerwall has ExclusionZones:
|
||||
// console.log(" ---- ExclZone ExclusionZonesArray= " + util.inspect(Outerwall.ExclusionZones, {showHidden: false, depth: 4}));
|
||||
|
||||
var ExclusionZonesArray = Outerwall.ExclusionZones.ExclusionZone;
|
||||
if (!ExclusionZonesArray)
|
||||
return;
|
||||
|
||||
if (!Array.isArray(ExclusionZonesArray)) {
|
||||
ExclusionZonesArray = [ExclusionZonesArray]
|
||||
}
|
||||
|
||||
// console.log(" ExclZone ExclusionZonesArray.length= " + ExclusionZonesArray.length);
|
||||
|
||||
var EzIdx =-1;
|
||||
ExclusionZonesArray.forEach(ExclusionZone => {
|
||||
EzIdx++;
|
||||
|
||||
// console.log(" ExclZone ---- ExclusionZone " + "EzIdx=" + EzIdx + " : " + util.inspect(ExclusionZone, {showHidden: false, depth: 3}));
|
||||
|
||||
var ExclZonePolygonPoints = ExclusionZone.ExclusionZoneElement.PolygonPoint;
|
||||
var polyLengthOrg = ExclZonePolygonPoints.length;
|
||||
|
||||
// console.log(" ExclZone ExclZonePolygonPoints-Org=" + polyLengthOrg + " (Bldg " + BuildingName + " / room " + Room.RoomId + ")") ;
|
||||
// console.log(" ExclZone data=" + util.inspect(ExclZonePolygonPoints, {showHidden: false, depth: 2}));
|
||||
ExclZonePolygonPoints.forEach(PolygonPoint => {
|
||||
PolygonPoint.X = parseFloat(PolygonPoint.X);
|
||||
PolygonPoint.Y = parseFloat(PolygonPoint.Y);
|
||||
PolygonPoint.Z = parseFloat(PolygonPoint.Z);
|
||||
//console.log(" ExclZone Point= " + PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z) ;
|
||||
});
|
||||
|
||||
// Maybe in future there will be some ExclZone/rectangles with a very short side (~10cm)...
|
||||
// Avoid them being modified to a triangle/line:
|
||||
if (ExclZonePolygonPoints.length > 4)
|
||||
{
|
||||
ExclZonePolygonPoints = simplify(ExclZonePolygonPoints, tolerance, highQuality);
|
||||
var polyLengthNew = ExclZonePolygonPoints.length;
|
||||
// console.log(" ExclZone ExclZonePolygonPoints-New= " + polyLengthNew) ;
|
||||
|
||||
if (polyLengthOrg != polyLengthNew)
|
||||
console.log(" ExclZone Bldg " + BuildingName + " / room " + Room.RoomId + " / wallIdx " + wallIdx + " / EzIdx " + EzIdx + ": " + " ExclZone: length changes from " + polyLengthOrg + " to " + polyLengthNew) ;
|
||||
|
||||
// write simplified data back, part 1:
|
||||
ExclusionZone.ExclusionZoneElement.PolygonPoint = ExclZonePolygonPoints; //CHECK (e.g. bldg_1199)
|
||||
} else {
|
||||
console.log(" ExclZone Bldg " + BuildingName + " / room " + Room.RoomId + " / wallIdx " + wallIdx + " / EzIdx " + EzIdx + ": " + " Skip due to short length: " + polyLengthOrg) ;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// write simplified data back, part 2:
|
||||
Outerwall.ExclusionZones.ExclusionZone = ExclusionZonesArray //CHECK (e.g. bldg_1199)
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var Rooms = jsonContent.BuildingVulnerability;
|
||||
var ausgabe = js2xmlparser.parse("BuildingVulnerability", Rooms);
|
||||
|
||||
var formattedXml = format(ausgabe, {
|
||||
collapseContent: true,
|
||||
lineSeparator: '\n'
|
||||
});
|
||||
|
||||
|
||||
|
||||
fs.writeFileSync(OriginalVWMFile, formattedXml, function(err) {
|
||||
// If an error occurred, show it
|
||||
if (err) {
|
||||
console.log("Error on writing file: " + OriginalVWMFile);
|
||||
console.err(err);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************************************************/
|
||||
} // end exports
|
||||
Vendored
Executable
+108
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/nodejs
|
||||
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, 2021-03
|
||||
|
||||
var fs = require("fs");
|
||||
var parser = require('xml2json');
|
||||
var js2xmlparser = require('js2xmlparser');
|
||||
var format = require('xml-formatter');
|
||||
|
||||
/****************** Hier editieren **********************/
|
||||
// Das ist der Transistion Factor, der für alle vertikalen Transitionen eingetragen werden soll
|
||||
// Muss ausgetestet werden.
|
||||
var TransitionFactor_vertical = 0.15;
|
||||
var TransitionFactor_horizontal_min = 0.10;
|
||||
|
||||
var TransitionFactor_horizontal_min_limit = 0.05;
|
||||
/********************************************************/
|
||||
|
||||
if (process.argv.length === 2) {
|
||||
console.error('Filename for VWM expected');
|
||||
process.exit(1);
|
||||
}
|
||||
const OriginalVWMFile = process.argv[2];
|
||||
|
||||
|
||||
var VWMFileNeu = OriginalVWMFile + "_neu";
|
||||
|
||||
var content = fs.readFileSync(OriginalVWMFile);
|
||||
|
||||
var jsonFileInhalt = parser.toJson(content);
|
||||
var jsonContent = JSON.parse(jsonFileInhalt);
|
||||
|
||||
var i;
|
||||
var RoomId;
|
||||
var NeighborRoomRoomId;
|
||||
var index;
|
||||
|
||||
console.log(Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length + " Rooms detected");
|
||||
|
||||
for (i = 0; i < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length; i++) {
|
||||
// Reduzierung auf die Etage
|
||||
console.log("RaumID" + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId);
|
||||
RoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId / 100);
|
||||
// console.log(RoomId);
|
||||
var j;
|
||||
// console.log(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms);
|
||||
// Test, ob ein Raum keine Nachbarraeume hat. Wenn dann entfernen
|
||||
if (!jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom) {
|
||||
console.log("Element RoomId " + jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId + " wird entfernt");
|
||||
delete jsonContent.BuildingVulnerability.Rooms.Room[i];
|
||||
} else {
|
||||
// console.log(Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[0].NeighborRooms.NeighborRoom).length);
|
||||
for (j = 0; j < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length; j++) {
|
||||
|
||||
// console.log(jsonContent.BuildingVulnerability.Rooms.Room[0].NeighborRooms.NeighborRoom.NeighborRoom.RoomId);
|
||||
// Test, ob Raeume in der gleiche Etage liegen. Wenn nicht dann Transistion Faktoren einschreiben
|
||||
if (Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length == 1) {
|
||||
index = i;
|
||||
NeighborRoomRoomId = jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.RoomId;
|
||||
NeighborRoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.RoomId / 100);
|
||||
if (RoomId != NeighborRoomId)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.TransitionFactor = TransitionFactor_vertical;
|
||||
if (RoomId == NeighborRoomId) {
|
||||
if (jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.TransitionFactor <= TransitionFactor_horizontal_min_limit)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom.TransitionFactor = TransitionFactor_horizontal_min;
|
||||
}
|
||||
} else {
|
||||
if (typeof jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j] !== 'undefined') {
|
||||
NeighborRoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].RoomId / 100);
|
||||
|
||||
if (RoomId != NeighborRoomId)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].TransitionFactor = TransitionFactor_vertical;
|
||||
if (RoomId == NeighborRoomId) {
|
||||
// if (jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].TransitionFactor <= TransitionFactor_horizontal_min_limit)
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j].TransitionFactor = TransitionFactor_horizontal_min;
|
||||
}
|
||||
} else {
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.TransitionFactor = TransitionFactor_vertical;
|
||||
}
|
||||
|
||||
|
||||
} // end if
|
||||
// end for
|
||||
} // end else
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// delete jsonContent.BuildingVulnerability.Rooms.Room[index].NeighborRooms.NeighborRoom.NeighborRoom;
|
||||
// jsonContent.BuildingVulnerability.Rooms.Room[index].NeighborRooms.NeighborRoom["TransitionFactor"] = TransitionFactor_vertical;
|
||||
// jsonContent.BuildingVulnerability.Rooms.Room[index].NeighborRooms.NeighborRoom["RoomId"] = NeighborRoomRoomId;
|
||||
|
||||
|
||||
var Rooms = jsonContent.BuildingVulnerability;
|
||||
|
||||
var ausgabe = js2xmlparser.parse("BuildingVulnerability", Rooms);
|
||||
var formattedXml = format(ausgabe, {
|
||||
collapseContent: true,
|
||||
lineSeparator: '\n'
|
||||
});
|
||||
|
||||
|
||||
fs.writeFile(VWMFileNeu, formattedXml, function (err) {
|
||||
console.log(VWMFileNeu + " Datei geschrieben"); // Datei geschrieben
|
||||
});
|
||||
Vendored
Executable
+122
@@ -0,0 +1,122 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, , 2021-05
|
||||
|
||||
var fs = require("fs");
|
||||
var parser = require('xml2json');
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
this.VwmXmlToWrl = function VwmXmlToWrl(OriginalxmlFile) {
|
||||
console.log(" VwmXmlToWrl: "+ OriginalxmlFile); // Datei geschrieben
|
||||
|
||||
// if (OriginalxmlFile.includes("bldg_1287.flt.VWM_Building.xml")) {
|
||||
// console.log(" Skip VwmXmlToWrl: "+ OriginalxmlFile); // Datei geschrieben
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
var coordIndex = "]\n}\ncoordIndex [ ";
|
||||
var counter = 0;
|
||||
|
||||
var wrl_filename = OriginalxmlFile + ".wrl";
|
||||
|
||||
var content = fs.readFileSync(OriginalxmlFile);
|
||||
var jsonFileInhalt = parser.toJson(content);
|
||||
var jsonContent = JSON.parse(jsonFileInhalt);
|
||||
var i;
|
||||
|
||||
var resultfile = "#VRML V2.0 utf8\nBackground {\nskyColor 0.2 0.3 0.1}\nTransform {\ntranslation -2.5 -2.5 -2.5\n"
|
||||
resultfile = resultfile + "children [\n Shape {\nappearance Appearance {\nmaterial Material {\n";
|
||||
resultfile = resultfile + "diffuseColor 1 0 1\n}\n}\ngeometry IndexedFaceSet {\nsolid FALSE\n";
|
||||
resultfile = resultfile + "coord Coordinate {\npoint [\n";
|
||||
|
||||
var RoomArray = jsonContent.BuildingVulnerability.Rooms.Room;
|
||||
if (RoomArray == null) {
|
||||
console.log("Datei " + OriginalxmlFile + ": " + " WARNING, no RoomArray detected");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Array.isArray(RoomArray)) {
|
||||
// console.log("1Array: ");
|
||||
} else {
|
||||
// No Array..
|
||||
// wrap obj into an array to ensure 'RoomArray.forEach(...'
|
||||
var dummy = new Array;
|
||||
dummy[0] = RoomArray;
|
||||
RoomArray = dummy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
RoomArray.forEach(Room => {
|
||||
|
||||
var OuterWallArray = Room.RoomOuterWalls.OuterWall;
|
||||
|
||||
if (Array.isArray(OuterWallArray)) {
|
||||
|
||||
OuterWallArray.forEach(Outerwall => {
|
||||
// console.log("Array: " + Outerwall.OuterWallAreaElement);
|
||||
var n = 0;
|
||||
var PolygonPoints = Outerwall.OuterWallAreaElement.PolygonPoint;
|
||||
|
||||
PolygonPoints.forEach(PolygonPoint => {
|
||||
// console.log(PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z) ;
|
||||
resultfile = resultfile + PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z + ",\n";
|
||||
|
||||
n = n + 1;
|
||||
counter = counter + 1;
|
||||
})
|
||||
|
||||
for (i = counter - n; i < counter; i++) {
|
||||
coordIndex = coordIndex + " " + i + ",";
|
||||
}
|
||||
coordIndex = coordIndex + " -1\n";
|
||||
});
|
||||
|
||||
} else {
|
||||
// console.log("NoArray: " + OuterWallArray);
|
||||
|
||||
if (OuterWallArray != undefined) {
|
||||
// RoomArray is object:
|
||||
// that means OuterWallArray could be used as (a single) Outerwall
|
||||
// console.log("OBJ" + OuterWallArray);
|
||||
|
||||
var n = 0;
|
||||
var PolygonPoints = OuterWallArray.OuterWallAreaElement.PolygonPoint;
|
||||
|
||||
PolygonPoints.forEach(PolygonPoint => {
|
||||
// console.log(PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z) ;
|
||||
resultfile = resultfile + PolygonPoint.X + " " + PolygonPoint.Y + " " + PolygonPoint.Z + ",\n";
|
||||
|
||||
n = n + 1;
|
||||
counter = counter + 1;
|
||||
})
|
||||
|
||||
for (i = counter - n; i < counter; i++) {
|
||||
coordIndex = coordIndex + " " + i + ",";
|
||||
}
|
||||
coordIndex = coordIndex + " -1\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
resultfile = resultfile + coordIndex;
|
||||
resultfile = resultfile + " ]\n}\n}\n]\n}\n";
|
||||
|
||||
fs.writeFileSync(wrl_filename, resultfile, function(err) {
|
||||
// If an error occurred, show it
|
||||
if(err)
|
||||
{
|
||||
console.log("Error on writing file: " + wrl_filename);
|
||||
console.err(err);
|
||||
}
|
||||
});
|
||||
|
||||
} // end of function
|
||||
} // export
|
||||
Vendored
Executable
+86
@@ -0,0 +1,86 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Manfred Gronak, 2021-03
|
||||
|
||||
var fs = require("fs");
|
||||
var parser = require('xml2json');
|
||||
var util = require('util');
|
||||
|
||||
|
||||
|
||||
if (process.argv.length === 2) {
|
||||
console.error('Filename for VWM expected');
|
||||
process.exit(1);
|
||||
}
|
||||
const OriginalxmlFile = process.argv[2];
|
||||
|
||||
|
||||
|
||||
var content = fs.readFileSync(OriginalxmlFile);
|
||||
|
||||
var jsonFileInhalt = parser.toJson(content);
|
||||
|
||||
|
||||
var jsonContent = JSON.parse(jsonFileInhalt);
|
||||
|
||||
var i;
|
||||
|
||||
for (i = 0; i < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room).length; i++) {
|
||||
|
||||
// console.log("1 SHGGS " + j + "-" + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room, {showHidden: false, depth: 1}));
|
||||
|
||||
var RoomId = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId - 2000);
|
||||
RoomId = ~~(RoomId % 100);
|
||||
|
||||
var floor = ~~(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId - 2000);
|
||||
floor = ~~(floor / 100);
|
||||
|
||||
if (RoomId == 1)
|
||||
console.log("***** floor=" + floor);
|
||||
|
||||
console.log(jsonContent.BuildingVulnerability.Rooms.Room[i].RoomId);
|
||||
|
||||
|
||||
|
||||
if (!jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom) {
|
||||
console.log("Keine NeighborRooms - muss entfernt werden");
|
||||
} else {
|
||||
|
||||
// console.log("2 SHGGS " + j + "-" + util.inspect(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom, {showHidden: false, depth: 1}));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!Array.isArray(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom)) {
|
||||
// wrap obj into an array
|
||||
var dummy = new Array;
|
||||
dummy[0] = jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom;
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom = dummy;
|
||||
}
|
||||
|
||||
// console.log("Keine NeighborRooms - else" + Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length);
|
||||
|
||||
if (!Array.isArray(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom)) {
|
||||
// wrap obj into an array
|
||||
var dummy = new Array;
|
||||
dummy[0] = jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom;
|
||||
jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom = dummy;
|
||||
}
|
||||
|
||||
var j;
|
||||
for (j = 0; j < Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length; j++) {
|
||||
if (!jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j])
|
||||
continue;
|
||||
// console.log("XXX" + jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom);
|
||||
|
||||
// if (Object.keys(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom).length == 1) {
|
||||
// console.log(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom.NeighborRoom);
|
||||
// } else {
|
||||
console.log(jsonContent.BuildingVulnerability.Rooms.Room[i].NeighborRooms.NeighborRoom[j]);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
Name: kdchart
|
||||
Version: 2.6.0
|
||||
Release: 1
|
||||
Summary: A Qt library for creating charts
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Group: System/Libraries
|
||||
License: Commercial
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Vendor: Klaralvdalens Datakonsult AB (KDAB)
|
||||
Packager: Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||
BuildRequires: libqt5-qtbase-devel
|
||||
Patch1: %{name}-%{version}_lib_suffix.patch
|
||||
|
||||
%description
|
||||
KDChart
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||
|
||||
%define libname lib%{name}1
|
||||
%package -n %{libname}
|
||||
Summary: %{summary}
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname}
|
||||
KDChart
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libname} = %{version}
|
||||
|
||||
%description devel
|
||||
This package contains header files and associated tools and libraries to
|
||||
develop programs using %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
|
||||
%build
|
||||
touch .license.accepted
|
||||
%if "%{_lib}"=="lib64"
|
||||
QMAKE_ARGS="LIB_SUFFIX=64" ./configure.sh -shared -release -prefix %{buildroot}/usr
|
||||
%else
|
||||
./configure.sh -shared -release -prefix %{buildroot}/usr
|
||||
%endif
|
||||
%__make %{?_smp_mflags}
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files -n %{libname}
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/share/doc/KDChart
|
||||
%{_libdir}/libkdchart.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/KDChart
|
||||
%{_includedir}/KDGantt
|
||||
%{_libdir}/libkdchart.so
|
||||
|
||||
%changelog
|
||||
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# spec file for package GeISiR
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name Log4Qt
|
||||
%define ctc_name ctc_%{real_name}
|
||||
|
||||
Name: %{ctc_name}
|
||||
Requires: libQt5Core5
|
||||
Requires: libQt5Network5
|
||||
Requires: libQt5Sql5
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libQt5Core-devel
|
||||
BuildRequires: libQt5Network-devel
|
||||
BuildRequires: libQt5Sql-devel
|
||||
Provides: %{ctc_name}
|
||||
License: Apache-2.0
|
||||
Group: System/Libraries
|
||||
Summary: Qt logging library
|
||||
Version: 1.4.2
|
||||
Release: 4
|
||||
Source: %{real_name}-%{version}.tar.gz
|
||||
AutoReqProv: no
|
||||
Patch1: %{name}-%{version}.patch
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
Qt logging library
|
||||
|
||||
%package devel
|
||||
#BuildRequires: -
|
||||
Requires: %{ctc_name}
|
||||
Provides: %{ctc_name}-devel
|
||||
License: Apache-2.0
|
||||
Group: Qt logging library
|
||||
Summary: Logging for Qt5
|
||||
|
||||
%description devel
|
||||
You need this package, if you want to compile programs with maia
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{version}
|
||||
%patch1
|
||||
|
||||
%build
|
||||
export CURRENT_ROOT=`pwd`
|
||||
|
||||
rm -fr $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
mkdir $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cmake $CURRENT_ROOT -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_WITH_DB_LOGGING=OFF -DBUILD_WITH_TELNET_LOGGING=OFF
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export CURRENT_ROOT=`pwd`
|
||||
export DONT_STRIP=1
|
||||
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
make DESTDIR=%{?buildroot:%{buildroot}} install
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/lib64
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/include/
|
||||
|
||||
%changelog
|
||||
* Fri Sep 15 2017 Christian Ehrlicher
|
||||
- disable db and telnet logging (so no deps to QtSql and QtNetwork)
|
||||
* Wed Jul 19 2017 Christian Ehrlicher
|
||||
- initial version
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
This tool greps through files for SIGNAL() or SLOT() macros and pipes the signals/slots
|
||||
through QMetaObject::normalizedSignature().
|
||||
|
||||
Rationale: In connect statements, you'll get a micro-speed update when passing in normalized
|
||||
signatures for signals and slots.
|
||||
|
||||
Run it without any arguments to see the command line parameters.
|
||||
|
||||
Typical usage on Qt:
|
||||
|
||||
# find all files with non-normalized signal/slot connections and p4 edit them
|
||||
normalize $QTDIR/src | xargs p4 edit
|
||||
# replace all non-normalized signal/slots
|
||||
normalize --modify $QTDIR/src
|
||||
# p4 diff to see that everything is OK then submit :)
|
||||
p4 submit $QTDIR/src/...
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# Handler for one indirect fire single object
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
|
||||
if [ $# -lt 1 ] ; then
|
||||
echo "Invalid arg count -> $0 <dir> --> fixup all *.cpp and *.h files found in this directory"
|
||||
echo "Invalid arg count -> $0 <file1> <file2> --> only handle the files given"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d $1 ]; then
|
||||
filelist=`ls -1 $1/*.cpp $1/*.h || true`;
|
||||
else
|
||||
filelist="$@";
|
||||
fi
|
||||
|
||||
for f in $filelist ; do
|
||||
astyle -n -Q -A1 --remove-brackets --indent=spaces=2 --indent-labels --pad-oper --unpad-paren --pad-header --keep-one-line-statements --keep-one-line-blocks --convert-tabs --indent-preprocessor --align-pointer=name --max-instatement-indent=120 $f
|
||||
normalize --modify $f
|
||||
done
|
||||
|
||||
echo "done - now run 'svn diff $f' to review the changes"
|
||||
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the utils of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
#include <qdiriterator.h>
|
||||
#include <qfile.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qstring.h>
|
||||
#include <qtextstream.h>
|
||||
#include <qcommandlineparser.h>
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static bool printFilename = true;
|
||||
static bool modify = false;
|
||||
|
||||
QString signature(const QString &line, int pos)
|
||||
{
|
||||
int start = pos;
|
||||
// find first open parentheses
|
||||
while (start < line.length() && line.at(start) != QLatin1Char('('))
|
||||
++start;
|
||||
int i = ++start;
|
||||
int par = 1;
|
||||
// find matching closing parentheses
|
||||
while (i < line.length() && par > 0) {
|
||||
if (line.at(i) == QLatin1Char('('))
|
||||
++par;
|
||||
else if (line.at(i) == QLatin1Char(')'))
|
||||
--par;
|
||||
++i;
|
||||
}
|
||||
if (par == 0)
|
||||
return line.mid(start, i - start - 1);
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool checkSignature(const QString &fileName, QString &line, const char *sig)
|
||||
{
|
||||
static QStringList fileList;
|
||||
|
||||
int idx = -1;
|
||||
bool found = false;
|
||||
while ((idx = line.indexOf(sig, ++idx)) != -1) {
|
||||
const QByteArray sl(signature(line, idx).toLocal8Bit());
|
||||
QByteArray nsl(QMetaObject::normalizedSignature(sl.constData()));
|
||||
if (sl != nsl) {
|
||||
found = true;
|
||||
if (printFilename && !fileList.contains(fileName)) {
|
||||
fileList.prepend(fileName);
|
||||
printf("%s\n", fileName.toLocal8Bit().constData());
|
||||
}
|
||||
if (modify)
|
||||
line.replace(sl, nsl);
|
||||
//qDebug("expected '%s', got '%s'", nsl.data(), sl.data());
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
void writeChanges(const QString &fileName, const QStringList &lines)
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
qDebug("unable to open file '%s' for writing (%s)", fileName.toLocal8Bit().constData(), file.errorString().toLocal8Bit().constData());
|
||||
return;
|
||||
}
|
||||
QTextStream stream(&file);
|
||||
for (int i = 0; i < lines.count(); ++i)
|
||||
stream << lines.at(i);
|
||||
file.close();
|
||||
}
|
||||
|
||||
void check(const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qDebug("unable to open file: '%s' (%s)", fileName.toLocal8Bit().constData(), file.errorString().toLocal8Bit().constData());
|
||||
return;
|
||||
}
|
||||
QStringList lines;
|
||||
bool found = false;
|
||||
while (true) {
|
||||
QByteArray bline = file.readLine(16384);
|
||||
if (bline.isEmpty())
|
||||
break;
|
||||
QString line = QString::fromLocal8Bit(bline);
|
||||
found |= checkSignature(fileName, line, "SLOT");
|
||||
found |= checkSignature(fileName, line, "SIGNAL");
|
||||
if (modify)
|
||||
lines << line;
|
||||
}
|
||||
file.close();
|
||||
|
||||
if (found && modify) {
|
||||
printf("Modifying file: '%s'\n", fileName.toLocal8Bit().constData());
|
||||
writeChanges(fileName, lines);
|
||||
}
|
||||
}
|
||||
|
||||
void traverse(const QString &path)
|
||||
{
|
||||
QDirIterator dirIterator(path, QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::NoSymLinks);
|
||||
|
||||
while (dirIterator.hasNext()) {
|
||||
QString filePath = dirIterator.next();
|
||||
if (filePath.endsWith(".cpp"))
|
||||
check(filePath);
|
||||
else if (QFileInfo(filePath).isDir())
|
||||
traverse(filePath); // recurse
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(
|
||||
QStringLiteral("Qt Normalize tool (Qt %1)\nOutputs all filenames that contain non-normalized SIGNALs and SLOTs")
|
||||
.arg(QString::fromLatin1(QT_VERSION_STR)));
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
|
||||
QCommandLineOption modifyOption(QStringLiteral("modify"),
|
||||
QStringLiteral("Fix all occurrences of non-normalized SIGNALs and SLOTs."));
|
||||
parser.addOption(modifyOption);
|
||||
|
||||
parser.addPositionalArgument(QStringLiteral("path"),
|
||||
QStringLiteral("can be a single file or a directory (in which case, look for *.cpp recursively)"));
|
||||
|
||||
parser.process(app);
|
||||
|
||||
if (parser.positionalArguments().count() != 1)
|
||||
parser.showHelp(1);
|
||||
QString path = parser.positionalArguments().first();
|
||||
if (path == "-")
|
||||
parser.showHelp(1);
|
||||
|
||||
if (parser.isSet(modifyOption)) {
|
||||
printFilename = false;
|
||||
modify = true;
|
||||
}
|
||||
|
||||
QFileInfo fi(path);
|
||||
if (fi.isFile()) {
|
||||
check(path);
|
||||
} else if (fi.isDir()) {
|
||||
if (!path.endsWith("/"))
|
||||
path.append("/");
|
||||
traverse(path);
|
||||
} else {
|
||||
qWarning("Don't know what to do with '%s'", path.toLocal8Bit().constData());
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
QT = core
|
||||
CONFIG -= moc
|
||||
CONFIG += console
|
||||
mac:CONFIG -= app_bundle
|
||||
|
||||
SOURCES += main.cpp
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
#
|
||||
# spec file for package lts_astyle_helper
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
# tar cvzf ~/rpmbuild/SOURCES/lts_astyle_helper-1.0.tgz lts_astyle_helper-1.0
|
||||
# rpmbuild -ba lts_astyle_helper.spec
|
||||
#
|
||||
|
||||
Name: lts_astyle_helper
|
||||
Requires: astyle
|
||||
License: LGPL
|
||||
Group: System/Libraries
|
||||
Summary: Helper for astyle (using lts specific options)
|
||||
Version: 1.0
|
||||
Release: 3
|
||||
Prefix: /
|
||||
Source: %{name}-%{version}.tgz
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
A helper script for astyle - runs astyle with lts specific options + qt normalize to normalize signal/slot signatures
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
qmake-qt5 %{_builddir}/%{buildsubdir}/normalize.pro
|
||||
make
|
||||
|
||||
%install
|
||||
mkdir -p "$RPM_BUILD_ROOT/%{prefix}/usr/bin"
|
||||
cp "%{_builddir}/%{buildsubdir}/normalize" "$RPM_BUILD_ROOT/%{prefix}/usr/bin/"
|
||||
cp "%{_builddir}/%{buildsubdir}/astyle_lts" "$RPM_BUILD_ROOT/%{prefix}/usr/bin/"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/bin/normalize
|
||||
%{_prefix}/bin/astyle_lts
|
||||
|
||||
%changelog
|
||||
* Wed Jan 25 2017 Christian Ehrlicher
|
||||
- add --keep-one-line-statements to astyle call
|
||||
* Wed May 04 2016 Christian Ehrlicher
|
||||
- add --max-instatement-indent to astyle call
|
||||
- allow also files as astyle_lts arguments
|
||||
* Mon Feb 22 2016 Christian Ehrlicher
|
||||
- initial version
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
[Global]
|
||||
; -> Default Values
|
||||
DatabaseHostname=192.168.133.44
|
||||
DatabaseName=legatus
|
||||
PortOffset=9100
|
||||
ServerHostname=192.168.133.44
|
||||
;LogPath=/shd/CTC/WS/LOG
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
#
|
||||
# bash
|
||||
# name="lts_config_entw_192_168_133_44"
|
||||
# mkdir ${name}
|
||||
# cp ${name}.conf ${name}/lts-cc.conf
|
||||
# tar cvzf ${name}.tgz ${name}/
|
||||
# cp ${name}.tgz ~/rpmbuild/SOURCES/
|
||||
# rm -r ${name}.tgz ${name}
|
||||
# rpmbuild -bb --target=noarch ${name}.spec
|
||||
|
||||
Summary: LifeSimulation Training System Config for ENTW (192.168.133.44)
|
||||
Name: lts_config_entw_192_168_133_44
|
||||
Version: 1.0
|
||||
Release: 3
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: %{name}.tgz
|
||||
Prefix: /
|
||||
Vendor: LifeMaps GmbH GmbH
|
||||
URL: http://www.life-maps.com
|
||||
Packager: ctc
|
||||
|
||||
%description
|
||||
LifeSimulation Training System Config for ENTW (192.168.133.44)
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Mon Dec 14 2015 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
|
||||
%build
|
||||
# nothing to do here
|
||||
|
||||
%install
|
||||
mkdir -p "$RPM_BUILD_ROOT/%{prefix}/etc/"
|
||||
cp -r "%{_builddir}/%{buildsubdir}/lts-cc.conf" "$RPM_BUILD_ROOT/%{prefix}/etc/lts-cc.conf"
|
||||
|
||||
%clean
|
||||
# nothing to do here
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{prefix}/etc/lts-cc.conf
|
||||
|
||||
%pre
|
||||
%post
|
||||
if [ ! -e /tmp/coredumps ]; then
|
||||
# TODO: cronjob zum Loeschen hinzufuegen
|
||||
mkdir /tmp/coredumps
|
||||
# 1 -> sticky bit
|
||||
chmod 1777 /tmp/coredumps
|
||||
echo "kernel.core_pattern = /tmp/coredumps/core.%e.%t.%p" > /etc/sysctl.d/50-tmp_coredumps.conf
|
||||
echo "/tmp/coredumps/core.%e.%t.%p" > /proc/sys/kernel/core_pattern
|
||||
fi
|
||||
if [ ! -e /shd/CTC/LOG ]; then
|
||||
mkdir /shd/CTC/LOG
|
||||
chmod 1777 /shd/CTC/LOG
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm /etc/sysctl.d/50-tmp_coredumps.conf
|
||||
fi
|
||||
%postun
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
#
|
||||
# spec file for package GeISiR
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name maia
|
||||
%define ctc_name ctc_%{real_name}
|
||||
|
||||
Name: %{ctc_name}
|
||||
Requires: libQt5Core5
|
||||
Requires: libQt5Network5
|
||||
Requires: libQt5Xml5
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libQt5Core-devel
|
||||
BuildRequires: libQt5Network-devel
|
||||
BuildRequires: libQt5Xml-devel
|
||||
Provides: %{ctc_name}
|
||||
License: BSD 2-clause
|
||||
Group: System/Libraries
|
||||
Summary: Qt XML-RPC library
|
||||
Version: 1.2
|
||||
Release: 0
|
||||
Source: %{real_name}-%{version}.tgz
|
||||
%if 0%{?suse_version} < 1120
|
||||
BuildRoot: %{_tmppath}/%{real_name}-%{version}-build
|
||||
%endif
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
Qt XML-RPC library
|
||||
|
||||
%package devel
|
||||
#BuildRequires: -
|
||||
Requires: %{ctc_name}
|
||||
Provides: %{ctc_name}-devel
|
||||
License: BSD 2-clause
|
||||
Group: Qt XML-RPC library
|
||||
Summary: XMLRPC for Qt5
|
||||
|
||||
%description devel
|
||||
You need this package, if you want to compile programs with maia
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{version}
|
||||
|
||||
%build
|
||||
export CURRENT_ROOT=`pwd`
|
||||
|
||||
rm -fr $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
mkdir $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
cmake $CURRENT_ROOT -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=%{_prefix}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export CURRENT_ROOT=`pwd`
|
||||
export DONT_STRIP=1
|
||||
|
||||
cd $CURRENT_ROOT/../build-%{name}-%{version}
|
||||
make DESTDIR=%{?buildroot:%{buildroot}} install
|
||||
|
||||
|
||||
%if 0%{?suse_version} < 1120
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/lib64
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
%{_prefix}/include/
|
||||
|
||||
%changelog
|
||||
* Mon Sep 26 2016 Christian Ehrlicher
|
||||
- remove Qt4 support
|
||||
- code cleanup
|
||||
- add delayed response support
|
||||
- move to own git repo instead holding patches
|
||||
|
||||
* Wed Jul 16 2014 Christian Ehrlicher
|
||||
- fix maia toDouble() conversion
|
||||
|
||||
* Sun Jan 23 2011 Christian Ehrlicher
|
||||
- initial version
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
#
|
||||
# Von Hand auszufuellen - Version und Release anpassen!
|
||||
# rpmbuild -bb arcgis-qt-V100.spec
|
||||
#
|
||||
|
||||
Name: mak_rti_450
|
||||
Provides: mak_rti_450
|
||||
Summary: mak RTI 4.5.0
|
||||
Version: 4.5.0
|
||||
Release: 2
|
||||
License: proprietary
|
||||
Group: Applications/Communications
|
||||
Source: makRti4.5j.tgz
|
||||
Prefix: /
|
||||
Vendor: mak
|
||||
URL: http://www.life-maps.com
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
Runtime libraries for mak RTI 4.5.0
|
||||
|
||||
%package devel
|
||||
Summary: Runtime libraries for mak RTI 4.5.0 (development files)
|
||||
Provides: mak_rti_450-devel
|
||||
License: -
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
Development headers for mak RTI 4.5.0 (development files)
|
||||
|
||||
%changelog
|
||||
#* date +"%a %b %d %Y" text
|
||||
* Wed Mar 13 2019 CE
|
||||
- initial
|
||||
|
||||
%prep
|
||||
%setup -q -n makRti4.5
|
||||
|
||||
%build
|
||||
echo "nothing to build"
|
||||
# nothing to do here
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/opt/NGS
|
||||
cp -r %{_builddir}/%{buildsubdir}/ %{buildroot}/opt/NGS
|
||||
|
||||
%clean
|
||||
%__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/opt/NGS/makRti4.5/bin
|
||||
/opt/NGS/makRti4.5/data
|
||||
/opt/NGS/makRti4.5/defaultConfig
|
||||
/opt/NGS/makRti4.5/lib
|
||||
/opt/NGS/makRti4.5/plugins
|
||||
/opt/NGS/makRti4.5/translations
|
||||
/opt/NGS/makRti4.5/*.mtl
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
/opt/NGS/makRti4.5/doc
|
||||
/opt/NGS/makRti4.5/examples
|
||||
/opt/NGS/makRti4.5/include
|
||||
|
||||
%post
|
||||
echo "/opt/NGS/makRti4.5/lib/" > /etc/ld.so.conf.d/makRti45.conf
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm /etc/ld.so.conf.d/makRti45.conf
|
||||
fi
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
#
|
||||
# spec file for package OpenSceneGraph (Version 3.1.7)
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name NGS
|
||||
|
||||
Name: NGS
|
||||
Provides: %{name}
|
||||
|
||||
Requires: ace
|
||||
Requires: log4cplus
|
||||
Requires: ScoreConfiguration
|
||||
Requires: ScoreGeometry
|
||||
Requires: ScoreGeodesy
|
||||
Requires: tao
|
||||
|
||||
BuildRequires: ace-devel
|
||||
BuildRequires: ace-xml-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: pkgconfig(log4cplus)
|
||||
BuildRequires: ScoreConfiguration-devel
|
||||
BuildRequires: ScoreGeometry-devel
|
||||
BuildRequires: ScoreGeodesy-devel
|
||||
BuildRequires: tao-devel
|
||||
License: commercial
|
||||
Group: System/Libraries
|
||||
Summary: NGS ... no need to write more
|
||||
Version: 14.1.1
|
||||
Release: 2
|
||||
Source: %{name}-v%{version}.zip
|
||||
Patch1: %{name}-v%{version}.patch
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
NGS - Middleware for HLA
|
||||
|
||||
%package devel
|
||||
Requires: %{name}
|
||||
Provides: %{name}-devel
|
||||
License: commercial
|
||||
Group: Development/Libraries
|
||||
Summary: NGS ... no need to write more
|
||||
|
||||
%description devel
|
||||
NGS - Middleware for HLA - devel package
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-v%{version}
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
rm -rf ${builddir}
|
||||
mkdir -p ${builddir}
|
||||
cd ${builddir}
|
||||
cp %{_builddir}/%{buildsubdir}/load.cmake .
|
||||
cmake -Wno-dev \
|
||||
-C load.cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=${builddir}/NGSPublic \
|
||||
-DNGS_PUBLIC_DIR=${builddir}/NGSPublic \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
%{_builddir}/%{buildsubdir}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
ngsdir=%{buildroot}/opt/NGS/
|
||||
ngspubdir=${ngsdir}/NGSPublic
|
||||
cd ${builddir}
|
||||
mkdir -p ${ngsdir}
|
||||
cp -r ${builddir}/NGSPublic ${ngsdir}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}-build'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/NGSPublic/dat
|
||||
/opt/NGS/NGSPublic/env
|
||||
/opt/NGS/NGSPublic/exe
|
||||
/opt/NGS/NGSPublic/lib
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/NGSPublic/doc
|
||||
/opt/NGS/NGSPublic/include
|
||||
/opt/NGS/NGSPublic/internalinclude
|
||||
/opt/NGS/NGSPublic/plugininclude
|
||||
/opt/NGS/NGSPublic/scripts
|
||||
/opt/NGS/NGSPublic/templates
|
||||
|
||||
%post
|
||||
echo "/opt/NGS/NGSPublic/lib" > /etc/ld.so.conf.d/ngs.conf
|
||||
echo "/opt/NGS/NGSPublic/lib/CorbaNotifyCdr" >> /etc/ld.so.conf.d/ngs.conf
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm /etc/ld.so.conf.d/ngs.conf
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Tue Mar 12 2019 Christian Ehrlicher
|
||||
- initial version v14.1.1
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
#
|
||||
# spec file for package OpenSceneGraph (Version 3.1.7)
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name NGS_addons
|
||||
|
||||
Name: NGS_addons
|
||||
Provides: %{name}
|
||||
|
||||
Requires: ace
|
||||
Requires: NGS
|
||||
Requires: ScoreConfiguration
|
||||
Requires: ScoreGeometry
|
||||
Requires: ScoreGeodesy
|
||||
Requires: tao
|
||||
|
||||
BuildRequires: ace-devel
|
||||
BuildRequires: NGS-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ScoreConfiguration-devel
|
||||
BuildRequires: ScoreGeometry-devel
|
||||
BuildRequires: ScoreGeodesy-devel
|
||||
BuildRequires: tao-devel
|
||||
|
||||
License: commercial
|
||||
Group: System/Libraries
|
||||
Summary: NGS - adapter to MAK RTI v4.5.0
|
||||
Version: 1.0.1
|
||||
Release: 1
|
||||
Source: NGSAddOns-master.tar.gz
|
||||
Patch1: NGSAddOns-master.patch
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
NGS - adapter to MAK RTI v4.5.0
|
||||
|
||||
%prep
|
||||
%setup -q -n NGSAddOns-master
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
rm -rf ${builddir}
|
||||
mkdir -p ${builddir}
|
||||
cd ${builddir}
|
||||
cmake -Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/NGS/NGSPublic \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DBUILD_QTSWTESTTOOL=ON \
|
||||
-DBUILD_RESCONVERTER=OFF \
|
||||
-DBUILD_RESOURCEMONITOR=OFF \
|
||||
-DC++11=ON \
|
||||
-DSCOREGEOMETRY_ROOT=/opt/NGS/NGSPublic \
|
||||
-DTP_ACE_ROOT=/usr \
|
||||
-DTP_ACE_TAO_INSTALL=/usr \
|
||||
-DTP_BOOST_ROOT=/usr \
|
||||
-DTP_NGS_ROOT=/opt/NGS/NGSPublic \
|
||||
-DTP_QT_ROOT=/usr \
|
||||
-DTP_SCORECONFIGURATION_ROOT=/usr \
|
||||
-DTP_SCOREGEODESY_ROOT=/usr \
|
||||
-DTP_TAO_ROOT=/usr/share/tao \
|
||||
%{_builddir}/%{buildsubdir}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
cd ${builddir}
|
||||
make DESTDIR=%{buildroot} install %{_smp_mflags}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}-build'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/NGSPublic/exe
|
||||
/opt/NGS/NGSPublic/qtswtesttool
|
||||
/opt/NGS/NGSPublic/simmonitor
|
||||
|
||||
%changelog
|
||||
* Tue Mar 12 2019 Christian Ehrlicher
|
||||
- initial version NGS v14.1.1 / RTIFacade v1.0.1
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
#
|
||||
# spec file for package OpenSceneGraph (Version 3.1.7)
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name NGS_guez_fom
|
||||
|
||||
Name: NGS_guez_fom
|
||||
Provides: %{name}
|
||||
|
||||
Requires: ace
|
||||
Requires: NGS
|
||||
Requires: ScoreConfiguration
|
||||
Requires: ScoreGeometry
|
||||
Requires: ScoreGeodesy
|
||||
Requires: tao
|
||||
|
||||
BuildRequires: ace-devel
|
||||
BuildRequires: NGS-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ScoreConfiguration-devel
|
||||
BuildRequires: ScoreGeometry-devel
|
||||
BuildRequires: ScoreGeodesy-devel
|
||||
BuildRequires: tao-devel
|
||||
License: commercial
|
||||
Group: System/Libraries
|
||||
Summary: NGS GUEZ FOM
|
||||
Version: 14.3.1
|
||||
Release: 1
|
||||
Source: %{name}-v%{version}.tgz
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
NGS - Middleware for HLA, FOM parts
|
||||
|
||||
%package devel
|
||||
Provides: %{name}-devel
|
||||
Requires: %{name}
|
||||
Requires: NGS-devel
|
||||
License: commercial
|
||||
Group: Development/Libraries
|
||||
Summary: NGS GUEZ FOM
|
||||
|
||||
%description devel
|
||||
NGS - Middleware for HLA - devel package
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-v%{version}
|
||||
|
||||
%build
|
||||
export LD_LIBRARY_PATH=/opt/NGS/NGSPublic/lib:/opt/NGS/NGSPublic/lib/CorbaNotifyAny
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
rm -rf ${builddir}
|
||||
mkdir -p ${builddir}
|
||||
cd ${builddir}
|
||||
cp %{_builddir}/%{buildsubdir}/load.cmake .
|
||||
cmake -Wno-dev \
|
||||
-C load.cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=${builddir}/NGSPublic \
|
||||
-DNGS_Public=/opt/NGS/NGSPublic \
|
||||
-DFOM_XMLFILE=%{_builddir}/%{buildsubdir}/RPRFOM2010_guez.xml \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
/opt/NGS/NGSPublic/templates/ngs/NGSBuild/NGSSWFOM
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
cd ${builddir}
|
||||
mkdir -p %{buildroot}/opt/NGS/
|
||||
cp -r ${builddir}/NGSPublic %{buildroot}/opt/NGS/
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}-build'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/NGSPublic/dat
|
||||
/opt/NGS/NGSPublic/env
|
||||
/opt/NGS/NGSPublic/exe
|
||||
/opt/NGS/NGSPublic/lib
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/NGSPublic/doc
|
||||
/opt/NGS/NGSPublic/include
|
||||
|
||||
%changelog
|
||||
* Tue Mar 12 2019 Christian Ehrlicher
|
||||
- initial version v14.1.1
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
#
|
||||
# spec file for package OpenSceneGraph (Version 3.1.7)
|
||||
# $Revision$
|
||||
# $Date$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
%define real_name NGS_rtifacade_mak450
|
||||
|
||||
Name: NGS_rtifacade_mak450
|
||||
Provides: %{name}
|
||||
|
||||
Requires: ace
|
||||
Requires: mak_rti_450
|
||||
Requires: NGS
|
||||
Requires: ScoreConfiguration
|
||||
Requires: ScoreGeometry
|
||||
Requires: ScoreGeodesy
|
||||
Requires: tao
|
||||
|
||||
BuildRequires: ace-devel
|
||||
BuildRequires: mak_rti_450-devel
|
||||
BuildRequires: NGS-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ScoreConfiguration-devel
|
||||
BuildRequires: ScoreGeometry-devel
|
||||
BuildRequires: ScoreGeodesy-devel
|
||||
BuildRequires: tao-devel
|
||||
|
||||
License: commercial
|
||||
Group: System/Libraries
|
||||
Summary: NGS - adapter to MAK RTI v4.5.0
|
||||
Version: 1.0.1
|
||||
Release: 1
|
||||
Source: NGSRTIFacade-v%{version}.zip
|
||||
Patch1: NGSRTIFacade-v%{version}.patch
|
||||
AutoReqProv: no
|
||||
|
||||
%debug_package
|
||||
|
||||
%description
|
||||
NGS - adapter to MAK RTI v4.5.0
|
||||
|
||||
%prep
|
||||
%setup -q -n NGSRTIFacade-v%{version}
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
rm -rf ${builddir}
|
||||
mkdir -p ${builddir}
|
||||
cd ${builddir}
|
||||
cmake -Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=${builddir}/NGSPublic \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DNGS_ROOT=/opt/NGS/NGSPublic \
|
||||
-DTAO_ROOT=/usr/share/tao \
|
||||
-DACE_ROOT=/usr \
|
||||
-DACE_TAO_INSTALL=/usr \
|
||||
-DGOAL_HLA1516E_MAK4_5_0=ON \
|
||||
-DHLA_MAK4_5_0_BASE=/opt/NGS/makRti4.5/ \
|
||||
%{_builddir}/%{buildsubdir}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
builddir=%{_builddir}/%{buildsubdir}-build
|
||||
ngsdir=%{buildroot}/opt/NGS/
|
||||
ngspubdir=${ngsdir}/NGSPublic
|
||||
cd ${builddir}
|
||||
mkdir -p ${ngsdir}
|
||||
cp -r ${builddir}/NGSPublic ${ngsdir}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf '%{buildroot}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}'
|
||||
%{__rm} -rf '%{_builddir}/%{buildsubdir}-build'
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
/opt/NGS/NGSPublic/env
|
||||
/opt/NGS/NGSPublic/lib
|
||||
|
||||
%post
|
||||
echo "/opt/NGS/NGSPublic/lib/RTIFacadeHLA1516E_MAK450" > /etc/ld.so.conf.d/ngs_makRti450.conf
|
||||
echo "/opt/NGS/NGSPublic/lib/DefaultSimTimeConverterHLA1516E_MAK450/" >> /etc/ld.so.conf.d/ngs_makRti450.conf
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm /etc/ld.so.conf.d/ngs_makRti450.conf
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Tue Mar 12 2019 Christian Ehrlicher
|
||||
- initial version NGS v14.1.1 / RTIFacade v1.0.1
|
||||
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user