Cavewhere / cavewhere

3D Cave Mapping Software
https://cavewhere.com
GNU General Public License v3.0
34 stars 8 forks source link

linux run problem #191

Closed gemist closed 3 years ago

gemist commented 3 years ago

Following your instructions CaveWhere was successfully built inside this directory cavewhere/release/install-root.

During qbs run using command:

qbs run --products CaveWhere profile:qt5 config:release

I got the following error:

CurrentDirectory: "/qml/CavewhereMainWindow.qml" exists: false
ExecDirectory: "$HOME/git/cavewhere/release/install-root/../share/yourapplication//qml/CavewhereMainWindow.qml" exists: false
Couldn't find qml/CavewhereMainWindow.qml, installed wrong!?
QQmlApplicationEngine failed to load component
file:///qml/CavewhereMainWindow.qml: No such file or directory

Temporal solution: I created directory cavewhere/release/share/yourapplication manually and copied everything from cavewhere/release/install-root to newly created directory. CaveWhere is now able to start.

vpicaver commented 3 years ago

What version of QBS are you using? qbs --version

vpicaver commented 3 years ago

You should be able to cd into cavewhere/release/install-root and then ./CaveWhere

I need to look into this and try to reproduce the issue you're having. I usually build CaveWhere through QtCreator but the CI uses qbs directly on the command line.

gemist commented 3 years ago
$ qbs --version
1.17.0

cd into cavewhere/release/install-root

$./CaveWhere 
./CaveWhere: error while loading shared libraries: libcavewhere-lib.so: cannot open shared object file: No such file or directory

Not sure if it helps, but here I found directions for the path

src/cwGlobalDirectory.cpp:    return QApplication::applicationDirPath() + "/../share/yourapplication/";

I built it inside linux and completely from command line following instructions (README.md).

echarlie commented 3 years ago

As far as I can tell, qbs run basically prepends all directories in cavewhere/release/ to the LD_LIBRARY_PATH, but quick testing suggests it's a tad more subtle than that (perhaps comparable to LD_PRELOAD).

I simply use qbs build --products CaveWhere and qbs test --products CaveWhere, without config:release. Everything is installed under default, and works predictably without work-arounds. This could be problematic with multiple projects using qbs, however.

gemist commented 3 years ago

I built it again without config:release option. I am confirming, it works without work-arounds. Maybe you delete config:release option from README.md file.

vpicaver commented 3 years ago

Simple programming mistake it should work as intended now.

vpicaver commented 3 years ago

Also it's staged no the 191 branch, and will be merged once CI finishes building and running testcases.

vpicaver commented 3 years ago

This has been merged into the master.