Uutiset:

Kirjoittaja Aihe: Opendta -asennus ( linux:illa, Fedora ) - .dta -tiedostojen avaus, pitkä  (Luettu 208 kertaa)

Poissa kaupunkitila

  • Vanha jäsen
  • ****
  • Viestejä: 391
  • Maalämpöfoorumi
Asensin tänään Opendta -softan Linux:ille, ja se oli tavanomaisen mutkikas. Laitan komennot oheen, root -käyttäjällä tehtynä. 100% varmasti ei tule toimimaan  kenelläkään juuri vastaavasti, mutta kenties jotain hajua tästä saisi, mitä vaati tällä kertaa.  Opendta -softan mukaan pitäisi mennä muutamalla komennolla, mutta en ole saanut sitä koskaan toimimaan niin.

( Aiempi asennus oli täällä, eikä se tänään toiminut, eri linux-versiot jne  https://www.maalampofoorumi.fi/index.php?topic=7931.msg106130#msg106130  )

En nyt jaksa siivota komentoja, mukana on kaikki "virheelliset vaiheet", ne ovat copy-pastella, ja kommentit olen laittanut englanniksi, koska se itselleni on helpompi.

Koodia: [Valitse]
# Download from:
# https://sourceforge.net/projects/opendta

cd /installations/opendta/
tar xvfz /root/Downloads/opendta-v0.20-src.tar.gz
mv /root/Downloads/opendta-v0.20-src.tar.gz .


ls -lath
# ------------------- output begin -----------------------
total 4.3M
drwxr-xr-x  5 root root  4.0K Jan  7 21:12 .
-rw-r--r--  1 root root  2.2M Jan  7 21:08 opendta-v0.20-src.tar.gz
drwxrwxr-x 10 1001  1001 4.0K Jan 12  2022 opendta-v0.20-src
# ------------------- output end -----------------------


cd opendta-v0.20-src/

more INSTALL.txt
dnf install qt-devel

mv /installations/qwt/ /installations/qwt.old.2024-01-07

## DID NOT WORK ## mkdir /installations/qwt
## DID NOT WORK ## cd /installations/qwt/
## DID NOT WORK ## mv ~/Downloads/qwt-6.1.3.zip .
## DID NOT WORK ## unzip qwt-6.1.3.zip
## DID NOT WORK ##
## DID NOT WORK ## cd /installations/qwt/qwt-6.1.3
## DID NOT WORK ## qmake-qt4 qwt.pro
## DID NOT WORK ## make
## DID NOT WORK ## make install

dnf install qwt
make-qt4 dtagui.pro
# ------------------- output begin -----------------------
/installations/opendta/opendta-v0.20-src/dtagui.pro:2: Unknown test function: versionAtLeast
Project ERROR: Use at least Qt version 5.12.0
# ------------------- output end -----------------------

dnf install qt
# ------------------- output begin -----------------------
Package qt-1:4.8.7-65.fc35.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
# ------------------- output end -----------------------

# Download latest qwt,  "qwt-6.2.0.tar.bz2"
cd /installations
tar -xf /root/Downloads/qwt-6.2.0.tar.bz2
mv  /root/Downloads/qwt-6.2.0.tar.bz2  .
ls -lath
# ------------------- output begin -----------------------
total 4.7M
drwxr-xr-x   8 root  root  4.0K Jan  7 21:52 .
-rw-r--r--   1 root  root  4.6M Jan  7 21:50 qwt-6.2.0.tar.bz2
drwxr-xr-x. 26 root  root  4.0K Jan  7 21:13 ..
drwxr-xr-x   5 root  root  4.0K Jan  7 21:12 opendta
drwxr-xr-x   3 root  root  4.0K Nov  1  2018 qwt
# ------------------- output end -----------------------

cd qwt-6.2.0
more INSTALL
# see doc/html/qwtinstall.html


qmake-qt4 qwt.pro           # DID NOT WORK!
# went silently
make
# went smooth
make install

cd /installations/opendta/opendta-v0.20-src/
export QWT_ROOT=installations/qwt-6.2.0

qmake-qt4 dtagui.pro
# ------------------- output begin -----------------------
/installations/opendta/opendta-v0.20-src/dtagui.pro:2: Unknown test function: versionAtLeast
Project ERROR: Use at least Qt version 5.12.0
# ------------------- output end -----------------------

 qmake-qt4 --version
# ------------------- output begin -----------------------
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64
# ------------------- output end -----------------------

dnf install qt-devel
# ------------------- output begin -----------------------
Package qt-devel-1:4.8.7-65.fc35.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
# ------------------- output end -----------------------

dnf install qt5-qtbase-devel

qmake-qt5 --version
# ------------------- output begin -----------------------
QMake version 3.1
Using Qt version 5.15.2 in /usr/lib64
# ------------------- output end -----------------------

 pwd
/installations/opendta/opendta-v0.20-src

qmake-qt5 dtagui.pro
# ------------------- output begin -----------------------
Info: creating stash file /installations/opendta/opendta-v0.20-src/.qmake.stash
Project ERROR: Unknown module(s) in QT: svg
# ------------------- output end -----------------------

# Google: project ERROR: Unknown module(s) in QT: svg
# https://stackoverflow.com/questions/21098805/unknown-modules-in-qt-svg
dnf install libqt5svg5*
# ------------------- output begin -----------------------
No match for argument: libqt5svg5*
Error: Unable to find a match: libqt5svg5*
# ------------------- output end -----------------------

dnf install qt5-qtsvg-devel

# Okay, try again
qmake-qt5 dtagui.pro

# Now it went silently
make
# ------------------- output begin -----------------------
/usr/lib64/qt5/bin/lrelease translations/dtagui_en.ts -qm dtagui_en.qm
make: /usr/lib64/qt5/bin/lrelease: No such file or directory
make: *** [Makefile:498: dtagui_en.qm] Error 127
# ------------------- output end -----------------------

# https://bbs.archlinux.org/viewtopic.php?id=260164
# says:
# "adding qt5-svg and qt5-tools resolves all the errors with this package. "

dnf install qt5-qttools-devel

# Went good
# Do again:
qmake-qt5 dtagui.pro
make     # takes a long time...
# But ends in an error:
# ------------------- output begin -----------------------
so /usr/lib64/libQt5Core.so -lGL -lpthread
/usr/bin/ld: cannot open output file dtagui: Is a directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:289: dtagui] Error 1
# ------------------- output end -----------------------

# Okay, so there is already a directory named "dtagui"
# Try again:
qmake-qt5 /installations/opendta/opendta-v0.20-src/dtagui.pro
make
# ------------------- output begin -----------------------
/usr/bin/ld: cannot open output file dtagui: Is a directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:289: dtagui] Error 1
# ------------------- output end -----------------------

# Still the same error.
 mv dtagui dtagui.DIR
make
# ------------------- output begin -----------------------
WARNING: Failure to find: dtagui/dtacompstartsframe.h
WARNING: Failure to find: dtagui/downloaddta.h
WARNING: Failure to find: dtagui/mainwindow.ui
# ------------------- output end -----------------------

# Revert changes:
 mv dtagui.DIR  dtagui

# Move dtagui to another directory :
mv dtagui dtaguidirectory
cp -p dtagui.pro /tmp/     # backup
# Edit dtagui.pro - replacing paths only:  "dtagui" --> "dtaguidirectory"
vi dtagui.pro
qmake-qt5 /installations/opendta/opendta-v0.20-src/dtagui.pro
make

# Now it went smoothly

./dtagui        # should open the Dtagui now.


Alpha Innotec PWZSV Nordic Inverter - 9kw,  Purmo C22 -patterilämmitys, 250m kaivo, Vantaa
+ maaviileä 2 x Sabiana SK-32, Grundfos Alpha2 25-60 -pumppu